horizon-design 2.0.1 → 2.0.2
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.
package/README.md
CHANGED
|
@@ -370,7 +370,7 @@ variants).
|
|
|
370
370
|
| [`CommandPalette`](https://play-horizon.github.io/horizon-design/command-palette) | The command palette: a dialog at the top of the window with a search field and every command that matches what is typed (each word whole, ignoring case and accents, through Ark's `useFilter`), ranked by [fuzzysort](https://github.com/farzher/fuzzysort), label matches first, each with its shortcut. The field and the virtualised list are an Ark combobox: Up, Down, Home and End move through the commands that can run, Enter runs one, Escape closes. `open` binds, `onRun` runs the chosen command once the palette has finished closing, so the command can move the focus, and `label` and `emptyText` are required. |
|
|
371
371
|
| [`LinkOverlay`](https://play-horizon.github.io/horizon-design/link-overlay) | The link of a `LinkBox`, stretched over the whole box so a click anywhere follows it, while the box's other links and controls stay usable. |
|
|
372
372
|
| [`Pagination`](https://play-horizon.github.io/horizon-design/pagination) | Page links with previous and next for `count` items, required (Ark Pagination); `page` binds the current page, and Ark `translations` name its controls; the built-in arrows show their names as tooltips. `children` replaces the built-in controls with the parts `PaginationPrevTrigger` and `PaginationNextTrigger` (an icon-only one takes a `label`, its tooltip), `PaginationItem`, `PaginationEllipsis` and `PaginationContext`, which reads its state. |
|
|
373
|
-
| [`Sidebar`](https://play-horizon.github.io/horizon-design/sidebar) | An app's navigation sidebar: a sunken column with an optional header (the brand), the navigation itself (`SidebarSection` and `SidebarItem
|
|
373
|
+
| [`Sidebar`](https://play-horizon.github.io/horizon-design/sidebar) | An app's navigation sidebar: a sunken column with an optional header (the brand), then the navigation landmark (named by `label`), holding the navigation itself (`SidebarSection` and `SidebarItem`) and an optional footer (the account's entries); `collapsed` narrows it to its icons, and each item then shows its text as a tooltip. |
|
|
374
374
|
| [`SkipNav`](https://play-horizon.github.io/horizon-design/skip-nav) | A link, shown on keyboard focus, that skips to the page's main content. |
|
|
375
375
|
| [`Steps`](https://play-horizon.github.io/horizon-design/steps) | A multi-step flow (Ark Steps): the `steps` (each an `id`, a `title` and its `content`), the current step's content, and back and next buttons named by `prevLabel` and `nextLabel`, required; `step` binds the current step. |
|
|
376
376
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
-
An app's navigation sidebar: a sunken column with an optional header (the brand), the
|
|
4
|
-
navigation
|
|
5
|
-
|
|
3
|
+
An app's navigation sidebar: a sunken column with an optional header (the brand), then the
|
|
4
|
+
navigation landmark (named by `label`), which holds both the navigation itself (`SidebarSection`
|
|
5
|
+
and `SidebarItem`), scrolling when it overflows, and the optional footer pinned beneath it (the
|
|
6
|
+
account's entries). `collapsed` narrows it to the items' icons: their text and the sections' labels
|
|
6
7
|
are clipped or visually hidden, and still read by assistive technology, and each item shows its
|
|
7
8
|
text as a tooltip.
|
|
8
9
|
-->
|
|
@@ -31,7 +32,7 @@ text as a tooltip.
|
|
|
31
32
|
label?: string;
|
|
32
33
|
/** The top of the sidebar, such as the brand. */
|
|
33
34
|
header?: Snippet;
|
|
34
|
-
/** The bottom of the sidebar, such as the account. */
|
|
35
|
+
/** The bottom of the sidebar, inside the navigation landmark, such as the account's entries. */
|
|
35
36
|
footer?: Snippet;
|
|
36
37
|
/** The navigation: `SidebarSection`s and `SidebarItem`s. */
|
|
37
38
|
children?: Snippet;
|
|
@@ -61,16 +62,20 @@ text as a tooltip.
|
|
|
61
62
|
{@render header()}
|
|
62
63
|
</div>
|
|
63
64
|
{/if}
|
|
64
|
-
<nav
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</nav>
|
|
71
|
-
{#if footer}
|
|
72
|
-
<div class="mx-2.5 border-t border-border px-1 py-3" data-slot="sidebar-footer">
|
|
73
|
-
{@render footer()}
|
|
65
|
+
<nav aria-label={label} class="flex min-h-0 flex-1 flex-col">
|
|
66
|
+
<div
|
|
67
|
+
class="flex flex-1 flex-col gap-0.5 overflow-x-hidden overflow-y-auto px-2.5 pb-3"
|
|
68
|
+
data-slot="sidebar-content"
|
|
69
|
+
>
|
|
70
|
+
{@render children?.()}
|
|
74
71
|
</div>
|
|
75
|
-
|
|
72
|
+
{#if footer}
|
|
73
|
+
<div
|
|
74
|
+
class="mx-2.5 flex flex-col gap-0.5 border-t border-border py-3"
|
|
75
|
+
data-slot="sidebar-footer"
|
|
76
|
+
>
|
|
77
|
+
{@render footer()}
|
|
78
|
+
</div>
|
|
79
|
+
{/if}
|
|
80
|
+
</nav>
|
|
76
81
|
</aside>
|
|
@@ -11,7 +11,7 @@ type $$ComponentProps = {
|
|
|
11
11
|
label?: string;
|
|
12
12
|
/** The top of the sidebar, such as the brand. */
|
|
13
13
|
header?: Snippet;
|
|
14
|
-
/** The bottom of the sidebar, such as the account. */
|
|
14
|
+
/** The bottom of the sidebar, inside the navigation landmark, such as the account's entries. */
|
|
15
15
|
footer?: Snippet;
|
|
16
16
|
/** The navigation: `SidebarSection`s and `SidebarItem`s. */
|
|
17
17
|
children?: Snippet;
|
|
@@ -19,9 +19,10 @@ type $$ComponentProps = {
|
|
|
19
19
|
[key: string]: unknown;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
|
-
* An app's navigation sidebar: a sunken column with an optional header (the brand), the
|
|
23
|
-
* navigation
|
|
24
|
-
*
|
|
22
|
+
* An app's navigation sidebar: a sunken column with an optional header (the brand), then the
|
|
23
|
+
* navigation landmark (named by `label`), which holds both the navigation itself (`SidebarSection`
|
|
24
|
+
* and `SidebarItem`), scrolling when it overflows, and the optional footer pinned beneath it (the
|
|
25
|
+
* account's entries). `collapsed` narrows it to the items' icons: their text and the sections' labels
|
|
25
26
|
* are clipped or visually hidden, and still read by assistive technology, and each item shows its
|
|
26
27
|
* text as a tooltip.
|
|
27
28
|
*/
|