@lofid/web 1.0.0 → 1.1.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 (38) hide show
  1. package/README.md +19 -0
  2. package/custom-elements.json +4853 -3129
  3. package/dist/index.d.ts +424 -16
  4. package/dist/index.js +4069 -1972
  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 +1 -1
  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 +15 -3
  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-progress/README.md +2 -2
  25. package/readmes/lof-radio/README.md +2 -2
  26. package/readmes/lof-rating/README.md +90 -0
  27. package/readmes/lof-segmented-button/README.md +2 -2
  28. package/readmes/lof-select/README.md +2 -2
  29. package/readmes/lof-split-button/README.md +2 -2
  30. package/readmes/lof-stat/README.md +73 -0
  31. package/readmes/lof-stepper/README.md +1 -1
  32. package/readmes/lof-switch/README.md +2 -2
  33. package/readmes/lof-tab/README.md +8 -4
  34. package/readmes/lof-table/README.md +114 -0
  35. package/readmes/lof-textfield/README.md +3 -3
  36. package/readmes/lof-time-picker/README.md +1 -1
  37. package/readmes/lof-tooltip/README.md +2 -2
  38. package/readmes/lof-upload/README.md +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lofid/web",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Lofid Design System web components (Lit) — rebuilt, API-compatible with 1.5.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -13,6 +13,8 @@
13
13
  "import": "./dist/index.js"
14
14
  },
15
15
  "./vars.css": "./dist/styles/vars.css",
16
+ "./typography.css": "./dist/styles/typography.css",
17
+ "./typography.json": "./dist/styles/typography.json",
16
18
  "./motion.css": "./dist/styles/motion.css",
17
19
  "./motion.tokens.json": "./dist/styles/motion.tokens.json",
18
20
  "./custom-elements.json": "./custom-elements.json",
@@ -32,7 +34,7 @@
32
34
  "cem": "node scripts/cem.mjs"
33
35
  },
34
36
  "dependencies": {
35
- "@lofid/icons": "1.0.0",
37
+ "@lofid/icons": "1.1.0",
36
38
  "lit": "^3.3.0"
37
39
  },
38
40
  "devDependencies": {
@@ -94,7 +94,7 @@
94
94
  | --- | --- | --- | --- | --- |
95
95
  | `size` | `size` | `"large" \| "medium" \| "small" \| "extra-small" \| "lg" \| "md" \| "sm" \| "xs"` | `"medium"` | Diameter step: `large` 40px, `medium` 32px, `small` 24px, `extra-small` 20px; each binds the matching body-*-semibold text role for initials. `lg` / `md` / `sm` / `xs` are alternative spellings and stay supported — they are normalised to the full words, not deprecated. Reflected. |
96
96
  | `type` | `type` | `"image" \| "text" \| "icon"` | `"image"` | What is rendered inside the circle: `image` shows `src`, `text` shows the `text` initials, `icon` shows the default slot. Reflected. |
97
- | `variant` | `variant` | `"fill" \| "subtle" \| "outline"` | `"fill"` | Fill style: `fill` = solid inverse background with light text, `subtle` = elevated neutral background, `outline` = `--lof-bg-neutral` fill with a 1px `--lof-border-default` border (opaque, so it stays readable over any background). Reflected. |
97
+ | `variant` | `variant` | `"fill" \| "subtle" \| "outline"` | `"subtle"` | Default since the 2026-11 refresh: `subtle` (muted disc, hairline edge, dark initials). Fill style: `fill` = solid inverse background with light text, `subtle` = elevated neutral background, `outline` = `--lof-bg-neutral` fill with a 1px `--lof-border-default` border (opaque, so it stays readable over any background). Reflected. |
98
98
  | `src` | `src` | `string` | `""` | Image URL for `type="image"`; when empty nothing is rendered inside the circle (there is no fallback to initials). |
99
99
  | `text` | `text` | `string` | `""` | Initials shown for `type="text"`; rendered uppercase via `text-transform`. |
100
100
  | `alt` | `alt` | `string` | `"Avatar"` | Alt text of the `<img>` for `type="image"`; the default is the generic word "Avatar", so pass the person's name. |
@@ -22,14 +22,15 @@ Action button implementing the Figma "Button" component: a native `<button>` wit
22
22
  <lof-button variant="secondary" tone="destructive">Remove</lof-button>
23
23
  <lof-button variant="ghost" tone="destructive">Discard</lof-button>
24
24
 
25
- <!-- Sizes: 32 / 40 / 48px -->
25
+ <!-- Sizes: 28 / 34 / 40px -->
26
26
  <lof-button size="small">Small</lof-button>
27
27
  <lof-button size="medium">Medium</lof-button>
28
28
  <lof-button size="large">Large</lof-button>
29
29
 
30
30
  <!-- Corner radius -->
31
- <lof-button border="corner-radius">Pill</lof-button>
32
- <lof-button border="small-corner-radius">Small radius</lof-button>
31
+ <lof-button border="corner-radius">6px corners (default)</lof-button>
32
+ <lof-button border="small-corner-radius">4px corners</lof-button>
33
+ <lof-button border="pill">Pill</lof-button>
33
34
  <lof-button border="no-corner-radius">Square</lof-button>
34
35
 
35
36
  <!-- Icon + label, and icon-only (needs an accessible name) -->
@@ -93,12 +94,12 @@ Action button implementing the Figma "Button" component: a native `<button>` wit
93
94
  | Property | Attribute | Type | Default | Description |
94
95
  | --- | --- | --- | --- | --- |
95
96
  | `variant` | `variant` | `"default" \| "primary" \| "secondary" \| "text" \| "link" \| "icon" \| "static" \| "outline" \| "ghost"` | `"default"` | Style axis (Figma "Style"). Canonical: `default` (legacy neutral fill), `primary`, `secondary` (outlined), `ghost` (text-only), `link` (underlined inline text), `static` (transparent, static-light label for dark/colored surfaces). Deprecated aliases still accepted: `outline` = secondary, `text` = ghost, and `icon` (pre-2.0 40px circular icon button — use `icon-only` with a style instead). |
96
- | `tone` | `tone` | `"default" \| "primary" \| "secondary" \| "critical" \| "success" \| "neutral" \| "brand" \| "danger" \| "destructive"` | `undefined` | Tone axis (Figma "Tone"). Canonical: `neutral` (= `default`), `brand` (= `primary`), `destructive`. Deprecated aliases `critical` and `danger` map to destructive and log a one-time console notice. `secondary` and `success` are legacy extras with no Figma counterpart: `secondary` styles only the legacy `icon` variant; on every other variant it renders as `neutral` and logs a one-time notice. Left UNSET it means `neutral`, except on `variant="primary"`, where it still means `brand` for one release — see `effectiveTone`. Write the tone explicitly and you always get what you wrote. |
97
- | `iconOnly` | `icon-only` | `boolean` | `false` | Figma "Type=Icon Only": renders a square button (32/40/48px per `size`) of the current style and tone with no padding or min-width. Composes with every `variant`; slot a single `lof-icon` and set `aria-label`. Reflected. |
97
+ | `tone` | `tone` | `"accent" \| "primary" \| "neutral" \| "mono" \| "default" \| "brand" \| "destructive" \| "success" \| "secondary" \| "critical" \| "danger"` | `undefined` | Tone axis. Canonical: `accent` (= `primary`, the blue accent), `neutral` (= `mono` = `default`, the black fill), `brand` (mint), `destructive`. Unset: `accent` on fill and link styles, `neutral` on outline and ghost. `critical` / `danger` are deprecated spellings of `destructive`; `secondary` only applies to the legacy `icon` variant. |
98
+ | `iconOnly` | `icon-only` | `boolean` | `false` | Figma "Type=Icon Only": renders a square button (28/34/40px per `size`) of the current style and tone with no padding or min-width. Composes with every `variant`; slot a single `lof-icon` and set `aria-label`. Reflected. |
98
99
  | `loading` | `loading` | `boolean` | `false` | Figma "State=Loading": replaces the label with a spinner (`indicator` part), sets `aria-busy`, and blocks pointer and programmatic clicks. The button keeps its width. Reflected. |
99
100
  | `size` | `size` | `"small" \| "medium" \| "large"` | `"medium"` | Figma "Size": `small` = 32px, `medium` = 40px, `large` = 48px height, with matching padding, typography and minimum width. |
100
- | `border` | `border` | `"corner-radius" \| "small-corner-radius" \| "no-corner-radius"` | `"corner-radius"` | Corner treatment: `corner-radius` = fully rounded pill, `small-corner-radius` = small radius token, `no-corner-radius` = square corners. |
101
- | `disabled` | `disabled` | `boolean` | `false` | Figma "State=Disabled": dims the button to 50% opacity, flattens filled styles to the disabled fill, shows a `not-allowed` cursor and swallows every click (including programmatic `.click()`). Reflected. |
101
+ | `border` | `border` | `"corner-radius" \| "small-corner-radius" \| "pill" \| "no-corner-radius"` | `"corner-radius"` | Corner treatment: `corner-radius` = the 6px control radius (`--lof-radius-control`), `small-corner-radius` = 4px, `pill` = fully rounded, `no-corner-radius` = square. |
102
+ | `disabled` | `disabled` | `boolean` | `false` | Disabled look: no opacity fade (since the 2026-11 refresh); every style switches to the disabled text colour, filled styles flatten to the neutral wash and outlines to the subtle edge; shows a `not-allowed` cursor and swallows every click (including programmatic `.click()`). Reflected. |
102
103
  | `ariaLabel` | `aria-label` | `string \| null` | `null` | Accessible name forwarded to the inner native `<button>`. Required for `icon-only` buttons, whose slotted icon has no visible text. |
103
104
  | `badge` | `badge` | `string` | `""` | Text for a small `lof-badge` anchored to the top-right corner (e.g. "3", "999+"). Empty string renders no badge. Ignored when `badge-dot` is set. |
104
105
  | `badgeDot` | `badge-dot` | `boolean` | `false` | Renders a small dot badge in the top-right corner instead of a numbered badge; takes precedence over `badge`. The dot is inset 2px from the corner so it lands on a circular icon button's edge. |
@@ -150,22 +151,20 @@ Focus: `:focus-visible` shows the shared 2px focus outline plus inner/outer halo
150
151
 
151
152
  ## Notes / Edge Cases
152
153
 
153
- ### The `variant="primary"` tone transition
154
+ ### Tone defaults (2026-11 admin refresh)
154
155
 
155
- Figma's `Style=Primary` is the **filled** style, and `Tone` picks its colour — so Primary + Neutral is the neutral fill and Primary + Brand is the brand fill. This component's `variant="primary"` historically meant *both* "filled" and "brand-coloured", which left the Figma-canonical Primary/Neutral cell unreachable by its own names.
156
+ The accent (blue) is the primary-action colour; black is the "mono" companion; mint (`brand`) stays available for brand moments.
156
157
 
157
- That cell now works: **`variant="primary" tone="neutral"` renders the neutral fill.**
158
-
159
- For one release there is a deliberate wrinkle, and it is worth knowing before you debug it:
160
-
161
- | Markup | Renders | Why |
162
- | --- | --- | --- |
163
- | `<lof-button>` | neutral fill | Unchanged. `variant` defaults to `default`, which is Figma's Primary/Neutral. |
164
- | `<lof-button variant="primary">` | **brand** fill | Unset tone still means brand *here only*, so existing brand buttons do not silently turn neutral. Logs a one-time console notice. |
165
- | `<lof-button variant="primary" tone="brand">` | brand fill | The explicit form. **Write this.** |
166
- | `<lof-button variant="primary" tone="neutral">` | neutral fill | The Figma-canonical cell, now reachable. |
158
+ | Markup | Renders |
159
+ | --- | --- |
160
+ | `<lof-button>` / `<lof-button variant="primary">` | accent fill |
161
+ | `<lof-button tone="neutral">` (or `tone="mono"`) | black (mono) fill |
162
+ | `<lof-button variant="primary" tone="brand">` | mint brand fill |
163
+ | `<lof-button variant="secondary">` | outline: hairline border on the surface, muted icon |
164
+ | `<lof-button variant="ghost">` | no chrome until hover |
165
+ | `<lof-button variant="link">` | accent text, underline on hover |
167
166
 
168
- So for this release, writing the default value explicitly changes the result: `variant="primary"` alone and `variant="primary" tone="neutral"` render differently. Setting `tone` explicitly always gives you exactly what you wrote. A future major will make an unset tone mean `neutral` everywhere, matching every other style.
167
+ An unset tone now has one meaning per style, so the one-time console notice for `variant="primary"` without a tone is gone. Before this refresh an unset tone rendered the brand (mint) fill on `variant="primary"` and the black fill on `default`: write `tone="brand"` or `tone="neutral"` to keep those looks.
169
168
 
170
169
  ### Tone × Style matrix
171
170
 
@@ -180,11 +179,11 @@ Figma populates only part of the grid. Combinations outside it have no design-sy
180
179
  `Link` additionally has no icon-only and no loading state in the design.
181
180
 
182
181
  - **Events.** The element dispatches no custom events. The native `click` is `composed`, so a listener on `<lof-button>` (or an ancestor) receives exactly one event per activation — do not re-dispatch it.
183
- - **Minimum widths** come from the Figma master: small/medium/large = 80/100/120px, static = 40/50/60px. `link` has no minimum, `icon-only` is a fixed square (32/40/48px) and the legacy `icon` variant is always a 40px circle regardless of `size`. Override per instance with `--lof-button-min-width`.
184
- - **`border`** exposes `small-corner-radius` and `no-corner-radius`, which have no design-system backing — every one of Figma's 624 button nodes is fully rounded. They are a code-only extension, kept for existing layouts.
182
+ - **No minimum width** since the 2026-11 refresh: buttons size to their label, as dense admin layouts expect. Set `--lof-button-min-width` (e.g. `100px`) to restore a floor. `icon-only` is a fixed square (28/34/40px) and the legacy `icon` variant is a 34px circle regardless of `size`.
183
+ - **`border`**: buttons default to the 6px control radius shared with fields, selects and the segmented control; `pill` restores the fully rounded shape of earlier releases.
185
184
  - **Legacy `icon` variant vs `icon-only`.** `variant="icon"` keeps its pre-2.0 look (40px circle, tone-driven fill, `tone="secondary"` gives it an outline) and ignores `size` and `border`. Since 1.5.0 the neutral tone's hover and pressed state is the Icon Only (ghost) hover tint laid over its grey fill; before, its hover showed no change. `icon-only` is an axis that composes with any style and size — prefer it.
186
185
  - **`tone` on `secondary` / `ghost` / `link`** changes the label, border or text colour only; the fill stays on the surface. The destructive outline border is deliberately subtle at rest and only goes solid on hover/pressed, matching Figma.
187
186
  - **`static`** is a neutral-only style meant for coloured or dark backgrounds; other tones have no static treatment.
188
187
  - **`success`** is a legacy tone without a Figma counterpart; it renders a green fill/outline/ghost tint but is not part of the current spec.
189
188
  - **Badges** render a small `lof-badge` positioned outside the button's box (numbered) or 2px inside the corner (dot); give the button room in tight layouts. `badge-dot` wins when both are set.
190
- - **Disabled styling**: only filled styles (`default`, `primary`, `icon`) flatten to the neutral disabled fill; `secondary`, `ghost`, `link` and `static` keep their shape at 50% opacity so they still read as their own style.
189
+ - **Disabled styling**: every style keeps its look at 50% opacity and drops its shadow; the inner button is `aria-disabled` and leaves the tab order.
@@ -106,6 +106,6 @@ calendar.addEventListener("lof-change", (e) => {
106
106
  - Comparisons happen at local midnight: the `Date` passed to `isDateDisabled` and returned in `lof-change` is `new Date(y, m, d)`, so read it with local getters, not `toISOString()`.
107
107
  - `disabled` makes every day fail the disabled check and natively disables every day button and both navigation buttons, so nothing in the calendar is in the tab order; pointer events stay on the host so the `not-allowed` cursor shows.
108
108
  - Each cell follows Figma ".Date Days": a 36 px full-rounded halo around a 28 px disc. The halo carries hover (`action/overlay/hover`), the focus ring and the selected day's `elevated-1` backing; the disc carries today's 1 px brand ring and the selected day's `inverse-2` fill with an inverse semibold label.
109
- - Figma treats the cell tone as one axis, so exactly one applies per day: today beats weekend beats adjacent-month. Adjacent-month and weekend labels use the caption colour (`--lof-text-caption`; changed in 1.5.0, they used to fade to 40% / 70% opacity) — on the label only, so a *selected* weekend or adjacent-month day still reads at full contrast on the dark disc. A disabled day switches to the disabled text colour, with no extra fade when it is also a weekend or adjacent-month day (changed in 1.5.0; those used to fade further), and today keeps its brand ring even when it is unavailable or the calendar is disabled (changed in 1.5.0; it used to switch to a neutral ring).
109
+ - Figma treats the cell tone as one axis, so exactly one applies per day: today beats weekend beats adjacent-month. Adjacent-month labels use the placeholder colour (`--lof-text-placeholder`); weekend labels read like any other day (2026-11 refresh: weekends used to share the caption colour, which made them look unavailable) — on the label only, so a *selected* adjacent-month day still reads at full contrast on the dark disc. A disabled day switches to the disabled text colour, with no extra fade when it is also a weekend or adjacent-month day (changed in 1.5.0; those used to fade further), and today is marked by semibold type and a 4px dot under the number (2026-11 refresh; it used to be a 1px brand ring, which measured about 1.5:1 on white), kept even when it is unavailable or the calendar is disabled.
110
110
  - The month-navigation buttons are hand-rolled ghost buttons that bind the same action tokens as `<lof-button variant="ghost">` (audit 8b) — they are intentionally not `<lof-button>` instances.
111
111
  - The host has a fixed `max-width: 320px`, its own radius, shadow and padding and no border (Figma draws the card with `shadow/xl`, approximated here by `--lof-shadows-shadow-400`, the nearest shipped step); wrap it or override on the host if you need a different footprint.
@@ -1,6 +1,6 @@
1
1
  # lof-card
2
2
 
3
- `<lof-card>` is an elevated, padded surface that groups related content — the Figma "Card" component. `type="custom"` (the default) pads whatever you slot in and applies the Figma card typography to slotted headings and paragraphs; `type="media"` adds a flush media region above the body, meant for a `<lof-card-media>` image header. Use it for dashboard tiles, summary blocks and list items that pair a title with body copy. It is a static container with no interaction of its own — for transient content use `lof-modal` or `lof-drawer` instead, and for a surface with its own tone/elevation variants use `lof-container`.
3
+ `<lof-card>` is a surface that groups related content: a 12px card with a hairline edge and an xs shadow. Since the 2026-11 admin refresh it has an optional anatomy: a header row (`heading` and `description`, or the `title` slot, with a `toolbar` slot for actions on the right), the body, and a `footer` slot, divided by hairlines; `flush` lets the body run edge to edge for tables and lists. `type="custom"` (the default) pads whatever you slot in and applies the Figma card typography to slotted headings and paragraphs; `type="media"` adds a flush media region above the body, meant for a `<lof-card-media>` image header. Use it for dashboard tiles, summary blocks and list items that pair a title with body copy. It is a static container with no interaction of its own — for transient content use `lof-modal` or `lof-drawer` instead, and for a surface with its own tone/elevation variants use `lof-container`.
4
4
 
5
5
  ## Usage
6
6
 
@@ -18,6 +18,18 @@
18
18
  <p>12 meeting rooms · 24/7 operations</p>
19
19
  </lof-card>
20
20
 
21
+ <!-- Header, toolbar and footer -->
22
+ <lof-card heading="Highlights" description="All time sales">
23
+ <lof-button slot="toolbar" variant="ghost" icon-only aria-label="More"><lof-icon name="more-vertical"></lof-icon></lof-button>
24
+ <p>$295.7k across three channels.</p>
25
+ <lof-link slot="footer" href="/reports" arrow>View report</lof-link>
26
+ </lof-card>
27
+
28
+ <!-- Edge-to-edge body for a table -->
29
+ <lof-card heading="Teams" flush>
30
+ <lof-table appearance="plain"></lof-table>
31
+ </lof-card>
32
+
21
33
  <!-- Cards in a grid -->
22
34
  <div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;">
23
35
  <lof-card><h4>On time</h4><p>98.2%</p></lof-card>
@@ -28,15 +40,16 @@
28
40
 
29
41
  <!-- readme-gen:start -->
30
42
 
31
- <!-- Generated from lof-card.ts — do not edit; run readme-generate.mjs -->
32
-
33
43
  ## API
34
44
 
35
45
  ### Attributes / Properties
36
46
 
37
47
  | Property | Attribute | Type | Default | Description |
38
48
  | --- | --- | --- | --- | --- |
39
- | `type` | `type` | `"custom" \| "media"` | `"custom"` | Figma "Type" axis: custom (default) renders slotted content with card padding; media adds a flush media region (slot name="media") above the content — pair it with <lof-card-media>. Reflected. |
49
+ | `type` | `type` | `"custom" \| "media"` | `"custom"` | custom (default): padded body. media: adds a flush media region (slot `media`) above the body — pair it with <lof-card-media>. Reflected. |
50
+ | `heading` | `heading` | `string` | `""` | Header title; renders the header row. The `title` slot replaces it. |
51
+ | `description` | `description` | `string` | `""` | Muted line under the header title. |
52
+ | `flush` | `flush` | `boolean` | `false` | The body runs edge to edge (no padding): for tables, lists and media. Reflected. |
40
53
 
41
54
  ## Events
42
55
 
@@ -48,16 +61,32 @@
48
61
 
49
62
  | Slot | Description |
50
63
  | --- | --- |
51
- | (default) | Card body; slotted headings and paragraphs receive the Figma card typography |
52
- | `media` | Flush media region above the body; rendered only when `type="media"` |
64
+ | (default) | The body. Slotted `h1`–`h4` and `p` get the card type styles. |
65
+ | `media` | A flush media region above the body (`type="media"` only). |
66
+ | `title` | Rich header title content (replaces `heading`). |
67
+ | `toolbar` | Actions on the right of the header row: buttons, a switch, a menu. Fields slotted here drop their label row. |
68
+ | `footer` | A footer row under a hairline: links, actions, totals. |
53
69
 
54
70
  ## CSS Parts
55
71
 
56
72
  | Part | Description |
57
73
  | --- | --- |
58
- | `base` | The outer elevated card surface |
59
- | `header` | The media region wrapper (present only when `type="media"`) |
60
- | `content` | The padded body that wraps the default slot |
74
+ | `base` | The card surface |
75
+ | `head` | The header row (hidden without a heading, title or toolbar) |
76
+ | `title` | The header title (`heading`) |
77
+ | `description` | The header description |
78
+ | `toolbar` | The toolbar region |
79
+ | `header` | The media region (`type="media"` only) |
80
+ | `content` | The body |
81
+ | `footer` | The footer row (hidden without footer content) |
82
+
83
+ ## Tokens / CSS Variables
84
+
85
+ ### Component hooks
86
+
87
+ | Custom property | Default | Description |
88
+ | --- | --- | --- |
89
+ | `--lof-card-padding` | `20px` | Inline padding of the header, body and footer, and the body's block padding |
61
90
 
62
91
  <!-- readme-gen:end -->
63
92
 
@@ -69,7 +98,8 @@
69
98
 
70
99
  ## Notes / Edge Cases
71
100
 
72
- - `type="media"` removes the card's own padding and clips overflow so the media sits flush against the rounded border; the body (`content` part) keeps the standard padding. Content placed in the `media` slot without `type="media"` is not rendered, because the slot only exists in that mode.
101
+ - `type="media"` clips overflow so the media sits flush against the rounded border; the body (`content` part) keeps the standard padding. Content placed in the `media` slot without `type="media"` is not rendered, because the slot only exists in that mode.
73
102
  - The `header` part exists only while `type="media"`; `::part(header)` matches nothing otherwise.
74
103
  - Slotted `h1`–`h4` and `p` elements get the Figma card roles (heading md / body lg) with their default margins reset; wrap other content in your own elements to style it.
75
- - The card is elevated with Figma's `shadow/sm` and draws no border, in both light and dark themes. There is no hover lift or transition.
104
+ - The card draws its edge as a 1px ring in its shadow (`--lof-shadow-surface`: a hairline in `--lof-border-subtle` plus the xs shadow), so the border never changes its size. There is no hover lift or transition.
105
+ - The header row is at least 56px tall; header, body and footer share the 20px inline padding (`--lof-card-padding`).
@@ -67,10 +67,10 @@
67
67
  | --- | --- | --- | --- | --- |
68
68
  | `label` | `label` | `string` | `"Label"` | Text shown in the chip; also its accessible name and the drag payload. |
69
69
  | `fieldAriaLabel` | `field-aria-label` | `string` | `undefined` | Accessible name for an icon-only or intentionally unlabelled chip; overrides `label` for the chip and its remove button. |
70
- | `tone` | `tone` | `"neutral" \| "destructive" \| "warning" \| "success" \| "info" \| "danger"` | `"neutral"` | Colour tone (Figma Tone): `neutral`, `destructive`, `warning`, `success` or `info`. Combined with `variant`. `"danger"` is a deprecated alias of `"destructive"`: it keeps working, logs a one-time console notice, and is normalised to `"destructive"` on the property and the reflected attribute. Reflected. |
71
- | `variant` | `variant` | `"fill" \| "subtle" \| "primary" \| "secondary"` | `"fill"` | Emphasis (Figma Style): `fill` = solid tone background, `subtle` = tinted background with tone-coloured text. Figma's own spellings `primary` and `secondary` are accepted and normalised to `fill` / `subtle`. Reflected. |
70
+ | `tone` | `tone` | `"neutral" \| "accent" \| "destructive" \| "warning" \| "success" \| "info" \| "danger"` | `"neutral"` | Colour tone (Figma Tone): `neutral`, `destructive`, `warning`, `success` or `info`. Combined with `variant`. `"danger"` is a deprecated alias of `"destructive"`: it keeps working, logs a one-time console notice, and is normalised to `"destructive"` on the property and the reflected attribute. Reflected. |
71
+ | `variant` | `variant` | `"fill" \| "subtle" \| "outline" \| "primary" \| "secondary"` | `"fill"` | Emphasis (Figma Style): `fill` = solid tone background, `subtle` = tinted background with tone-coloured text. Figma's own spellings `primary` and `secondary` are accepted and normalised to `fill` / `subtle`. Reflected. |
72
72
  | `size` | `size` | `"small" \| "medium" \| "large" \| "sm" \| "md" \| "lg"` | `"medium"` | Height scale (Figma Size): `small` 24px / body-sm, `medium` 28px / body-md, `large` 32px / body-lg. Icon size follows (12 / 14 / 16px). `sm` / `md` / `lg` are accepted and normalised to the full words. Reflected. |
73
- | `border` | `border` | `"default" \| "rounded"` | `"default"` | Corner shape (Figma Border): `default` = 4px radius, `rounded` = fully rounded with 12px horizontal padding. Reflected. |
73
+ | `border` | `border` | `"default" \| "rounded"` | `"default"` | Corner shape (Figma Border): `default` = 6px radius, `rounded` = fully rounded with 12px horizontal padding. Reflected. |
74
74
  | `leadingIcon` | `leading-icon` | `string` | `undefined` | Icon name from the generated icon dictionary (e.g. "settings") — rendered via <lof-icon> before the label. Ignored when `avatar` is set. |
75
75
  | `trailingIcon` | `trailing-icon` | `string` | `undefined` | Icon name from the generated icon dictionary, rendered after the label. |
76
76
  | `avatar` | `avatar` | `string` | `undefined` | Initials text for the avatar (e.g. "JD"), rendered as a `<lof-avatar type="text">` before the label. Mutually exclusive with leadingIcon (avatar wins). |
@@ -113,6 +113,18 @@ Set these on the host (or an ancestor) to customise the element without touching
113
113
 
114
114
  <!-- readme-gen:end -->
115
115
 
116
+ ## 2026-11 admin refresh
117
+
118
+ - Chips are status labels: 20 / 24 / 28px tall (small / medium / large), 4px corners at small and 6px above, 12px Medium text (10px at small).
119
+ - `variant="subtle"` is a light tint with a 1px edge in the same hue; `variant="outline"` (new) is the surface colour with a hairline, the tone tinting only the text.
120
+ - `tone="accent"` (new) uses the blue accent: a solid accent fill, or the accent tint when subtle.
121
+
122
+ ```html
123
+ <lof-chip label="Public" tone="success" variant="subtle" size="small"></lof-chip>
124
+ <lof-chip label="Management" variant="outline"></lof-chip>
125
+ <lof-chip label="New" tone="accent" variant="subtle"></lof-chip>
126
+ ```
127
+
116
128
  ## Accessibility
117
129
 
118
130
  - The chip body is a `<span role="button" tabindex="0">` whose `aria-label` is the `label` text. The shadow root uses `delegatesFocus`, so calling `focus()` on the host focuses that inner span.
@@ -14,7 +14,7 @@
14
14
  <!-- Bounded to 2026, Monday-first grid -->
15
15
  <lof-date-picker label="Handoff" min-date="2026-01-01" max-date="2026-12-31" week-start="mon"></lof-date-picker>
16
16
 
17
- <!-- Field heights 32 / 40 / 48; full-width fills the parent -->
17
+ <!-- Field heights 28 / 34 / 40; full-width fills the parent -->
18
18
  <lof-date-picker size="small" label="Small"></lof-date-picker>
19
19
  <lof-date-picker size="medium" label="Medium" variant="outlined"></lof-date-picker>
20
20
  <lof-date-picker size="large" label="Large" full-width></lof-date-picker>
@@ -0,0 +1,78 @@
1
+ # lof-empty-state
2
+
3
+ `<lof-empty-state>` fills a page, card or table that has nothing in it yet: an illustration (the `media` slot) or a round icon badge (`icon`), a heading, a sentence and the actions that get the user started (the `actions` slot). Centred by default; `align="start"` for a left-aligned panel. New in the 2026-11 admin refresh.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <lof-card>
9
+ <lof-empty-state heading="Swift setup for new teams" description="Create a team to plan work, share files and track progress in one place." icon="people">
10
+ <lof-button slot="actions" tone="mono">Create team</lof-button>
11
+ <lof-button slot="actions" variant="secondary">Import</lof-button>
12
+ </lof-empty-state>
13
+ </lof-card>
14
+
15
+ <!-- With an illustration -->
16
+ <lof-empty-state heading="No invoices yet" description="Invoices you send appear here.">
17
+ <svg slot="media" width="160" height="110" viewBox="0 0 160 110" fill="none" aria-hidden="true">
18
+ <rect x="34" y="12" width="92" height="86" rx="8" fill="var(--lof-bg-muted)" stroke="var(--lof-border-default)" />
19
+ <path d="M50 36h60M50 52h60M50 68h36" stroke="var(--lof-border-control)" stroke-width="4" stroke-linecap="round" />
20
+ </svg>
21
+ </lof-empty-state>
22
+
23
+ <!-- In a table -->
24
+ <lof-table id="t">
25
+ <lof-empty-state slot="empty" size="small" heading="No results" description="Try a different search." icon="search"></lof-empty-state>
26
+ </lof-table>
27
+ ```
28
+
29
+ <!-- readme-gen:start -->
30
+
31
+ ## API
32
+
33
+ ### Attributes / Properties
34
+
35
+ | Property | Attribute | Type | Default | Description |
36
+ | --- | --- | --- | --- | --- |
37
+ | `heading` | `heading` | `string` | `""` | Heading text. |
38
+ | `description` | `description` | `string` | `""` | Supporting sentence under the heading. |
39
+ | `icon` | `icon` | `string` | `""` | lof-icon name for a round icon badge, used when the `media` slot is empty. |
40
+ | `headingLevel` | `heading-level` | `number` | `3` | Heading level for `heading` (2 to 6). |
41
+ | `size` | `size` | `"small" \| "medium" \| "large"` | `"medium"` | |
42
+ | `align` | `align` | `"center" \| "start"` | `"center"` | center (default) \| start. |
43
+
44
+ ## Events
45
+
46
+ | Event | Detail | Bubbles / composed | Description |
47
+ | --- | --- | --- | --- |
48
+ | — | — | — | This element emits no custom events. |
49
+
50
+ ## Slots
51
+
52
+ | Slot | Description |
53
+ | --- | --- |
54
+ | `media` | An illustration or image (replaces the icon badge). |
55
+ | (default) | Extra content under the description. |
56
+ | `actions` | Buttons or links. |
57
+
58
+ ## CSS Parts
59
+
60
+ | Part | Description |
61
+ | --- | --- |
62
+ | `title` | The heading |
63
+ | `base` | The block |
64
+ | `media` | The media region |
65
+ | `icon` | The icon badge |
66
+ | `description` | The description |
67
+ | `actions` | The actions row |
68
+
69
+ <!-- readme-gen:end -->
70
+
71
+ ## Accessibility
72
+
73
+ - The heading is `role="heading"` at `heading-level` (default 3); set it to fit the page outline.
74
+ - The icon badge is decorative (`aria-hidden`); give a slotted illustration `alt=""` unless it adds information.
75
+
76
+ ## Notes / Edge Cases
77
+
78
+ - Default padding is 40px vertically (24 small, 64 large); the block is at most 520px wide (`--lof-empty-state-max-width`).
@@ -0,0 +1,75 @@
1
+ # lof-image-input
2
+
3
+ `<lof-image-input>` picks, previews and removes one image: an avatar, a team thumbnail, a logo. The preview is a button (click, Enter or Space opens the file chooser, and an image file can be dropped on it); a small corner button removes the image. It is form-associated: with a `name` the chosen File is submitted with the form. New in the 2026-11 admin refresh.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <!-- Empty: a placeholder silhouette -->
9
+ <lof-image-input name="avatar" field-aria-label="Avatar"></lof-image-input>
10
+
11
+ <!-- With the saved image -->
12
+ <lof-image-input src="/img/team.png" field-aria-label="Team thumbnail" size="small"></lof-image-input>
13
+
14
+ <!-- Rounded square for logos, 2 MB limit -->
15
+ <lof-image-input id="logo" shape="rounded" size="large" max-size="2000000" field-aria-label="Company logo"></lof-image-input>
16
+ <script>
17
+ const logo = document.getElementById('logo');
18
+ logo.addEventListener('lof-change', (e) => console.log(e.detail.file, e.detail.src));
19
+ logo.addEventListener('lof-error', (e) => alert(e.detail.reason === 'size' ? 'File too large' : 'Not an image'));
20
+ </script>
21
+ ```
22
+
23
+ <!-- readme-gen:start -->
24
+
25
+ ## API
26
+
27
+ ### Attributes / Properties
28
+
29
+ | Property | Attribute | Type | Default | Description |
30
+ | --- | --- | --- | --- | --- |
31
+ | `src` | `src` | `string` | `""` | The current image URL. Choosing a file replaces it with an object URL; removing clears it. |
32
+ | `name` | `name` | `string` | `""` | Form field name for the chosen File. |
33
+ | `accept` | `accept` | `string` | `"image/png, image/jpeg, image/webp, image/gif"` | |
34
+ | `shape` | `shape` | `"circle" \| "rounded"` | `"circle"` | |
35
+ | `size` | `size` | `"small" \| "medium" \| "large"` | `"medium"` | 56 / 80 / 112px. Reflected. |
36
+ | `disabled` | `disabled` | `boolean` | `false` | |
37
+ | `noRemove` | `no-remove` | `boolean` | `false` | Hide the remove button. |
38
+ | `fieldAriaLabel` | `field-aria-label` | `string` | `"Image"` | Accessible name of the picker. |
39
+ | `maxSize` | `max-size` | `number` | `0` | Largest accepted file in bytes (0 = any). Larger files fire lof-error and are ignored. |
40
+
41
+ ## Events
42
+
43
+ | Event | Detail | Bubbles / composed | Description |
44
+ | --- | --- | --- | --- |
45
+ | `lof-change` | `CustomEvent<ImageInputChangeDetail>` | yes / yes | An image was chosen or removed. `detail: { file, src }` (`file` is `null` after removal). |
46
+ | `lof-error` | `CustomEvent<{ reason: string; file: File; }>` | yes / yes | A file was rejected. `detail: { reason: "type" \| "size", file }`. |
47
+ | `lof-remove` | — | yes / yes | The image was removed. |
48
+
49
+ ## Slots
50
+
51
+ | Slot | Description |
52
+ | --- | --- |
53
+ | `placeholder` | Replaces the default silhouette when there is no image. |
54
+
55
+ ## CSS Parts
56
+
57
+ | Part | Description |
58
+ | --- | --- |
59
+ | `base` | The wrapper |
60
+ | `preview` | The preview button |
61
+ | `remove` | The remove button |
62
+
63
+ <!-- readme-gen:end -->
64
+
65
+ ## Accessibility
66
+
67
+ - The preview is a native button named "<field-aria-label>: choose image" or "… change image". Delete or Backspace on it removes the image.
68
+ - The remove button is named "Remove <field-aria-label>" and returns focus to the preview.
69
+ - The hidden file input is out of the tab order; the preview button is the only stop for choosing.
70
+
71
+ ## Notes / Edge Cases
72
+
73
+ - Object URLs created for previews are revoked when replaced, removed, or when the element disconnects.
74
+ - `clear()` removes the image from code; `choose()` opens the file chooser.
75
+ - Only image MIME types are accepted, whatever `accept` says; `accept` narrows the chooser's filter.
@@ -80,8 +80,8 @@ Anything else (`K`, `F5`, `⌘`) is shown as typed.
80
80
  <lof-kbd size="lg">L</lof-kbd>
81
81
  <lof-kbd-group items='["Ctrl","C"]' size="md"></lof-kbd-group>
82
82
 
83
- <!-- `pill` is deprecated → use the default 4px radius. Still renders fully rounded corners and logs once:
84
- [lof-kbd] "pill" is deprecated and will be removed in 3.0 — use "the default radius (4px at every size)" instead. The Kbd spec has one radius at every size; pill keeps working but is not part of the design. -->
83
+ <!-- `pill` is deprecated → use the default radius. Still renders fully rounded corners and logs once:
84
+ [lof-kbd] "pill" is deprecated and will be removed in 3.0 — use "the default radius (6px; 4px at small)" instead. The Kbd spec has one radius at every size; pill keeps working but is not part of the design. -->
85
85
  <lof-kbd pill>R</lof-kbd>
86
86
  ```
87
87
 
@@ -114,7 +114,7 @@ Anything else (`K`, `F5`, `⌘`) is shown as typed.
114
114
 
115
115
  | Property | Attribute | Type | Use instead |
116
116
  | --- | --- | --- | --- |
117
- | `pill` | `pill` | `boolean` | The Kbd spec has a single 4px radius at every size (audit 16); `pill` is kept working as an alias but logs a one-time notice. |
117
+ | `pill` | `pill` | `boolean` | The key cap has one radius per size (6px; 4px at small); `pill` is kept working as an alias but logs a one-time notice. |
118
118
 
119
119
  ### Events
120
120