@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
@@ -44,7 +44,7 @@
44
44
  | Property | Attribute | Type | Default | Description |
45
45
  | --- | --- | --- | --- | --- |
46
46
  | `checked` | `checked` | `boolean` | `false` | Whether the switch is on. Set it to control the state programmatically; user toggles update it and fire `lof-change`. |
47
- | `type` | `type` | `"line" \| "pill"` | `"line"` | Shape (Figma "Type"): `"line"` (default) is the 44x20 control with a thin 40x10 rail and the handle riding on it; `"pill"` is the 44x24 filled track with the handle inside it. Pressing squashes the handle; only `line` also shows a pressed disc behind it. Reflected. |
47
+ | `type` | `type` | `"line" \| "pill"` | `"pill"` | Shape. `"pill"` (default since the 2026-11 refresh) is a filled track with the knob inside it: 26×18 / 30×20 / 34×22 with a 10 / 12 / 14px knob, the accent when on. `"line"` is the earlier 44×20 control with a thin rail and the knob riding on it, accent knob when on. Pressing squashes the knob; only `line` also shows a pressed disc behind it. Reflected. |
48
48
  | `disabled` | `disabled` | `boolean` | `false` | Disables interaction and swaps in the dulled rail / handle fills (for both types, checked or not) and the disabled label colour; the handle shadow is removed. An ancestor `<fieldset disabled>` disables it the same way, without changing this property. |
49
49
  | `value` | `value` | `string` | `""` | Arbitrary string echoed in the `lof-change` event detail — useful when one handler serves several switches. |
50
50
  | `fieldAriaLabel` | `field-aria-label` | `string` | `undefined` | Accessible name for the native input when the switch has no visible text. Prefer `label`, slotted text or an outer `<label>` (wrapping the switch, or `for=`), which are visible and clickable. |
@@ -110,7 +110,7 @@ Set these on the host (or an ancestor) to customise the element without touching
110
110
  ## Notes / Edge Cases
111
111
 
112
112
  - `lof-change` fires for user toggles only; setting `checked` from JavaScript updates the visuals but emits nothing.
113
- - Geometry follows the `size` ramp, derived from the Figma Line switch at `medium`: 44×20 control, 40×10 track inset 2px, 20px handle travelling 20px. `small` is 36×16 and `large` 52×24, holding the same invariants (handle = control height, width = 2× height + 4, rail = height ÷ 2, travel = width − 4 − handle). `type="pill"` shares the width, handle and travel but is 4px taller at every size — 20 / 24 / 28 — because its height is the handle plus its 2px inset, where Line's height *is* the handle. Changing `--lof-switch-track-width` widens the control without moving the "on" position.
113
+ - Geometry: the default `pill` switch is 26×18 / 30×20 / 34×22 (small / medium / large) with a 10 / 12 / 14px knob inset 4px; on, the track takes the accent (`--lof-accent`) and the knob travels the track width minus its height. `type="line"` keeps the earlier geometry: 44×20 control, 40×10 rail, 20px knob (36×16 and 52×24 at small and large). Changing `--lof-switch-track-width` widens the control without moving the "on" position.
114
114
  - The label type follows the size: body-sm / body-md / body-lg (12 / 14 / 16px) for small / medium / large.
115
115
  - **`size` does not respond to viewport width.** It follows Figma's Size axis, and choosing a size per breakpoint is the application's decision — set it from your own media queries or container queries. A control that resized itself at some width would be behaviour a design system cannot document, and the breakpoint that matters belongs to the layout around the switch, not to the switch.
116
116
  - A `label` (or slotted content) becomes the switch's accessible name and is clickable, because the root element is the `<label>` that owns the input. Use `field-aria-label` instead when there is no visible text; when both are set, `label` wins.
@@ -22,7 +22,7 @@
22
22
  });
23
23
  </script>
24
24
 
25
- <!-- Sizes: small (32px), medium (40px), large (48px) -->
25
+ <!-- Sizes: small (34px), medium (40px), large (48px) -->
26
26
  <lof-tab size="small">
27
27
  <lof-tab-item slot="items" label="Overview"></lof-tab-item>
28
28
  <lof-tab-item slot="items" label="Details"></lof-tab-item>
@@ -81,7 +81,7 @@
81
81
  | --- | --- | --- | --- | --- |
82
82
  | `tabs` | `tabs` | `TabItem[]` | `[]` | Tab definitions as `{ label, badge?, badgeDot?, disabled? }` objects — normally set as a property (as an attribute it must be a JSON string). Assign a new array to update; mutating in place does not re-render. Ignored when `<lof-tab-item>` children are slotted into `items`. |
83
83
  | `activeIndex` | `active-index` | `number` | `0` | Zero-based index of the selected tab. Set it to switch tabs programmatically (no event is fired for programmatic changes). Reflected (as `activeindex` in 1.x). The `activeindex` attribute spelling is deprecated (still works; removal targeted for 3.0). |
84
- | `size` | `size` | `"sm" \| "md" \| "lg" \| "small" \| "medium" \| "large"` | `"md"` | Tab size — styled via :host([size]) rules. Explicit item heights 32 / 40 / 48px (audit 34); `small\|medium\|large` alias `sm\|md\|lg`. Reflected. |
84
+ | `size` | `size` | `"sm" \| "md" \| "lg" \| "small" \| "medium" \| "large"` | `"md"` | Tab size — styled via :host([size]) rules. Explicit item heights 34 / 40 / 48px (audit 34); `small\|medium\|large` alias `sm\|md\|lg`. Reflected. |
85
85
  | `orientation` | `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | New in 1.5.0. Tab list layout: `horizontal` (default, a row above the panel) or `vertical` (a column beside the panel as wide as its longest label, tabs 24px apart along a rule on the list's inline-start edge, the active bar on that edge, labels that wrap rather than truncate; Up / Down move between tabs). There is no built-in breakpoint: switch to horizontal on small screens in your app. Reflected. |
86
86
  | `iconPlacement` | `icon-placement` | `"start" \| "top"` | `"start"` | New in 1.5.0. Icon position in every tab: `start` (default, before the label) or `top` (stacked above the label, with the badge beside the label). Stacked tabs are 76 / 64 / 52px tall at large / medium / small. Works in both orientations. Reflected. |
87
87
 
@@ -116,7 +116,7 @@ Set these on the host (or an ancestor) to customise the element without touching
116
116
 
117
117
  | Custom property | Default | Description |
118
118
  | --- | --- | --- |
119
- | `--lof-tab-active-color` | `var(--tab-active-color)` | Underline colour of the active tab; default `var(--lof-bg-brand)` |
119
+ | `--lof-tab-active-color` | `var(--tab-active-color)` | Indicator colour of the active tab; default `var(--lof-border-strong)` (set it to `var(--lof-bg-brand)` for the pre-2026-11 brand line) |
120
120
  | `--lof-tab-hover-color` | `var(--tab-hover-color)` | Background of an inactive tab on hover; default `transparent` (the design darkens the label instead). Set it to bring a hover fill back. |
121
121
  | `--lof-tab-list-width` | `max-content` | Width of the tab list when `orientation="vertical"`; default `max-content` |
122
122
  | `--lof-tab-text-default` | `var(--tab-text-default)` | Label colour of the active tab; default `var(--lof-text-default)` |
@@ -157,6 +157,10 @@ Set these on the host (or an ancestor) to customise the element without touching
157
157
 
158
158
  <!-- readme-gen:end -->
159
159
 
160
+ ## Look
161
+
162
+ - 2026-11 refresh: the active tab is accent text over a full-width 2px accent underline; hover turns a tab's text accent. Horizontal tabs have no side padding and sit 24px apart (`--lof-tab-gap`); vertical tabs keep an 80px minimum and 16px side padding.
163
+
160
164
  ## Accessibility
161
165
 
162
166
  - The strip is `role="tablist"`; every tab is `role="tab"` with `aria-selected`, `aria-disabled` and `aria-controls` pointing at the shared `role="tabpanel"`, which in turn is `aria-labelledby` the active tab and is focusable (`tabindex="0"`).
@@ -180,5 +184,5 @@ Set these on the host (or an ancestor) to customise the element without touching
180
184
  - `lof-tab-change` fires for user selection only; setting `activeIndex` programmatically updates the strip silently.
181
185
  - Slotted `<lof-tab-item>` elements take precedence over the `tabs` array. Their `value` is not read by `<lof-tab>` — look it up from the item at `event.detail` when you need an identifier. The `items` slot itself is hidden.
182
186
  - `badge-dot` wins over `badge`; a `badge` of `0` renders no badge. Badges use the danger tone on enabled tabs and a neutral inverse tone on disabled tabs.
183
- - `size` accepts `small` / `medium` / `large` (item heights 32 / 40 / 48px with body-sm / md / lg type); the short forms `sm` / `md` / `lg` are aliases (see Deprecated aliases).
187
+ - `size` accepts `small` / `medium` / `large` (item heights 34 / 40 / 48px with body-sm / md / lg type); the short forms `sm` / `md` / `lg` are aliases (see Deprecated aliases).
184
188
  - Legacy hook aliases still honoured: `--tab-active-color`, `--tab-underline-height`, `--tab-text-default`, `--tab-text-hover`, `--tab-text-disabled` and `--tab-hover-color` are read as fallbacks of the `--lof-tab-*` hooks.
@@ -0,0 +1,114 @@
1
+ # lof-table
2
+
3
+ `<lof-table>` is the data table of an admin screen: header row with sortable columns, row selection with a select-all box, two-line cells (a value and a muted line under it), custom cell content, client-side paging with a "Show N per page" footer and a page range, plus loading and empty states. By default (`appearance="card"`) it draws the 12px hairline surface of a card, with an optional header (`heading` and the `toolbar` slot for search or actions); `appearance="plain"` drops the surface so it can sit inside a flush `lof-card`. With `server-side` the app owns sorting and paging: the table shows `rows` as given and reports `lof-sort` and `lof-page-change`. New in the 2026-11 admin refresh.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <lof-table id="teams" heading="Teams" selectable page-size="5" grid>
9
+ <lof-textfield slot="toolbar" size="small" prefix-icon="search" placeholder="Search teams" field-aria-label="Search teams"></lof-textfield>
10
+ </lof-table>
11
+ <script>
12
+ const t = document.getElementById('teams');
13
+ t.columns = [
14
+ { key: 'team', label: 'Team', sortable: true, subKey: 'desc', width: '40%' },
15
+ { key: 'rating', label: 'Rating', sortable: true,
16
+ render: (row) => Object.assign(document.createElement('lof-rating'), { value: row.rating, readonly: true }) },
17
+ { key: 'modified', label: 'Last modified', sortable: true },
18
+ { key: 'members', label: 'Members', align: 'end' },
19
+ ];
20
+ t.rows = [
21
+ { id: 1, team: 'Product Management', desc: 'Product development & lifecycle', rating: 5, modified: '21 Oct, 2024', members: 14 },
22
+ { id: 2, team: 'Marketing Team', desc: 'Campaigns & market analysis', rating: 3.5, modified: '15 Oct, 2024', members: 6 },
23
+ { id: 3, team: 'HR Department', desc: 'Talent acquisition, employee welfare', rating: 5, modified: '10 Oct, 2024', members: 9 },
24
+ { id: 4, team: 'Sales Division', desc: 'Customer relations, sales strategy', rating: 4, modified: '05 Oct, 2024', members: 2 },
25
+ { id: 5, team: 'Development Team', desc: 'Software development', rating: 4.5, modified: '01 Oct, 2024', members: 21 },
26
+ { id: 6, team: 'Design', desc: 'Product and brand design', rating: 4.5, modified: '20 Sep, 2024', members: 7 },
27
+ ];
28
+ t.addEventListener('lof-selection-change', (e) => console.log(e.detail.selected));
29
+ </script>
30
+
31
+ <!-- Inside a card, edge to edge, server-side -->
32
+ <lof-card heading="Orders" flush>
33
+ <lof-table id="orders" appearance="plain" server-side page-size="10" total-items="240"></lof-table>
34
+ </lof-card>
35
+ ```
36
+
37
+ <!-- readme-gen:start -->
38
+
39
+ ## API
40
+
41
+ ### Attributes / Properties
42
+
43
+ | Property | Attribute | Type | Default | Description |
44
+ | --- | --- | --- | --- | --- |
45
+ | `columns` | `columns` | `TableColumn[]` | `[]` | Column definitions: `{ key, label, sortable?, align?, width?, subKey?, render?(row, column), compare?(a, b) }`. `render` may return a string, a DOM node or a Lit template. |
46
+ | `rows` | `rows` | `TableRow[]` | `[]` | Row objects. Each column shows `row[column.key]` (and `row[column.subKey]` under it). |
47
+ | `rowKey` | `row-key` | `string` | `"id"` | Row field that identifies a row (for selection). |
48
+ | `selectable` | `selectable` | `boolean` | `false` | Adds a checkbox column and a select-all box. |
49
+ | `selected` | `selected` | `string[]` | `[]` | Keys (`row[row-key]` as strings) of the selected rows. |
50
+ | `sortKey` | `sort-key` | `string` | `""` | Key of the sorted column (`""` = unsorted). Header clicks cycle ascending → descending → unsorted. |
51
+ | `sortDirection` | `sort-direction` | `"asc" \| "desc" \| ""` | `""` | |
52
+ | `pageSize` | `page-size` | `number` | `0` | Rows per page. `0` shows every row and hides the footer. |
53
+ | `page` | `page` | `number` | `1` | |
54
+ | `pageSizeOptions` | `page-size-options` | `number[]` | `[5, 10, 20, 50]` | |
55
+ | `serverSide` | `server-side` | `boolean` | `false` | The app sorts and pages: `rows` are shown as given, `total-items` drives the footer. |
56
+ | `totalItems` | `total-items` | `number` | `0` | |
57
+ | `appearance` | `appearance` | `"card" \| "plain"` | `"card"` | card (default) \| plain. |
58
+ | `grid` | `grid` | `boolean` | `false` | Column dividers as well as row dividers. |
59
+ | `density` | `density` | `"comfortable" \| "compact"` | `"comfortable"` | comfortable (default) \| compact. |
60
+ | `stickyHeader` | `sticky-header` | `boolean` | `false` | |
61
+ | `loading` | `loading` | `boolean` | `false` | |
62
+ | `heading` | `heading` | `string` | `""` | Card header title. |
63
+ | `emptyText` | `empty-text` | `string` | `"No results"` | Text when there are no rows (the `empty` slot replaces it). |
64
+ | `fieldAriaLabel` | `field-aria-label` | `string` | `""` | Accessible name of the table (default: `heading`). |
65
+ | `pageSizeLabel` | `page-size-label` | `string` | `"Show"` | Footer label before the page-size select. |
66
+ | `pageSizeSuffix` | `page-size-suffix` | `string` | `"per page"` | Footer label after the page-size select. |
67
+ | `rangeTemplate` | `range-template` | `string` | `"{start}-{end} of {total}"` | Footer range text; {start}, {end} and {total} are replaced. |
68
+
69
+ ## Events
70
+
71
+ | Event | Detail | Bubbles / composed | Description |
72
+ | --- | --- | --- | --- |
73
+ | `lof-page-change` | `CustomEvent<TablePageDetail>` | yes / yes | The page or page size changed. `detail: { page, pageSize }`. |
74
+ | `lof-selection-change` | `CustomEvent<TableSelectionDetail>` | yes / yes | A row or the select-all box changed. `detail.selected` is the new key list. |
75
+ | `lof-sort` | `CustomEvent<TableSortDetail>` | yes / yes | A sortable header was activated. `detail: { key, direction }`. Cancelable: `preventDefault()` keeps the current sort (sort on the server, then set `sort-key` / `sort-direction`). |
76
+
77
+ ## Slots
78
+
79
+ | Slot | Description |
80
+ | --- | --- |
81
+ | `toolbar` | Search, filters or actions on the right of the header row. |
82
+ | `empty` | Content for a table with no rows (default: `empty-text`). |
83
+
84
+ ## CSS Parts
85
+
86
+ | Part | Description |
87
+ | --- | --- |
88
+ | `page-size` | The page-size `<select>` |
89
+ | `cell` | Each body `<td>` |
90
+ | `base` | The surface |
91
+ | `head` | Header row (title and toolbar) |
92
+ | `title` | Header title |
93
+ | `scroll` | Scrolling wrapper around the table |
94
+ | `table` | The `<table>` |
95
+ | `header-row` | Header `<tr>` |
96
+ | `header-cell` | Each header `<th>` |
97
+ | `row` | Each body `<tr>` |
98
+ | `footer` | The page-size and pager row |
99
+
100
+ <!-- readme-gen:end -->
101
+
102
+ ## Accessibility
103
+
104
+ - A native `<table>` with `scope="col"` headers, named by `field-aria-label` or `heading`. Sortable headers are buttons and carry `aria-sort` (ascending, descending or none).
105
+ - Selection boxes are native checkboxes named "Select row <first column>"; the header box is named "Select all rows on this page" and shows mixed when some are selected. Selected rows carry `aria-selected`.
106
+ - The footer is a `nav` named Pagination; the range text is a polite live region, and the current page button has `aria-current="page"`.
107
+ - While `loading` the table is `aria-busy` and shows skeleton rows.
108
+
109
+ ## Notes / Edge Cases
110
+
111
+ - Client-side sorting compares numbers numerically, dates by time, and everything else with a locale-aware, numeric collator ("Item 2" before "Item 10"). Give a column `compare` for anything else.
112
+ - Select-all toggles the rows on the current page only; selections on other pages are kept.
113
+ - `grid` adds column dividers (the bordered admin table look); `density="compact"` trims the row padding to 8px.
114
+ - `sticky-header` keeps the header visible inside a height-constrained table (set a height on the `scroll` part).
@@ -1,6 +1,6 @@
1
1
  # lof-textfield
2
2
 
3
- `<lof-textfield>` is the single-line and multi-line text input from the Figma "Text Field" component: a labelled control with three chromes (`default` outlined, `underline`, `legend` notched outline), three heights (32 / 40 / 48px), prefix and suffix blocks (icon, short text or slotted content), error / helper text and full-width or inline layout. Use it for free-text entry — names, emails, passwords, numbers, notes (`multiline`). For picking from a fixed list use `lof-select`; for type-ahead against a list use `lof-autocomplete`; for dates and times use the picker components, which reuse this field's chrome.
3
+ `<lof-textfield>` is the single-line and multi-line text input from the Figma "Text Field" component: a labelled control with three chromes (`default` outlined, `underline`, `legend` notched outline), three heights (28 / 34 / 40px), prefix and suffix blocks (icon, short text or slotted content), error / helper text and full-width or inline layout. Use it for free-text entry — names, emails, passwords, numbers, notes (`multiline`). For picking from a fixed list use `lof-select`; for type-ahead against a list use `lof-autocomplete`; for dates and times use the picker components, which reuse this field's chrome.
4
4
 
5
5
  ## Usage
6
6
 
@@ -170,7 +170,7 @@ Set these on the host (or an ancestor) to customise the element without touching
170
170
 
171
171
  | Custom property | Default | Description |
172
172
  | --- | --- | --- |
173
- | `--lof-field-label-reserve` | `calc(var(--lof-body-md-regular-line-height) + var(--lof-spacing-2xs))` | Height held for the label row whenever no label renders above the control — `labelStyle="none"`, and `labelStyle="floating"` where the label sits inside the control — so the control still lines up with labelled siblings in a form row. Defaults to that size's label line-height plus the wrapper gap (24px at `small`, 26px at `medium` and `large`). Set to `0` to collapse the row entirely (toolbars, table cells). |
173
+ | `--lof-field-label-reserve` | `0px` | Height held for the label row whenever no label renders above the control — `labelStyle="none"`, and `labelStyle="floating"` where the label sits inside the control. Nothing is held by default, so an unlabelled field (a search bar) lines up with the buttons beside it. In a form row that mixes labelled and unlabelled fields, set it to the label row's height — `calc(var(--lof-body-field-label-line-height) + var(--lof-spacing-2xs))` (24px at `small`, 26px at `medium` and `large`) — so the controls share a bottom edge. |
174
174
  | `--lof-textfield-surface` | `var(--lof-bg-neutral)` | Colour of the strip the floating label lays over the control's top border and focus ring so the label appears to sit in a notch. It overshoots the band by 2px on the page side, so it must match the surface the field sits on; defaults to the control's own fill (`--lof-bg-neutral`). Set it on a tinted or elevated surface, otherwise the strip shows as a light dash across the border. |
175
175
 
176
176
  <!-- readme-gen:end -->
@@ -200,7 +200,7 @@ Focus behaviour: `focus()` on the host focuses the inner input / textarea (the h
200
200
  - `fullWidth` defaults to `true`; without it the host becomes `inline-block` at its content width. Turn it off with `full-width="false"` (since 1.5.0) or the property (`.fullWidth=${false}`). In 1.x it still reflects as the `fullwidth` attribute, so `lof-textfield[fullwidth]` selectors keep matching.
201
201
  - `label-style="floating"`: the placeholder is hidden until the field is focused; the label floats onto the border when focused or filled. Internally the deprecated `floatingLabel` boolean is kept in sync with `labelStyle` and its reflected `floatinglabel` attribute is the styling hook, so both spellings render identically. With a `prefix-style="clear"` prefix the floated label slides back over the control's left edge (Figma "Floating Label"); `divider` / `fill` prefixes keep it after the block.
202
202
  - `variant="legend"` + `label-style="none"` drops the `<legend>` entirely so the top border runs continuous; a `fill` prefix is squared off in this variant because it cannot reach the notched top border.
203
- - `--lof-field-label-reserve` (see Component hooks) keeps a `label-style="none"` field bottom-aligned with labelled siblings; set it to `0` in toolbars or table cells.
203
+ - No label row is held when no label renders above the control, so `label-style="none"` sits flush with buttons in toolbars and page headers. To bottom-align it with labelled siblings in a form row, set `--lof-field-label-reserve` (see Component hooks) on the row.
204
204
  - Inside the prefix block the order is slotted content → icon → text (nearest the input); in the suffix block it is text → icon → slotted content. Clicking a non-interactive part of either block focuses the input.
205
- - The control height (32 / 40 / 48px) is explicit so the field lines up with `lof-select` and the date / time / range picker triggers; the textarea keeps the padding model and grows with `rows`.
205
+ - The control height (28 / 34 / 40px) is explicit so the field lines up with `lof-select` and the date / time / range picker triggers; the textarea keeps the padding model and grows with `rows`.
206
206
  - In Figma, the `error` state's border has no focus ring; that matches the code (`box-shadow: none` in error).
@@ -32,7 +32,7 @@ Time selection field implementing the Figma "Time Picker" component (Lofid DS V1
32
32
  <lof-time-picker value="09:30" disabled></lof-time-picker>
33
33
  <lof-time-picker value="09:30" readonly></lof-time-picker>
34
34
 
35
- <!-- Sizes (field 32 / 40 / 48px, panel 220 / 250 / 280px) and layout -->
35
+ <!-- Sizes (field 28 / 34 / 40px, panel 220 / 250 / 280px) and layout -->
36
36
  <lof-time-picker size="small"></lof-time-picker>
37
37
  <lof-time-picker size="medium"></lof-time-picker>
38
38
  <lof-time-picker size="large"></lof-time-picker>
@@ -1,6 +1,6 @@
1
1
  # lof-tooltip
2
2
 
3
- Hover/focus tooltip implementing the Figma "Tooltip" component: wraps a trigger element and fades in a short inverse-coloured text bubble above, below, left or right of it, in the Figma `single-line` or `multi-line` **Type**, optionally with a pointing tail. Use it for brief supplementary hints on icon buttons and truncated labels. Do not put critical or interactive content in it — it is not reachable on touch, cannot be focused, and disappears on hover-out.
3
+ Hover/focus tooltip implementing the Figma "Tooltip" component: wraps a trigger element and fades in a short inverse-coloured text bubble (body-sm medium, sliding 4px toward its side) above, below, left or right of it — after a 200ms hover delay, or immediately on keyboard focus — in the Figma `single-line` or `multi-line` **Type**, optionally with a pointing tail. Use it for brief supplementary hints on icon buttons and truncated labels. Do not put critical or interactive content in it — it is not reachable on touch, cannot be focused, and disappears on hover-out.
4
4
 
5
5
  ## Usage
6
6
 
@@ -60,7 +60,7 @@ Hover/focus tooltip implementing the Figma "Tooltip" component: wraps a trigger
60
60
  | Property | Attribute | Type | Default | Description |
61
61
  | --- | --- | --- | --- | --- |
62
62
  | `text` | `text` | `string` | `""` | Plain-text content of the bubble. Empty text still renders an (empty) bubble on hover, so always set it. |
63
- | `position` | `position` | `"above" \| "below" \| "left" \| "right"` | `"above"` | Side of the trigger the bubble appears on, centred and 6px away (13px when `show-tail` is set, so the tail clears the trigger; override with `--lof-tooltip-offset`): `above`, `below`, `left` or `right`. No collision detection — pick a side with room in the viewport. |
63
+ | `position` | `position` | `"above" \| "below" \| "left" \| "right"` | `"above"` | Side of the trigger the bubble appears on, centred and 6px away (9px when `show-tail` is set, so the tail clears the trigger; override with `--lof-tooltip-offset`): `above`, `below`, `left` or `right`. No collision detection — pick a side with room in the viewport. |
64
64
  | `showTail` | `show-tail` | `boolean` | `false` | Renders the triangular tail (`indicator` part) on the bubble's edge facing the trigger. |
65
65
  | `type` | `type` | `"single-line" \| "multi-line"` | `"single-line"` | Figma "Type": `single-line` keeps the text on one line and sizes to content; `multi-line` wraps inside a 200px max-width bubble. Reflected. |
66
66
  | `tone` | `tone` | `"inverse" \| "neutral"` | `"inverse"` | Bubble appearance: `inverse` (default) is the original inverse-surface bubble, unchanged; `neutral` is a light surface — `--lof-bg-neutral` with `--lof-text-default` and a 1px `--lof-border-default`, tail included. Figma has no such variant; this is a deliberate addition. Reflected. |
@@ -219,5 +219,5 @@ Set these on the host (or an ancestor) to customise the element without touching
219
219
  - **Cancel** aborts the `AbortSignal` handed to `uploader` and returns in-flight rows to `ready`; it keeps the list. `reset()` aborts and clears everything.
220
220
  - **`lof-state` is de-duplicated** — it only fires when the derived snapshot (`phase`, counts, `canUpload`, `primaryLabel`) changes, so progress ticks do not spam `<lof-upload-actions>`; it also fires once right after connecting.
221
221
  - **Pairing.** `<lof-upload-actions>` resolves its target by `for` (an id in the same DOM root), else the first `<lof-upload>` in its parent element, else the first in its root. It listens for `lof-state` on its root node, so both elements must share the same document or shadow root — slotting the actions into `<lof-modal>`'s footer is fine because slotting does not change the root.
222
- - **Figma deviations.** The Browse button (not the whole dropzone) is the focusable control; the drag-over frame (solid brand border + 8% brand tint) and the disabled state (60% opacity) have no Figma frame; three colours were moved to the correct token layer for contrast. Details in `UPLOAD-DESIGN-CHANGES.md`.
222
+ - **Figma deviations.** The Browse button (not the whole dropzone) is the focusable control; the drag-over frame (solid 2px green border + 8% brand tint) and the disabled state (60% opacity) have no Figma frame; three colours were moved to the correct token layer for contrast. Details in `UPLOAD-DESIGN-CHANGES.md`.
223
223
  - The Browse hover background reads `--lof-upload-browse-hover-bg` and falls back to `--lof-action-neutral-outline-hover`, then `--lof-bg-surface-elevated`.