@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
@@ -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
 
@@ -1,122 +1,122 @@
1
- # lof-layout
2
-
3
- ## Overview
4
- A responsive CSS Grid layout component with automatic breakpoint handling. Provides a configurable grid with customizable column count and gap, automatically adapting to smaller viewports when `responsive` is enabled.
5
-
6
- ## Usage
7
- ```html
8
- <!-- Basic 4-column grid -->
9
- <lof-layout>
10
- <div>Item 1</div>
11
- <div>Item 2</div>
12
- <div>Item 3</div>
13
- <div>Item 4</div>
14
- <div>Item 5</div>
15
- <div>Item 6</div>
16
- </lof-layout>
17
-
18
- <!-- Custom columns and gap -->
19
- <lof-layout columns="3" gap="24px">
20
- <div>Column 1</div>
21
- <div>Column 2</div>
22
- <div>Column 3</div>
23
- </lof-layout>
24
-
25
- <!-- Fixed layout (non-responsive) -->
26
- <lof-layout columns="2" gap="16px" responsive="false">
27
- <div>Always 2 columns</div>
28
- <div>Even on mobile</div>
29
- </lof-layout>
30
-
31
- <!-- Large gap with 6 columns -->
32
- <lof-layout columns="6" gap="2rem">
33
- <div>Item 1</div>
34
- <div>Item 2</div>
35
- <div>Item 3</div>
36
- <div>Item 4</div>
37
- <div>Item 5</div>
38
- <div>Item 6</div>
39
- </lof-layout>
40
- ```
41
-
42
- <!-- readme-gen:start -->
43
-
44
- <!-- Generated from lof-layout.ts — do not edit; run readme-generate.mjs -->
45
-
46
- ## API
47
-
48
- ### Attributes / Properties
49
-
50
- | Property | Attribute | Type | Default | Description |
51
- | --- | --- | --- | --- | --- |
52
- | `gap` | `gap` | `string` | `"1rem"` | — |
53
- | `columns` | `columns` | `number` | `4` | — |
54
- | `responsive` | `responsive` | `boolean` | `true` | Reflected. |
55
-
56
- ## Events
57
-
58
- | Event | Detail | Bubbles / composed | Description |
59
- | --- | --- | --- | --- |
60
- | — | — | — | This element emits no custom events. |
61
-
62
- ## Slots
63
-
64
- | Slot | Description |
65
- | --- | --- |
66
- | (default) | Main content. |
67
-
68
- ## CSS Parts
69
-
70
- | Part | Description |
71
- | --- | --- |
72
- | — | None exposed. |
73
-
74
- <!-- readme-gen:end -->
75
-
76
- ## API
77
-
78
- ### Attributes/Properties
79
- | Name | Type | Default | Description |
80
- |------|------|---------|-------------|
81
- | `columns` | `number` | `4` | Number of columns in the grid |
82
- | `gap` | `string` | `"1rem"` | CSS gap value (supports any CSS length unit) |
83
- | `responsive` (reflected) | `boolean` | `true` | Enable automatic responsive breakpoints |
84
-
85
- ## Events
86
- None.
87
-
88
- ## Slots
89
- | Slot | Description |
90
- |------|-------------|
91
- | (default) | Grid items (any HTML elements) |
92
-
93
- ## CSS Parts
94
- None exposed.
95
-
96
- ## Tokens / CSS Variables
97
-
98
- ### Semantic Tokens
99
- - `--lof-fonts-font-family` - Font family
100
-
101
- ## Accessibility
102
- - Uses standard CSS Grid, which is accessible by default
103
- - Ensure grid items contain proper semantic HTML
104
-
105
- ### Keyboard Interactions
106
- - Standard browser navigation through grid items
107
-
108
- ### Focus Behavior
109
- - No specific focus handling (relies on slotted content)
110
-
111
- ## Notes / Edge Cases
112
- - **Responsive breakpoints** (only when `responsive` is true):
113
- - **≤1024px**: 3 columns
114
- - **≤768px**: 2 columns
115
- - **≤480px**: 1 column
116
- - The `responsive` attribute is reflected, so CSS can target `:host([responsive])`
117
- - Responsive styles use `!important` to override inline column count
118
- - If `responsive` is set to `false`, the grid maintains the specified column count at all viewport sizes
119
- - The grid is `display: grid` with `width: 100%`
120
- - The `columns` and `gap` properties are applied as inline styles for maximum flexibility
121
- - The component is `display: block` and `width: 100%`
122
- - Grid items do not have any default styling—you must style them yourself
1
+ # lof-layout
2
+
3
+ ## Overview
4
+ A responsive CSS Grid layout component with automatic breakpoint handling. Provides a configurable grid with customizable column count and gap, automatically adapting to smaller viewports when `responsive` is enabled.
5
+
6
+ ## Usage
7
+ ```html
8
+ <!-- Basic 4-column grid -->
9
+ <lof-layout>
10
+ <div>Item 1</div>
11
+ <div>Item 2</div>
12
+ <div>Item 3</div>
13
+ <div>Item 4</div>
14
+ <div>Item 5</div>
15
+ <div>Item 6</div>
16
+ </lof-layout>
17
+
18
+ <!-- Custom columns and gap -->
19
+ <lof-layout columns="3" gap="24px">
20
+ <div>Column 1</div>
21
+ <div>Column 2</div>
22
+ <div>Column 3</div>
23
+ </lof-layout>
24
+
25
+ <!-- Fixed layout (non-responsive) -->
26
+ <lof-layout columns="2" gap="16px" responsive="false">
27
+ <div>Always 2 columns</div>
28
+ <div>Even on mobile</div>
29
+ </lof-layout>
30
+
31
+ <!-- Large gap with 6 columns -->
32
+ <lof-layout columns="6" gap="2rem">
33
+ <div>Item 1</div>
34
+ <div>Item 2</div>
35
+ <div>Item 3</div>
36
+ <div>Item 4</div>
37
+ <div>Item 5</div>
38
+ <div>Item 6</div>
39
+ </lof-layout>
40
+ ```
41
+
42
+ <!-- readme-gen:start -->
43
+
44
+ <!-- Generated from lof-layout.ts — do not edit; run readme-generate.mjs -->
45
+
46
+ ## API
47
+
48
+ ### Attributes / Properties
49
+
50
+ | Property | Attribute | Type | Default | Description |
51
+ | --- | --- | --- | --- | --- |
52
+ | `gap` | `gap` | `string` | `"1rem"` | — |
53
+ | `columns` | `columns` | `number` | `4` | — |
54
+ | `responsive` | `responsive` | `boolean` | `true` | Reflected. |
55
+
56
+ ## Events
57
+
58
+ | Event | Detail | Bubbles / composed | Description |
59
+ | --- | --- | --- | --- |
60
+ | — | — | — | This element emits no custom events. |
61
+
62
+ ## Slots
63
+
64
+ | Slot | Description |
65
+ | --- | --- |
66
+ | (default) | Main content. |
67
+
68
+ ## CSS Parts
69
+
70
+ | Part | Description |
71
+ | --- | --- |
72
+ | — | None exposed. |
73
+
74
+ <!-- readme-gen:end -->
75
+
76
+ ## API
77
+
78
+ ### Attributes/Properties
79
+ | Name | Type | Default | Description |
80
+ |------|------|---------|-------------|
81
+ | `columns` | `number` | `4` | Number of columns in the grid |
82
+ | `gap` | `string` | `"1rem"` | CSS gap value (supports any CSS length unit) |
83
+ | `responsive` (reflected) | `boolean` | `true` | Enable automatic responsive breakpoints |
84
+
85
+ ## Events
86
+ None.
87
+
88
+ ## Slots
89
+ | Slot | Description |
90
+ |------|-------------|
91
+ | (default) | Grid items (any HTML elements) |
92
+
93
+ ## CSS Parts
94
+ None exposed.
95
+
96
+ ## Tokens / CSS Variables
97
+
98
+ ### Semantic Tokens
99
+ - `--lof-font-family` - Font family
100
+
101
+ ## Accessibility
102
+ - Uses standard CSS Grid, which is accessible by default
103
+ - Ensure grid items contain proper semantic HTML
104
+
105
+ ### Keyboard Interactions
106
+ - Standard browser navigation through grid items
107
+
108
+ ### Focus Behavior
109
+ - No specific focus handling (relies on slotted content)
110
+
111
+ ## Notes / Edge Cases
112
+ - **Responsive breakpoints** (only when `responsive` is true):
113
+ - **≤1024px**: 3 columns
114
+ - **≤768px**: 2 columns
115
+ - **≤480px**: 1 column
116
+ - The `responsive` attribute is reflected, so CSS can target `:host([responsive])`
117
+ - Responsive styles use `!important` to override inline column count
118
+ - If `responsive` is set to `false`, the grid maintains the specified column count at all viewport sizes
119
+ - The grid is `display: grid` with `width: 100%`
120
+ - The `columns` and `gap` properties are applied as inline styles for maximum flexibility
121
+ - The component is `display: block` and `width: 100%`
122
+ - Grid items do not have any default styling—you must style them yourself
@@ -0,0 +1,67 @@
1
+ # lof-link
2
+
3
+ `<lof-link>` is a text link: a real `<a>` in the accent colour by default, with an underline style (`hover`, `always`, `dashed` or `none`), three sizes and an optional trailing chevron for "View page ›" calls to action. `tone="mono"` draws it in the text colour and `inverse` on dark surfaces. Use `lof-button variant="link"` for actions that look like links but do something on the page; use `lof-link` to go somewhere. New in the 2026-11 admin refresh.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <lof-link href="/account">View page</lof-link>
9
+ <lof-link href="/account" arrow>View page</lof-link>
10
+ <lof-link href="/start" underline="dashed">Get started</lof-link>
11
+ <lof-link href="/docs" tone="mono" underline="always">Documentation</lof-link>
12
+ <lof-link href="https://example.com" target="_blank">External site</lof-link>
13
+
14
+ <!-- Inside running text: take the paragraph's font -->
15
+ <p>Read the <lof-link href="/terms" inherit underline="always">terms of service</lof-link> before you continue.</p>
16
+ ```
17
+
18
+ <!-- readme-gen:start -->
19
+
20
+ ## API
21
+
22
+ ### Attributes / Properties
23
+
24
+ | Property | Attribute | Type | Default | Description |
25
+ | --- | --- | --- | --- | --- |
26
+ | `href` | `href` | `string` | `""` | |
27
+ | `target` | `target` | `string` | `""` | Passed to the anchor. `_blank` adds `rel="noopener noreferrer"` unless `rel` is set. |
28
+ | `rel` | `rel` | `string` | `""` | |
29
+ | `tone` | `tone` | `"accent" \| "mono" \| "inverse"` | `"accent"` | accent (default) \| mono \| inverse. |
30
+ | `underline` | `underline` | `"hover" \| "always" \| "dashed" \| "none"` | `"hover"` | hover (default) \| always \| dashed \| none. |
31
+ | `size` | `size` | `"small" \| "medium" \| "large"` | `"medium"` | |
32
+ | `arrow` | `arrow` | `boolean` | `false` | A trailing chevron, for "View page ›" calls to action. |
33
+ | `inherit` | `inherit` | `boolean` | `false` | Take the surrounding text's font instead of the link type style (for links inside paragraphs). |
34
+ | `disabled` | `disabled` | `boolean` | `false` | |
35
+
36
+ ## Events
37
+
38
+ | Event | Detail | Bubbles / composed | Description |
39
+ | --- | --- | --- | --- |
40
+ | — | — | — | This element emits no custom events. |
41
+
42
+ ## Slots
43
+
44
+ | Slot | Description |
45
+ | --- | --- |
46
+ | (default) | The link text, and an optional leading lof-icon. |
47
+
48
+ ## CSS Parts
49
+
50
+ | Part | Description |
51
+ | --- | --- |
52
+ | `base` | The `<a>` |
53
+ | `arrow` | The trailing chevron (`arrow`) |
54
+
55
+ <!-- readme-gen:end -->
56
+
57
+ ## Accessibility
58
+
59
+ - A native anchor with focus delegated from the host, so `el.focus()` and label clicks work. Focus shows a 2px ring and the underline.
60
+ - Without `href` the anchor gets `role="link"`, a Tab stop and Enter activation; prefer a real `href`.
61
+ - `disabled` removes the `href` and adds `aria-disabled`; a disabled link is skipped by Tab.
62
+ - Inside running text use `underline="always"`: colour alone does not mark a link in a paragraph.
63
+
64
+ ## Notes / Edge Cases
65
+
66
+ - The chevron is drawn at 1em and follows the link colour.
67
+ - Sizes follow the action type scale: 12 / 13 / 14px Medium.
@@ -0,0 +1,90 @@
1
+ # lof-nav
2
+
3
+ `<lof-nav>` is the vertical navigation of an application sidebar: section headings, items with an icon and an optional badge ("Soon", "New", a count), collapsible groups of child links, and one active item (`value`) drawn with the accent. Items with `href` are real links; items without one are buttons that fire `lof-select` for in-app routing. `collapsed` turns it into an icon rail. New in the 2026-11 admin refresh, after the sidebars of admin dashboards.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <lof-nav id="side" value="light"></lof-nav>
9
+ <script>
10
+ document.getElementById('side').items = [
11
+ { label: 'Dashboards', icon: 'dashboard', children: [
12
+ { label: 'Light sidebar', value: 'light' },
13
+ { label: 'Dark sidebar', value: 'dark' },
14
+ ] },
15
+ { heading: 'User' },
16
+ { label: 'Public profile', icon: 'person', href: '/profile' },
17
+ { label: 'My account', icon: 'settings', href: '/account' },
18
+ { label: 'Network', icon: 'people', href: '/network' },
19
+ { heading: 'Apps' },
20
+ { label: 'Project planning', icon: 'calendar-month', href: '/planning' },
21
+ { label: 'Invoice generator', icon: 'billing-invoices', badge: 'Soon', disabled: true },
22
+ ];
23
+ </script>
24
+
25
+ <!-- Plus / minus group toggles -->
26
+ <lof-nav indicator="plus"></lof-nav>
27
+
28
+ <!-- Icon rail -->
29
+ <lof-nav collapsed></lof-nav>
30
+
31
+ <!-- Route in-app instead of following hrefs -->
32
+ <script>
33
+ document.getElementById('side').addEventListener('lof-select', (e) => {
34
+ e.preventDefault();
35
+ router.go(e.detail.item.href ?? e.detail.value);
36
+ });
37
+ </script>
38
+ ```
39
+
40
+ <!-- readme-gen:start -->
41
+
42
+ ## API
43
+
44
+ ### Attributes / Properties
45
+
46
+ | Property | Attribute | Type | Default | Description |
47
+ | --- | --- | --- | --- | --- |
48
+ | `items` | `items` | `NavEntry[]` | `[]` | Items `{ label, value?, href?, icon?, badge?, disabled?, children?, expanded? }` and section labels `{ heading }`, in order. An item with `children` is a group that toggles instead of navigating. |
49
+ | `value` | `value` | `string` | `""` | The active item's identity (`value`, else `href`, else `label`). |
50
+ | `collapsed` | `collapsed` | `boolean` | `false` | Icon-only rail: labels, badges, headings and children hide; labels move to tooltips. |
51
+ | `indicator` | `indicator` | `"chevron" \| "plus"` | `"chevron"` | Group toggle glyph: chevron (default) or plus / minus. |
52
+ | `fieldAriaLabel` | `field-aria-label` | `string` | `"Main"` | Accessible name of the navigation landmark. |
53
+
54
+ ## Events
55
+
56
+ | Event | Detail | Bubbles / composed | Description |
57
+ | --- | --- | --- | --- |
58
+ | `lof-select` | `CustomEvent<NavSelectDetail>` | yes / yes | An item (not a group) was activated. `detail: { value, item }`. Cancelable: `preventDefault()` stops the link from navigating; `value` still updates. |
59
+ | `lof-toggle` | `CustomEvent<{ value: string; open: boolean; }>` | yes / yes | A group opened or closed. `detail: { value, open }`. |
60
+
61
+ ## Slots
62
+
63
+ | Slot | Description |
64
+ | --- | --- |
65
+ | — | This element has no slots. |
66
+
67
+ ## CSS Parts
68
+
69
+ | Part | Description |
70
+ | --- | --- |
71
+ | `badge` | Each item badge |
72
+ | `link` | Each item link or button (groups also have `group`) |
73
+ | `group` | Each group toggle |
74
+ | `base` | The `<nav>` landmark |
75
+ | `heading` | Each section label |
76
+
77
+ <!-- readme-gen:end -->
78
+
79
+ ## Accessibility
80
+
81
+ - A `<nav>` landmark named by `field-aria-label` (default "Main"), with plain lists inside. Tab moves through the items in order; Enter or Space activates.
82
+ - Group toggles are buttons with `aria-expanded`. A group that holds the active item opens on its own.
83
+ - The active item has `aria-current="page"`. Disabled link items lose their `href` and carry `aria-disabled`.
84
+ - In `collapsed` mode the labels become `title` tooltips; pair the rail with a visible label elsewhere (a header) or an expand control.
85
+
86
+ ## Notes / Edge Cases
87
+
88
+ - An item's identity is `value`, else `href`, else `label`: set `value` when two items share a label.
89
+ - Children are one level deep, drawn with a bullet that takes the accent when active. Icons are shown on top-level items only.
90
+ - The element does not draw a sidebar surface: put it inside your own aside (Metronic-style sidebars are the page background with a hairline divider).
@@ -0,0 +1,71 @@
1
+ # lof-page-header
2
+
3
+ `<lof-page-header>` is the bar at the top of a page: the page title, a line under it (`description`) or a breadcrumb trail (the `breadcrumb` slot), and the page actions on the right (the `actions` slot). `layout="inline"` puts the breadcrumb beside the title; `divider` draws a hairline under the bar. New in the 2026-11 admin refresh.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <lof-page-header heading="Dashboard" description="Central hub for personal customization">
9
+ <lof-button slot="actions" variant="secondary">View profile</lof-button>
10
+ <lof-button slot="actions">Create team</lof-button>
11
+ </lof-page-header>
12
+
13
+ <!-- Breadcrumb beside the title -->
14
+ <lof-page-header id="ph" heading="Team settings" layout="inline" divider>
15
+ <lof-breadcrumbs slot="breadcrumb" id="trail"></lof-breadcrumbs>
16
+ <lof-button slot="actions" variant="secondary"><lof-icon name="download"></lof-icon>Export</lof-button>
17
+ </lof-page-header>
18
+ <script>
19
+ document.getElementById('trail').items = [
20
+ { label: 'Home', href: '/' }, { label: 'Client API', href: '/api' }, { label: 'Team settings' },
21
+ ];
22
+ </script>
23
+ ```
24
+
25
+ <!-- readme-gen:start -->
26
+
27
+ ## API
28
+
29
+ ### Attributes / Properties
30
+
31
+ | Property | Attribute | Type | Default | Description |
32
+ | --- | --- | --- | --- | --- |
33
+ | `heading` | `heading` | `string` | `""` | Page title (rendered as an h1 by default). |
34
+ | `description` | `description` | `string` | `""` | Line under (or beside) the title; the `breadcrumb` slot takes a lof-breadcrumbs instead. |
35
+ | `headingLevel` | `heading-level` | `number` | `1` | Heading level for the title (1 to 6). |
36
+ | `layout` | `layout` | `"stacked" \| "inline"` | `"stacked"` | stacked (default) \| inline. |
37
+ | `divider` | `divider` | `boolean` | `false` | A hairline under the bar. |
38
+
39
+ ## Events
40
+
41
+ | Event | Detail | Bubbles / composed | Description |
42
+ | --- | --- | --- | --- |
43
+ | — | — | — | This element emits no custom events. |
44
+
45
+ ## Slots
46
+
47
+ | Slot | Description |
48
+ | --- | --- |
49
+ | `title` | Rich title content (replaces `heading`). |
50
+ | `breadcrumb` | A lof-breadcrumbs or other line (replaces `description`). |
51
+ | `actions` | Page actions; fields here drop their label row. |
52
+
53
+ ## CSS Parts
54
+
55
+ | Part | Description |
56
+ | --- | --- |
57
+ | `base` | The bar |
58
+ | `title` | The title |
59
+ | `description` | The description |
60
+ | `actions` | The actions region |
61
+
62
+ <!-- readme-gen:end -->
63
+
64
+ ## Accessibility
65
+
66
+ - The title is `role="heading"` at `heading-level` (default 1). Use one level 1 per page.
67
+ - Actions keep their own semantics; order them so the primary action is last (rightmost), as reading order follows the DOM.
68
+
69
+ ## Notes / Edge Cases
70
+
71
+ - The bar wraps on narrow screens: actions drop under the title.