@f-ewald/components 0.7.0 → 1.0.2

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 (193) hide show
  1. package/README.md +76 -47
  2. package/custom-elements.json +3049 -910
  3. package/dist/address-autocomplete.d.ts +8 -0
  4. package/dist/address-autocomplete.d.ts.map +1 -1
  5. package/dist/address-autocomplete.js +165 -15
  6. package/dist/address-autocomplete.js.map +1 -1
  7. package/dist/animate-confetti.d.ts +8 -5
  8. package/dist/animate-confetti.d.ts.map +1 -1
  9. package/dist/animate-confetti.js +46 -19
  10. package/dist/animate-confetti.js.map +1 -1
  11. package/dist/autocomplete-input.d.ts +8 -0
  12. package/dist/autocomplete-input.d.ts.map +1 -1
  13. package/dist/autocomplete-input.js +165 -15
  14. package/dist/autocomplete-input.js.map +1 -1
  15. package/dist/calendar-entry.d.ts +33 -0
  16. package/dist/calendar-entry.d.ts.map +1 -0
  17. package/dist/calendar-entry.js +64 -0
  18. package/dist/calendar-entry.js.map +1 -0
  19. package/dist/calendar-month.d.ts +67 -0
  20. package/dist/calendar-month.d.ts.map +1 -0
  21. package/dist/calendar-month.js +469 -0
  22. package/dist/calendar-month.js.map +1 -0
  23. package/dist/calendar-year.d.ts +43 -0
  24. package/dist/calendar-year.d.ts.map +1 -0
  25. package/dist/calendar-year.js +145 -0
  26. package/dist/calendar-year.js.map +1 -0
  27. package/dist/chat-message.d.ts.map +1 -1
  28. package/dist/chat-message.js +77 -24
  29. package/dist/chat-message.js.map +1 -1
  30. package/dist/confirm-dialog.d.ts +8 -1
  31. package/dist/confirm-dialog.d.ts.map +1 -1
  32. package/dist/confirm-dialog.js +130 -18
  33. package/dist/confirm-dialog.js.map +1 -1
  34. package/dist/copy-link-button.d.ts +2 -0
  35. package/dist/copy-link-button.d.ts.map +1 -1
  36. package/dist/copy-link-button.js +35 -3
  37. package/dist/copy-link-button.js.map +1 -1
  38. package/dist/data-table.d.ts +2 -0
  39. package/dist/data-table.d.ts.map +1 -1
  40. package/dist/data-table.js +83 -11
  41. package/dist/data-table.js.map +1 -1
  42. package/dist/distance-value.d.ts +0 -1
  43. package/dist/distance-value.d.ts.map +1 -1
  44. package/dist/distance-value.js +3 -8
  45. package/dist/distance-value.js.map +1 -1
  46. package/dist/distribution-chart.d.ts.map +1 -1
  47. package/dist/distribution-chart.js +54 -17
  48. package/dist/distribution-chart.js.map +1 -1
  49. package/dist/dropdown-button.d.ts.map +1 -1
  50. package/dist/dropdown-button.js +60 -11
  51. package/dist/dropdown-button.js.map +1 -1
  52. package/dist/editable-text.d.ts.map +1 -1
  53. package/dist/editable-text.js +46 -13
  54. package/dist/editable-text.js.map +1 -1
  55. package/dist/form-select.d.ts +21 -2
  56. package/dist/form-select.d.ts.map +1 -1
  57. package/dist/form-select.js +489 -37
  58. package/dist/form-select.js.map +1 -1
  59. package/dist/frame-box.d.ts.map +1 -1
  60. package/dist/frame-box.js +20 -12
  61. package/dist/frame-box.js.map +1 -1
  62. package/dist/icon-button.d.ts.map +1 -1
  63. package/dist/icon-button.js +11 -0
  64. package/dist/icon-button.js.map +1 -1
  65. package/dist/index.d.ts +4 -1
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +4 -1
  68. package/dist/index.js.map +1 -1
  69. package/dist/kbd-hint.d.ts +30 -0
  70. package/dist/kbd-hint.d.ts.map +1 -0
  71. package/dist/kbd-hint.js +184 -0
  72. package/dist/kbd-hint.js.map +1 -0
  73. package/dist/live-timer.d.ts +0 -1
  74. package/dist/live-timer.d.ts.map +1 -1
  75. package/dist/live-timer.js +1 -6
  76. package/dist/live-timer.js.map +1 -1
  77. package/dist/map-circle.d.ts +3 -0
  78. package/dist/map-circle.d.ts.map +1 -1
  79. package/dist/map-circle.js +19 -1
  80. package/dist/map-circle.js.map +1 -1
  81. package/dist/map-pin.d.ts.map +1 -1
  82. package/dist/map-pin.js +16 -1
  83. package/dist/map-pin.js.map +1 -1
  84. package/dist/percent-bar-chart.d.ts +3 -0
  85. package/dist/percent-bar-chart.d.ts.map +1 -1
  86. package/dist/percent-bar-chart.js +60 -4
  87. package/dist/percent-bar-chart.js.map +1 -1
  88. package/dist/photo-gallery.d.ts.map +1 -1
  89. package/dist/photo-gallery.js +12 -3
  90. package/dist/photo-gallery.js.map +1 -1
  91. package/dist/popover-panel.d.ts.map +1 -1
  92. package/dist/popover-panel.js +132 -23
  93. package/dist/popover-panel.js.map +1 -1
  94. package/dist/price-history-chart.d.ts.map +1 -1
  95. package/dist/price-history-chart.js +52 -18
  96. package/dist/price-history-chart.js.map +1 -1
  97. package/dist/radio-cards.d.ts +2 -0
  98. package/dist/radio-cards.d.ts.map +1 -1
  99. package/dist/radio-cards.js +51 -5
  100. package/dist/radio-cards.js.map +1 -1
  101. package/dist/radio-pills.d.ts +2 -0
  102. package/dist/radio-pills.d.ts.map +1 -1
  103. package/dist/radio-pills.js +46 -4
  104. package/dist/radio-pills.js.map +1 -1
  105. package/dist/relative-time.d.ts +0 -1
  106. package/dist/relative-time.d.ts.map +1 -1
  107. package/dist/relative-time.js +1 -6
  108. package/dist/relative-time.js.map +1 -1
  109. package/dist/reveal-button.d.ts +2 -0
  110. package/dist/reveal-button.d.ts.map +1 -1
  111. package/dist/reveal-button.js +42 -5
  112. package/dist/reveal-button.js.map +1 -1
  113. package/dist/roman-numeral.js +1 -1
  114. package/dist/roman-numeral.js.map +1 -1
  115. package/dist/slide-panel.d.ts +7 -3
  116. package/dist/slide-panel.d.ts.map +1 -1
  117. package/dist/slide-panel.js +95 -23
  118. package/dist/slide-panel.js.map +1 -1
  119. package/dist/stat-meter.d.ts.map +1 -1
  120. package/dist/stat-meter.js +17 -7
  121. package/dist/stat-meter.js.map +1 -1
  122. package/dist/status-pill.d.ts.map +1 -1
  123. package/dist/status-pill.js +26 -12
  124. package/dist/status-pill.js.map +1 -1
  125. package/dist/tile-grid.d.ts +8 -0
  126. package/dist/tile-grid.d.ts.map +1 -1
  127. package/dist/tile-grid.js +88 -12
  128. package/dist/tile-grid.js.map +1 -1
  129. package/dist/toast-notification.d.ts.map +1 -1
  130. package/dist/toast-notification.js +40 -11
  131. package/dist/toast-notification.js.map +1 -1
  132. package/dist/tokens.css +23 -0
  133. package/dist/tokens.d.ts.map +1 -1
  134. package/dist/tokens.js +16 -0
  135. package/dist/tokens.js.map +1 -1
  136. package/dist/ui-button.d.ts +2 -0
  137. package/dist/ui-button.d.ts.map +1 -1
  138. package/dist/ui-button.js +58 -9
  139. package/dist/ui-button.js.map +1 -1
  140. package/dist/user-avatar.d.ts.map +1 -1
  141. package/dist/user-avatar.js +18 -3
  142. package/dist/user-avatar.js.map +1 -1
  143. package/dist/utils/calendar.d.ts +77 -0
  144. package/dist/utils/calendar.d.ts.map +1 -0
  145. package/dist/utils/calendar.js +135 -0
  146. package/dist/utils/calendar.js.map +1 -0
  147. package/dist/utils/form.d.ts +3 -0
  148. package/dist/utils/form.d.ts.map +1 -0
  149. package/dist/utils/form.js +14 -0
  150. package/dist/utils/form.js.map +1 -0
  151. package/dist/utils/layer-stack.d.ts +9 -0
  152. package/dist/utils/layer-stack.d.ts.map +1 -0
  153. package/dist/utils/layer-stack.js +35 -0
  154. package/dist/utils/layer-stack.js.map +1 -0
  155. package/dist/weight-bar-chart.d.ts.map +1 -1
  156. package/dist/weight-bar-chart.js +27 -8
  157. package/dist/weight-bar-chart.js.map +1 -1
  158. package/docs/address-autocomplete.md +5 -0
  159. package/docs/autocomplete-input.md +5 -0
  160. package/docs/calendar-entry.md +53 -0
  161. package/docs/calendar-month.md +79 -0
  162. package/docs/calendar-year.md +53 -0
  163. package/docs/chat-message.md +4 -0
  164. package/docs/confirm-dialog.md +2 -0
  165. package/docs/copy-link-button.md +2 -0
  166. package/docs/data-table.md +2 -0
  167. package/docs/design-language.md +149 -0
  168. package/docs/distribution-chart.md +4 -0
  169. package/docs/dropdown-button.md +1 -0
  170. package/docs/form-select.md +15 -3
  171. package/docs/frame-box.md +2 -0
  172. package/docs/kbd-hint.md +42 -0
  173. package/docs/map-circle.md +4 -0
  174. package/docs/percent-bar-chart.md +4 -1
  175. package/docs/photo-gallery.md +1 -0
  176. package/docs/popover-panel.md +2 -0
  177. package/docs/price-history-chart.md +8 -1
  178. package/docs/radio-cards.md +2 -0
  179. package/docs/radio-pills.md +2 -0
  180. package/docs/reveal-button.md +3 -0
  181. package/docs/slide-panel.md +4 -2
  182. package/docs/status-pill.md +3 -0
  183. package/docs/tile-grid.md +10 -1
  184. package/docs/toast-notification.md +4 -1
  185. package/docs/ui-button.md +2 -0
  186. package/docs/user-avatar.md +1 -0
  187. package/llms.txt +175 -61
  188. package/package.json +14 -2
  189. package/dist/map-point.d.ts +0 -31
  190. package/dist/map-point.d.ts.map +0 -1
  191. package/dist/map-point.js +0 -83
  192. package/dist/map-point.js.map +0 -1
  193. package/docs/map-point.md +0 -44
package/README.md CHANGED
@@ -3,6 +3,9 @@
3
3
  [![npm](https://img.shields.io/npm/v/@f-ewald/components)](https://www.npmjs.com/package/@f-ewald/components)
4
4
  [![license](https://img.shields.io/badge/license-BSD--3--Clause-blue)](./LICENSE)
5
5
 
6
+ [Documentation](https://f-ewald.github.io/components/) ·
7
+ [Playground](https://f-ewald.github.io/components/playground/)
8
+
6
9
  A collection of self-contained [Lit](https://lit.dev) web components sharing a
7
10
  Tailwind-inspired design token system. Every component is individually
8
11
  importable and ships its own TypeScript types plus a checked-in
@@ -41,43 +44,46 @@ import "@f-ewald/components/roman-numeral.js";
41
44
 
42
45
  | Component | Docs |
43
46
  | --- | --- |
44
- | `<address-autocomplete>` | [docs/address-autocomplete.md](./docs/address-autocomplete.md) |
45
- | `<animate-confetti>` | [docs/animate-confetti.md](./docs/animate-confetti.md) |
46
- | `<autocomplete-input>` | [docs/autocomplete-input.md](./docs/autocomplete-input.md) |
47
- | `<chat-message>` | [docs/chat-message.md](./docs/chat-message.md) |
48
- | `<confirm-dialog>` | [docs/confirm-dialog.md](./docs/confirm-dialog.md) |
49
- | `<copy-link-button>` | [docs/copy-link-button.md](./docs/copy-link-button.md) |
50
- | `<data-table>` | [docs/data-table.md](./docs/data-table.md) |
51
- | `<distance-value>` | [docs/distance-value.md](./docs/distance-value.md) |
52
- | `<distribution-chart>` | [docs/distribution-chart.md](./docs/distribution-chart.md) |
53
- | `<dropdown-button>` | [docs/dropdown-button.md](./docs/dropdown-button.md) |
54
- | `<editable-text>` | [docs/editable-text.md](./docs/editable-text.md) |
55
- | `<form-select>` | [docs/form-select.md](./docs/form-select.md) |
56
- | `<frame-box>` | [docs/frame-box.md](./docs/frame-box.md) |
57
- | `<gallery-item>` | [docs/gallery-item.md](./docs/gallery-item.md) |
58
- | `<gallery-item-variant>` | [docs/gallery-item-variant.md](./docs/gallery-item-variant.md) |
59
- | `<icon-button>` | [docs/icon-button.md](./docs/icon-button.md) |
60
- | `<live-timer>` | [docs/live-timer.md](./docs/live-timer.md) |
61
- | `<map-circle>` | [docs/map-circle.md](./docs/map-circle.md) |
62
- | `<map-pin>` | [docs/map-pin.md](./docs/map-pin.md) |
63
- | `<map-point>` | [docs/map-point.md](./docs/map-point.md) |
64
- | `<percent-bar-chart>` | [docs/percent-bar-chart.md](./docs/percent-bar-chart.md) |
65
- | `<photo-gallery>` | [docs/photo-gallery.md](./docs/photo-gallery.md) |
66
- | `<popover-panel>` | [docs/popover-panel.md](./docs/popover-panel.md) |
67
- | `<price-history-chart>` | [docs/price-history-chart.md](./docs/price-history-chart.md) |
68
- | `<radio-cards>` | [docs/radio-cards.md](./docs/radio-cards.md) |
69
- | `<radio-pills>` | [docs/radio-pills.md](./docs/radio-pills.md) |
70
- | `<relative-time>` | [docs/relative-time.md](./docs/relative-time.md) |
71
- | `<reveal-button>` | [docs/reveal-button.md](./docs/reveal-button.md) |
72
- | `<roman-numeral>` | [docs/roman-numeral.md](./docs/roman-numeral.md) |
73
- | `<slide-panel>` | [docs/slide-panel.md](./docs/slide-panel.md) |
74
- | `<stat-meter>` | [docs/stat-meter.md](./docs/stat-meter.md) |
75
- | `<status-pill>` | [docs/status-pill.md](./docs/status-pill.md) |
76
- | `<tile-grid>` | [docs/tile-grid.md](./docs/tile-grid.md) |
77
- | `<toast-notification>` | [docs/toast-notification.md](./docs/toast-notification.md) |
78
- | `<ui-button>` | [docs/ui-button.md](./docs/ui-button.md) |
79
- | `<user-avatar>` | [docs/user-avatar.md](./docs/user-avatar.md) |
80
- | `<weight-bar-chart>` | [docs/weight-bar-chart.md](./docs/weight-bar-chart.md) |
47
+ | `<address-autocomplete>` | [API reference](https://f-ewald.github.io/components/docs/address-autocomplete.html) |
48
+ | `<animate-confetti>` | [API reference](https://f-ewald.github.io/components/docs/animate-confetti.html) |
49
+ | `<autocomplete-input>` | [API reference](https://f-ewald.github.io/components/docs/autocomplete-input.html) |
50
+ | `<calendar-entry>` | [API reference](https://f-ewald.github.io/components/docs/calendar-entry.html) |
51
+ | `<calendar-month>` | [API reference](https://f-ewald.github.io/components/docs/calendar-month.html) |
52
+ | `<calendar-year>` | [API reference](https://f-ewald.github.io/components/docs/calendar-year.html) |
53
+ | `<chat-message>` | [API reference](https://f-ewald.github.io/components/docs/chat-message.html) |
54
+ | `<confirm-dialog>` | [API reference](https://f-ewald.github.io/components/docs/confirm-dialog.html) |
55
+ | `<copy-link-button>` | [API reference](https://f-ewald.github.io/components/docs/copy-link-button.html) |
56
+ | `<data-table>` | [API reference](https://f-ewald.github.io/components/docs/data-table.html) |
57
+ | `<distance-value>` | [API reference](https://f-ewald.github.io/components/docs/distance-value.html) |
58
+ | `<distribution-chart>` | [API reference](https://f-ewald.github.io/components/docs/distribution-chart.html) |
59
+ | `<dropdown-button>` | [API reference](https://f-ewald.github.io/components/docs/dropdown-button.html) |
60
+ | `<editable-text>` | [API reference](https://f-ewald.github.io/components/docs/editable-text.html) |
61
+ | `<form-select>` | [API reference](https://f-ewald.github.io/components/docs/form-select.html) |
62
+ | `<frame-box>` | [API reference](https://f-ewald.github.io/components/docs/frame-box.html) |
63
+ | `<gallery-item>` | [API reference](https://f-ewald.github.io/components/docs/gallery-item.html) |
64
+ | `<gallery-item-variant>` | [API reference](https://f-ewald.github.io/components/docs/gallery-item-variant.html) |
65
+ | `<icon-button>` | [API reference](https://f-ewald.github.io/components/docs/icon-button.html) |
66
+ | `<kbd-hint>` | [API reference](https://f-ewald.github.io/components/docs/kbd-hint.html) |
67
+ | `<live-timer>` | [API reference](https://f-ewald.github.io/components/docs/live-timer.html) |
68
+ | `<map-circle>` | [API reference](https://f-ewald.github.io/components/docs/map-circle.html) |
69
+ | `<map-pin>` | [API reference](https://f-ewald.github.io/components/docs/map-pin.html) |
70
+ | `<percent-bar-chart>` | [API reference](https://f-ewald.github.io/components/docs/percent-bar-chart.html) |
71
+ | `<photo-gallery>` | [API reference](https://f-ewald.github.io/components/docs/photo-gallery.html) |
72
+ | `<popover-panel>` | [API reference](https://f-ewald.github.io/components/docs/popover-panel.html) |
73
+ | `<price-history-chart>` | [API reference](https://f-ewald.github.io/components/docs/price-history-chart.html) |
74
+ | `<radio-cards>` | [API reference](https://f-ewald.github.io/components/docs/radio-cards.html) |
75
+ | `<radio-pills>` | [API reference](https://f-ewald.github.io/components/docs/radio-pills.html) |
76
+ | `<relative-time>` | [API reference](https://f-ewald.github.io/components/docs/relative-time.html) |
77
+ | `<reveal-button>` | [API reference](https://f-ewald.github.io/components/docs/reveal-button.html) |
78
+ | `<roman-numeral>` | [API reference](https://f-ewald.github.io/components/docs/roman-numeral.html) |
79
+ | `<slide-panel>` | [API reference](https://f-ewald.github.io/components/docs/slide-panel.html) |
80
+ | `<stat-meter>` | [API reference](https://f-ewald.github.io/components/docs/stat-meter.html) |
81
+ | `<status-pill>` | [API reference](https://f-ewald.github.io/components/docs/status-pill.html) |
82
+ | `<tile-grid>` | [API reference](https://f-ewald.github.io/components/docs/tile-grid.html) |
83
+ | `<toast-notification>` | [API reference](https://f-ewald.github.io/components/docs/toast-notification.html) |
84
+ | `<ui-button>` | [API reference](https://f-ewald.github.io/components/docs/ui-button.html) |
85
+ | `<user-avatar>` | [API reference](https://f-ewald.github.io/components/docs/user-avatar.html) |
86
+ | `<weight-bar-chart>` | [API reference](https://f-ewald.github.io/components/docs/weight-bar-chart.html) |
81
87
 
82
88
  Each doc lists the component's attributes/properties, events, slots, and the
83
89
  `--ui-*` CSS custom properties it consumes. For a machine-readable summary of
@@ -166,20 +172,35 @@ sources are imported directly from `src/`, so edits hot-reload.
166
172
 
167
173
  ```bash
168
174
  npm run build:demo # static build of the playground, into demo-dist/
175
+ npm run build:site # docs + playground Pages artifact, into pages-dist/
176
+ npm run preview:site # preview the exact Pages artifact locally
177
+ npm run test:site # smoke-test the built documentation and playground
169
178
  ```
170
179
 
180
+ The combined site is deployed automatically from `main` to
181
+ [GitHub Pages](https://f-ewald.github.io/components/). The workflow reads the
182
+ repository and publishes `pages-dist/`; it has no permission or persisted
183
+ credential capable of changing repository files, branches, tags, or pull
184
+ requests.
185
+
171
186
  ## Development commands
172
187
 
173
188
  | Command | Purpose |
174
189
  | --- | --- |
175
190
  | `npm run dev` | Start the Vite playground with HMR. |
191
+ | `npm run typecheck` | Check TypeScript without writing build output. |
176
192
  | `npm run build` | Compile `src/` with `tsc` into `dist/`, and generate `dist/tokens.css`. |
177
193
  | `npm run build:demo` | Build the static playground into `demo-dist/`. |
194
+ | `npm run build:site` | Build the static documentation and nested playground into `pages-dist/`. |
195
+ | `npm run preview:site` | Preview the built Pages artifact locally. |
178
196
  | `npm run icons` | Regenerate `src/icons.ts` from the Heroicons package. |
179
197
  | `npm run analyze` | Regenerate `custom-elements.json` via the custom-elements-manifest analyzer. |
180
198
  | `npm run docs` | Regenerate the manifest, `docs/*.md`, and `llms.txt`. |
181
199
  | `npm run mcp` | Run the MCP server (`dist/mcp-server.js`) directly, for manual testing. |
182
200
  | `npm run test` | Run the Playwright suite against the playground. |
201
+ | `npm run test:design` | Check catalog ordering, token fallbacks, and source design contracts. |
202
+ | `npm run test:visual` | Compare light/dark component screenshots. |
203
+ | `npm run test:site` | Run the Playwright smoke suite against `pages-dist/`. |
183
204
 
184
205
  ## Contributing
185
206
 
@@ -191,25 +212,33 @@ npm run build:demo # static build of the playground, into demo-dist/
191
212
  the `tsc`-emitted `dist/` output resolves correctly for consumers.
192
213
  - Run `npm run docs` after changing any component's public API so the
193
214
  generated docs and `llms.txt` stay in sync.
215
+ - `npm run build:site` only reads those checked-in documentation inputs and
216
+ writes ignored `pages-dist/`; it never updates tracked generated files.
217
+ - Component styling and interaction changes follow
218
+ [`docs/design-language.md`](./docs/design-language.md).
194
219
 
195
220
  ## Publishing
196
221
 
197
- First publish (package is not yet on the npm registry):
198
-
199
- ```bash
200
- npm login # if needed
201
- npm publish --access public
202
- ```
222
+ Releases are published automatically by
223
+ [`.github/workflows/npm-publish.yml`](./.github/workflows/npm-publish.yml)
224
+ when a strict `vX.Y.Z` tag is pushed. The workflow validates the tag against
225
+ both package manifests, runs the full `prepublishOnly` gate, and publishes via
226
+ npm Trusted Publishing with provenance—no `NPM_TOKEN` repository secret.
203
227
 
204
- Subsequent releases:
228
+ Configure the `@f-ewald/components` npmjs package once with a GitHub Actions
229
+ Trusted Publisher for owner `f-ewald`, repository `components`, workflow
230
+ `npm-publish.yml`, no environment, and **Allowed actions: npm publish**. Then
231
+ release only after all source and generated-doc changes are committed:
205
232
 
206
233
  ```bash
207
234
  npm version <patch|minor|major>
208
- npm publish
235
+ git push origin main --follow-tags
209
236
  ```
210
237
 
211
- `prepublishOnly` runs `build`, `docs`, and `test` automatically before every
212
- publish.
238
+ `npm version` must create the matching annotated `vX.Y.Z` tag on the version
239
+ commit; every version bump requires that tag, beginning with `v1.0.0`. The
240
+ initial local `v1.0.0` tag was moved to the release-workflow commit before
241
+ its first push; published tags must never be moved.
213
242
 
214
243
  ## License
215
244