@xsolla/xui-navigation 0.149.1 → 0.151.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 (2) hide show
  1. package/README.md +28 -22
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -1,45 +1,51 @@
1
- # @xsolla/xui-navigation
1
+ # Navigation
2
2
 
3
- Convenience re-export of all navigation components: Breadcrumbs, Link, NavBar, Pagination, Segmented, TabBar, and Tabs.
3
+ Convenience meta-package that re-exports every navigation component from the toolkit. Install one package instead of many; refer to each component's own page for detailed API and accessibility notes.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- yarn add @xsolla/xui-navigation
8
+ npm install @xsolla/xui-navigation
9
9
  ```
10
10
 
11
- ## Usage
11
+ ## Imports
12
12
 
13
- ```tsx
14
- import { Tabs, TabPanel, NavBar, Breadcrumbs, Pagination } from '@xsolla/xui-navigation';
13
+ ```ts
14
+ import { Breadcrumbs, Link, NavBar, Pagination, Segmented, TabBar, Tabs } from '@xsolla/xui-navigation';
15
+ ```
15
16
 
16
- function App() {
17
- const [page, setPage] = React.useState(1);
18
- const [activeTab, setActiveTab] = React.useState('home');
17
+ ## Quick start
19
18
 
19
+ ```tsx
20
+ import { Tabs, NavBar, Breadcrumbs } from '@xsolla/xui-navigation';
21
+
22
+ export default function Example() {
23
+ const [active, setActive] = React.useState('home');
20
24
  return (
21
25
  <>
22
- <NavBar bordered>
23
- <NavBar.StartSlot><BackButton /></NavBar.StartSlot>
24
- <NavBar.Center><Text>My App</Text></NavBar.Center>
25
- </NavBar>
26
+ <NavBar bordered><NavBar.Center>My App</NavBar.Center></NavBar>
26
27
  <Breadcrumbs items={[{ label: 'Home', href: '/' }, { label: 'Shop' }]} />
27
28
  <Tabs
28
29
  id="main"
29
30
  tabs={[{ id: 'home', label: 'Home' }, { id: 'shop', label: 'Shop' }]}
30
- activeTabId={activeTab}
31
- onChange={setActiveTab}
31
+ activeTabId={active}
32
+ onTabChange={setActive}
32
33
  />
33
- <Pagination totalPages={20} currentPage={page} onPageChange={setPage} />
34
34
  </>
35
35
  );
36
36
  }
37
37
  ```
38
38
 
39
- ## Components
39
+ ## Re-exported packages
40
+
41
+ | Component(s) | Source package |
42
+ | :----------- | :------------- |
43
+ | Breadcrumbs | `@xsolla/xui-breadcrumbs` |
44
+ | Link | `@xsolla/xui-link` |
45
+ | NavBar | `@xsolla/xui-nav-bar` |
46
+ | Pagination | `@xsolla/xui-pagination` |
47
+ | Segmented | `@xsolla/xui-segmented` |
48
+ | TabBar | `@xsolla/xui-tab-bar` |
49
+ | Tabs | `@xsolla/xui-tabs` |
40
50
 
41
- - **Breadcrumbs** Accessible breadcrumb trail
42
- - **NavBar** — Top navigation bar with start/centre/end slots
43
- - **Pagination** — Page navigation control
44
- - **Tabs** / **TabPanel** — Tabbed interface with content panels
45
- - **TabBar** — React Navigation-compatible bottom tab bar
51
+ See each component's dedicated page for props, examples, and accessibility details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-navigation",
3
- "version": "0.149.1",
3
+ "version": "0.151.0",
4
4
  "main": "./web/index.js",
5
5
  "types": "./web/index.d.ts",
6
6
  "scripts": {
@@ -12,13 +12,13 @@
12
12
  "styled-components": ">=4"
13
13
  },
14
14
  "dependencies": {
15
- "@xsolla/xui-breadcrumbs": "0.149.1",
16
- "@xsolla/xui-link": "0.149.1",
17
- "@xsolla/xui-nav-bar": "0.149.1",
18
- "@xsolla/xui-pagination": "0.149.1",
19
- "@xsolla/xui-segmented": "0.149.1",
20
- "@xsolla/xui-tab-bar": "0.149.1",
21
- "@xsolla/xui-tabs": "0.149.1"
15
+ "@xsolla/xui-breadcrumbs": "0.151.0",
16
+ "@xsolla/xui-link": "0.151.0",
17
+ "@xsolla/xui-nav-bar": "0.151.0",
18
+ "@xsolla/xui-pagination": "0.151.0",
19
+ "@xsolla/xui-segmented": "0.151.0",
20
+ "@xsolla/xui-tab-bar": "0.151.0",
21
+ "@xsolla/xui-tabs": "0.151.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@vitest/coverage-v8": "^4.0.18",