@lofid/web 0.0.0-stage → 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 (65) hide show
  1. package/README.md +104 -2
  2. package/custom-elements.json +12890 -0
  3. package/dist/index.d.ts +3192 -0
  4. package/dist/index.js +20807 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/styles/ag-grid.css +145 -0
  7. package/dist/styles/motion.css +32 -0
  8. package/dist/styles/motion.tokens.json +38 -0
  9. package/dist/styles/typography.css +41 -0
  10. package/dist/styles/typography.json +858 -0
  11. package/dist/styles/vars.css +1225 -0
  12. package/package.json +46 -4
  13. package/readmes/lof-accordion/README.md +140 -0
  14. package/readmes/lof-alert/README.md +142 -0
  15. package/readmes/lof-autocomplete/README.md +209 -0
  16. package/readmes/lof-avatar/README.md +228 -0
  17. package/readmes/lof-badge/README.md +102 -0
  18. package/readmes/lof-breadcrumb/README.md +97 -0
  19. package/readmes/lof-button/README.md +189 -0
  20. package/readmes/lof-calendar/README.md +111 -0
  21. package/readmes/lof-card/README.md +105 -0
  22. package/readmes/lof-cardmedia/README.md +100 -0
  23. package/readmes/lof-carousel/README.md +187 -0
  24. package/readmes/lof-checkbox/README.md +159 -0
  25. package/readmes/lof-chip/README.md +153 -0
  26. package/readmes/lof-container/README.md +107 -0
  27. package/readmes/lof-date-picker/README.md +221 -0
  28. package/readmes/lof-divider/README.md +88 -0
  29. package/readmes/lof-drawer/README.md +188 -0
  30. package/readmes/lof-empty-state/README.md +78 -0
  31. package/readmes/lof-image-input/README.md +75 -0
  32. package/readmes/lof-kbd/README.md +188 -0
  33. package/readmes/lof-layout/README.md +122 -0
  34. package/readmes/lof-link/README.md +67 -0
  35. package/readmes/lof-menu/README.md +187 -0
  36. package/readmes/lof-menubar/README.md +218 -0
  37. package/readmes/lof-nav/README.md +90 -0
  38. package/readmes/lof-otp/README.md +167 -0
  39. package/readmes/lof-page-header/README.md +71 -0
  40. package/readmes/lof-pagination/README.md +141 -0
  41. package/readmes/lof-popover/README.md +220 -0
  42. package/readmes/lof-progress/README.md +88 -0
  43. package/readmes/lof-radio/README.md +142 -0
  44. package/readmes/lof-range-picker/README.md +194 -0
  45. package/readmes/lof-rating/README.md +90 -0
  46. package/readmes/lof-resizable/README.md +220 -0
  47. package/readmes/lof-segmented-button/README.md +158 -0
  48. package/readmes/lof-select/README.md +193 -0
  49. package/readmes/lof-sheet/README.md +170 -0
  50. package/readmes/lof-signature-pad/README.md +161 -0
  51. package/readmes/lof-skeleton/README.md +104 -0
  52. package/readmes/lof-slider/README.md +140 -0
  53. package/readmes/lof-snackbar/README.md +170 -0
  54. package/readmes/lof-split-button/README.md +129 -0
  55. package/readmes/lof-stat/README.md +73 -0
  56. package/readmes/lof-stepper/README.md +171 -0
  57. package/readmes/lof-switch/README.md +122 -0
  58. package/readmes/lof-tab/README.md +188 -0
  59. package/readmes/lof-table/README.md +114 -0
  60. package/readmes/lof-textfield/README.md +206 -0
  61. package/readmes/lof-time-picker/README.md +188 -0
  62. package/readmes/lof-toast/README.md +174 -0
  63. package/readmes/lof-tooltip/README.md +120 -0
  64. package/readmes/lof-tree/README.md +157 -0
  65. package/readmes/lof-upload/README.md +223 -0
@@ -0,0 +1,228 @@
1
+ # lof-avatar
2
+
3
+ `<lof-avatar>` is the circular identity mark of the Figma "Avatar" component: a 20–40px disc that shows a photo (`type="image"`), uppercase initials (`type="text"`) or a slotted icon (`type="icon"`), in a solid `fill`, a neutral `subtle` or a bordered `outline` variant. Use it wherever a person, team or account needs a compact visual identity — user menus, comment threads, assignee columns, stacked avatar groups. It is purely presentational: it takes no focus and emits no events, so wrap it in a button or link when it should be clickable, and overlay a `lof-badge` when it needs a status or count.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <!-- Image avatar (always pass a meaningful alt) -->
9
+ <lof-avatar type="image" src="./user-photo.jpg" alt="Priya Natarajan"></lof-avatar>
10
+
11
+ <!-- Initials -->
12
+ <lof-avatar type="text" text="PN"></lof-avatar>
13
+
14
+ <!-- Slotted icon -->
15
+ <lof-avatar type="icon">
16
+ <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
17
+ <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
18
+ </svg>
19
+ </lof-avatar>
20
+
21
+ <!-- Sizes: xs 20px, sm 24px, md 32px (default), lg 40px -->
22
+ <lof-avatar type="text" text="XS" size="extra-small"></lof-avatar>
23
+ <lof-avatar type="text" text="SM" size="small"></lof-avatar>
24
+ <lof-avatar type="text" text="MD" size="medium"></lof-avatar>
25
+ <lof-avatar type="text" text="LG" size="large"></lof-avatar>
26
+
27
+ <!-- Variants -->
28
+ <lof-avatar type="text" text="AA" variant="fill"></lof-avatar>
29
+ <lof-avatar type="text" text="AA" variant="subtle"></lof-avatar>
30
+ <lof-avatar type="text" text="AA" variant="outline"></lof-avatar>
31
+
32
+ <!-- Inline colour overrides (any CSS colour) -->
33
+ <lof-avatar type="text" text="JD" bg="#1d4ed8" color="#ffffff"></lof-avatar>
34
+
35
+ <!-- New in 1.5.0. Icon by name instead of a slotted SVG (Figma "Icon" swap) -->
36
+ <lof-avatar type="icon" icon="person" variant="subtle"></lof-avatar>
37
+
38
+ <!-- New in 1.5.0. Status badge (Figma "Show Badge"): a green dot, or an icon disc -->
39
+ <lof-avatar type="image" src="./user-photo.jpg" alt="Priya Natarajan" badge="dot" badge-label="Online"></lof-avatar>
40
+ <lof-avatar type="text" text="PN" badge="icon" badge-icon="edit-square" badge-label="Can edit"></lof-avatar>
41
+
42
+ <!-- New in 1.5.0. Ring (Figma "Show Ring"): separates avatars that overlap -->
43
+ <lof-avatar type="text" text="AB" ring></lof-avatar>
44
+ ```
45
+
46
+ <!-- @unreleased-begin 1.5.0 -->
47
+ ### Avatar group
48
+
49
+ ```html
50
+ <!-- New in 1.5.0. <lof-avatar-group> (Figma "Avatar Group"): overlapping avatars with a "+N" circle.
51
+ The group sets size and ring on every avatar; max hides the rest and counts them. -->
52
+ <lof-avatar-group size="medium" max="3" label="Project members">
53
+ <lof-avatar type="image" src="./priya.jpg" alt="Priya Natarajan"></lof-avatar>
54
+ <lof-avatar type="text" text="JD"></lof-avatar>
55
+ <lof-avatar type="text" text="MK"></lof-avatar>
56
+ <lof-avatar type="text" text="LS"></lof-avatar>
57
+ <lof-avatar type="text" text="TO"></lof-avatar>
58
+ </lof-avatar-group>
59
+
60
+ <!-- Only some people loaded: total counts everyone else -->
61
+ <lof-avatar-group total="57">
62
+ <lof-avatar type="text" text="AB"></lof-avatar>
63
+ <lof-avatar type="text" text="CD"></lof-avatar>
64
+ <lof-avatar type="text" text="EF"></lof-avatar>
65
+ </lof-avatar-group>
66
+ ```
67
+
68
+ `<lof-avatar-group>` (new in 1.5.0) lays its slotted `<lof-avatar>` elements in a row, each overlapping the previous one by a quarter of the diameter (Figma's 10 / 8 / 6 / 4px), later ones on top. It gives every avatar its `size` and turns their `ring` on. Avatars beyond `max` are hidden and counted, with anyone beyond the slotted avatars when `total` is larger, in a "+N" circle: the fill style, the same text role as the initials, and its own ring.
69
+ <!-- @unreleased-end -->
70
+
71
+ <!-- readme-gen:start -->
72
+
73
+ <!-- Generated from lof-avatar.ts — do not edit; run readme-generate.mjs -->
74
+
75
+ ## Elements
76
+
77
+ | Element | Class | Source |
78
+ | --- | --- | --- |
79
+ | `<lof-avatar>` | `LofAvatar` | `lof-avatar.ts` |
80
+
81
+ <!-- @unreleased-begin 1.5.0 -->
82
+ | Element | Class | Source |
83
+ | --- | --- | --- |
84
+ | `<lof-avatar-group>` | `LofAvatarGroup` | `lof-avatar-group.ts` |
85
+ <!-- @unreleased-end -->
86
+
87
+ ## API
88
+
89
+ ### `<lof-avatar>`
90
+
91
+ #### Attributes / Properties
92
+
93
+ | Property | Attribute | Type | Default | Description |
94
+ | --- | --- | --- | --- | --- |
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
+ | `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"` | `"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
+ | `src` | `src` | `string` | `""` | Image URL for `type="image"`; when empty nothing is rendered inside the circle (there is no fallback to initials). |
99
+ | `text` | `text` | `string` | `""` | Initials shown for `type="text"`; rendered uppercase via `text-transform`. |
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. |
101
+ | `bg` | `bg` | `string` | `""` | Any CSS colour applied inline as `background-color` on the circle, overriding the variant background. |
102
+ | `color` | `color` | `string` | `""` | Any CSS colour applied inline as `color` on the circle (initials / icon), overriding the variant text colour. |
103
+ | `icon` | `icon` | `string` | `""` | New in 1.5.0. lof-icon name shown for `type="icon"` (Figma's "Icon" swap, e.g. `person`), as an alternative to slotting an SVG. When set it replaces the slot. |
104
+ | `ring` | `ring` | `boolean` | `false` | New in 1.5.0. Figma "Show Ring": a 2px ring in `--lof-border-inverse` just outside the circle, which separates overlapping avatars. It does not change the avatar's size. Reflected. |
105
+ | `badge` | `badge` | `"" \| "dot" \| "icon"` | `""` | New in 1.5.0. Figma "Show Badge": a status badge on the bottom-right edge with a 1px `--lof-border-inverse` edge. `dot` is a `--lof-bg-success` disc; `icon` is a `--lof-bg-neutral-elevated-2` disc holding `badge-icon`. 12 / 10 / 8 / 6px for large / medium / small / extra-small. Empty (the default) renders none. |
106
+ | `badgeIcon` | `badge-icon` | `string` | `"edit-square"` | New in 1.5.0. lof-icon name inside a `badge="icon"` badge. |
107
+ | `badgeLabel` | `badge-label` | `string` | `""` | New in 1.5.0. What the badge means, for screen readers (e.g. "Online"). Without it the badge is decorative and hidden from assistive technology, because a dot conveys its meaning by colour alone. |
108
+
109
+ ### Events
110
+
111
+ | Event | Detail | Bubbles / composed | Description |
112
+ | --- | --- | --- | --- |
113
+ | — | — | — | This element emits no custom events. |
114
+
115
+ ### Slots
116
+
117
+ | Slot | Description |
118
+ | --- | --- |
119
+ | (default) | Icon content rendered when `type="icon"` (typically an inline SVG, sized 20 / 18 / 16 / 12px by `size`); not rendered when the `icon` attribute is set |
120
+
121
+ ### CSS Parts
122
+
123
+ | Part | Description |
124
+ | --- | --- |
125
+ | `base` | The circular wrapper that carries the size, variant and inline `bg` / `color` overrides |
126
+ | `icon` | The `<img>` (`type="image"`) or the icon wrapper span around the slot (`type="icon"`) |
127
+ | `label` | The `<span>` holding the initials when `type="text"` |
128
+ | `badge` | The status badge on the bottom-right edge, rendered when `badge` is set (new in 1.5.0) |
129
+
130
+ ### Tokens / CSS Variables
131
+
132
+ #### Component hooks
133
+
134
+ Set these on the host (or an ancestor) to customise the element without touching design tokens.
135
+
136
+ | Custom property | Default | Description |
137
+ | --- | --- | --- |
138
+ | `--lof-avatar-badge-bg` | `var(--lof-bg-success)` | Fill of the `badge`; defaults to `--lof-bg-success` for `dot` and `--lof-bg-neutral-elevated-2` for `icon` (new in 1.5.0) |
139
+ | `--lof-avatar-bg-fill` | `var(--lof-bg-neutral-inverse-2)` | Background colour of the `fill` variant |
140
+ | `--lof-avatar-bg-outline` | `var(--lof-bg-neutral)` | Background colour of the `outline` variant; defaults to --lof-bg-neutral |
141
+ | `--lof-avatar-bg-subtle` | `var(--lof-bg-neutral-elevated-1)` | Background colour of the `subtle` variant |
142
+ | `--lof-avatar-border-outline` | `var(--lof-border-default)` | 1px border colour of the `outline` variant |
143
+ | `--lof-avatar-color-fill` | `var(--lof-text-inverse)` | Text / icon colour of the `fill` variant |
144
+ | `--lof-avatar-color-outline` | `var(--lof-text-default)` | Text / icon colour of the `outline` variant |
145
+ | `--lof-avatar-color-subtle` | `var(--lof-text-default)` | Text / icon colour of the `subtle` variant |
146
+ | `--lof-avatar-font-size` | `var(--_lof-avatar-font-size)` | Overrides the initials' font-size, for use alongside `--lof-avatar-size`; defaults to the preset's text role |
147
+ | `--lof-avatar-icon-size` | `var(--_lof-avatar-icon-size)` | Overrides the slotted icon's size; defaults to the preset ramp (20 / 18 / 16 / 12px) |
148
+ | `--lof-avatar-ring-color` | `var(--lof-border-inverse)` | Colour of the `ring`; defaults to `--lof-border-inverse` (new in 1.5.0) |
149
+ | `--lof-avatar-size` | `var(--_lof-avatar-size)` | Overrides the circle's width/height for sizes between (or below) the `size` presets; defaults to the preset's diameter |
150
+
151
+ <!-- @unreleased-begin 1.5.0 -->
152
+ ### `<lof-avatar-group>`
153
+
154
+ #### Attributes / Properties
155
+
156
+ | Property | Attribute | Type | Default | Description |
157
+ | --- | --- | --- | --- | --- |
158
+ | `size` | `size` | `"large" \| "medium" \| "small" \| "extra-small" \| "lg" \| "md" \| "sm" \| "xs"` | `"medium"` | Diameter step given to every avatar in the group and to the "+N" circle: `large` 40px, `medium` 32px, `small` 24px, `extra-small` 20px. `lg` / `md` / `sm` / `xs` are accepted and normalised to the full words. Reflected. |
159
+ | `max` | `max` | `number` | `0` | Most avatars to show; the rest are hidden and counted in the "+N" circle. `0` (the default) shows them all. |
160
+ | `total` | `total` | `number` | `0` | The full number of people when only some avatars are slotted (e.g. 3 slotted of 57). The "+N" circle then counts everyone not shown. `0` (the default) counts the slotted avatars only. |
161
+ | `label` | `label` | `string` | `""` | Accessible name of the group (e.g. "Project members"). No default: without it the group has no name. |
162
+ | `overflowLabel` | `overflow-label` | `string` | `"{n} more"` | Accessible name of the "+N" circle; `{n}` is replaced by the count. |
163
+
164
+ #### Public fields / accessors
165
+
166
+ | Name | Type | Description |
167
+ | --- | --- | --- |
168
+ | `overflowCount` | `number` | People counted in the "+N" circle. |
169
+
170
+ ### Events
171
+
172
+ | Event | Detail | Bubbles / composed | Description |
173
+ | --- | --- | --- | --- |
174
+ | — | — | — | This element emits no custom events. |
175
+
176
+ ### Slots
177
+
178
+ | Slot | Description |
179
+ | --- | --- |
180
+ | (default) | The `lof-avatar` elements, in display order |
181
+
182
+ ### CSS Parts
183
+
184
+ | Part | Description |
185
+ | --- | --- |
186
+ | `base` | The `role="group"` row holding the avatars and the overflow circle |
187
+ | `overflow` | The "+N" circle (a `lof-avatar` of `type="text"`, `variant="fill"`) shown when people are not displayed |
188
+
189
+ ### Tokens / CSS Variables
190
+
191
+ #### Component hooks
192
+
193
+ Set these on the host (or an ancestor) to customise the element without touching design tokens.
194
+
195
+ | Custom property | Default | Description |
196
+ | --- | --- | --- |
197
+ | `--lof-avatar-group-overlap` | `var(--_lof-avatar-group-overlap)` | How far each avatar overlaps the previous one (a positive length); defaults to Figma's 10 / 8 / 6 / 4px for large / medium / small / extra-small |
198
+ <!-- @unreleased-end -->
199
+
200
+ <!-- readme-gen:end -->
201
+
202
+ ## Accessibility
203
+
204
+ - The host has no ARIA role and no keyboard handling, and it is never focusable. Put it inside a `<button>` or `<a>` when it should be interactive and give that element the accessible name.
205
+ - `type="image"` renders a real `<img>` whose alt text comes from the `alt` prop. The default is the generic word "Avatar" — pass the person's name, or an empty string when the avatar sits next to visible text with the same name.
206
+ - `type="text"` renders the initials as plain text in the `label` part, so screen readers read the letters ("P N"). If the initials alone are meaningless, add `aria-hidden="true"` and keep the full name in nearby text.
207
+ - `type="icon"` slots your SVG unchanged; add `aria-hidden="true"` to decorative icons or a `<title>` to meaningful ones. The `icon` attribute (new in 1.5.0) renders a decorative `lof-icon`, hidden from assistive technology.
208
+ - The badge (new in 1.5.0) shows a status by colour, or by a tiny icon, so it is not readable by itself. Set `badge-label` ("Online", "Away") and it is read right after the avatar's own name. Without `badge-label` the badge is hidden from assistive technology: say the status in nearby text instead.
209
+ - The ring and the badge edge use `--lof-border-inverse`, the page-colour edge Figma draws. In forced-colours mode the badge is drawn in `CanvasText`, so a status dot stays visible.
210
+ - The three variants differ only by colour; every colour used has a dark-mode value in `vars.css`, so no extra theming is needed.
211
+ <!-- @unreleased-begin 1.5.0 -->
212
+ - `<lof-avatar-group>` is a `role="group"` named by `label`; give it one ("Project members") so the list of names has context. Each avatar keeps its own name (image `alt`, initials). The "+N" circle is a `role="img"` named by `overflow-label` (default "{n} more", e.g. "54 more") with the exact count, even when it shows "99+". Hidden avatars are `display: none`, so they are not read. The group takes no focus and has no keyboard handling.
213
+ <!-- @unreleased-end -->
214
+
215
+ ## Notes / Edge Cases
216
+
217
+ - The disc is `border-radius: 50%` with `overflow: hidden`; images use `object-fit: cover`, so non-square sources are centre-cropped rather than stretched.
218
+ - `type="image"` with an empty `src` renders an empty circle — there is no automatic fallback to initials. Switch `type` yourself when the photo is missing.
219
+ - Every variant keeps a 1px border (`--lof-stroke-sm`); `fill` and `subtle` make it transparent so the outer size is identical across variants.
220
+ - `bg` and `color` are written as inline styles on the `base` part, so they win over both the `--lof-avatar-*` hooks and the variant tokens.
221
+ - Initials are forced uppercase and `user-select: none`. `size`, `type` and `variant` are reflected, so `lof-avatar[size="large"]` works as a selector. Because `lg` / `md` / `sm` / `xs` are normalised to the full words before reflection, the selector matches whichever spelling was written.
222
+ - The `icon` part name is shared by the `<img>` (`type="image"`) and the slot wrapper (`type="icon"`); `::part(icon)` matches whichever one is rendered.
223
+ - **Ring** (new in 1.5.0): a 2px outline just outside the circle, so the avatar keeps its 40 / 32 / 24 / 20px box and neighbours are not pushed apart. It is meant for avatars that overlap, on any surface; recolour it with `--lof-avatar-ring-color` when the surface is not the page colour.
224
+ - **Badge** (new in 1.5.0): 12 / 10 / 8 / 6px by size, flush with the bottom-right of the avatar's box, with a 1px outside edge. `dot` fills with `--lof-bg-success` (Figma has only the green dot); `icon` fills with `--lof-bg-neutral-elevated-2` and draws `badge-icon` at two thirds of the disc. Recolour either with `--lof-avatar-badge-bg`. At the two smallest sizes an icon badge is too small to read; prefer `dot` there.
225
+ - **`icon` vs the slot:** when `icon` is set it replaces the slot; leave it empty to slot your own SVG.
226
+ <!-- @unreleased-begin 1.5.0 -->
227
+ - **Avatar group.** The group writes `size` and `ring` on its avatars, so a size set on an avatar inside a group is replaced by the group's. It hides avatars beyond `max` with a `data-lof-group-hidden` attribute it manages itself; your own `hidden` attributes are left alone. The "+N" text steps down to 36% of the diameter from two digits ("+10"), and counts above 99 show "99+". Change the overlap with `--lof-avatar-group-overlap`.
228
+ <!-- @unreleased-end -->
@@ -0,0 +1,102 @@
1
+ # lof-badge
2
+
3
+ `<lof-badge>` is the Figma "Badge" count indicator: a small `number` pill ("5", "99+") or an unlabeled `dot`, in four sizes (S/M/L/XL), filled with the danger token by default and overridable per instance through `color` / `text-color`. Use it to flag unread counts or unseen activity on an icon, tab, avatar or navigation item — you position it over the target yourself. It is not a text tag (use `lof-chip`) and not a status message (use `lof-alert` or `lof-toast`); it only carries a count or a "something is new" signal.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <!-- Number badges -->
9
+ <lof-badge number="5"></lof-badge>
10
+ <lof-badge number="12" size="md"></lof-badge>
11
+ <lof-badge number="99+" size="lg"></lof-badge>
12
+ <lof-badge number="120" size="xl"></lof-badge>
13
+
14
+ <!-- Dot badges (no text) -->
15
+ <lof-badge variant="dot"></lof-badge>
16
+
17
+ <!-- Positioned over an icon button -->
18
+ <div style="position: relative; display: inline-block;">
19
+ <button aria-label="Notifications">🔔</button>
20
+ <lof-badge number="3" size="sm" style="position: absolute; top: -8px; right: -8px;"></lof-badge>
21
+ </div>
22
+
23
+ <!-- Accessible-name control -->
24
+ <lof-badge number="3" suffix="unread messages"></lof-badge>
25
+ <lof-badge variant="dot" arialabel="New activity"></lof-badge>
26
+
27
+ <!-- A count that changes while the user is on the page: announce updates -->
28
+ <lof-badge number="3" suffix="unread messages" live></lof-badge>
29
+
30
+ <!-- Colour overrides: any CSS colour, including a token via var() -->
31
+ <lof-badge number="3" color="#7d7d7d"></lof-badge>
32
+ <lof-badge number="3" color="teal" text-color="#1a1a1a"></lof-badge>
33
+ <lof-badge variant="dot" color="seagreen"></lof-badge>
34
+ ```
35
+
36
+ <!-- readme-gen:start -->
37
+
38
+ <!-- Generated from lof-badge.ts — do not edit; run readme-generate.mjs -->
39
+
40
+ ## API
41
+
42
+ ### Attributes / Properties
43
+
44
+ | Property | Attribute | Type | Default | Description |
45
+ | --- | --- | --- | --- | --- |
46
+ | `number` | `number` | `string` | `""` | Text shown in the `number` variant (a count such as "5" or "99+"); not rendered by `variant="dot"` but still used to build the accessible name. |
47
+ | `ariaLabel` | `arialabel` | `string` | `""` | Explicit accessible name; when empty it is composed as "<number> <suffix>" or, with no number, "New <suffix>". Attribute is `arialabel`. |
48
+ | `suffix` | `suffix` | `string` | `"notifications"` | Noun appended to the count in the generated accessible name, e.g. "3 notifications". |
49
+ | `live` | `live` | `boolean` | `false` | Announce changes: renders the badge as a polite live region (`role="status"`), so a screen reader reads the new count when it updates. Off by default — a static badge (a count in a table row, a dot on an avatar) is a quiet image named by its accessible label, so a page of badges is not a page of live regions. Turn it on for a count that changes while the user is on the page. New in 1.5.0. Reflected. |
50
+ | `size` | `size` | `"small" \| "medium" \| "large" \| "extra-large" \| "sm" \| "md" \| "lg" \| "xl"` | `"medium"` | Badge scale (Figma Badge S/M/L/XL): number badges are 20 / 24 / 28 / 40px tall. `sm` / `md` / `lg` / `xl` are accepted and normalised to the full words. Ignored when `variant="dot"` — Figma models `Dot` as a fifth option of the same Size axis, so a dot has one size. Reflected. |
51
+ | `variant` | `variant` | `"dot" \| "number"` | `"number"` | `number` renders the `number` text in a pill that widens with its content; `dot` renders a 6px disc with no text (Figma `Size=Dot`), ignoring `size`. Reflected. |
52
+ | `color` | `color` | `string` | `""` | Direct CSS color override for the badge background. Accepts any valid CSS color value: hex, rgb(...), hsl(...), named color, or var(--token). Clear it (set to `''`) to fall back to the default token. Reflected. |
53
+ | `textColor` | `text-color` | `string` | `""` | Direct CSS color override for the badge text/icon color. Accepts any valid CSS color value: hex, rgb(...), hsl(...), named color, or var(--token). Clear it (set to `''`) to fall back to the default (white). Reflected. |
54
+
55
+ ## Events
56
+
57
+ | Event | Detail | Bubbles / composed | Description |
58
+ | --- | --- | --- | --- |
59
+ | — | — | — | This element emits no custom events. |
60
+
61
+ ## Slots
62
+
63
+ | Slot | Description |
64
+ | --- | --- |
65
+ | — | This element has no slots. |
66
+
67
+ ## CSS Parts
68
+
69
+ | Part | Description |
70
+ | --- | --- |
71
+ | `base` | The pill / dot that carries the size, variant and colour overrides; `role="img"` named by the accessible label, or `role="status"` with `live` |
72
+
73
+ ## Tokens / CSS Variables
74
+
75
+ ### Component hooks
76
+
77
+ Set these on the host (or an ancestor) to customise the element without touching design tokens.
78
+
79
+ | Custom property | Default | Description |
80
+ | --- | --- | --- |
81
+ | `--lof-badge-bg` | `var(--lof-bg-danger)` | Background colour of the badge; the `color` prop writes this on the host |
82
+ | `--lof-badge-color` | `var(--lof-text-static-light)` | Text colour of the count; the `text-color` prop writes this on the host |
83
+ | `--lof-badge-dot-size` | `6px` | Diameter of the `dot` variant; default 6px, the single dot size Figma draws. Set it to restore the larger discs shipped previously. |
84
+
85
+ <!-- readme-gen:end -->
86
+
87
+ ## Accessibility
88
+
89
+ - The pill (`base` part) carries an `aria-label`. The label is `ariaLabel` when set; otherwise it is composed as `"<number> <suffix>"` (e.g. "3 notifications") or, when `number` is empty (dot badges), `"New <suffix>"` (e.g. "New notifications"). Set `suffix` so the name says the right thing, or `arialabel` for full control.
90
+ - By default a badge is quiet: the pill is `role="img"`, so screen readers read its label where it sits but never announce it on their own. A page with a badge in every table row is not a page of live regions. (The role is what makes the label count; ARIA ignores an `aria-label` on a plain `<span>`.)
91
+ - Set `live` for a count that changes while the user is on the page (an inbox counter): the pill becomes `role="status"`, an implicit polite live region, so a change to `number` may be announced without the badge taking focus. Verify the behaviour with your target screen reader before relying on it. Until 1.5.0 every badge was live; add `live` where you relied on that.
92
+ - The host is not focusable and handles no keys. Interactive meaning ("open notifications") belongs to the element the badge decorates — give that element its own accessible name.
93
+ - A dot badge has no visible text; the generated name is the only thing a screen reader gets, and sighted users get colour alone. Pair it with nearby text when the meaning is not obvious from context.
94
+
95
+ ## Notes / Edge Cases
96
+
97
+ - Number badge heights are 20 / 24 / 28 / 40px for `sm` / `md` / `lg` / `xl`; dot badges are 8 / 10 / 12 / 12px (`lg` and `xl` dots are the same size). The number badge sets `min-width`, not `width`, so a two-digit count stays a circle while "999+" grows into a pill.
98
+ - The corner radius is a fixed `999px`, not `50%`, which is what lets wide content become a pill instead of clipping.
99
+ - In `variant="dot"` the `number` text is not rendered but still feeds the accessible name ("3 notifications" for a dot with `number="3"`).
100
+ - `color` and `text-color` are applied by writing `--lof-badge-bg` / `--lof-badge-color` as inline custom properties on the host; clearing the prop removes the inline value and falls back to whatever the hook resolves to (the danger / static-light tokens unless you set the hook in your own CSS).
101
+ - The accessible-name property is `ariaLabel` with the attribute `arialabel` (no hyphen). A plain `aria-label` attribute on the host is not read by the component, and because the host has no role it does not reach the pill either — use `arialabel`.
102
+ - The host is `display: inline-flex`; the usual pattern is an absolutely positioned badge inside a `position: relative` wrapper around the decorated element.
@@ -0,0 +1,97 @@
1
+ # lof-breadcrumbs
2
+
3
+ Breadcrumb trail (element `<lof-breadcrumbs>`, folder `lof-breadcrumb`): a `<nav aria-label="Breadcrumb">` ordered list built from an `items` array, with chevron separators and the last entry rendered as the non-link current page. Use it to show where the current page sits in a hierarchy and to jump back up it; do not use it as primary navigation or for a single-level site.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <!-- Basic trail: every item but the last is a link -->
9
+ <lof-breadcrumbs id="trail"></lof-breadcrumbs>
10
+ <script>
11
+ document.getElementById('trail').items = [
12
+ { label: 'Home', url: '/' },
13
+ { label: 'Products', url: '/products' },
14
+ { label: 'Electronics', url: '/products/electronics' },
15
+ { label: 'Laptops' } // current page — no url needed
16
+ ];
17
+ </script>
18
+
19
+ <!-- Two levels -->
20
+ <lof-breadcrumbs id="short"></lof-breadcrumbs>
21
+ <script>
22
+ document.getElementById('short').items = [
23
+ { label: 'Dashboard', url: '/dashboard' },
24
+ { label: 'Settings' }
25
+ ];
26
+ </script>
27
+
28
+ <!-- Restyle the current-page text through its part -->
29
+ <style>
30
+ .muted::part(label) {
31
+ color: gray;
32
+ }
33
+ </style>
34
+ <lof-breadcrumbs class="muted" id="muted"></lof-breadcrumbs>
35
+ <script>
36
+ document.getElementById('muted').items = [
37
+ { label: 'Docs', url: '/docs' },
38
+ { label: 'Components', url: '/docs/components' },
39
+ { label: 'Breadcrumbs' }
40
+ ];
41
+ </script>
42
+ ```
43
+
44
+ The `BreadcrumbItem` shape is `{ label: string; url?: string }`; the type is exported from the package.
45
+
46
+ <!-- readme-gen:start -->
47
+
48
+ <!-- Generated from lof-breadcrumb.ts — do not edit; run readme-generate.mjs -->
49
+
50
+ ## API
51
+
52
+ ### Attributes / Properties
53
+
54
+ | Property | Attribute | Type | Default | Description |
55
+ | --- | --- | --- | --- | --- |
56
+ | `items` | `items` | `BreadcrumbItem[]` | `[]` | Ordered trail, root first: `{ label: string; url?: string }[]`. Items with a `url` render as links except the last one, which is always the current page (and never a link). Set as a property — arrays do not survive attribute serialisation. |
57
+ | `ariaLabel` | `aria-label` | `string` | `"Breadcrumb"` | Name the trail when several breadcrumb landmarks share a page. |
58
+
59
+ ## Events
60
+
61
+ | Event | Detail | Bubbles / composed | Description |
62
+ | --- | --- | --- | --- |
63
+ | — | — | — | This element emits no custom events. |
64
+
65
+ ## Slots
66
+
67
+ | Slot | Description |
68
+ | --- | --- |
69
+ | — | This element has no slots. |
70
+
71
+ ## CSS Parts
72
+
73
+ | Part | Description |
74
+ | --- | --- |
75
+ | `base` | The `<nav>` landmark wrapping the ordered list. |
76
+ | `label` | The non-link current-page text (`aria-current="page"`), also used for any item without a `url`. |
77
+
78
+ <!-- readme-gen:end -->
79
+
80
+ ## Accessibility
81
+
82
+ - Semantic `<nav aria-label="Breadcrumb">` landmark (the `base` part) containing an `<ol>`, so the trail is announced as an ordered list within a named navigation region.
83
+ - The last item is a `<span aria-current="page">` (the `label` part), never a link, so the current page is identified without being actionable.
84
+ - Chevron separators are inline SVGs with `aria-hidden="true"`.
85
+ - Links show a 2px focus outline with 2px offset on `:focus-visible`.
86
+
87
+ | Key | Action |
88
+ | --- | --- |
89
+ | `Tab` / `Shift+Tab` | Move between the breadcrumb links |
90
+ | `Enter` | Follow the focused link (native anchor behaviour) |
91
+
92
+ ## Notes / Edge Cases
93
+
94
+ - **The last item is always the current page**, even if it has a `url` — it renders as text, not a link. Any earlier item *without* a `url` also renders as text (and reuses the `label` part and `aria-current="page"`, so give every ancestor a `url`).
95
+ - `items` must be assigned as a property (it is an array); setting an `items` attribute in HTML does not work.
96
+ - Separators are 16px chevrons with 10px horizontal margins inheriting `currentColor`; the list wraps onto new lines when it runs out of width.
97
+ - Links are plain anchors: navigation happens natively and no custom event is emitted. Intercept `click` on the host if you route client-side.
@@ -0,0 +1,189 @@
1
+ # lof-button
2
+
3
+ Action button implementing the Figma "Button" component: a native `<button>` with the Figma **Style** (`variant`), **Tone** (`tone`) and **Size** axes, an independent **Icon Only** mode, a **Loading** state and an optional corner badge. Use it for every clickable action (submit, confirm, open, delete). Do not use it for navigation to another page — use a link instead.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <!-- Styles (Figma "Style") -->
9
+ <lof-button variant="primary" tone="brand">Primary</lof-button>
10
+ <lof-button variant="secondary">Secondary</lof-button>
11
+ <lof-button variant="ghost">Ghost</lof-button>
12
+ <lof-button variant="link">Link style</lof-button>
13
+ <lof-button variant="default">Neutral fill</lof-button>
14
+ <div style="background: #1f2937; padding: 8px;">
15
+ <lof-button variant="static">Static (on dark surfaces)</lof-button>
16
+ </div>
17
+
18
+ <!-- Tones (Figma "Tone") -->
19
+ <lof-button variant="primary" tone="brand">Save</lof-button>
20
+ <lof-button variant="primary" tone="neutral">Cancel</lof-button>
21
+ <lof-button variant="primary" tone="destructive">Delete</lof-button>
22
+ <lof-button variant="secondary" tone="destructive">Remove</lof-button>
23
+ <lof-button variant="ghost" tone="destructive">Discard</lof-button>
24
+
25
+ <!-- Sizes: 28 / 34 / 40px -->
26
+ <lof-button size="small">Small</lof-button>
27
+ <lof-button size="medium">Medium</lof-button>
28
+ <lof-button size="large">Large</lof-button>
29
+
30
+ <!-- Corner radius -->
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>
34
+ <lof-button border="no-corner-radius">Square</lof-button>
35
+
36
+ <!-- Icon + label, and icon-only (needs an accessible name) -->
37
+ <lof-button variant="primary" tone="brand">
38
+ <lof-icon name="plus"></lof-icon>
39
+ Add item
40
+ </lof-button>
41
+ <lof-button variant="secondary" icon-only aria-label="Settings">
42
+ <lof-icon name="settings"></lof-icon>
43
+ </lof-button>
44
+ <lof-button variant="ghost" icon-only size="small" aria-label="Close">
45
+ <lof-icon name="close"></lof-icon>
46
+ </lof-button>
47
+
48
+ <!-- States -->
49
+ <lof-button variant="primary" tone="brand" loading>Saving</lof-button>
50
+ <lof-button variant="primary" tone="brand" disabled>Unavailable</lof-button>
51
+
52
+ <!-- Corner badges -->
53
+ <lof-button variant="secondary" badge="3">Inbox</lof-button>
54
+ <lof-button variant="ghost" icon-only badge-dot aria-label="Notifications">
55
+ <lof-icon name="notification-on"></lof-icon>
56
+ </lof-button>
57
+
58
+ <!-- Listen for clicks (native click bubbles through the shadow root) -->
59
+ <lof-button id="save" variant="primary" tone="brand">Save</lof-button>
60
+ <script>
61
+ document.getElementById('save').addEventListener('click', () => {
62
+ console.log('saved');
63
+ });
64
+ </script>
65
+
66
+ <!-- Per-instance minimum width -->
67
+ <lof-button variant="primary" tone="brand" style="--lof-button-min-width: 160px;">Wide</lof-button>
68
+ ```
69
+
70
+ ### Deprecated aliases
71
+
72
+ ```html
73
+ <!-- Legacy Style spellings — still rendered identically, prefer the canonical names -->
74
+ <lof-button variant="outline">Outline</lof-button> <!-- → variant="secondary" -->
75
+ <lof-button variant="text">Text</lof-button> <!-- → variant="ghost" -->
76
+ <lof-button variant="icon" aria-label="Settings"> <!-- → icon-only + a variant -->
77
+ <lof-icon name="settings"></lof-icon>
78
+ </lof-button>
79
+
80
+ <!-- Legacy Tone spellings — each logs once per page:
81
+ [lof-button] "tone="critical"" is deprecated and will be removed in 3.0 — use "tone="destructive"" instead. -->
82
+ <lof-button variant="primary" tone="critical">Delete</lof-button> <!-- → tone="destructive" -->
83
+ <lof-button variant="primary" tone="danger">Delete</lof-button> <!-- → tone="destructive" -->
84
+ ```
85
+
86
+ <!-- readme-gen:start -->
87
+
88
+ <!-- Generated from lof-button.ts — do not edit; run readme-generate.mjs -->
89
+
90
+ ## API
91
+
92
+ ### Attributes / Properties
93
+
94
+ | Property | Attribute | Type | Default | Description |
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). |
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. |
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. |
100
+ | `size` | `size` | `"small" \| "medium" \| "large"` | `"medium"` | Figma "Size": `small` = 32px, `medium` = 40px, `large` = 48px height, with matching padding, typography and minimum width. |
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. |
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. |
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. |
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. |
106
+
107
+ ## Events
108
+
109
+ | Event | Detail | Bubbles / composed | Description |
110
+ | --- | --- | --- | --- |
111
+ | — | — | — | This element emits no custom events. |
112
+
113
+ ## Slots
114
+
115
+ | Slot | Description |
116
+ | --- | --- |
117
+ | (default) | Button content: label text, a `lof-icon`, or icon + text (kept on one line with the size's gap). |
118
+
119
+ ## CSS Parts
120
+
121
+ | Part | Description |
122
+ | --- | --- |
123
+ | `base` | The inner native `<button>` element (padding, min-width, fill, border, focus ring). |
124
+ | `indicator` | The loading spinner, rendered only while `loading` is set. |
125
+
126
+ ## Tokens / CSS Variables
127
+
128
+ ### Component hooks
129
+
130
+ Set these on the host (or an ancestor) to customise the element without touching design tokens.
131
+
132
+ | Custom property | Default | Description |
133
+ | --- | --- | --- |
134
+ | `--lof-button-min-width` | `80px` | Overrides the per-size minimum width (Figma small/medium/large = 80/100/120px, ghost small = 56px). Ignored by `icon-only` and `link`. |
135
+
136
+ <!-- readme-gen:end -->
137
+
138
+ ## Accessibility
139
+
140
+ - Renders a native `<button>` (the `base` part), so it is focusable, announced as a button and activated with the keyboard without extra work.
141
+ - `aria-disabled` mirrors `disabled`; `aria-busy` mirrors `loading`. The spinner is `aria-hidden`, and the label stays in the DOM (visually hidden) while loading, so the accessible name does not change.
142
+ - `aria-label` is forwarded to the inner button. Always set it on `icon-only` buttons and on the legacy `icon` variant — a slotted icon has no text.
143
+ - Disabled and loading buttons swallow clicks in the capture phase on the host, so `el.click()` and delegated listeners never fire.
144
+
145
+ | Key | Action |
146
+ | --- | --- |
147
+ | `Tab` / `Shift+Tab` | Move focus to / from the button |
148
+ | `Enter` / `Space` | Activate (native button behaviour) |
149
+
150
+ Focus: `:focus-visible` shows the shared 2px focus outline plus inner/outer halo on every style except `link`, which shows a 2px focus-coloured underline bar and the hover label colour instead (still a visible indicator per WCAG 2.4.7). Pressing scales the button to 97%; the spinner slows to 2s under `prefers-reduced-motion: reduce`.
151
+
152
+ ## Notes / Edge Cases
153
+
154
+ ### Tone defaults (2026-11 admin refresh)
155
+
156
+ The accent (blue) is the primary-action colour; black is the "mono" companion; mint (`brand`) stays available for brand moments.
157
+
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 |
166
+
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.
168
+
169
+ ### Tone × Style matrix
170
+
171
+ Figma populates only part of the grid. Combinations outside it have no design-system definition and fall back to the style's neutral treatment:
172
+
173
+ | Tone | Primary | Secondary | Ghost | Link | Static |
174
+ | --- | --- | --- | --- | --- | --- |
175
+ | Neutral | yes | yes | yes | yes | yes |
176
+ | Brand | yes | — | — | — | — |
177
+ | Destructive | yes | yes | yes | yes | — |
178
+
179
+ `Link` additionally has no icon-only and no loading state in the design.
180
+
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.
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.
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.
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.
186
+ - **`static`** is a neutral-only style meant for coloured or dark backgrounds; other tones have no static treatment.
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.
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.
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.