@f-ewald/components 1.27.2 → 1.28.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 (62) hide show
  1. package/custom-elements.json +109 -9
  2. package/dist/calendar-day.d.ts +21 -0
  3. package/dist/calendar-day.d.ts.map +1 -1
  4. package/dist/calendar-day.js +131 -9
  5. package/dist/calendar-day.js.map +1 -1
  6. package/dist/calendar-entry.d.ts +1 -0
  7. package/dist/calendar-entry.d.ts.map +1 -1
  8. package/dist/calendar-entry.js +2 -1
  9. package/dist/calendar-entry.js.map +1 -1
  10. package/dist/calendar-month.d.ts +3 -3
  11. package/dist/calendar-month.d.ts.map +1 -1
  12. package/dist/calendar-month.js +40 -7
  13. package/dist/calendar-month.js.map +1 -1
  14. package/dist/calendar-week.d.ts.map +1 -1
  15. package/dist/calendar-week.js +30 -3
  16. package/dist/calendar-week.js.map +1 -1
  17. package/dist/icons.d.ts +1 -1
  18. package/dist/icons.d.ts.map +1 -1
  19. package/dist/icons.js +1 -1
  20. package/dist/icons.js.map +1 -1
  21. package/dist/percent-bar-chart.d.ts.map +1 -1
  22. package/dist/percent-bar-chart.js +9 -2
  23. package/dist/percent-bar-chart.js.map +1 -1
  24. package/dist/radio-cards.d.ts +5 -1
  25. package/dist/radio-cards.d.ts.map +1 -1
  26. package/dist/radio-cards.js +19 -2
  27. package/dist/radio-cards.js.map +1 -1
  28. package/dist/scroll-to-bottom.d.ts +6 -0
  29. package/dist/scroll-to-bottom.d.ts.map +1 -1
  30. package/dist/scroll-to-bottom.js +31 -7
  31. package/dist/scroll-to-bottom.js.map +1 -1
  32. package/dist/scroll-to-top.d.ts +6 -0
  33. package/dist/scroll-to-top.d.ts.map +1 -1
  34. package/dist/scroll-to-top.js +31 -7
  35. package/dist/scroll-to-top.js.map +1 -1
  36. package/dist/tokens.css +4 -0
  37. package/dist/tokens.d.ts.map +1 -1
  38. package/dist/tokens.js +11 -0
  39. package/dist/tokens.js.map +1 -1
  40. package/dist/ui-button.d.ts +24 -0
  41. package/dist/ui-button.d.ts.map +1 -1
  42. package/dist/ui-button.js +122 -1
  43. package/dist/ui-button.js.map +1 -1
  44. package/dist/utils/calendar.d.ts +1 -0
  45. package/dist/utils/calendar.d.ts.map +1 -1
  46. package/dist/utils/calendar.js +2 -0
  47. package/dist/utils/calendar.js.map +1 -1
  48. package/dist/weight-bar-chart.js +2 -2
  49. package/dist/weight-bar-chart.js.map +1 -1
  50. package/docs/calendar-day.md +7 -1
  51. package/docs/calendar-entry.md +2 -0
  52. package/docs/calendar-month.md +3 -0
  53. package/docs/calendar-week.md +5 -1
  54. package/docs/design-language.md +19 -0
  55. package/docs/icons.md +1 -1
  56. package/docs/radio-cards.md +6 -1
  57. package/docs/scroll-to-bottom.md +15 -0
  58. package/docs/scroll-to-top.md +15 -0
  59. package/docs/ui-button.md +28 -0
  60. package/docs/weight-bar-chart.md +1 -0
  61. package/llms.txt +59 -13
  62. package/package.json +1 -1
package/llms.txt CHANGED
@@ -72,7 +72,7 @@ table to pick the icon matching a use case, for consistency across apps:
72
72
  | `iconQueueList` | 16px | Queues, backlogs, or ordered work-item lists. |
73
73
  | `iconShieldCheck` | 16px | Verified, secure, or trusted states. |
74
74
  | `iconShieldExclamation` | 16px | Security warnings, or at-risk/compromised states. |
75
- | `iconSparkles` | 16px | A gradient-theme toggle, or to represent a decorative/enhanced visual style. |
75
+ | `iconSparkles` | 16px | An AI-powered action (pairs with ui-button's `ai` ring), a gradient-theme toggle, or a decorative/enhanced visual style. |
76
76
  | `iconSpeakerWave` | 18px | An unmuted volume control, e.g. audio-player/video-player's mute toggle. |
77
77
  | `iconSpeakerXMark` | 18px | A muted volume state; pair with iconSpeakerWave for the unmuted state. |
78
78
  | `iconSquares2x2` | 18px | A grid or kanban-view toggle, or to represent card/tile layouts. |
@@ -400,17 +400,18 @@ interaction sync with `calendar-week` via `CalendarTimelineBase`.
400
400
 
401
401
  Import: `import "@f-ewald/components/calendar-day.js";`
402
402
 
403
- Properties: `date` (attribute `date`) : string, default —
403
+ Properties: `date` (attribute `date`) : string, default —; `timeMarker` (attribute `time-marker`) : boolean, default false; `minWidth` (attribute `min-width`) : string, default ""
404
404
  Events: none
405
- CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-lg`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-font-weight-semibold`, `--ui-hover-overlay`, `--ui-info`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-sm`, `--ui-success`, `--ui-surface`, `--ui-text`, `--ui-text-muted`, `--ui-warning`
405
+ CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-lg`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-hover-overlay`, `--ui-info`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-sm`, `--ui-success`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`, `--ui-warning`
406
406
 
407
407
  Example:
408
408
  ```html
409
- <calendar-day date="2026-07-15">
409
+ <calendar-day date="2026-07-15" time-marker>
410
410
  <calendar-entry start="2026-07-15" end="2026-07-15" label="Company holiday" color="neutral"></calendar-entry>
411
411
  <calendar-entry start="2026-07-15T09:00" end="2026-07-15T09:30" label="Standup" color="info"></calendar-entry>
412
412
  <calendar-entry start="2026-07-15T09:15" end="2026-07-15T10:00" label="Design review" color="primary" href="#review">
413
413
  <span slot="detail">Walk through the new onboarding flow</span>
414
+ <span slot="location">Room A</span>
414
415
  </calendar-entry>
415
416
  </calendar-day>
416
417
  ```
@@ -436,6 +437,7 @@ Example:
436
437
  color="success"
437
438
  >
438
439
  <span slot="title">Vacation</span>
440
+ <span slot="location">Beach house</span>
439
441
  <span slot="detail">Out of office</span>
440
442
  <span slot="detail">Road trip along the California coast with several scenic stops</span>
441
443
  <span slot="footer">Return July 19 at 6 PM</span>
@@ -479,6 +481,9 @@ Example:
479
481
  <span slot="detail">Talks and workshops</span>
480
482
  <span slot="footer">Closing keynote · July 20</span>
481
483
  </calendar-entry>
484
+ <calendar-entry start="2026-07-27" end="2026-07-28" label="Client lunch" color="neutral">
485
+ <span slot="location">Downtown bistro</span>
486
+ </calendar-entry>
482
487
  </calendar-month>
483
488
  ```
484
489
 
@@ -502,14 +507,16 @@ Import: `import "@f-ewald/components/calendar-week.js";`
502
507
 
503
508
  Properties: `date` (attribute `date`) : string, default —
504
509
  Events: none
505
- CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-lg`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-font-weight-semibold`, `--ui-hover-overlay`, `--ui-info`, `--ui-primary`, `--ui-radius-sm`, `--ui-success`, `--ui-surface`, `--ui-text`, `--ui-text-muted`, `--ui-warning`
510
+ CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-lg`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-hover-overlay`, `--ui-info`, `--ui-primary`, `--ui-radius-sm`, `--ui-success`, `--ui-surface`, `--ui-text`, `--ui-text-muted`, `--ui-warning`
506
511
 
507
512
  Example:
508
513
  ```html
509
514
  <calendar-week date="2026-07-15">
510
515
  <calendar-entry start="2026-07-13" end="2026-07-15" label="Offsite" color="primary" href="#offsite"></calendar-entry>
511
516
  <calendar-entry start="2026-07-14T09:00" end="2026-07-14T09:30" label="Standup" color="info"></calendar-entry>
512
- <calendar-entry start="2026-07-16T14:00" end="2026-07-16T15:00" label="Customer demo" color="success"></calendar-entry>
517
+ <calendar-entry start="2026-07-16T14:00" end="2026-07-16T15:00" label="Customer demo" color="success">
518
+ <span slot="location">Main conference room</span>
519
+ </calendar-entry>
513
520
  </calendar-week>
514
521
  ```
515
522
 
@@ -1714,13 +1721,17 @@ The selected card's border/radio dot read `--ui-button-accent` (a solid
1714
1721
  stand-in, since `border-color`/`accent-color` can't render a gradient),
1715
1722
  and its background reads the shared `--ui-button-secondary-surface-muted`
1716
1723
  plus `--ui-button-highlight`, so a gradient theme tints it consistently
1717
- with `button-group`/`pagination-nav`'s equivalents.
1724
+ with `button-group`/`pagination-nav`'s equivalents. That shared value is
1725
+ tuned for small controls, so a card — with far more area — blends it 45%
1726
+ toward `--ui-surface` rather than taking a second token: the tint stays
1727
+ the same hue and gradient, just lighter on light themes (and
1728
+ correspondingly deeper on dark ones) than on a button.
1718
1729
 
1719
1730
  Import: `import "@f-ewald/components/radio-cards.js";`
1720
1731
 
1721
1732
  Properties: `options` (JS property only) : RadioCardOption[], default []; `value` (attribute `value`) : string, default ""; `disabled` (attribute `disabled`) : boolean, default false
1722
1733
  Events: `change`
1723
- CSS custom properties: `--ui-border`, `--ui-button-accent`, `--ui-button-highlight`, `--ui-button-secondary-surface-muted`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
1734
+ CSS custom properties: `--ui-border`, `--ui-button-accent`, `--ui-button-highlight`, `--ui-button-secondary-surface-muted`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
1724
1735
 
1725
1736
  Example:
1726
1737
  ```html
@@ -1865,11 +1876,17 @@ auto; position: relative`, so the button stays pinned to that container's
1865
1876
  own visible corner as its content scrolls, rather than floating over the
1866
1877
  whole page.
1867
1878
 
1879
+ The control is styled as a standard secondary button (ui-button's
1880
+ `secondary` variant: 2rem tall, `--ui-radius-sm` corners, the
1881
+ `--ui-button-secondary-*` background/border tokens, so a gradient theme
1882
+ carries over) rather than a pill, layered over an opaque `--ui-surface`
1883
+ base and an elevation shadow, since it floats above scrolled content.
1884
+
1868
1885
  Import: `import "@f-ewald/components/scroll-to-bottom.js";`
1869
1886
 
1870
1887
  Properties: `target` (JS property only) : HTMLElement | null, default null; `threshold` (attribute `threshold`) : number, default 200; `label` (attribute `label`) : string, default "Scroll to bottom"
1871
1888
  Events: `scroll-to-bottom-triggered`
1872
- CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-shadow`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`
1889
+ CSS custom properties: `--ui-border`, `--ui-button-highlight`, `--ui-button-secondary-`, `--ui-button-secondary-background`, `--ui-button-secondary-background-active`, `--ui-button-secondary-background-hover`, `--ui-button-secondary-border`, `--ui-button-secondary-border-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-radius-sm`, `--ui-shadow`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
1873
1890
 
1874
1891
  Example:
1875
1892
  ```html
@@ -1900,11 +1917,17 @@ auto; position: relative`, so the button stays pinned to that container's
1900
1917
  own visible corner as its content scrolls, rather than floating over the
1901
1918
  whole page.
1902
1919
 
1920
+ The control is styled as a standard secondary button (ui-button's
1921
+ `secondary` variant: 2rem tall, `--ui-radius-sm` corners, the
1922
+ `--ui-button-secondary-*` background/border tokens, so a gradient theme
1923
+ carries over) rather than a pill, layered over an opaque `--ui-surface`
1924
+ base and an elevation shadow, since it floats above scrolled content.
1925
+
1903
1926
  Import: `import "@f-ewald/components/scroll-to-top.js";`
1904
1927
 
1905
1928
  Properties: `target` (JS property only) : HTMLElement | null, default null; `threshold` (attribute `threshold`) : number, default 200; `label` (attribute `label`) : string, default "Scroll to top"
1906
1929
  Events: `scroll-to-top-triggered`
1907
- CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-shadow`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`
1930
+ CSS custom properties: `--ui-border`, `--ui-button-highlight`, `--ui-button-secondary-`, `--ui-button-secondary-background`, `--ui-button-secondary-background-active`, `--ui-button-secondary-background-hover`, `--ui-button-secondary-border`, `--ui-button-secondary-border-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-radius-sm`, `--ui-shadow`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
1908
1931
 
1909
1932
  Example:
1910
1933
  ```html
@@ -2323,11 +2346,33 @@ background/border read the equivalent `--ui-button-secondary-*` tokens
2323
2346
  transparent/bordered look, so it can be themed into a matching (e.g.
2324
2347
  white-to-gray) gradient too.
2325
2348
 
2349
+ `ai` is an orthogonal modifier rather than a fourth variant: it leaves the
2350
+ variant's fill (flat or gradient-themed) untouched and only adds an
2351
+ animated multi-hue ring *outside* the button box — a crisp masked edge
2352
+ plus a blurred bloom behind it that fades out to transparent, so the ring
2353
+ melts into the page instead of ending on a hard line. Both layers are
2354
+ masked into a donut, so nothing is ever painted over the background or
2355
+ label. The ring's four stops are the `--ui-ai-1`…`--ui-ai-4` tokens. It
2356
+ sweeps slowly at rest, faster on hover and while `busy`, holds still while
2357
+ disabled or under `prefers-reduced-motion`, and drops the bloom for a
2358
+ solid `CanvasText` ring in forced-colors mode. The bloom reaches about
2359
+ `0.5rem` past the control, so give an AI button that much clearance from
2360
+ its neighbors and avoid `overflow: hidden` ancestors that would clip it.
2361
+
2362
+ Do not combine `ai` with `pill` under the gradient theme
2363
+ (`data-theme="gradient"`). That theme defines a button through a darker
2364
+ `--ui-button-border` edge plus a glossy top highlight; a pill's
2365
+ fully-rounded silhouette runs flush against the ring around its entire
2366
+ outline, so that border and gloss read as the inner edge of the rainbow
2367
+ rather than as the button's own shape, and the vertical gradient fill
2368
+ stops reading as a gradient at all. Use `ai` with the default
2369
+ `--ui-radius-sm` corners there, and keep `ai` + `pill` for the flat theme.
2370
+
2326
2371
  Import: `import "@f-ewald/components/ui-button.js";`
2327
2372
 
2328
- Properties: `variant` (attribute `variant`) : ButtonVariant, default "primary"; `size` (attribute `size`) : "sm" | "md", default "md"; `pill` (attribute `pill`) : boolean, default false; `href` (attribute `href`) : string | null, default null; `type` (attribute `type`) : "button" | "submit" | "reset", default "button"; `disabled` (attribute `disabled`) : boolean, default false; `busy` (attribute `busy`) : boolean, default false
2373
+ Properties: `variant` (attribute `variant`) : ButtonVariant, default "primary"; `size` (attribute `size`) : "sm" | "md", default "md"; `pill` (attribute `pill`) : boolean, default false; `ai` (attribute `ai`) : boolean, default false; `href` (attribute `href`) : string | null, default null; `type` (attribute `type`) : "button" | "submit" | "reset", default "button"; `disabled` (attribute `disabled`) : boolean, default false; `busy` (attribute `busy`) : boolean, default false
2329
2374
  Events: none
2330
- CSS custom properties: `--ui-border`, `--ui-button-background`, `--ui-button-background-active`, `--ui-button-background-hover`, `--ui-button-border`, `--ui-button-danger-background`, `--ui-button-danger-background-active`, `--ui-button-danger-background-hover`, `--ui-button-danger-border`, `--ui-button-highlight`, `--ui-button-secondary-`, `--ui-button-secondary-background`, `--ui-button-secondary-background-active`, `--ui-button-secondary-background-hover`, `--ui-button-secondary-border`, `--ui-button-secondary-border-hover`, `--ui-button-text-shadow`, `--ui-danger`, `--ui-danger-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius-sm`, `--ui-text`, `--ui-text-muted`
2375
+ CSS custom properties: `--ui-ai-1`, `--ui-ai-2`, `--ui-ai-3`, `--ui-ai-4`, `--ui-border`, `--ui-button-background`, `--ui-button-background-active`, `--ui-button-background-hover`, `--ui-button-border`, `--ui-button-danger-background`, `--ui-button-danger-background-active`, `--ui-button-danger-background-hover`, `--ui-button-danger-border`, `--ui-button-highlight`, `--ui-button-secondary-`, `--ui-button-secondary-background`, `--ui-button-secondary-background-active`, `--ui-button-secondary-background-hover`, `--ui-button-secondary-border`, `--ui-button-secondary-border-hover`, `--ui-button-text-shadow`, `--ui-danger`, `--ui-danger-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius-sm`, `--ui-text`, `--ui-text-muted`
2331
2376
 
2332
2377
  Example:
2333
2378
  ```html
@@ -2337,6 +2382,7 @@ Example:
2337
2382
  </ui-button>
2338
2383
  <ui-button variant="danger">Delete</ui-button>
2339
2384
  <ui-button variant="secondary" href="/properties?edit=42">Edit</ui-button>
2385
+ <ui-button variant="primary" ai>Ask AI</ui-button>
2340
2386
  ```
2341
2387
 
2342
2388
  ## <ui-checkbox>
@@ -2426,7 +2472,7 @@ Import: `import "@f-ewald/components/weight-bar-chart.js";`
2426
2472
 
2427
2473
  Properties: `items` (JS property only) : WeightBarItem[], default []
2428
2474
  Events: none
2429
- CSS custom properties: `--ui-font`, `--ui-font-size-sm`, `--ui-primary`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
2475
+ CSS custom properties: `--ui-font`, `--ui-font-size-sm`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
2430
2476
 
2431
2477
  Example:
2432
2478
  ```html
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@f-ewald/components",
3
3
  "private": false,
4
- "version": "1.27.2",
4
+ "version": "1.28.0",
5
5
  "description": "A collection of universally usable web components for various tasks.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",