@kubex/zinc 1.0.118 → 1.1.0

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 (98) hide show
  1. package/dist/custom-elements.json +634 -201
  2. package/dist/vscode.html-custom-data.json +115 -39
  3. package/dist/web-types.json +220 -64
  4. package/dist/zn.d.ts +149 -25
  5. package/dist/zn.min.css +1 -1
  6. package/dist/zn.min.js +911 -874
  7. package/docs/assets/styles/docs.css +1 -1
  8. package/docs/pages/components/button.md +25 -7
  9. package/docs/pages/components/chat-message.md +62 -0
  10. package/docs/pages/components/data-table-search.md +6 -6
  11. package/docs/pages/components/editor.md +1 -1
  12. package/docs/pages/components/file.md +1 -1
  13. package/docs/pages/components/form-group.md +1 -1
  14. package/docs/pages/components/icon.md +19 -2
  15. package/docs/pages/components/menu.md +23 -2
  16. package/docs/pages/components/select.md +2 -2
  17. package/docs/pages/components/tile-group.md +92 -0
  18. package/docs/pages/components/tile.md +80 -25
  19. package/package.json +1 -1
  20. package/scss/_root.scss +1 -1
  21. package/scss/mixins/_spacing-mixins.scss +20 -0
  22. package/scss/mixins/_typography-mixins.scss +22 -0
  23. package/scss/mixins/index.scss +2 -1
  24. package/scss/shared/_base.scss +18 -20
  25. package/scss/shared/_button.scss +5 -3
  26. package/scss/shared/_table.scss +4 -1
  27. package/scss/shared/layout.scss +2 -2
  28. package/scss/themes/_index.scss +2 -0
  29. package/scss/themes/_light.scss +22 -45
  30. package/scss/themes/_spacing.scss +44 -0
  31. package/scss/themes/_typography.scss +62 -0
  32. package/src/components/animated-button/README.md +1 -1
  33. package/src/components/button/button.component.ts +27 -5
  34. package/src/components/button/button.scss +86 -30
  35. package/src/components/button-menu/button-menu.component.ts +22 -9
  36. package/src/components/button-menu/button-menu.scss +1 -2
  37. package/src/components/button-menu/button-menu.test.ts +18 -0
  38. package/src/components/chat-message/chat-message.component.ts +73 -0
  39. package/src/components/chat-message/chat-message.scss +60 -0
  40. package/src/components/chat-message/index.ts +12 -0
  41. package/src/components/checkbox/checkbox.scss +2 -2
  42. package/src/components/chip/chip.component.ts +0 -5
  43. package/src/components/chip/chip.scss +14 -34
  44. package/src/components/content-block/content-block.component.ts +46 -45
  45. package/src/components/content-block/content-block.scss +58 -27
  46. package/src/components/data-table/data-table.scss +10 -7
  47. package/src/components/data-table-sort/data-table-sort.scss +1 -1
  48. package/src/components/dialog/dialog.component.ts +3 -3
  49. package/src/components/dialog/dialog.scss +2 -2
  50. package/src/components/dropdown/dropdown.component.ts +1 -0
  51. package/src/components/editor/editor.component.ts +3 -1
  52. package/src/components/editor/editor.scss +9 -2
  53. package/src/components/editor/modules/ai/panel/ai-panel.scss +2 -2
  54. package/src/components/editor/modules/ai/tooltip/ai-tooltip.scss +1 -1
  55. package/src/components/editor/modules/context-menu/context-menu.ts +20 -20
  56. package/src/components/editor/modules/dialog/dialog.component.ts +3 -4
  57. package/src/components/editor/modules/dialog/dialog.scss +2 -1
  58. package/src/components/editor/modules/dialog/dialog.ts +12 -8
  59. package/src/components/editor/modules/toolbar/tool/tool.component.ts +1 -5
  60. package/src/components/editor/modules/toolbar/toolbar.component.ts +54 -50
  61. package/src/components/editor/modules/toolbar/toolbar.scss +4 -29
  62. package/src/components/editor/modules/toolbar/toolbar.ts +15 -17
  63. package/src/components/expanding-action/expanding-action.component.ts +14 -7
  64. package/src/components/expanding-action/expanding-action.scss +44 -2
  65. package/src/components/file/file.scss +2 -2
  66. package/src/components/header/header.component.ts +1 -1
  67. package/src/components/header/header.scss +3 -3
  68. package/src/components/hover-container/hover-container.scss +1 -1
  69. package/src/components/icon/icon.component.ts +6 -1
  70. package/src/components/icon/icon.scss +31 -0
  71. package/src/components/icon-picker/icon-picker.scss +3 -3
  72. package/src/components/input/input.scss +3 -3
  73. package/src/components/input-group/input-group.scss +16 -16
  74. package/src/components/markdown-editor/markdown-editor.scss +2 -2
  75. package/src/components/menu/menu.component.ts +32 -1
  76. package/src/components/menu/menu.scss +28 -5
  77. package/src/components/menu-item/menu-item.component.ts +6 -2
  78. package/src/components/menu-item/menu-item.scss +49 -5
  79. package/src/components/navbar/navbar.component.ts +7 -4
  80. package/src/components/navbar/navbar.scss +93 -21
  81. package/src/components/page/page.component.ts +1 -1
  82. package/src/components/page/page.scss +7 -26
  83. package/src/components/panel/panel.scss +5 -8
  84. package/src/components/priority-list/priority-list.scss +1 -1
  85. package/src/components/rating/rating.scss +1 -1
  86. package/src/components/scroll-container/scroll-container.scss +2 -1
  87. package/src/components/select/select.scss +1 -1
  88. package/src/components/settings-container/settings-container.scss +2 -2
  89. package/src/components/stat/stat.scss +8 -5
  90. package/src/components/tile/tile.component.ts +10 -2
  91. package/src/components/tile/tile.scss +108 -67
  92. package/src/components/tile-group/index.ts +12 -0
  93. package/src/components/tile-group/tile-group.component.ts +66 -0
  94. package/src/components/tile-group/tile-group.scss +23 -0
  95. package/src/form-control.scss +2 -1
  96. package/src/wc.scss +1 -0
  97. package/src/zinc.ts +2 -0
  98. package/src/components/editor/modules/toolbar/tool/tool.scss +0 -5
@@ -169,7 +169,7 @@ img {
169
169
  }
170
170
 
171
171
  .badges img {
172
- border-radius: var(--zn-border-radius-medium);
172
+ border-radius: var(--zn-border-radius);
173
173
  }
174
174
 
175
175
  .callout img,
@@ -117,17 +117,35 @@ Buttons can be used with just an icon and no text by omitting the button label.
117
117
  <zn-button icon="add" color="info"></zn-button>
118
118
  ```
119
119
 
120
- ### Icon Button Style
120
+ ### Icon Buttons
121
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.
122
+ Use `icon-button` to render a chromed icon button: a 40x36 white button with a border, a 6px radius, and a centred 20px icon. Pass `small` for the 36x36 variant or `round` for a 36x36 circle on the tab tint. The icon button style takes precedence over color variants like `secondary` the `color` attribute only tints the icon.
123
123
 
124
124
  ```html:preview
125
- <zn-button icon-button icon="settings"></zn-button>
125
+ <zn-button icon-button icon="inventory_2"></zn-button>
126
+ <zn-button icon-button="small" icon="inventory_2"></zn-button>
127
+ <zn-button icon-button="round" icon="search"></zn-button>
126
128
  <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>
129
+ <zn-button icon-button icon="check" color="success"></zn-button>
130
+ ```
131
+
132
+ ### Plain Icon Buttons
133
+
134
+ Add `plain` to remove the white background and border while keeping the button's size, for quiet inline actions. Hovering tints the background with the tab colour; add `no-hover` to suppress that too, for placements where the tint doesn't fit (e.g. on an already-tinted surface).
135
+
136
+ ```html:preview
137
+ <zn-button icon-button plain icon="settings"></zn-button>
138
+ <zn-button icon-button="small" plain icon="close" color="error" tooltip="Remove"></zn-button>
139
+ <zn-button icon-button plain no-hover icon="close" color="error" tooltip="Remove Note"></zn-button>
140
+ ```
141
+
142
+ ### Icon Library
143
+
144
+ Use `icon-library` to load the button's icon from a different icon library, passed through to the nested `zn-icon`.
145
+
146
+ ```html:preview
147
+ <zn-button icon-button icon="flag" icon-library="lucide"></zn-button>
148
+ <zn-button icon="rocket" icon-library="lucide">Launch</zn-button>
131
149
  ```
132
150
 
133
151
  ### Icon Position
@@ -0,0 +1,62 @@
1
+ ---
2
+ meta:
3
+ title: Chat Message
4
+ description: A single message in a chat-style conversation, with an avatar, sender, time, optional badge, and a message bubble.
5
+ layout: component
6
+ ---
7
+
8
+ ```html:preview
9
+ <zn-chat-message sender="Agent Name" time="1718193420">
10
+ <zn-chip slot="badge" type="info">Internal Note</zn-chip>
11
+ The customer disconnected before I could answer his questions.
12
+ <zn-button slot="edit-dialog-trigger" icon="close" icon-button plain no-hover
13
+ color="error" tooltip="Remove Note"></zn-button>
14
+ </zn-chat-message>
15
+ ```
16
+
17
+ ## Examples
18
+
19
+ ### Basic Message
20
+
21
+ The avatar initials and colour are derived from `sender`. `time` is a unix timestamp, displayed as a localised HH:MM.
22
+
23
+ ```html:preview
24
+ <zn-chat-message sender="Alan Jones" time="1718193420">
25
+ Thanks for getting in touch — I'll take a look at your account now.
26
+ </zn-chat-message>
27
+ ```
28
+
29
+ ### Badge
30
+
31
+ Use the `badge` slot to annotate the message in the header, for example marking it as an internal note.
32
+
33
+ ```html:preview
34
+ <zn-chat-message sender="Agent Name" time="1718193420">
35
+ <zn-chip slot="badge" type="info">Internal Note</zn-chip>
36
+ Customer has been refunded — keep an eye out for a follow-up email.
37
+ </zn-chat-message>
38
+ ```
39
+
40
+ ### Actions
41
+
42
+ Use the `edit-dialog-trigger` slot to add an action to the end of the bubble, such as a remove button.
43
+
44
+ ```html:preview
45
+ <zn-chat-message sender="Agent Name" time="1718193420">
46
+ <zn-chip slot="badge" type="info">Internal Note</zn-chip>
47
+ Interaction abandoned — the customer disconnected before I could answer.
48
+ <zn-button slot="edit-dialog-trigger" icon="close" icon-button plain no-hover
49
+ color="error" tooltip="Remove Note"></zn-button>
50
+ </zn-chat-message>
51
+ ```
52
+
53
+ ### Custom Bubble Colour
54
+
55
+ The bubble background can be themed with the `--message-background` custom property.
56
+
57
+ ```html:preview
58
+ <zn-chat-message sender="Agent Name" time="1718193420"
59
+ style="--message-background: rgba(var(--zn-color-info), 0.08)">
60
+ This one uses an info-tinted bubble instead of the default cream.
61
+ </zn-chat-message>
62
+ ```
@@ -101,7 +101,7 @@ The component emits a `zn-search-change` event when the search value changes (af
101
101
  ```html:preview
102
102
  <zn-data-table-search class="search-demo" placeholder="Type to search..."></zn-data-table-search>
103
103
 
104
- <div class="search-results" style="margin-top: 1rem; padding: 1rem; background: var(--zn-color-neutral-50); border-radius: var(--zn-border-radius-medium);">
104
+ <div class="search-results" style="margin-top: 1rem; padding: 1rem; background: var(--zn-color-neutral-50); border-radius: var(--zn-border-radius);">
105
105
  <strong>Search Results:</strong>
106
106
  <div class="results-content">No search performed yet</div>
107
107
  </div>
@@ -143,7 +143,7 @@ The component supports slotting additional form controls that will be included i
143
143
  </zn-select>
144
144
  </zn-data-table-search>
145
145
 
146
- <div class="filter-results" style="margin-top: 1rem; padding: 1rem; background: var(--zn-color-neutral-50); border-radius: var(--zn-border-radius-medium);">
146
+ <div class="filter-results" style="margin-top: 1rem; padding: 1rem; background: var(--zn-color-neutral-50); border-radius: var(--zn-border-radius);">
147
147
  <strong>Search Parameters:</strong>
148
148
  <pre class="filter-content" style="margin-top: 0.5rem; font-size: 0.875rem;">No search performed yet</pre>
149
149
  </div>
@@ -194,7 +194,7 @@ The following input types are supported in the default slot and will have their
194
194
  <input type="hidden" name="includeArchived" value="false" />
195
195
  </zn-data-table-search>
196
196
 
197
- <div class="advanced-results" style="margin-top: 1rem; padding: 1rem; background: var(--zn-color-neutral-50); border-radius: var(--zn-border-radius-medium);">
197
+ <div class="advanced-results" style="margin-top: 1rem; padding: 1rem; background: var(--zn-color-neutral-50); border-radius: var(--zn-border-radius);">
198
198
  <strong>All Search Parameters:</strong>
199
199
  <pre class="advanced-content" style="margin-top: 0.5rem; font-size: 0.875rem;">No search performed yet</pre>
200
200
  </div>
@@ -259,7 +259,7 @@ The `zn-data-table-search` component is designed to work seamlessly with the `zn
259
259
  placeholder="Search users by name or email...">
260
260
  </zn-data-table-search>
261
261
 
262
- <div class="search-status" style="margin: 1rem 0; padding: 0.75rem; background: var(--zn-color-primary-50); border-radius: var(--zn-border-radius-medium); font-size: 0.875rem;">
262
+ <div class="search-status" style="margin: 1rem 0; padding: 0.75rem; background: var(--zn-color-primary-50); border-radius: var(--zn-border-radius); font-size: 0.875rem;">
263
263
  Ready to search
264
264
  </div>
265
265
 
@@ -310,7 +310,7 @@ The component implements the `ZincFormControl` interface and can be used within
310
310
  </zn-button>
311
311
  </form>
312
312
 
313
- <div class="form-output" style="margin-top: 1rem; padding: 1rem; background: var(--zn-color-neutral-50); border-radius: var(--zn-border-radius-medium);">
313
+ <div class="form-output" style="margin-top: 1rem; padding: 1rem; background: var(--zn-color-neutral-50); border-radius: var(--zn-border-radius);">
314
314
  <strong>Form Data:</strong>
315
315
  <pre class="form-content" style="margin-top: 0.5rem; font-size: 0.875rem;">No form submission yet</pre>
316
316
  </div>
@@ -355,7 +355,7 @@ Use the `getFormData()` method to retrieve all form data from the search compone
355
355
  Get Form Data
356
356
  </zn-button>
357
357
 
358
- <div class="data-output" style="margin-top: 1rem; padding: 1rem; background: var(--zn-color-neutral-50); border-radius: var(--zn-border-radius-medium);">
358
+ <div class="data-output" style="margin-top: 1rem; padding: 1rem; background: var(--zn-color-neutral-50); border-radius: var(--zn-border-radius);">
359
359
  <strong>Form Data Object:</strong>
360
360
  <pre class="data-content" style="margin-top: 0.5rem; font-size: 0.875rem;">Click the button to retrieve form data</pre>
361
361
  </div>
@@ -288,7 +288,7 @@ Add custom tools to the editor toolbar using the `zn-editor-tool` component in t
288
288
  style="height: 300px">
289
289
  <zn-editor-tool
290
290
  slot="tools"
291
- icon="lightbulb"
291
+ icon="lightbulb@lu"
292
292
  label="Insert Tip"
293
293
  handler="dialog"
294
294
  uri="/custom/tip"
@@ -263,7 +263,7 @@ Use the `trigger` slot to provide completely custom content for the file control
263
263
 
264
264
  ```html:preview
265
265
  <zn-file name="custom-upload" multiple>
266
- <div slot="trigger" style="padding: 2rem; border: 2px dashed var(--zn-color-neutral-300); border-radius: var(--zn-border-radius-medium); text-align: center; cursor: pointer;">
266
+ <div slot="trigger" style="padding: 2rem; border: 2px dashed var(--zn-color-neutral-300); border-radius: var(--zn-border-radius); text-align: center; cursor: pointer;">
267
267
  <zn-icon src="cloud_upload" style="font-size: 3rem; color: var(--zn-color-primary-600);"></zn-icon>
268
268
  <p style="margin: 0.5rem 0 0; font-weight: var(--zn-font-weight-semibold);">Click to upload or drag and drop</p>
269
269
  <p style="margin: 0.25rem 0 0; font-size: var(--zn-font-size-small); color: var(--zn-color-neutral-600);">SVG, PNG, JPG or GIF (max. 800x400px)</p>
@@ -363,7 +363,7 @@ Form groups expose several CSS parts that can be styled to customize their appea
363
363
  .custom-form-group::part(form-control) {
364
364
  padding: var(--zn-spacing-large);
365
365
  border: 2px solid var(--zn-color-primary-300);
366
- border-radius: var(--zn-border-radius-medium);
366
+ border-radius: var(--zn-border-radius);
367
367
  background-color: var(--zn-color-primary-50);
368
368
  }
369
369
 
@@ -66,6 +66,20 @@ Additional color options are available for specific use cases:
66
66
  <zn-icon src="palette" color="white" size="32" style="background: #333; padding: 4px;"></zn-icon>
67
67
  ```
68
68
 
69
+ ### Fill
70
+
71
+ Lucide icons render as outlines by default. Use the `fill` attribute to fill the shape. On its own, `fill` uses the icon's current colour; pass a preset or custom colour to fill with that colour instead. The `fill` attribute only affects the Lucide library.
72
+
73
+ ```html:preview
74
+ <zn-icon src="star@lucide" size="32"></zn-icon>
75
+ <zn-icon src="star@lucide" size="32" fill></zn-icon>
76
+ <zn-icon src="star@lucide" size="32" fill="warning"></zn-icon>
77
+ <zn-icon src="heart@lucide" size="32" color="error" fill></zn-icon>
78
+ <zn-icon src="heart@lucide" size="32" fill="blue"></zn-icon>
79
+ <zn-icon src="badge-check@lucide" size="32" fill="success"></zn-icon>
80
+ <zn-icon src="circle@lucide" size="32" fill="#ff9900"></zn-icon>
81
+ ```
82
+
69
83
  ### Round Icons
70
84
 
71
85
  Add the `round` attribute to give icons a circular background.
@@ -197,6 +211,8 @@ Lucide icons are rendered as inline SVGs. Use `library="lucide"` or the `@lucide
197
211
  <zn-icon src="circle-alert@lu" size="32" color="warning"></zn-icon>
198
212
  ```
199
213
 
214
+ You can fill Lucide outlines with the `fill` attribute — see [Fill](#fill).
215
+
200
216
  ### Brand Icons
201
217
 
202
218
  Display brand logos and custom company icons using the brands library.
@@ -430,6 +446,7 @@ The icon component exposes CSS custom properties for advanced styling:
430
446
 
431
447
  - `--icon-size`: Controls the icon dimensions (default: 24px)
432
448
  - `--icon-color`: Controls the icon color (default: inherit)
449
+ - `--icon-fill`: Controls the fill color of Lucide icons when the `fill` attribute is present (default: `currentColor`)
433
450
 
434
451
  ```html:preview
435
452
  <zn-icon src="settings" style="--icon-size: 48px; --icon-color: #ff5722;"></zn-icon>
@@ -648,7 +665,7 @@ your HTML like this:
648
665
  <style>
649
666
  .icon-search {
650
667
  border: solid 1px var(--zn-panel-border-color);
651
- border-radius: var(--zn-border-radius-medium);
668
+ border-radius: var(--zn-border-radius);
652
669
  padding: var(--zn-spacing-medium);
653
670
  }
654
671
 
@@ -693,7 +710,7 @@ your HTML like this:
693
710
  display: inline-flex;
694
711
  align-items: center;
695
712
  justify-content: center;
696
- border-radius: var(--zn-border-radius-medium);
713
+ border-radius: var(--zn-border-radius);
697
714
  font-size: 24px;
698
715
  width: 2em;
699
716
  height: 2em;
@@ -28,7 +28,7 @@ Menus are typically used in combination with dropdowns to display a list of acti
28
28
 
29
29
  ### Basic Menu
30
30
 
31
- A basic menu with simple text items.
31
+ A basic menu with simple text items. Menus render as a white panel with a soft shadow; items use the muted menu-link text style and highlight with a subtle grey background on hover, with no separators between them.
32
32
 
33
33
  ```html:preview
34
34
  <zn-menu>
@@ -79,6 +79,27 @@ Use the `prefix` slot to add icons to menu items.
79
79
  </zn-menu>
80
80
  ```
81
81
 
82
+ ### Shell Variant
83
+
84
+ Use `variant="shell"` for the app-shell header dropdown look: a padded, translucent panel with floating rounded items that highlight with the primary colour on hover. The variant is automatically propagated to the menu's items.
85
+
86
+ ```html:preview
87
+ <zn-menu variant="shell">
88
+ <zn-menu-item>
89
+ <zn-icon slot="prefix" src="admin_panel_settings" size="24"></zn-icon>
90
+ Admin
91
+ </zn-menu-item>
92
+ <zn-menu-item>
93
+ <zn-icon slot="prefix" src="alt_route" size="24"></zn-icon>
94
+ Selectors
95
+ </zn-menu-item>
96
+ <zn-menu-item>
97
+ <zn-icon slot="prefix" src="settings" size="24"></zn-icon>
98
+ Settings
99
+ </zn-menu-item>
100
+ </zn-menu>
101
+ ```
102
+
82
103
  ### Menu Items with Value
83
104
 
84
105
  Use the `value` attribute to associate a value with each menu item. This is useful for identifying which item was selected.
@@ -292,7 +313,7 @@ Menus support full keyboard navigation:
292
313
 
293
314
  ### Dividers
294
315
 
295
- You can add visual separators between menu items using HTML elements with `role="separator"`.
316
+ Menu items have no built-in separators to group items visually, add HTML elements with `role="separator"`.
296
317
 
297
318
  ```html:preview
298
319
  <zn-menu>
@@ -228,7 +228,7 @@ If the server returns fewer results than `max-results`, further refinements of t
228
228
  help-text="Try typing 'a' then narrowing to 'al' — the second query filters locally."
229
229
  ></zn-select>
230
230
 
231
- <div id="remote-search-log" style="margin-top: 1rem; padding: 0.75rem 1rem; background: var(--zn-color-neutral-100); border-radius: var(--zn-border-radius-medium); font-family: var(--zn-font-mono); font-size: var(--zn-font-size-small); max-height: 8rem; overflow-y: auto;">
231
+ <div id="remote-search-log" style="margin-top: 1rem; padding: 0.75rem 1rem; background: var(--zn-color-neutral-100); border-radius: var(--zn-border-radius); font-family: var(--zn-font-mono); font-size: var(--zn-font-size-small); max-height: 8rem; overflow-y: auto;">
232
232
  <strong>Request log:</strong>
233
233
  </div>
234
234
  </div>
@@ -421,7 +421,7 @@ Use `search-only` with `search` and `data-uri` to defer all fetching until the u
421
421
  placeholder="Start typing a city name..."
422
422
  ></zn-select>
423
423
 
424
- <div id="search-only-log" style="margin-top: 1rem; padding: 0.75rem 1rem; background: var(--zn-color-neutral-100); border-radius: var(--zn-border-radius-medium); font-family: var(--zn-font-mono); font-size: var(--zn-font-size-small); max-height: 8rem; overflow-y: auto;">
424
+ <div id="search-only-log" style="margin-top: 1rem; padding: 0.75rem 1rem; background: var(--zn-color-neutral-100); border-radius: var(--zn-border-radius); font-family: var(--zn-font-mono); font-size: var(--zn-font-size-small); max-height: 8rem; overflow-y: auto;">
425
425
  <strong>Request log:</strong>
426
426
  </div>
427
427
  </div>
@@ -0,0 +1,92 @@
1
+ ---
2
+ meta:
3
+ title: Tile Group
4
+ description: Aligns a list of tiles into shared, content-driven columns so values and actions line up across every row.
5
+ layout: component
6
+ ---
7
+
8
+ A plain list of `zn-tile` rows lays each row out independently, so columns drift out of alignment whenever content widths differ (for example a wider "Manual Renewal" chip shifts that row). `zn-tile-group` wraps the rows in a shared grid: every tile becomes a row of the same columns, so captions, values and actions line up down the list.
9
+
10
+ ```html:preview
11
+ <zn-tile-group divide>
12
+ <zn-tile caption="Test" plain>
13
+ <span slot="properties">Default</span>
14
+ <span slot="properties">£9.99/mo</span>
15
+ <zn-chip slot="actions" type="info">Auto Renewal</zn-chip>
16
+ <zn-chip slot="actions" type="success">Active</zn-chip>
17
+ </zn-tile>
18
+
19
+ <zn-tile caption="Test" plain>
20
+ <span slot="properties">Default</span>
21
+ <span slot="properties">£9.99/mo</span>
22
+ <zn-chip slot="actions" type="warning">Manual Renewal</zn-chip>
23
+ <zn-chip slot="actions" type="success">Active</zn-chip>
24
+ </zn-tile>
25
+
26
+ <zn-tile caption="Test" plain>
27
+ <span slot="properties">Default</span>
28
+ <span slot="properties">£9.99/mo</span>
29
+ <zn-chip slot="actions" type="info">Auto Renewal</zn-chip>
30
+ <zn-chip slot="actions" type="success">Active</zn-chip>
31
+ </zn-tile>
32
+ </zn-tile-group>
33
+ ```
34
+
35
+ ## Examples
36
+
37
+ ### Dividers
38
+
39
+ Add the `divide` attribute to draw a border between rows.
40
+
41
+ ```html:preview
42
+ <zn-tile-group divide>
43
+ <zn-tile caption="Leslie Alexander" plain>
44
+ <span slot="properties">Co-Founder / CEO</span>
45
+ <zn-chip slot="actions" type="success">Active</zn-chip>
46
+ </zn-tile>
47
+
48
+ <zn-tile caption="Michael Foster" plain>
49
+ <span slot="properties">Engineering Lead</span>
50
+ <zn-chip slot="actions" type="success">Active</zn-chip>
51
+ </zn-tile>
52
+
53
+ <zn-tile caption="Emma Davis" plain>
54
+ <span slot="properties">Product Manager</span>
55
+ <zn-chip slot="actions">Away</zn-chip>
56
+ </zn-tile>
57
+ </zn-tile-group>
58
+ ```
59
+
60
+ ### Without Dividers
61
+
62
+ Omit `divide` for a borderless list.
63
+
64
+ ```html:preview
65
+ <zn-tile-group>
66
+ <zn-tile caption="Wireless Headphones" plain>
67
+ <span slot="properties">In Stock</span>
68
+ <span slot="properties">$299</span>
69
+ </zn-tile>
70
+
71
+ <zn-tile caption="Smart Watch" plain>
72
+ <span slot="properties">Low Stock</span>
73
+ <span slot="properties">$399</span>
74
+ </zn-tile>
75
+ </zn-tile-group>
76
+ ```
77
+
78
+ ## How It Works
79
+
80
+ The group is a CSS grid: a flexible caption column on the left, then one shared, content-sized column for each value/action. Each tile is rendered as a [subgrid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Subgrid) row spanning those columns, so a column is only as wide as its widest cell across the whole list and every row aligns to it. Value/action columns are right-aligned, so chips of differing widths (Auto vs Manual Renewal) still share a clean right edge.
81
+
82
+ The number of shared columns is detected automatically from the row with the most `properties` + `actions`, and published as the `--zn-tile-cols` custom property.
83
+
84
+ ## Usage Notes
85
+
86
+ - Use a consistent set of `properties`/`actions` across rows for the cleanest alignment; rows with fewer cells leave trailing columns empty.
87
+ - Captions render in the bold tile weight by default; add `plain` to the tiles for the regular table-content weight (as in the examples above).
88
+ - Dividers are drawn between rows and are inset by the group's horizontal padding.
89
+
90
+ ## CSS Custom Properties
91
+
92
+ - `--zn-tile-cols` - The number of shared value/action columns. Set automatically; you normally don't need to touch it.
@@ -5,24 +5,82 @@ meta:
5
5
  layout: component
6
6
  ---
7
7
 
8
- Tiles are versatile components designed for building lists of structured content. They provide a consistent, responsive layout for displaying items with associated metadata, images, properties, and actions. Tiles can be clickable links or static containers, making them ideal for user lists, product catalogs, file browsers, and more.
8
+ Tiles are compact, single-line rows (48px tall) that inherit table content typography, making them ideal for building structured lists: a leading value, optional inline values, and an optional chip or action on the right. The same flexible component covers everything from a plain phone number to a multi-value transaction row.
9
9
 
10
10
  ```html:preview
11
11
  <zn-sp divide no-gap>
12
- <zn-tile caption="Leslie Alexander" description="leslie.alexander@example.com" href="https://google.com">
13
- <zn-icon slot="image" size="40" src="https://i.pravatar.cc/60?img=70" round></zn-icon>
14
- <zn-tile-property slot="properties" caption="Co-Founder / CEO">Last seen 2h ago</zn-tile-property>
12
+ <zn-tile caption="Total VPN">
13
+ <span slot="properties">Professional</span>
14
+ <span slot="properties">$9.95/mo</span>
15
+ <zn-chip slot="actions" type="success">Active</zn-chip>
15
16
  </zn-tile>
16
17
 
17
- <zn-tile caption="Michael Foster" description="michael.foster@example.com" href="https://google.com">
18
- <zn-icon slot="image" size="40" src="https://i.pravatar.cc/60?img=51" round></zn-icon>
19
- <zn-tile-property slot="properties" caption="Engineering Lead">Active now</zn-tile-property>
20
- <div slot="actions"><zn-button>Contact</zn-button></div>
18
+ <zn-tile caption="Galaxy 16 Plus Pro">
19
+ <span slot="properties">Android</span>
20
+ <zn-chip slot="actions" type="success">In Use</zn-chip>
21
21
  </zn-tile>
22
22
 
23
- <zn-tile caption="Emma Davis" description="emma.davis@example.com">
24
- <zn-icon slot="image" size="40" src="https://i.pravatar.cc/60?img=47" round></zn-icon>
25
- <zn-tile-property slot="properties" caption="Product Manager">Last seen 1d ago</zn-tile-property>
23
+ <zn-tile caption="customer.name@example.com"></zn-tile>
24
+ </zn-sp>
25
+ ```
26
+
27
+ ## Tile Row Variants
28
+
29
+ A single tile adapts to a wide range of content. The leading `caption` is bold by default; add the `plain` attribute for the normal table-content weight. Values placed in the `properties` slot align to the right, and a chip or button in the `actions` slot pins to the far right.
30
+
31
+ ```html:preview
32
+ <zn-sp divide no-gap>
33
+ <zn-tile caption="This is a Tile Row Value" plain>
34
+ <span slot="properties">Row value</span>
35
+ <span slot="properties">Row value</span>
36
+ <span slot="properties">Row value</span>
37
+ <zn-chip slot="actions">Chip</zn-chip>
38
+ </zn-tile>
39
+
40
+ <zn-tile caption="Total VPN" plain>
41
+ <span slot="properties">Professional</span>
42
+ <span slot="properties">$9.95/mo</span>
43
+ <zn-chip slot="actions" type="success">Active</zn-chip>
44
+ </zn-tile>
45
+
46
+ <zn-tile caption="+1 (541) 555-0198" plain></zn-tile>
47
+
48
+ <zn-tile caption="customer.name@example.com" plain></zn-tile>
49
+
50
+ <zn-tile caption="742 Evergreen Terrace, Apt 4B, Building C, Springfield, Oregon, 94777-1246" plain></zn-tile>
51
+
52
+ <zn-tile caption="14th August 2025" plain>
53
+ <span slot="properties">$9.95/mo</span>
54
+ <span slot="properties">Capture Auth [paypal-connector]</span>
55
+ <span slot="properties">Completed</span>
56
+ <zn-chip slot="actions" type="success">Capture Auth</zn-chip>
57
+ </zn-tile>
58
+
59
+ <zn-tile caption="Brand">
60
+ <span slot="properties">BrightCloud</span>
61
+ </zn-tile>
62
+
63
+ <zn-tile caption="Galaxy 16 Plus Pro" plain>
64
+ <span slot="properties">Android</span>
65
+ <zn-chip slot="actions" type="success">In Use</zn-chip>
66
+ </zn-tile>
67
+
68
+ <zn-tile caption="14th August 2026" description="Event Name"></zn-tile>
69
+ </zn-sp>
70
+ ```
71
+
72
+ ### Emphasised Caption
73
+
74
+ The leading caption renders bold by default to lead the row. Add `plain` when the first value should match the regular table-content weight (most data rows).
75
+
76
+ ```html:preview
77
+ <zn-sp divide no-gap>
78
+ <zn-tile caption="Brand">
79
+ <span slot="properties">BrightCloud</span>
80
+ </zn-tile>
81
+
82
+ <zn-tile caption="Region" plain>
83
+ <span slot="properties">BrightCloud</span>
26
84
  </zn-tile>
27
85
  </zn-sp>
28
86
  ```
@@ -339,10 +397,10 @@ Tiles are responsive and adapt to different screen sizes. On smaller screens (be
339
397
  ### Layout Structure
340
398
 
341
399
  When using structured content (caption, description, properties, or actions), the tile automatically:
342
- - Applies padding (`var(--zn-spacing-large)`)
343
- - Creates a horizontal layout with left and right sections
344
- - The left section contains the image and content (max-width: 400px on desktop, 320px on tablet)
345
- - The right section contains properties and actions (50% width, grows to fill space)
400
+ - Renders as a single-line row with a minimum height of `48px`, vertically centred
401
+ - Inherits the table content typography (`--zn-text-table-content-*`)
402
+ - Applies horizontal padding (`var(--zn-base-gap)`)
403
+ - Creates a horizontal layout: the leading image, caption and description sit on the left; properties and actions align to the right
346
404
 
347
405
  ### Hover Effects
348
406
 
@@ -361,9 +419,8 @@ The tile uses different rendering logic based on slot usage:
361
419
  ### Content Overflow
362
420
 
363
421
  Text content in tiles uses ellipsis overflow handling:
364
- - Captions and descriptions are truncated with ellipsis if too long
365
- - Properties have a max-width of 150px and use ellipsis overflow
366
- - The properties container has horizontal scrolling on overflow
422
+ - Captions and descriptions are kept on a single line and truncated with ellipsis if too long
423
+ - The properties container hides its overflow to keep the row on a single line
367
424
 
368
425
  ## Tile Property Component
369
426
 
@@ -400,11 +457,9 @@ The following CSS parts are available for styling:
400
457
 
401
458
  Tiles use the following CSS custom properties from the Zinc design system:
402
459
 
403
- - `--zn-spacing-large` - Padding around tile content
404
- - `--zn-spacing-medium` - Gap between image and content
405
- - `--zn-spacing-small` - Gap between action buttons
406
- - `--zn-spacing-2x-small` - Margin above description text
460
+ - `--zn-text-table-content-*` - Row typography (font-size, line-height, weight, color)
461
+ - `--zn-base-gap` - Horizontal padding around tile content
462
+ - `--zn-spacing-large` - Gap between properties and between left/right sections
463
+ - `--zn-spacing-small` - Gap between action buttons and image/content
407
464
  - `--zn-color-neutral-100` - Hover background color
408
- - `--zn-text-heading` - Caption text color
409
- - `--zn-text-color` - Description text color
410
- - `--zn-font-size-medium` - Description font size
465
+ - `--zn-text-heading` - Bold caption text color
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubex/zinc",
3
- "version": "1.0.118",
3
+ "version": "1.1.0",
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",
package/scss/_root.scss CHANGED
@@ -127,7 +127,7 @@
127
127
  [t="light"], .theme-light {
128
128
  // Theme Light
129
129
  --zn-panel-opacity: 1;
130
- --zn-shadow: 236, 233, 241;
130
+ --zn-shadow: 236, 235, 249;
131
131
 
132
132
  --zn-panel-secondary: 246 246 246;
133
133
  --zn-panel-highlight: 248, 249, 252;
@@ -33,6 +33,26 @@
33
33
  }
34
34
  }
35
35
 
36
+ @mixin gutter {
37
+ @container (width > 1024px) {
38
+ :host {
39
+ --zn-gutter: 16px;
40
+ }
41
+ }
42
+
43
+ @container (width > 1400px) {
44
+ :host {
45
+ --zn-gutter: 24px;
46
+ }
47
+ }
48
+
49
+ @container (width > 1500px) {
50
+ :host {
51
+ --zn-gutter: 32px;
52
+ }
53
+ }
54
+ }
55
+
36
56
  @mixin gap {
37
57
  gap: var(--zn-gap, 0);
38
58
  }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Apply a text style role defined in scss/themes/_typography.scss.
3
+ *
4
+ * Usage:
5
+ * @include text-style(h2);
6
+ * @include text-style(button-label);
7
+ *
8
+ * Pass $spacing: true to also emit the role's paragraph spacing
9
+ * as margin-block-end.
10
+ */
11
+ @mixin text-style($role, $spacing: false) {
12
+ font-family: var(--zn-font-sans);
13
+ font-size: var(--zn-text-#{$role}-font-size);
14
+ font-weight: var(--zn-text-#{$role}-font-weight);
15
+ line-height: var(--zn-text-#{$role}-line-height);
16
+ color: var(--zn-text-#{$role}-color);
17
+ text-transform: var(--zn-text-#{$role}-transform);
18
+
19
+ @if $spacing {
20
+ margin-block-end: var(--zn-text-#{$role}-spacing);
21
+ }
22
+ }
@@ -1,5 +1,6 @@
1
1
  @forward "spacing-mixins";
2
2
  @forward "helper-mixins";
3
+ @forward "typography-mixins";
3
4
 
4
5
 
5
6
  @mixin cosmic-border() {
@@ -15,7 +16,7 @@
15
16
  width: calc(100% + 4px);
16
17
  filter: blur(var(--zn-blur, 1px));
17
18
  opacity: 0.9;
18
- border-radius: var(--zn-border-radius-large);
19
+ border-radius: var(--zn-border-radius);
19
20
 
20
21
  background-image: conic-gradient(
21
22
  from var(--rotate) at 50% 50%,