@stealthscale/component-navigation 0.3.1 → 0.3.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/dist/theme.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as recipe$3, n as recipe$4, o as recipe, r as recipe$2, s as recipe$1, t as recipe$5 } from "./recipe-BN0p1O6u.js";
1
+ import { a as recipe$3, n as recipe$4, o as recipe, r as recipe$2, s as recipe$1, t as recipe$5 } from "./recipes-BN0p1O6u.js";
2
2
  import { definePreset } from "@stealthscale/theme/authoring";
3
3
  //#region src/theme.ts
4
4
  /**
@@ -0,0 +1,22 @@
1
+ {
2
+ "about": "An ordered list of links from the site root to the current page.",
3
+ "april": "April",
4
+ "collapsed": {
5
+ "about": "A trail with the crumbs between the first crumb and the current page replaced by an ellipsis. The ellipsis takes an aria-label with the number of crumbs it replaces, so a screen reader announces the full depth.",
6
+ "title": "Collapsed"
7
+ },
8
+ "dropped": "{{count}} more steps",
9
+ "home": "Home",
10
+ "invoices": "Invoices",
11
+ "label": "Breadcrumb",
12
+ "shortened": "Collapsed breadcrumb",
13
+ "size": {
14
+ "about": "Every size, one trail per row. The size sets the text style and the gap between crumbs.",
15
+ "title": "Sizes"
16
+ },
17
+ "title": "Breadcrumb",
18
+ "variant": {
19
+ "about": "Both looks. The current page is a span in the default ink, and the links above it are muted.",
20
+ "title": "Looks"
21
+ }
22
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "about": "An anchor in the theme's link ink, underlined at rest or on hover.",
3
+ "after": " before the end of the month.",
4
+ "before": "Read the",
5
+ "inherit": {
6
+ "about": "A link in the link ink and a link that inherits the text color, both in muted text. Use inherit for a card title or a brand name, where the context already marks the text as a link.",
7
+ "title": "Inherit"
8
+ },
9
+ "palette": {
10
+ "about": "The eight semantic palettes. Each palette sets the ink from its fg role and the focus ring from its focusRing role.",
11
+ "title": "Palettes"
12
+ },
13
+ "terms": "terms of service",
14
+ "title": "Link",
15
+ "variant": {
16
+ "about": "Both looks inside a sentence. Both underline on hover. The underline look also underlines at rest.",
17
+ "title": "Looks"
18
+ }
19
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "about": "A list of links a page is reached from: rows in a column, and branches that expand a nested list.",
3
+ "acme": "Acme",
4
+ "billing": "Billing",
5
+ "effect": {
6
+ "about": "A glow around the current row, in the palette's solid at half opacity.",
7
+ "title": "Effects"
8
+ },
9
+ "guide": {
10
+ "about": "Every style of the line down a nested list. The line is aligned with the centre of the branch's icon.",
11
+ "title": "Guides"
12
+ },
13
+ "highlight": {
14
+ "about": "Every highlight at every size, on the row with `aria-current`.",
15
+ "title": "Highlights and sizes"
16
+ },
17
+ "iconic": {
18
+ "about": "The list in full and collapsed to a rail. In the rail every row is a square that contains its icon, or its mark, such as the workspace's avatar. The counts, the controls and the nested rows are hidden, and the text remains in the accessibility tree. A link with `tooltip` shows its words beside the icon on hover and on focus.",
19
+ "title": "Iconic"
20
+ },
21
+ "invoices": "Invoices",
22
+ "overview": "Overview",
23
+ "palette": {
24
+ "about": "The eight semantic palettes, on the fill highlight. The palette sets the highlight, the hover fill and the branch rows.",
25
+ "title": "Palettes"
26
+ },
27
+ "radius": {
28
+ "about": "Every corner, on the current row.",
29
+ "title": "Corners"
30
+ },
31
+ "rename": "Rename {{name}}",
32
+ "reveal": {
33
+ "about": "A control that is always visible, and one that appears on hover. The control on the current row is always visible. The others appear under the pointer, while their row has focus, and under a coarse pointer.",
34
+ "title": "Reveal"
35
+ },
36
+ "settings": "Settings",
37
+ "team": "Team",
38
+ "title": "Nav list",
39
+ "variant": {
40
+ "about": "A column of rows, and a dock of equal columns across the foot of a screen, each an icon over its label.",
41
+ "title": "Looks"
42
+ }
43
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "about": "Renders a site's navigation landmark: a bar of links and of buttons that open panels of links. Each button follows the WAI-ARIA disclosure pattern, so a screen reader announces a button that expands a group of links. A mouse opens a panel after `openDelay`, a press toggles it, the arrow keys move along the bar and into an open panel, and Escape or a press outside closes it.",
3
+ "aligned": {
4
+ "about": "`align` on the viewport positioner places the viewport against the open trigger: its start edge at the trigger's start, centred under the trigger, or its end edge at the trigger's end. The machine keeps the viewport 10px inside the window.",
5
+ "title": "Alignment"
6
+ },
7
+ "click": {
8
+ "about": "With `disableHoverTrigger` a panel opens only on a press, as a menu in an application's bar does. A second press closes it, and the arrow keys still move along the bar.",
9
+ "docs": "Documentation",
10
+ "help": "Help",
11
+ "label": "Application",
12
+ "members": "Members",
13
+ "settings": "Settings",
14
+ "shortcuts": "Keyboard shortcuts",
15
+ "support": "Contact support",
16
+ "switch": "Switch workspace",
17
+ "title": "Press to open",
18
+ "workspace": "Workspace"
19
+ },
20
+ "controlled": {
21
+ "about": "The caller keeps `value` and changes it in `onValueChange`, and the status line reads the open item. `onSelect` on a link runs before the menu closes, so the status line also names the last link pressed.",
22
+ "closed": "Every panel is closed.",
23
+ "open": "Open: {{item}}.",
24
+ "picked": "Last link pressed: {{link}}.",
25
+ "title": "Controlled"
26
+ },
27
+ "header": {
28
+ "about": "Panels open in one shared viewport, which moves to the open trigger and resizes to the panel, and the indicator runs along the bar under the open trigger. The viewport's start edge meets the open trigger's, because the bar starts at the page's start edge. Every panel is written inside its item and shown in the viewport. Pricing is a plain link and marks the page on screen with `current`.",
29
+ "careers": "Careers",
30
+ "changelog": {
31
+ "about": "What shipped each week.",
32
+ "title": "Changelog"
33
+ },
34
+ "company": "Company",
35
+ "contact": "Contact",
36
+ "guides": {
37
+ "about": "Setups for common integrations.",
38
+ "title": "Guides"
39
+ },
40
+ "invoicing": {
41
+ "about": "Invoices that reconcile when paid.",
42
+ "title": "Invoicing"
43
+ },
44
+ "label": "Site",
45
+ "ledger": {
46
+ "about": "Double-entry books for each account.",
47
+ "title": "Ledger"
48
+ },
49
+ "payments": {
50
+ "about": "Accept cards and bank debits.",
51
+ "title": "Payments"
52
+ },
53
+ "pricing": "Pricing",
54
+ "products": "Products",
55
+ "reference": {
56
+ "about": "Every endpoint and error code.",
57
+ "title": "API reference"
58
+ },
59
+ "reports": {
60
+ "about": "Revenue, fees and payouts by month.",
61
+ "title": "Reports"
62
+ },
63
+ "resources": "Resources",
64
+ "story": "About us",
65
+ "title": "Site header"
66
+ },
67
+ "inline": {
68
+ "about": "Without a viewport each panel opens under its own trigger and is as wide as its links. The indicator runs along the bar under the open trigger, and Changelog marks the page on screen with `current`.",
69
+ "api": "API",
70
+ "changelog": "Changelog",
71
+ "cli": "Command line",
72
+ "label": "Developers",
73
+ "logs": "Request logs",
74
+ "payments": "Payments",
75
+ "refunds": "Refunds",
76
+ "sandbox": "Sandbox",
77
+ "title": "Panels in place",
78
+ "tools": "Tools",
79
+ "webhooks": "Webhooks"
80
+ },
81
+ "palette": {
82
+ "about": "The palette colors the indicator and a link to the page on screen. Changelog is current in each row.",
83
+ "title": "Palettes"
84
+ },
85
+ "sidebar": {
86
+ "about": "With `orientation=\"vertical\"` the bar is a column, the arrow keys move up and down it, and ArrowRight enters an open panel, which opens beside its trigger. Dashboard is current.",
87
+ "billing": "Billing",
88
+ "dashboard": "Dashboard",
89
+ "invoices": "Invoices",
90
+ "keys": "API keys",
91
+ "label": "Workspace",
92
+ "security": "Security",
93
+ "settings": "Settings",
94
+ "subscriptions": "Subscriptions",
95
+ "tax": "Tax",
96
+ "team": "Team",
97
+ "title": "Vertical"
98
+ },
99
+ "size": {
100
+ "about": "Every size. The size sets the bar's triggers and links, the gap to a panel, and a panel's padding, links and icons.",
101
+ "title": "Sizes"
102
+ },
103
+ "title": "Navigation menu"
104
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "about": "Renders a navigation landmark of page buttons between the buttons that move a page back and forward. Every page and trigger is the library's square button, and the current page is the button marked on.",
3
+ "edges": {
4
+ "about": "The first and last triggers jump to the ends. With `siblingCount` 0 the row shows the first, the current and the last page between them.",
5
+ "title": "Edges"
6
+ },
7
+ "first": "First page",
8
+ "last": "Last page",
9
+ "links": {
10
+ "about": "With `type=\"link\"`, every page and trigger is a link to the address `getPageUrl` returns, so a reader can open a page in a new tab and the address bar keeps the page. A press follows the link and leaves the page to the address: the example reads `page` from the hash, as an application reads it from its router.",
11
+ "title": "Links"
12
+ },
13
+ "looks": {
14
+ "about": "The root passes `variant` to every button. Ghost and outline fill the current page, and subtle fills it one step deeper than the other pages.",
15
+ "title": "Looks"
16
+ },
17
+ "narrow": {
18
+ "about": "The root measures whether its pages fit the row. When they do not, it sets `data-crowded`, the pages and marks are hidden, and the summary states the current page between the triggers. The `summary` prop of `Pagination.Items` sets the summary's words.",
19
+ "title": "Narrow"
20
+ },
21
+ "next": "Next page",
22
+ "page": "Page {{page}}",
23
+ "palette": {
24
+ "about": "The root passes `palette` to every button, so the current page takes the palette's fill.",
25
+ "title": "Palettes"
26
+ },
27
+ "previous": "Previous page",
28
+ "siblings": {
29
+ "about": "`siblingCount` sets how many pages show on each side of the current one. Every row starts on page 12 of 24, where marks replace the runs of pages left out.",
30
+ "title": "Siblings"
31
+ },
32
+ "size": {
33
+ "about": "Every size. The size sets the buttons, the gaps between them, the ellipsis and the page text.",
34
+ "title": "Sizes"
35
+ },
36
+ "summary": "Page {{page}} of {{totalPages}}",
37
+ "table": {
38
+ "about": "A controlled pagination under a list: the caller keeps `page` and `pageSize`, shows the rows of the current page, and changes the page size from a segment group. The page text gives the range of rows.",
39
+ "amount": "€{{amount}}",
40
+ "invoice": "Invoice INV-{{number}}",
41
+ "perPage": "Rows per page",
42
+ "title": "Controlled"
43
+ },
44
+ "text": {
45
+ "about": "The page text in each format: compact states the page, short gives the page over the count, and long gives the range of items. It is an `output`, so a screen reader reads the new text after a press.",
46
+ "title": "Page text"
47
+ },
48
+ "title": "Pagination"
49
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "about": "A list of links to the headings on a page, with an indicator next to the headings in view.",
3
+ "following": {
4
+ "about": "The aside placement next to three sections of this page. The table of contents sticks to the top of the viewport while the page scrolls, and the indicator moves to the headings in view. Clicking a link scrolls the page to its heading.",
5
+ "title": "Aside placement"
6
+ },
7
+ "headings": {
8
+ "toc-first": "The first section",
9
+ "toc-install": "Install",
10
+ "toc-overview": "Overview",
11
+ "toc-peers": "Peers",
12
+ "toc-second": "The second section",
13
+ "toc-third": "The third section",
14
+ "toc-usage": "Usage"
15
+ },
16
+ "onThisPage": "On this page",
17
+ "palette": {
18
+ "about": "The eight semantic palettes, with the indicator on the second heading. The palette sets the indicator and the focus ring.",
19
+ "title": "Palettes"
20
+ },
21
+ "passage": "This section gives the page enough height to scroll. The table of contents marks its heading while the heading is in view.",
22
+ "second": "With the aside placement the table of contents is sticky. It stays in the viewport while this column scrolls, so the indicator stays visible.",
23
+ "size": {
24
+ "about": "Every size, with the indicator on the second heading. A heading at depth 3 is indented by one gap.",
25
+ "title": "Sizes"
26
+ },
27
+ "third": "Clicking a link scrolls the page to its heading and writes the heading's ID to the URL fragment. The indicator then moves to that heading.",
28
+ "title": "Table of contents"
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stealthscale/component-navigation",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Draws the ways a person moves between places: links, tabs, breadcrumbs and rails.",
5
5
  "keywords": [
6
6
  "components",
@@ -19,6 +19,7 @@
19
19
  "files": [
20
20
  "dist",
21
21
  "LICENSE",
22
+ "locales",
22
23
  "README.md"
23
24
  ],
24
25
  "type": "module",
@@ -44,16 +45,16 @@
44
45
  },
45
46
  "devDependencies": {
46
47
  "@arethetypeswrong/core": "^0.18",
47
- "@stealthscale/component-actions": "^0.2.2",
48
- "@stealthscale/component-disclosure": "^0.2.3",
49
- "@stealthscale/component-layout": "^0.2.1",
50
- "@stealthscale/component-primitives": "^0.3.0",
48
+ "@stealthscale/component-actions": "^0.2.3",
49
+ "@stealthscale/component-disclosure": "^0.2.4",
50
+ "@stealthscale/component-layout": "^0.2.2",
51
+ "@stealthscale/component-primitives": "^0.3.1",
51
52
  "@stealthscale/hooks": "^0.3.0",
52
53
  "@stealthscale/theme": "^0.5.0",
53
54
  "@stealthscale/vite-config": "^0.8.0",
54
- "@stealthscale/vite-config-i18n": "^0.2.1",
55
+ "@stealthscale/vite-config-i18n": "^0.2.2",
55
56
  "@stealthscale/vite-config-react": "^0.9.1",
56
- "@stealthscale/vite-config-specimen": "^0.2.1",
57
+ "@stealthscale/vite-config-specimen": "^0.3.0",
57
58
  "@stealthscale/vite-config-theme": "^0.3.0",
58
59
  "@stealthscale/vite-config-typescript": "^0.3.0",
59
60
  "@testing-library/react": "^16.3",
@@ -69,9 +70,9 @@
69
70
  "vitest": "5.0.3"
70
71
  },
71
72
  "peerDependencies": {
72
- "@stealthscale/component-actions": "^0.2.2",
73
- "@stealthscale/component-disclosure": "^0.2.3",
74
- "@stealthscale/component-primitives": "^0.3.0",
73
+ "@stealthscale/component-actions": "^0.2.3",
74
+ "@stealthscale/component-disclosure": "^0.2.4",
75
+ "@stealthscale/component-primitives": "^0.3.1",
75
76
  "@stealthscale/hooks": "^0.3.0",
76
77
  "@stealthscale/theme": "^0.5.0",
77
78
  "react": "^19.3"