@lofid/web 1.0.0 → 1.1.1

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 (39) hide show
  1. package/README.md +19 -0
  2. package/custom-elements.json +4853 -3129
  3. package/dist/index.d.ts +441 -16
  4. package/dist/index.js +4217 -1994
  5. package/dist/index.js.map +1 -1
  6. package/dist/styles/motion.css +1 -1
  7. package/dist/styles/typography.css +41 -0
  8. package/dist/styles/typography.json +858 -0
  9. package/dist/styles/vars.css +660 -305
  10. package/package.json +4 -2
  11. package/readmes/lof-avatar/README.md +3 -2
  12. package/readmes/lof-button/README.md +22 -23
  13. package/readmes/lof-calendar/README.md +1 -1
  14. package/readmes/lof-card/README.md +41 -11
  15. package/readmes/lof-chip/README.md +153 -141
  16. package/readmes/lof-date-picker/README.md +1 -1
  17. package/readmes/lof-empty-state/README.md +78 -0
  18. package/readmes/lof-image-input/README.md +75 -0
  19. package/readmes/lof-kbd/README.md +3 -3
  20. package/readmes/lof-layout/README.md +122 -122
  21. package/readmes/lof-link/README.md +67 -0
  22. package/readmes/lof-nav/README.md +90 -0
  23. package/readmes/lof-page-header/README.md +71 -0
  24. package/readmes/lof-pagination/README.md +141 -141
  25. package/readmes/lof-progress/README.md +2 -2
  26. package/readmes/lof-radio/README.md +2 -2
  27. package/readmes/lof-rating/README.md +90 -0
  28. package/readmes/lof-segmented-button/README.md +2 -2
  29. package/readmes/lof-select/README.md +3 -3
  30. package/readmes/lof-split-button/README.md +2 -2
  31. package/readmes/lof-stat/README.md +73 -0
  32. package/readmes/lof-stepper/README.md +1 -1
  33. package/readmes/lof-switch/README.md +2 -2
  34. package/readmes/lof-tab/README.md +8 -4
  35. package/readmes/lof-table/README.md +114 -0
  36. package/readmes/lof-textfield/README.md +4 -4
  37. package/readmes/lof-time-picker/README.md +1 -1
  38. package/readmes/lof-tooltip/README.md +2 -2
  39. package/readmes/lof-upload/README.md +1 -1
package/README.md CHANGED
@@ -60,10 +60,29 @@ Every element extends `LofElement` (`src/internal/lof-element.ts`): `="false"` t
60
60
  assigned to an Array / Object / Number / Boolean property is converted (React 19), and the 33 old run-together
61
61
  attribute spellings keep working with a one-time deprecation notice (declared per property with `legacy` / `kebab`).
62
62
 
63
+ ## Typography
64
+
65
+ Text styles are purpose tokens, named for what the text is for: `--lof-{heading|body|paragraph|label|action}-{purpose}`,
66
+ for example `--lof-heading-dialog`, `--lof-body-field-label` or `--lof-action-button-small`. Each is a `font` shorthand
67
+ plus five longhands (`-font-family`, `-font-weight`, `-font-size`, `-line-height`, `-letter-spacing`); set
68
+ letter-spacing next to the shorthand, since `font` doesn't include it. They are built from pixel-named primitives
69
+ (`--lof-font-size-24`, `--lof-font-line-height-32`, `--lof-font-weight-semibold`…). Every component reads them;
70
+ none hard-codes a size.
71
+
72
+ ```css
73
+ .card-title { font: var(--lof-heading-card); letter-spacing: var(--lof-heading-card-letter-spacing); }
74
+ ```
75
+
76
+ The earlier size-letter names (`--lof-headings-lg-*`, `--lof-body-md-regular-*`, `--lof-fonts-*`) still work as
77
+ deprecated aliases with identical values and go in 3.0. The values and the migration map live in
78
+ `scripts/typography-spec.mjs`; `node scripts/typography-tokens.mjs` writes them into `tokens/tokens.json`.
79
+
63
80
  ## Other exports
64
81
 
65
82
  | Export | What it is |
66
83
  | --- | --- |
84
+ | `@lofid/web/typography.css` | Utility classes for the typography purpose tokens (`.lof-heading-card`, `.lof-body-default`…); each sets `font` and `letter-spacing`. Needs `vars.css` |
85
+ | `@lofid/web/typography.json` | The purpose tokens with their values, what each is for, which components use it, and the old-name migration map |
67
86
  | `@lofid/web/motion.css` | Motion v1 tokens (also in `vars.css`); recipe durations drop to 0ms under reduced motion |
68
87
  | `@lofid/web/motion.tokens.json` | The same tokens in DTCG format (source: `tokens/motion.tokens.json`) |
69
88
  | `@lofid/web/ag-grid.css` | AG Grid 33+ theme on the tokens; scope it with `.lof-data-table` (source: `styles/ag-grid.css`) |