@f-ewald/components 1.15.0 → 1.17.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 (42) hide show
  1. package/README.md +1 -0
  2. package/custom-elements.json +720 -70
  3. package/dist/icons.d.ts +1 -0
  4. package/dist/icons.d.ts.map +1 -1
  5. package/dist/icons.js +1 -0
  6. package/dist/icons.js.map +1 -1
  7. package/dist/index.d.ts +3 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +3 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/mapbox-map.d.ts +59 -0
  12. package/dist/mapbox-map.d.ts.map +1 -0
  13. package/dist/mapbox-map.js +144 -0
  14. package/dist/mapbox-map.js.map +1 -0
  15. package/dist/photo-gallery.d.ts +4 -0
  16. package/dist/photo-gallery.d.ts.map +1 -1
  17. package/dist/photo-gallery.js +14 -1
  18. package/dist/photo-gallery.js.map +1 -1
  19. package/dist/range-slider.d.ts +48 -0
  20. package/dist/range-slider.d.ts.map +1 -0
  21. package/dist/range-slider.js +240 -0
  22. package/dist/range-slider.js.map +1 -0
  23. package/dist/toast-notification.d.ts +27 -9
  24. package/dist/toast-notification.d.ts.map +1 -1
  25. package/dist/toast-notification.js +68 -17
  26. package/dist/toast-notification.js.map +1 -1
  27. package/dist/tree-view.d.ts +9 -0
  28. package/dist/tree-view.d.ts.map +1 -1
  29. package/dist/tree-view.js +66 -4
  30. package/dist/tree-view.js.map +1 -1
  31. package/dist/ui-checkbox.d.ts +11 -3
  32. package/dist/ui-checkbox.d.ts.map +1 -1
  33. package/dist/ui-checkbox.js +31 -2
  34. package/dist/ui-checkbox.js.map +1 -1
  35. package/docs/mapbox-map.md +62 -0
  36. package/docs/photo-gallery.md +5 -0
  37. package/docs/range-slider.md +59 -0
  38. package/docs/toast-notification.md +15 -6
  39. package/docs/tree-view.md +7 -1
  40. package/docs/ui-checkbox.md +9 -1
  41. package/llms.txt +97 -13
  42. package/package.json +3 -1
@@ -0,0 +1,62 @@
1
+ # `<mapbox-map>`
2
+
3
+ A thin, generic wrapper around a `mapboxgl.Map` — construction, access
4
+ token, style loading/switching, and container resizing only. It carries no
5
+ domain logic: no layer registry, no click-handler system, no markers or
6
+ popups. A consumer registers its own sources/layers/handlers against the
7
+ `mapboxgl.Map` instance handed back on `map-ready`, the same instance
8
+ `mapbox-map` continues to own (this component never calls `map.remove()`
9
+ except on disconnect, so a consumer's own registrations survive style
10
+ reloads exactly as they would using `mapboxgl.Map` directly).
11
+
12
+ Deliberately does not construct the map until `styleUrl` is a non-empty
13
+ string — if a consumer knows the desired style only after an async
14
+ lookup (e.g. a saved user preference), delay setting `styleUrl` rather
15
+ than setting a default and swapping it later, which would visibly flash
16
+ the wrong basemap before the real one loads.
17
+
18
+ ## Install
19
+
20
+ ```js
21
+ import "@f-ewald/components/mapbox-map.js";
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ ```html
27
+ <mapbox-map
28
+ access-token="pk.your-token"
29
+ style-url="mapbox://styles/mapbox/light-v11"
30
+ ></mapbox-map>
31
+ <script type="module">
32
+ document.querySelector("mapbox-map").addEventListener("map-ready", (e) => {
33
+ const map = e.detail.map; // the underlying mapboxgl.Map
34
+ map.addSource("mine", { type: "geojson", data: "/mine.geojson" });
35
+ map.addLayer({ id: "mine", type: "circle", source: "mine", paint: { "circle-color": "#4f46e5" } });
36
+ });
37
+ </script>
38
+ ```
39
+
40
+ ## Attributes / properties
41
+
42
+ | Property | Attribute | Type | Default | Description |
43
+ | --- | --- | --- | --- | --- |
44
+ | `accessToken` | `access-token` | `string` | `""` | Mapbox access token. Required before the map can be constructed. |
45
+ | `styleUrl` | `style-url` | `string` | `""` | Style URL (e.g. `mapbox://styles/mapbox/light-v11`). The map is not constructed until this is a non-empty string — see the class doc. |
46
+ | `center` | _(JS property only)_ | `[number, number]` | `[0, 0]` | Initial center as `[lng, lat]`. Only read at construction time. |
47
+ | `zoom` | `zoom` | `number` | `0` | Initial zoom level. Only read at construction time. |
48
+
49
+ ## Events
50
+
51
+ | Event | Description |
52
+ | --- | --- |
53
+ | `map-style-reloaded` | A subsequent `styleUrl` change finished loading its new style (sources/layers registered by a consumer via the `map-ready` instance do not survive a style change and must be re-registered — same behavior as calling `map.setStyle()` directly); detail: `{ map: mapboxgl.Map }`. |
54
+ | `map-ready` | The map (and, if `styleUrl` changed before the initial load finished, its final requested style) has finished loading; detail: `{ map: mapboxgl.Map }`. |
55
+
56
+ ## Slots
57
+
58
+ _None._
59
+
60
+ ## CSS custom properties
61
+
62
+ _None._
@@ -3,6 +3,10 @@
3
3
  Responsive, accessible image carousel composed from declarative
4
4
  `gallery-item` children.
5
5
 
6
+ The image viewport keeps a fixed `aspect-ratio`, and the caption row is
7
+ reserved for every slide whenever any slide has a caption, so the carousel's
8
+ total height stays constant as it cycles — it never shifts the page below it.
9
+
6
10
  ## Install
7
11
 
8
12
  ```js
@@ -67,6 +71,7 @@ import "@f-ewald/components/photo-gallery.js";
67
71
  | `--ui-font` |
68
72
  | `--ui-font-size` |
69
73
  | `--ui-font-size-sm` |
74
+ | `--ui-line-height-normal` |
70
75
  | `--ui-line-height-tight` |
71
76
  | `--ui-on-accent` |
72
77
  | `--ui-overlay` |
@@ -0,0 +1,59 @@
1
+ # `<range-slider>`
2
+
3
+ A form-associated numeric range slider, usable standalone or inside a
4
+ native `<form>`. Wraps a native `<input type="range">` (kept for its free
5
+ keyboard, drag, and screen-reader support) restyled to match this
6
+ package's track/fill visual language (`stat-meter`, `percent-bar-chart`)
7
+ instead of the browser-default appearance. Purely a value control — no
8
+ built-in label; wrap in `form-field` for a labeled field, or render a
9
+ value readout next to it (see the playground example), matching
10
+ `autocomplete-input`/`form-select`.
11
+
12
+ ## Install
13
+
14
+ ```js
15
+ import "@f-ewald/components/range-slider.js";
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```html
21
+ <range-slider min="100" max="5000" step="50" value="1000"></range-slider>
22
+ <script type="module">
23
+ document.querySelector("range-slider").addEventListener("input", (e) => {
24
+ console.log(e.detail.value);
25
+ });
26
+ </script>
27
+ ```
28
+
29
+ ## Attributes / properties
30
+
31
+ | Property | Attribute | Type | Default | Description |
32
+ | --- | --- | --- | --- | --- |
33
+ | `min` | `min` | `number` | `0` | Minimum value. |
34
+ | `max` | `max` | `number` | `100` | Maximum value. |
35
+ | `step` | `step` | `number` | `1` | Step increment. |
36
+ | `value` | `value` | `number` | `0` | Current value. |
37
+ | `disabled` | `disabled` | `boolean` | `false` | Disables interaction; merged with an ancestor `<fieldset disabled>`. |
38
+ | `name` | `name` | `string` | `""` | Form field name. |
39
+
40
+ ## Events
41
+
42
+ | Event | Description |
43
+ | --- | --- |
44
+ | `input` | Fires continuously while dragging/typing; detail: `{ value }`. |
45
+ | `change` | Fires once the value is committed (drag released, arrow key released); detail: `{ value }`. |
46
+
47
+ ## Slots
48
+
49
+ _None._
50
+
51
+ ## CSS custom properties
52
+
53
+ | Custom property |
54
+ | --- |
55
+ | `--ui-focus-ring` |
56
+ | `--ui-primary` |
57
+ | `--ui-surface` |
58
+ | `--ui-surface-muted` |
59
+ | `--ui-text-muted` |
@@ -1,13 +1,18 @@
1
1
  # `<toast-notification>`
2
2
 
3
3
  Fixed-position stack of dismissible notifications, anchored top-right
4
- (top-full-width on mobile). Not wired to any app state yet — callers add
5
- toasts imperatively via the `show()` method on a live element reference,
4
+ (top-full-width on mobile). Every toast shares one fixed width so entries
5
+ never appear narrower or wider than one another. Not wired to any app state
6
+ yet — callers add toasts imperatively via the `show()` method on a live
7
+ element reference,
6
8
  e.g. `document.querySelector('toast-notification')?.show('Offline', { variant: 'error' })`,
7
9
  or via the `notifySuccess`/`notifyError`/`notifyInfo` module-level helpers
8
- exported from this file. Each toast auto-dismisses after `duration` ms and
9
- can also be dismissed via its button. Appears/disappears instantly — no
10
- slide/fade transitions.
10
+ exported from this file. The first argument is the required bold headline; an
11
+ optional `description` renders a smaller, non-bold second line. Each variant
12
+ leads with a matching status icon (success → check, error → exclamation
13
+ circle, info → information circle, warning → exclamation triangle). Each toast
14
+ auto-dismisses after `duration` ms and can also be dismissed via its ✕
15
+ button. Appears/disappears instantly — no slide/fade transitions.
11
16
 
12
17
  ## Install
13
18
 
@@ -21,7 +26,7 @@ import "@f-ewald/components/toast-notification.js";
21
26
  <toast-notification></toast-notification>
22
27
  <script type="module">
23
28
  import { notifySuccess } from "@f-ewald/components/toast-notification.js";
24
- notifySuccess("Saved!");
29
+ notifySuccess("Saved!", "Your changes are now live.");
25
30
  </script>
26
31
  ```
27
32
 
@@ -45,6 +50,9 @@ _None._
45
50
  | `--ui-focus-ring` |
46
51
  | `--ui-font` |
47
52
  | `--ui-font-size` |
53
+ | `--ui-font-size-sm` |
54
+ | `--ui-font-weight-regular` |
55
+ | `--ui-font-weight-semibold` |
48
56
  | `--ui-hover-overlay` |
49
57
  | `--ui-info` |
50
58
  | `--ui-line-height-glyph` |
@@ -55,3 +63,4 @@ _None._
55
63
  | `--ui-shadow-lg` |
56
64
  | `--ui-success` |
57
65
  | `--ui-text` |
66
+ | `--ui-warning` |
package/docs/tree-view.md CHANGED
@@ -13,6 +13,10 @@ every folder expanded instead. Expansion state is otherwise managed
13
13
  internally and untouched by later `nodes` updates, so a user's manual
14
14
  toggles survive a data refresh.
15
15
 
16
+ Set the `lines` boolean to draw classic file-tree connector guides: a
17
+ vertical line per continuing ancestor level and a branch elbow (`└`) or
18
+ tee (`├`) linking each node to its parent. Off by default (indentation only).
19
+
16
20
  ## Install
17
21
 
18
22
  ```js
@@ -22,7 +26,7 @@ import "@f-ewald/components/tree-view.js";
22
26
  ## Usage
23
27
 
24
28
  ```html
25
- <tree-view></tree-view>
29
+ <tree-view lines></tree-view>
26
30
  <script type="module">
27
31
  const tree = document.querySelector("tree-view");
28
32
  tree.nodes = [
@@ -45,6 +49,7 @@ import "@f-ewald/components/tree-view.js";
45
49
  | `nodes` | _(JS property only)_ | `TreeNode[]` | `[]` | Tree data; opaque to this component beyond what `renderNode` does with it. |
46
50
  | `renderNode` | _(JS property only)_ | `(node: TreeNode) => unknown` | `—` | Produces a row's rendered content for `node`. Default: plain label text. |
47
51
  | `defaultExpanded` | `default-expanded` | `boolean` | `false` | Start every folder expanded instead of the default all-collapsed. |
52
+ | `lines` | `lines` | `boolean` | `false` | Draw classic file-tree connector guides (vertical ancestor lines plus a branch elbow/tee per row) instead of indentation alone. Off by default. |
48
53
 
49
54
  ## Events
50
55
 
@@ -60,6 +65,7 @@ _None._
60
65
 
61
66
  | Custom property |
62
67
  | --- |
68
+ | `--ui-border` |
63
69
  | `--ui-focus-ring` |
64
70
  | `--ui-font` |
65
71
  | `--ui-font-size-sm` |
@@ -8,7 +8,11 @@ A form-associated boolean checkbox, usable standalone or inside a native
8
8
  Renders a native `<input type="checkbox">` wrapped in a `<label>`, styled
9
9
  via `:has()` on the wrapping label (matching `radio-pills`/`radio-cards`)
10
10
  rather than styling the native input directly; the checkbox itself renders
11
- at `1rem`, matching the existing radio-input convention.
11
+ at `1rem`, matching the existing radio-input convention. An optional
12
+ pre-rendered `icon` (matching `form-select`'s per-option icon convention)
13
+ renders between the box and the label, inside the same clickable `<label>`
14
+ — for a row that pairs a checkbox with an icon/swatch and needs the whole
15
+ row, icon included, to stay one click target.
12
16
 
13
17
  ## Install
14
18
 
@@ -21,6 +25,8 @@ import "@f-ewald/components/ui-checkbox.js";
21
25
  ```html
22
26
  <ui-checkbox label="Subscribe to updates"></ui-checkbox>
23
27
  <ui-checkbox name="terms" label="I agree to the terms" required></ui-checkbox>
28
+ <!-- .icon is set programmatically (a pre-rendered TemplateResult), not an attribute -->
29
+ <ui-checkbox label="Show list view"></ui-checkbox>
24
30
  ```
25
31
 
26
32
  ## Attributes / properties
@@ -33,6 +39,8 @@ import "@f-ewald/components/ui-checkbox.js";
33
39
  | `required` | `required` | `boolean` | `false` | Marks the control invalid via `ElementInternals` while unchecked. |
34
40
  | `name` | `name` | `string` | `""` | Form field name; submitted as `name=on` only while checked. |
35
41
  | `label` | `label` | `string` | `""` | Visible label text rendered next to the box. |
42
+ | `icon` | _(JS property only)_ | `TemplateResult | null` | `null` | Pre-rendered icon template displayed between the box and the label, e.g. `iconPencil(14)` from this package's icon set. |
43
+ | `iconSize` | `iconSize` | `number` | `14` | Square icon size in pixels — 14 (inline icon size) by default. |
36
44
 
37
45
  ## Events
38
46
 
package/llms.txt CHANGED
@@ -1082,6 +1082,44 @@ Example:
1082
1082
  <map-pin color="#22c55e" size="26" highlighted>🏠</map-pin>
1083
1083
  ```
1084
1084
 
1085
+ ## <mapbox-map>
1086
+
1087
+ A thin, generic wrapper around a `mapboxgl.Map` — construction, access
1088
+ token, style loading/switching, and container resizing only. It carries no
1089
+ domain logic: no layer registry, no click-handler system, no markers or
1090
+ popups. A consumer registers its own sources/layers/handlers against the
1091
+ `mapboxgl.Map` instance handed back on `map-ready`, the same instance
1092
+ `mapbox-map` continues to own (this component never calls `map.remove()`
1093
+ except on disconnect, so a consumer's own registrations survive style
1094
+ reloads exactly as they would using `mapboxgl.Map` directly).
1095
+
1096
+ Deliberately does not construct the map until `styleUrl` is a non-empty
1097
+ string — if a consumer knows the desired style only after an async
1098
+ lookup (e.g. a saved user preference), delay setting `styleUrl` rather
1099
+ than setting a default and swapping it later, which would visibly flash
1100
+ the wrong basemap before the real one loads.
1101
+
1102
+ Import: `import "@f-ewald/components/mapbox-map.js";`
1103
+
1104
+ Properties: `accessToken` (attribute `access-token`) : string, default ""; `styleUrl` (attribute `style-url`) : string, default ""; `center` (JS property only) : [number, number], default [0, 0]; `zoom` (attribute `zoom`) : number, default 0
1105
+ Events: `map-style-reloaded`, `map-ready`
1106
+ CSS custom properties: none
1107
+
1108
+ Example:
1109
+ ```html
1110
+ <mapbox-map
1111
+ access-token="pk.your-token"
1112
+ style-url="mapbox://styles/mapbox/light-v11"
1113
+ ></mapbox-map>
1114
+ <script type="module">
1115
+ document.querySelector("mapbox-map").addEventListener("map-ready", (e) => {
1116
+ const map = e.detail.map; // the underlying mapboxgl.Map
1117
+ map.addSource("mine", { type: "geojson", data: "/mine.geojson" });
1118
+ map.addLayer({ id: "mine", type: "circle", source: "mine", paint: { "circle-color": "#4f46e5" } });
1119
+ });
1120
+ </script>
1121
+ ```
1122
+
1085
1123
  ## <markdown-view>
1086
1124
 
1087
1125
  Renders a markdown string as sanitized, styled HTML — headings, lists,
@@ -1273,11 +1311,15 @@ Example:
1273
1311
  Responsive, accessible image carousel composed from declarative
1274
1312
  `gallery-item` children.
1275
1313
 
1314
+ The image viewport keeps a fixed `aspect-ratio`, and the caption row is
1315
+ reserved for every slide whenever any slide has a caption, so the carousel's
1316
+ total height stays constant as it cycles — it never shifts the page below it.
1317
+
1276
1318
  Import: `import "@f-ewald/components/photo-gallery.js";`
1277
1319
 
1278
1320
  Properties: `currentIndex` (attribute `current-index`) : number, default 0; `delay` (attribute `delay`) : number, default 0; `showControls` (attribute `show-controls`) : boolean, default true; `showCounter` (attribute `show-counter`) : boolean, default false; `showIndicators` (attribute `show-indicators`) : boolean, default false; `showAutoplayControl` (attribute `show-autoplay-control`) : boolean, default true; `paused` (attribute `paused`) : boolean, default false; `aspectRatio` (attribute `aspect-ratio`) : string, default "16 / 9"; `objectFit` (attribute `object-fit`) : PhotoGalleryObjectFit, default "cover"
1279
1321
  Events: `slide-change`
1280
- CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-overlay`, `--ui-primary`, `--ui-radius`, `--ui-radius-sm`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
1322
+ CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-line-height-normal`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-overlay`, `--ui-primary`, `--ui-radius`, `--ui-radius-sm`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
1281
1323
 
1282
1324
  Example:
1283
1325
  ```html
@@ -1414,6 +1456,33 @@ Example:
1414
1456
  </script>
1415
1457
  ```
1416
1458
 
1459
+ ## <range-slider>
1460
+
1461
+ A form-associated numeric range slider, usable standalone or inside a
1462
+ native `<form>`. Wraps a native `<input type="range">` (kept for its free
1463
+ keyboard, drag, and screen-reader support) restyled to match this
1464
+ package's track/fill visual language (`stat-meter`, `percent-bar-chart`)
1465
+ instead of the browser-default appearance. Purely a value control — no
1466
+ built-in label; wrap in `form-field` for a labeled field, or render a
1467
+ value readout next to it (see the playground example), matching
1468
+ `autocomplete-input`/`form-select`.
1469
+
1470
+ Import: `import "@f-ewald/components/range-slider.js";`
1471
+
1472
+ Properties: `min` (attribute `min`) : number, default 0; `max` (attribute `max`) : number, default 100; `step` (attribute `step`) : number, default 1; `value` (attribute `value`) : number, default 0; `disabled` (attribute `disabled`) : boolean, default false; `name` (attribute `name`) : string, default ""
1473
+ Events: `input`, `change`
1474
+ CSS custom properties: `--ui-focus-ring`, `--ui-primary`, `--ui-surface`, `--ui-surface-muted`, `--ui-text-muted`
1475
+
1476
+ Example:
1477
+ ```html
1478
+ <range-slider min="100" max="5000" step="50" value="1000"></range-slider>
1479
+ <script type="module">
1480
+ document.querySelector("range-slider").addEventListener("input", (e) => {
1481
+ console.log(e.detail.value);
1482
+ });
1483
+ </script>
1484
+ ```
1485
+
1417
1486
  ## <relative-time>
1418
1487
 
1419
1488
  Inline relative-time display (e.g. "3 hours ago"). Accepts either a
@@ -1712,26 +1781,31 @@ Example:
1712
1781
  ## <toast-notification>
1713
1782
 
1714
1783
  Fixed-position stack of dismissible notifications, anchored top-right
1715
- (top-full-width on mobile). Not wired to any app state yet — callers add
1716
- toasts imperatively via the `show()` method on a live element reference,
1784
+ (top-full-width on mobile). Every toast shares one fixed width so entries
1785
+ never appear narrower or wider than one another. Not wired to any app state
1786
+ yet — callers add toasts imperatively via the `show()` method on a live
1787
+ element reference,
1717
1788
  e.g. `document.querySelector('toast-notification')?.show('Offline', { variant: 'error' })`,
1718
1789
  or via the `notifySuccess`/`notifyError`/`notifyInfo` module-level helpers
1719
- exported from this file. Each toast auto-dismisses after `duration` ms and
1720
- can also be dismissed via its button. Appears/disappears instantly — no
1721
- slide/fade transitions.
1790
+ exported from this file. The first argument is the required bold headline; an
1791
+ optional `description` renders a smaller, non-bold second line. Each variant
1792
+ leads with a matching status icon (success → check, error → exclamation
1793
+ circle, info → information circle, warning → exclamation triangle). Each toast
1794
+ auto-dismisses after `duration` ms and can also be dismissed via its ✕
1795
+ button. Appears/disappears instantly — no slide/fade transitions.
1722
1796
 
1723
1797
  Import: `import "@f-ewald/components/toast-notification.js";`
1724
1798
 
1725
1799
  Properties: none
1726
1800
  Events: none
1727
- CSS custom properties: `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-hover-overlay`, `--ui-info`, `--ui-line-height-glyph`, `--ui-line-height-normal`, `--ui-on-accent`, `--ui-radius`, `--ui-radius-sm`, `--ui-shadow-lg`, `--ui-success`, `--ui-text`
1801
+ CSS custom properties: `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-hover-overlay`, `--ui-info`, `--ui-line-height-glyph`, `--ui-line-height-normal`, `--ui-on-accent`, `--ui-radius`, `--ui-radius-sm`, `--ui-shadow-lg`, `--ui-success`, `--ui-text`, `--ui-warning`
1728
1802
 
1729
1803
  Example:
1730
1804
  ```html
1731
1805
  <toast-notification></toast-notification>
1732
1806
  <script type="module">
1733
1807
  import { notifySuccess } from "@f-ewald/components/toast-notification.js";
1734
- notifySuccess("Saved!");
1808
+ notifySuccess("Saved!", "Your changes are now live.");
1735
1809
  </script>
1736
1810
  ```
1737
1811
 
@@ -1750,15 +1824,19 @@ every folder expanded instead. Expansion state is otherwise managed
1750
1824
  internally and untouched by later `nodes` updates, so a user's manual
1751
1825
  toggles survive a data refresh.
1752
1826
 
1827
+ Set the `lines` boolean to draw classic file-tree connector guides: a
1828
+ vertical line per continuing ancestor level and a branch elbow (`└`) or
1829
+ tee (`├`) linking each node to its parent. Off by default (indentation only).
1830
+
1753
1831
  Import: `import "@f-ewald/components/tree-view.js";`
1754
1832
 
1755
- Properties: `nodes` (JS property only) : TreeNode[], default []; `renderNode` (JS property only) : (node: TreeNode) => unknown, default —; `defaultExpanded` (attribute `default-expanded`) : boolean, default false
1833
+ Properties: `nodes` (JS property only) : TreeNode[], default []; `renderNode` (JS property only) : (node: TreeNode) => unknown, default —; `defaultExpanded` (attribute `default-expanded`) : boolean, default false; `lines` (attribute `lines`) : boolean, default false
1756
1834
  Events: `node-click`
1757
- CSS custom properties: `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
1835
+ CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
1758
1836
 
1759
1837
  Example:
1760
1838
  ```html
1761
- <tree-view></tree-view>
1839
+ <tree-view lines></tree-view>
1762
1840
  <script type="module">
1763
1841
  const tree = document.querySelector("tree-view");
1764
1842
  tree.nodes = [
@@ -1815,11 +1893,15 @@ A form-associated boolean checkbox, usable standalone or inside a native
1815
1893
  Renders a native `<input type="checkbox">` wrapped in a `<label>`, styled
1816
1894
  via `:has()` on the wrapping label (matching `radio-pills`/`radio-cards`)
1817
1895
  rather than styling the native input directly; the checkbox itself renders
1818
- at `1rem`, matching the existing radio-input convention.
1896
+ at `1rem`, matching the existing radio-input convention. An optional
1897
+ pre-rendered `icon` (matching `form-select`'s per-option icon convention)
1898
+ renders between the box and the label, inside the same clickable `<label>`
1899
+ — for a row that pairs a checkbox with an icon/swatch and needs the whole
1900
+ row, icon included, to stay one click target.
1819
1901
 
1820
1902
  Import: `import "@f-ewald/components/ui-checkbox.js";`
1821
1903
 
1822
- Properties: `checked` (attribute `checked`) : boolean, default false; `indeterminate` (attribute `indeterminate`) : boolean, default false; `disabled` (attribute `disabled`) : boolean, default false; `required` (attribute `required`) : boolean, default false; `name` (attribute `name`) : string, default ""; `label` (attribute `label`) : string, default ""
1904
+ Properties: `checked` (attribute `checked`) : boolean, default false; `indeterminate` (attribute `indeterminate`) : boolean, default false; `disabled` (attribute `disabled`) : boolean, default false; `required` (attribute `required`) : boolean, default false; `name` (attribute `name`) : string, default ""; `label` (attribute `label`) : string, default ""; `icon` (JS property only) : TemplateResult | null, default null; `iconSize` (attribute `iconSize`) : number, default 14
1823
1905
  Events: `change`
1824
1906
  CSS custom properties: `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-sm`, `--ui-text`
1825
1907
 
@@ -1827,6 +1909,8 @@ Example:
1827
1909
  ```html
1828
1910
  <ui-checkbox label="Subscribe to updates"></ui-checkbox>
1829
1911
  <ui-checkbox name="terms" label="I agree to the terms" required></ui-checkbox>
1912
+ <!-- .icon is set programmatically (a pre-rendered TemplateResult), not an attribute -->
1913
+ <ui-checkbox label="Show list view"></ui-checkbox>
1830
1914
  ```
1831
1915
 
1832
1916
  ## <user-avatar>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@f-ewald/components",
3
3
  "private": false,
4
- "version": "1.15.0",
4
+ "version": "1.17.0",
5
5
  "description": "A collection of universally usable web components for various tasks.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -65,6 +65,7 @@
65
65
  "d3-shape": "^3.2.0",
66
66
  "dompurify": "^3.4.12",
67
67
  "lit": "^3.3.3",
68
+ "mapbox-gl": "^3.9.0",
68
69
  "marked": "^18.0.7",
69
70
  "zod": "^4.4.3"
70
71
  },
@@ -79,6 +80,7 @@
79
80
  "@types/d3-array": "^3.2.2",
80
81
  "@types/d3-scale": "^4.0.9",
81
82
  "@types/d3-shape": "^3.1.8",
83
+ "@types/mapbox-gl": "^3.4.1",
82
84
  "@types/node": "^26.1.1",
83
85
  "heroicons": "^2.2.0",
84
86
  "tailwindcss": "^4.3.3",