@kubex/zinc 1.1.97 → 1.1.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.
Files changed (85) hide show
  1. package/AGENTS.md +5 -0
  2. package/CLAUDE.md +5 -0
  3. package/dist/chunks/zn.R2EAU6OS.js +1 -0
  4. package/dist/custom-elements.json +14747 -12528
  5. package/dist/vscode.html-custom-data.json +386 -61
  6. package/dist/web-types.json +1232 -481
  7. package/dist/zn.d.ts +529 -11
  8. package/dist/zn.min.js +649 -478
  9. package/docs/pages/components/background.md +143 -0
  10. package/docs/pages/components/button.md +11 -1
  11. package/docs/pages/components/chart.md +165 -3
  12. package/docs/pages/components/checkbox-group.md +13 -1
  13. package/docs/pages/components/checkbox.md +59 -1
  14. package/docs/pages/components/icon-picker.md +8 -0
  15. package/docs/pages/components/radio-group.md +12 -0
  16. package/docs/pages/components/radio.md +188 -0
  17. package/docs/pages/components/remarkd-editor.md +22 -0
  18. package/docs/pages/components/scroll-container.md +14 -15
  19. package/docs/pages/components/thumbnail-group.md +216 -0
  20. package/docs/pages/components/thumbnail.md +349 -0
  21. package/docs/pages/components/well.md +34 -0
  22. package/package.json +1 -1
  23. package/src/components/background/background.component.ts +111 -0
  24. package/src/components/background/background.scss +236 -0
  25. package/src/components/background/background.test.ts +120 -0
  26. package/src/components/background/index.ts +12 -0
  27. package/src/components/button/button.component.ts +8 -0
  28. package/src/components/chart/builders.test.ts +190 -1
  29. package/src/components/chart/builders.ts +246 -4
  30. package/src/components/chart/chart.component.ts +33 -1
  31. package/src/components/chart/chart.test.ts +66 -1
  32. package/src/components/chart/echarts-loader.ts +10 -0
  33. package/src/components/checkbox/checkbox.component.ts +62 -6
  34. package/src/components/checkbox/checkbox.scss +1 -0
  35. package/src/components/checkbox/checkbox.test.ts +56 -0
  36. package/src/components/checkbox-group/checkbox-group.component.ts +15 -0
  37. package/src/components/checkbox-group/checkbox-group.scss +23 -5
  38. package/src/components/checkbox-group/checkbox-group.test.ts +15 -0
  39. package/src/components/collapsible/collapsible.component.ts +49 -4
  40. package/src/components/collapsible/collapsible.scss +33 -14
  41. package/src/components/confirm/confirm.component.ts +3 -3
  42. package/src/components/confirm/confirm.test.ts +15 -0
  43. package/src/components/dialog/dialog.component.ts +3 -2
  44. package/src/components/editor/editor.component.ts +7 -6
  45. package/src/components/header/header.scss +2 -2
  46. package/src/components/icon-picker/icon-picker.component.ts +3 -0
  47. package/src/components/icon-picker/lucide-icons.ts +1756 -0
  48. package/src/components/navbar/navbar.scss +11 -0
  49. package/src/components/page/page.scss +1 -1
  50. package/src/components/radio/radio.component.ts +63 -7
  51. package/src/components/radio/radio.scss +1 -0
  52. package/src/components/radio/radio.test.ts +56 -0
  53. package/src/components/radio-group/radio-group.component.ts +16 -3
  54. package/src/components/radio-group/radio-group.scss +23 -4
  55. package/src/components/radio-group/radio-group.test.ts +15 -0
  56. package/src/components/remarkd-editor/remarkd-editor.component.ts +118 -5
  57. package/src/components/remarkd-editor/remarkd-editor.scss +8 -1
  58. package/src/components/remarkd-editor/remarkd-editor.test.ts +135 -0
  59. package/src/components/scroll-container/scroll-container.component.ts +15 -1
  60. package/src/components/scroll-container/scroll-container.scss +4 -2
  61. package/src/components/scroll-container/scroll-container.test.ts +13 -0
  62. package/src/components/slideout/slideout.component.ts +3 -2
  63. package/src/components/split-pane/split-pane.scss +21 -15
  64. package/src/components/thumbnail/index.ts +12 -0
  65. package/src/components/thumbnail/thumbnail.component.ts +460 -0
  66. package/src/components/thumbnail/thumbnail.scss +360 -0
  67. package/src/components/thumbnail/thumbnail.test.ts +379 -0
  68. package/src/components/thumbnail-group/index.ts +12 -0
  69. package/src/components/thumbnail-group/thumbnail-group.component.ts +268 -0
  70. package/src/components/thumbnail-group/thumbnail-group.scss +86 -0
  71. package/src/components/thumbnail-group/thumbnail-group.test.ts +151 -0
  72. package/src/components/tile/tile.scss +4 -2
  73. package/src/components/translation-group/translation-group.test.ts +22 -0
  74. package/src/components/translations/translations.component.ts +18 -3
  75. package/src/components/well/well.component.ts +22 -4
  76. package/src/components/well/well.scss +24 -0
  77. package/src/components/well/well.test.ts +43 -0
  78. package/src/form-control.scss +3 -1
  79. package/src/internal/conditional.ts +2 -2
  80. package/src/internal/form.ts +2 -1
  81. package/src/internal/selection-card.ts +19 -0
  82. package/src/selection-card.scss +187 -0
  83. package/src/utilities/query.test.ts +18 -1
  84. package/src/utilities/query.ts +8 -0
  85. package/src/zinc.ts +3 -0
@@ -0,0 +1,143 @@
1
+ ---
2
+ meta:
3
+ title: Background
4
+ description: Layer a colour, decorative image, image strength, motion and contrast overlay behind content.
5
+ layout: component
6
+ ---
7
+
8
+ `zn-background` builds a presentation background without making assumptions about the content laid over it. Give the element a height (or let its content establish one), then use the default slot for foreground content.
9
+
10
+ ```html:preview
11
+ <zn-background
12
+ image="https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?w=1400&q=80"
13
+ color="#18382f"
14
+ image-strength="full"
15
+ motion="drift"
16
+ overlay="strong"
17
+ overlay-tone="dark"
18
+ floating-icons="school,lightbulb,auto_awesome,psychology,rocket_launch,public"
19
+ style="min-height: 24rem; border-radius: var(--zn-border-radius-large); color: white;">
20
+ <zn-sp style="max-width: 38rem;" xl>
21
+ <h2>Build a calm, legible canvas</h2>
22
+ <p>The image, movement and contrast treatment stay behind any slotted Zinc or HTML content.</p>
23
+ </zn-sp>
24
+ </zn-background>
25
+ ```
26
+
27
+ ## Treatments
28
+
29
+ Use `image-strength="soft|medium|full"` to set the image opacity, `motion="none|drift|breathe"` to choose its movement, and `overlay="none|soft|strong"` to control the contrast gradient. `overlay-tone="light"` places a white gradient over the image; use `dark` when light foreground content needs a dark gradient.
30
+
31
+ Motion automatically stops for people who request reduced motion. Set `paused` when a background remains in the document but is not currently visible, such as an inactive slide.
32
+
33
+ ### Image strength
34
+
35
+ ```html:preview
36
+ <zn-cols layout="1,1,1">
37
+ <zn-background color="#dcefeb" image="https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=800&q=70" image-strength="soft" overlay="soft" style="min-height: 13rem;">
38
+ <zn-sp><strong>Soft image</strong></zn-sp>
39
+ </zn-background>
40
+ <zn-background color="#dcefeb" image="https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=800&q=70" image-strength="medium" overlay="soft" style="min-height: 13rem;">
41
+ <zn-sp><strong>Medium image</strong></zn-sp>
42
+ </zn-background>
43
+ <zn-background color="#10231d" image="https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=800&q=70" image-strength="full" overlay="strong" overlay-tone="dark" style="min-height: 13rem; color: white;">
44
+ <zn-sp><strong>Full image</strong></zn-sp>
45
+ </zn-background>
46
+ </zn-cols>
47
+ ```
48
+
49
+ ### Motion
50
+
51
+ `drift` slowly travels across the image, while `breathe` gently changes its scale. The oversized image canvas keeps the edges covered throughout both animations.
52
+
53
+ ```html:preview
54
+ <zn-cols layout="1,1,1">
55
+ <zn-background
56
+ color="#18382f"
57
+ image="https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=900&q=75"
58
+ motion="none"
59
+ overlay="strong"
60
+ overlay-tone="dark"
61
+ style="min-height: 14rem; color: white;">
62
+ <zn-sp><strong>No motion</strong></zn-sp>
63
+ </zn-background>
64
+ <zn-background
65
+ color="#18382f"
66
+ image="https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=900&q=75"
67
+ motion="drift"
68
+ overlay="strong"
69
+ overlay-tone="dark"
70
+ style="min-height: 14rem; color: white;">
71
+ <zn-sp><strong>Gentle drift</strong></zn-sp>
72
+ </zn-background>
73
+ <zn-background
74
+ color="#18382f"
75
+ image="https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=900&q=75"
76
+ motion="breathe"
77
+ overlay="strong"
78
+ overlay-tone="dark"
79
+ style="min-height: 14rem; color: white;">
80
+ <zn-sp><strong>Gentle breathe</strong></zn-sp>
81
+ </zn-background>
82
+ </zn-cols>
83
+ ```
84
+
85
+ ### Overlay strength
86
+
87
+ The overlay sits above the image and below the slotted content. Choose its strength based on how much contrast the foreground needs.
88
+
89
+ ```html:preview
90
+ <zn-cols layout="1,1,1">
91
+ <zn-background
92
+ color="#dcefeb"
93
+ image="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=900&q=75"
94
+ overlay="none"
95
+ style="min-height: 14rem;">
96
+ <zn-sp><strong>No overlay</strong></zn-sp>
97
+ </zn-background>
98
+ <zn-background
99
+ color="#dcefeb"
100
+ image="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=900&q=75"
101
+ overlay="soft"
102
+ overlay-tone="light"
103
+ style="min-height: 14rem;">
104
+ <zn-sp><strong>Soft light overlay</strong></zn-sp>
105
+ </zn-background>
106
+ <zn-background
107
+ color="#10231d"
108
+ image="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=900&q=75"
109
+ overlay="strong"
110
+ overlay-tone="dark"
111
+ style="min-height: 14rem; color: white;">
112
+ <zn-sp><strong>Strong dark overlay</strong></zn-sp>
113
+ </zn-background>
114
+ </zn-cols>
115
+ ```
116
+
117
+ ### Floating icons
118
+
119
+ Pass up to eight comma-separated Zinc icon names to `floating-icons`. The icons are decorative and non-interactive. Each uses a fixed ambient anchor with its own timing and fades between 1% and no more than 50% opacity.
120
+
121
+ Icon size follows the background width: 5% of the available space, capped at 150px. Floating motion stops when reduced motion is requested or when the background has `paused`.
122
+
123
+ ```html:preview
124
+ <zn-background
125
+ color="#151b34"
126
+ image="https://images.unsplash.com/photo-1446776811953-b23d57bd21aa?w=1400&q=80"
127
+ image-strength="medium"
128
+ overlay="strong"
129
+ overlay-tone="dark"
130
+ floating-icons="rocket_launch,public,star,science,satellite_alt,explore,orbit,auto_awesome"
131
+ style="min-height: 28rem; color: white; --zn-background-floating-icon-color: #d9e2ff;">
132
+ <zn-sp style="max-width: 34rem;" xl>
133
+ <h2>Explore the next horizon</h2>
134
+ <p>Floating icons remain a background treatment, so the foreground content keeps normal focus and pointer behaviour.</p>
135
+ </zn-sp>
136
+ </zn-background>
137
+ ```
138
+
139
+ ## CSS customisation
140
+
141
+ Use `--zn-background-image-position` to change the image focal point, `--zn-background-overlay-angle` to turn the overlay gradient, and `--zn-background-floating-icon-color` to recolour the ambient icons. `--zn-background-color` provides a reusable fallback when the `color` attribute is omitted.
142
+
143
+ The `base`, `image`, `overlay`, `floating-icons`, `floating-icon`, and `content` CSS parts are available for application-specific treatments that cannot be expressed with the attributes or custom properties.
@@ -117,6 +117,15 @@ 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
+ An icon-only button has no text for assistive technology to read, so give it a name
121
+ with the `label` attribute. A `tooltip` is used as the name when no `label` is set,
122
+ which covers most icon-only buttons without extra markup.
123
+
124
+ ```html:preview
125
+ <zn-button icon="settings" label="Settings"></zn-button>
126
+ <zn-button icon="delete" color="error" tooltip="Delete"></zn-button>
127
+ ```
128
+
120
129
  ### Icon Buttons
121
130
 
122
131
  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.
@@ -216,7 +225,8 @@ Use `muted-notifications` for a subtle notification style.
216
225
 
217
226
  ### Tooltip
218
227
 
219
- Use the `tooltip` attribute to add a tooltip to the button.
228
+ Use the `tooltip` attribute to add a tooltip to the button. On a button with no text,
229
+ the tooltip also becomes the accessible name — see [Icon-Only Buttons](#icon-only-buttons).
220
230
 
221
231
  ```html:preview
222
232
  <zn-button icon="info" tooltip="This button provides additional information"></zn-button>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  meta:
3
3
  title: Data Chart
4
- description: Charts visualize data using various chart types powered by Apache ECharts. Display line charts, bar charts, area charts, sankey diagrams, and more with full customization options.
4
+ description: Charts visualize data using line, bar, area, circular, statistical, hierarchical, and flow layouts powered by Apache ECharts.
5
5
  layout: component
6
6
  ---
7
7
 
@@ -281,6 +281,135 @@ Use `type="sankey"` to render a Sankey flow diagram. Each item in the series `da
281
281
  </zn-chart>
282
282
  ```
283
283
 
284
+ ### Pie Chart
285
+
286
+ Use `type="pie"` for part-to-whole data. The first series supplies the slice values and `categories` supplies their
287
+ names.
288
+
289
+ ```html:preview
290
+ <zn-chart
291
+ type="pie"
292
+ categories="[&quot;Configuration suggestion&quot;,&quot;Insecure configuration&quot;]"
293
+ data="[{&quot;name&quot;:&quot;Insights&quot;,&quot;data&quot;:[8,1]}]"
294
+ height="300">
295
+ </zn-chart>
296
+ ```
297
+
298
+ ### Donut Chart
299
+
300
+ Use `type="donut"` for a pie chart with a hollow centre. Adjust the ring with `inner-radius` and `outer-radius`; both
301
+ accept an ECharts pixel value or percentage. Add `show-labels` to render labels beside the slices.
302
+
303
+ ```html:preview
304
+ <zn-chart
305
+ type="donut"
306
+ inner-radius="45%"
307
+ outer-radius="75%"
308
+ colors="[&quot;#ffe29a&quot;,&quot;#f78ab3&quot;]"
309
+ categories="[&quot;Configuration suggestion&quot;,&quot;Insecure configuration&quot;]"
310
+ data="[{&quot;name&quot;:&quot;Insights&quot;,&quot;data&quot;:[8,1]}]"
311
+ height="300">
312
+ </zn-chart>
313
+ ```
314
+
315
+ ### Scatter Chart
316
+
317
+ Use `type="scatter"` with `[x, y]` coordinate pairs. `d-size` controls point size, and `xaxis="datetime"` can be used
318
+ for time-based scatter plots.
319
+
320
+ ```html:preview
321
+ <zn-chart
322
+ type="scatter"
323
+ d-size="14"
324
+ data="[{&quot;name&quot;:&quot;Latency&quot;,&quot;data&quot;:[[12,110],[24,180],[38,140],[52,260],[70,220]]}]"
325
+ height="300">
326
+ </zn-chart>
327
+ ```
328
+
329
+ ### Radar Chart
330
+
331
+ Use `type="radar"` with an `indicators` array describing each axis. Each normal series becomes one radar shape.
332
+
333
+ ```html:preview
334
+ <zn-chart
335
+ type="radar"
336
+ indicators="[{&quot;name&quot;:&quot;Security&quot;,&quot;max&quot;:100},{&quot;name&quot;:&quot;Performance&quot;,&quot;max&quot;:100},{&quot;name&quot;:&quot;Reliability&quot;,&quot;max&quot;:100},{&quot;name&quot;:&quot;Usability&quot;,&quot;max&quot;:100}]"
337
+ data="[{&quot;name&quot;:&quot;Current&quot;,&quot;data&quot;:[82,71,94,76]},{&quot;name&quot;:&quot;Target&quot;,&quot;data&quot;:[95,90,98,90]}]"
338
+ height="320">
339
+ </zn-chart>
340
+ ```
341
+
342
+ ### Gauge Chart
343
+
344
+ Use `type="gauge"` for a single current value. `min-value`, `max-value`, and `y-axis-append` configure its range and
345
+ displayed unit.
346
+
347
+ ```html:preview
348
+ <zn-chart
349
+ type="gauge"
350
+ min-value="0"
351
+ max-value="100"
352
+ y-axis-append="%"
353
+ data="[{&quot;name&quot;:&quot;Security score&quot;,&quot;data&quot;:[82]}]"
354
+ height="300">
355
+ </zn-chart>
356
+ ```
357
+
358
+ ### Funnel Chart
359
+
360
+ Use `type="funnel"` for ordered stages. Numeric values pair with `categories`, using the same compact format as pie
361
+ charts.
362
+
363
+ ```html:preview
364
+ <zn-chart
365
+ type="funnel"
366
+ categories="[&quot;Visitors&quot;,&quot;Trials&quot;,&quot;Customers&quot;]"
367
+ data="[{&quot;name&quot;:&quot;Conversion&quot;,&quot;data&quot;:[1000,320,85]}]"
368
+ height="320">
369
+ </zn-chart>
370
+ ```
371
+
372
+ ### Heatmap Chart
373
+
374
+ Use `type="heatmap"` with x-axis `categories`, `y-categories`, and `[xIndex, yIndex, value]` data points. The visual
375
+ range is derived from the values unless `min-value` or `max-value` is provided.
376
+
377
+ ```html:preview
378
+ <zn-chart
379
+ type="heatmap"
380
+ show-labels
381
+ categories="[&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;]"
382
+ y-categories="[&quot;API&quot;,&quot;Web&quot;,&quot;Worker&quot;]"
383
+ data="[{&quot;name&quot;:&quot;Requests&quot;,&quot;data&quot;:[[0,0,5],[1,0,12],[2,0,8],[3,0,16],[4,0,11],[0,1,9],[1,1,15],[2,1,12],[3,1,20],[4,1,14],[0,2,3],[1,2,7],[2,2,5],[3,2,10],[4,2,8]]}]"
384
+ height="320">
385
+ </zn-chart>
386
+ ```
387
+
388
+ ### Treemap Chart
389
+
390
+ Use `type="treemap"` with hierarchical `children` data to compare nested values by area.
391
+
392
+ ```html:preview
393
+ <zn-chart
394
+ type="treemap"
395
+ data="[{&quot;name&quot;:&quot;Insights&quot;,&quot;data&quot;:[{&quot;name&quot;:&quot;Security&quot;,&quot;children&quot;:[{&quot;name&quot;:&quot;Configuration&quot;,&quot;value&quot;:8},{&quot;name&quot;:&quot;Insecure&quot;,&quot;value&quot;:1}]},{&quot;name&quot;:&quot;Performance&quot;,&quot;value&quot;:4}]}]"
396
+ height="320">
397
+ </zn-chart>
398
+ ```
399
+
400
+ ### Sunburst Chart
401
+
402
+ Use `type="sunburst"` for radial hierarchical data. `inner-radius` and `outer-radius` adjust the occupied area.
403
+
404
+ ```html:preview
405
+ <zn-chart
406
+ type="sunburst"
407
+ outer-radius="90%"
408
+ data="[{&quot;name&quot;:&quot;Insights&quot;,&quot;data&quot;:[{&quot;name&quot;:&quot;Security&quot;,&quot;children&quot;:[{&quot;name&quot;:&quot;Configuration&quot;,&quot;value&quot;:8},{&quot;name&quot;:&quot;Insecure&quot;,&quot;value&quot;:1}]},{&quot;name&quot;:&quot;Performance&quot;,&quot;children&quot;:[{&quot;name&quot;:&quot;Latency&quot;,&quot;value&quot;:4}]}]}]"
409
+ height="340">
410
+ </zn-chart>
411
+ ```
412
+
284
413
  ### Cross-Chart Tooltip Sync
285
414
 
286
415
  Use `sync-group="<id>"` on two or more charts to synchronise hover tooltips, zoom, and legend selection across them.
@@ -439,6 +568,32 @@ When `type="sankey"`, each item in the series `data` array is an edge:
439
568
 
440
569
  Nodes are auto-derived from unique source/target values. To customise node appearance or ordering, include an explicit `nodes` key on the series object.
441
570
 
571
+ ### Pie and Donut Data
572
+
573
+ Pie and donut charts use the first series. The standard numeric format pairs each value with the category at the same
574
+ index. You can alternatively pass ECharts-style named slices when each slice needs its own metadata or colour:
575
+
576
+ ```json
577
+ [{
578
+ "name": "Insights",
579
+ "data": [
580
+ {"name": "Configuration suggestion", "value": 8, "color": "#ffe29a"},
581
+ {"name": "Insecure configuration", "value": 1, "color": "#f78ab3"}
582
+ ]
583
+ }]
584
+ ```
585
+
586
+ ### Specialized Data Formats
587
+
588
+ - Scatter points use `[x, y]` or `{ "x": value, "y": value }`.
589
+ - Radar charts accept an `indicators` array of `{ "name": string, "min"?: number, "max"?: number }`; each series
590
+ contains one value per indicator.
591
+ - Gauge charts use the first value in the first series.
592
+ - Funnel charts accept the same numeric/category or named-value formats as pie charts.
593
+ - Heatmaps use `[xIndex, yIndex, value]` points with `categories` and `y-categories`.
594
+ - Treemaps and sunbursts accept hierarchical nodes containing `name`, optional `value`, and optional recursive
595
+ `children`.
596
+
442
597
  ### HTML Encoding
443
598
 
444
599
  When using the data attribute in HTML, JSON must be properly encoded. Use `&quot;` for quotes:
@@ -483,6 +638,15 @@ chart.enableAnimations = true;
483
638
  - **Line Charts**: Best for showing trends over time or continuous data
484
639
  - **Bar Charts**: Ideal for comparing discrete categories or values
485
640
  - **Area Charts**: Good for showing cumulative totals or part-to-whole relationships over time
641
+ - **Pie Charts**: Useful for compact part-to-whole comparisons with a small number of slices
642
+ - **Donut Charts**: Useful when a pie chart needs a lighter visual weight or centred annotation space
643
+ - **Scatter Charts**: Show relationships, distributions, and clusters between two numeric dimensions
644
+ - **Radar Charts**: Compare a small number of entities across a shared set of metrics
645
+ - **Gauge Charts**: Display one value against a meaningful bounded range
646
+ - **Funnel Charts**: Show progressive reduction through ordered stages
647
+ - **Heatmaps**: Reveal density and patterns across two categorical dimensions
648
+ - **Treemaps**: Compare hierarchical values by area
649
+ - **Sunburst Charts**: Explore hierarchical proportions across radial levels
486
650
  - **Stacked Charts**: Use when showing how categories contribute to a total
487
651
 
488
652
  ### Performance Considerations
@@ -505,5 +669,3 @@ chart.enableAnimations = true;
505
669
  - Round values appropriately for readability
506
670
  - Use `y-axis-append` to add units or symbols to values
507
671
  - Format dates consistently when using time series data
508
-
509
-
@@ -106,6 +106,18 @@ This option can be combined with the `horizontal` attribute.
106
106
  :::tip
107
107
  When [checkboxes](/components/checkbox) are wrapped with the Checkbox Group , adding the `contained` attribute to the
108
108
  parent Checkbox Group or to _any_ checkbox in the group will create `contained` checkboxes for the entire group.
109
+
110
+ Contained checkboxes can also render as [multi-select cards](/components/checkbox#multi-select-cards) with an image,
111
+ title, description, and positioned indicator. The checkbox group continues to manage validation and submits every
112
+ selected value under the group's name.
113
+
114
+ Contained checkboxes are rounded by default; add `square` to the group to square off every checkbox in it. With
115
+ `horizontal`, cards in a row are given equal height, and `--zn-checkbox-group-column-width` (default `152px`) sets the
116
+ minimum column width used by the grid.
117
+
118
+ Add `wrap` to lay the checkboxes out as a wrapping row instead of an equal-width grid: each card starts from
119
+ `--zn-checkbox-group-column-width` and grows to fill its line, and setting that property to `auto` sizes every card from
120
+ its own content.
109
121
  :::
110
122
 
111
123
  ### Disabling Options
@@ -193,4 +205,4 @@ make the browser display the error message you provide. To clear the error, call
193
205
  });
194
206
  });
195
207
  </script>
196
- ```
208
+ ```
@@ -188,6 +188,64 @@ Add the `contained` attribute to draw a card-like container around a checkbox. T
188
188
  When checkboxes are wrapped with [Checkbox Group](/components/checkbox-group), adding the `contained` attribute to the parent Checkbox Group or to _any_ checkbox in the group will create `contained` checkboxes for the entire group.
189
189
  :::
190
190
 
191
+ ### Multi-select Cards
192
+
193
+ Contained checkboxes support the same card content and placement options as [contained radios](/components/radio#selection-cards),
194
+ while preserving checkbox semantics. Use them inside `zn-checkbox-group` when people may select more than one card.
195
+
196
+ Set the title with `card-title` (or use the default slot), supporting text with `description`, and an image with `src`
197
+ and `image-alt` or the `image` slot. `image-position` accepts `top`, `right`, `bottom`, and `left`. Cards are rounded
198
+ by default; add `square` to the group to square off every card.
199
+
200
+ ```html:preview
201
+ <zn-checkbox-group
202
+ label="Choose benefits"
203
+ help-text="Select all that apply"
204
+ name="benefits"
205
+ contained
206
+ horizontal>
207
+ <zn-checkbox
208
+ value="health"
209
+ card-title="Health insurance"
210
+ description="Medical and dental cover."
211
+ image-position="top"
212
+ control-position="top-right">
213
+ <zn-icon slot="image" src="health_and_safety" size="64"></zn-icon>
214
+ </zn-checkbox>
215
+ <zn-checkbox
216
+ value="pension"
217
+ card-title="Pension"
218
+ description="Employer contribution matching."
219
+ image-position="top"
220
+ control-position="top-right">
221
+ <zn-icon slot="image" src="savings" size="64"></zn-icon>
222
+ </zn-checkbox>
223
+ </zn-checkbox-group>
224
+ ```
225
+
226
+ Image and control placement is identical for radio and checkbox cards. See the
227
+ [image and indicator position examples](/components/radio#image-and-indicator-positions) for a visual matrix of the
228
+ four image directions, indicator corners, centered edge positions, and a hidden indicator.
229
+
230
+ `control-position` accepts `top-left`, `top-center`, `top-right`, `center-left`, `center`, `center-right`,
231
+ `bottom-left`, `bottom-center`, and `bottom-right`. The default `start` position retains the standard inline checkbox;
232
+ use `none` to hide the indicator so the card itself shows the selected state, while keeping checkbox semantics and the
233
+ full-card click target — see [hiding the input](/components/radio#hiding-the-radio-input) for what that looks like.
234
+
235
+ ```html:preview
236
+ <zn-checkbox-group label="Choose add-ons" name="addons" contained horizontal wrap>
237
+ <zn-checkbox value="support" card-title="Priority support" description="One hour response time" control-position="none"></zn-checkbox>
238
+ <zn-checkbox value="backups" card-title="Daily backups" description="Retained for 30 days" control-position="none"></zn-checkbox>
239
+ <zn-checkbox value="audit" card-title="Audit log" description="Exportable as CSV" control-position="none"></zn-checkbox>
240
+ </zn-checkbox-group>
241
+ ```
242
+
243
+ Card dimensions can be adjusted with `--zn-selection-card-image-width`, `--zn-selection-card-image-height`,
244
+ `--zn-selection-card-min-height`, `--zn-selection-card-content-min-width`, and `--zn-selection-card-title-font-size`.
245
+ Use `--zn-selection-card-padding` for the inset around the card, `--zn-selection-card-gap` for the space between its
246
+ regions, `--zn-selection-card-control-offset` for indicator placement, `--zn-selection-card-border-radius` for the
247
+ corner radius, and `--zn-checkbox-group-column-width` on the group to control how many cards sit in a row.
248
+
191
249
  ### Borderless
192
250
 
193
251
  Use the `borderless` attribute to remove borders from the checkbox.
@@ -483,4 +541,4 @@ Checkboxes provide several methods for programmatic control:
483
541
  alert('Checkbox is ' + (isValid ? 'valid' : 'invalid'));
484
542
  });
485
543
  </script>
486
- ```
544
+ ```
@@ -71,6 +71,14 @@ Use the `line` library for Lineicons.
71
71
  <zn-icon-picker name="line" label="Line Icon" icon="heart" library="line"></zn-icon-picker>
72
72
  ```
73
73
 
74
+ ### Lucide Icons
75
+
76
+ Use the `lucide` library for [Lucide](https://lucide.dev/icons) icons, rendered as inline SVGs. Icon names use kebab-case.
77
+
78
+ ```html:preview
79
+ <zn-icon-picker name="lucide" label="Lucide Icon" icon="rocket" library="lucide"></zn-icon-picker>
80
+ ```
81
+
74
82
  ### Gravatar
75
83
 
76
84
  Use the `gravatar` library to display a Gravatar from an email address.
@@ -161,6 +161,18 @@ This option can be combined with the `horizontal` attribute.
161
161
  :::tip
162
162
  When [radios](/components/radio) are wrapped with the Radio Group, adding the `contained` attribute to the
163
163
  parent Radio Group or to _any_ radio in the group will create `contained` radios for the entire group.
164
+
165
+ Contained radios can also render as richer [selection cards](/components/radio#selection-cards) with an image, title,
166
+ description, and positioned indicator. The radio group continues to manage their single selection, validation,
167
+ keyboard navigation, and submitted form value.
168
+
169
+ Contained radios are rounded by default; add `square` to the group to square off every radio in it. With
170
+ `horizontal`, cards in a row are given equal height, and `--zn-radio-group-column-width` (default `152px`) sets the
171
+ minimum column width used by the grid.
172
+
173
+ Add `wrap` to lay the radios out as a wrapping row instead of an equal-width grid: each card starts from
174
+ `--zn-radio-group-column-width` and grows to fill its line, and setting that property to `auto` sizes every card from
175
+ its own content.
164
176
  :::
165
177
 
166
178
  ### Disabling Options