@kiteapps/lite-ui 0.0.0-stage → 0.1.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.
- package/README.md +114 -2
- package/dist/index.cjs +792 -0
- package/dist/index.css +2070 -0
- package/dist/index.mjs +760 -0
- package/dist/pages.cjs +1319 -0
- package/dist/pages.css +2070 -0
- package/dist/pages.mjs +1287 -0
- package/package.json +53 -4
package/README.md
CHANGED
|
@@ -1,3 +1,115 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kiteapps/lite-ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A React widget library and interactive reference implementation of the [ADSelfService Plus live demo](https://demo.adselfserviceplus.com/). It follows the reference's compact scale: a 69 px dark header, 244 px navigation rail, small form controls, flat panels, and green primary buttons. Icons use Lucide.
|
|
4
|
+
|
|
5
|
+
## Run
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install
|
|
9
|
+
npm start
|
|
10
|
+
npm run storybook
|
|
11
|
+
npm run build:lib
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`npm run build` builds the demo; `npm run build-storybook` builds the component catalog. `npm run build:lib` creates the distributable package in `dist`. The application starts on Login Settings. Use the top navigation to open Dashboard, Reports, and Configuration.
|
|
15
|
+
|
|
16
|
+
## Package entries
|
|
17
|
+
|
|
18
|
+
The root entry exports only reusable widgets and reference data. Full page compositions are a separate entry:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @kiteapps/lite-ui lucide-react
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```jsx
|
|
25
|
+
import '@kiteapps/lite-ui/styles.css';
|
|
26
|
+
import { AppShell, TopNavigation, CollapsibleSidebar, MetricWidget, MfaChart, ShortcutRail, ReportCategoryBar, ReportNavigation, PolicyTable } from '@kiteapps/lite-ui';
|
|
27
|
+
import { DashboardPage, ReportsPage, ConfigurationPage, AdminScreen } from '@kiteapps/lite-ui/pages';
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Use your own content
|
|
31
|
+
|
|
32
|
+
The ADSelfService Plus text and counts are defaults for the demo. Pass your own labels, data, and callbacks to each widget or page:
|
|
33
|
+
|
|
34
|
+
```jsx
|
|
35
|
+
import { ShoppingCart } from 'lucide-react';
|
|
36
|
+
import '@kiteapps/lite-ui/styles.css';
|
|
37
|
+
import { AppShell, MetricWidget, ReportNavigation, PolicyTable } from '@kiteapps/lite-ui';
|
|
38
|
+
import { DashboardPage, ReportsPage } from '@kiteapps/lite-ui/pages';
|
|
39
|
+
|
|
40
|
+
const metrics = [
|
|
41
|
+
{ id: 'orders', title: 'Orders Today', value: '128', caption: 'Across all stores', icon: ShoppingCart, report: 'daily' },
|
|
42
|
+
];
|
|
43
|
+
const reportGroups = [
|
|
44
|
+
{ label: 'Sales Reports', items: [{ id: 'daily', label: 'Daily Sales' }] },
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
<AppShell
|
|
48
|
+
activeSection="Dashboard"
|
|
49
|
+
hideSidebar
|
|
50
|
+
mainClassName="ad-main--dashboard"
|
|
51
|
+
headerProps={{
|
|
52
|
+
brand: 'Acme Console', sections: ['Dashboard', 'Reports'],
|
|
53
|
+
directories: ['Production', 'Staging'], showDownload: false,
|
|
54
|
+
utilityItems: [], showNotifications: false, showBrandOrbit: false,
|
|
55
|
+
}}
|
|
56
|
+
footerProps={{ items: [{ id: 'help', label: 'Help Center', href: '/help' }] }}
|
|
57
|
+
>
|
|
58
|
+
<DashboardPage
|
|
59
|
+
metrics={metrics}
|
|
60
|
+
directoryData={[{ id: 'open', label: 'Open Orders', value: 64 }]}
|
|
61
|
+
mfaData={[{ id: 'web', label: 'Web', value: 70, color: '#3b82f6' }]}
|
|
62
|
+
selfServiceData={[{ id: 'returns', label: 'Returns', value: 12 }]}
|
|
63
|
+
shortcuts={[{ title: 'Store Tools', links: [{ id: 'inventory', label: 'Inventory' }] }]}
|
|
64
|
+
chartTitles={{ directory: 'Order Status', mfa: 'Sales Channels', selfService: 'Operations' }}
|
|
65
|
+
chartProps={{ directory: { max: 100, axisLabel: 'Orders' } }}
|
|
66
|
+
domains={['Production', 'Staging']}
|
|
67
|
+
onReportSelect={(reportId, item) => console.log(reportId, item)}
|
|
68
|
+
onShortcutSelect={(id, item) => console.log(id, item)}
|
|
69
|
+
/>
|
|
70
|
+
</AppShell>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`ReportNavigation`, `ReportCategoryBar`, and `ReportsPage` accept `groups={reportGroups}`. `ReportsPage` also accepts `filtersProps` for domain and OU choices, `labels` for text, and `onGenerate`, `onStop`, and `onSchedule` for actions. It manages report selection internally unless you pass `selected` and `onSelect`. The `onGenerate` callback receives `{ selected, report, domain, ou }`.
|
|
74
|
+
|
|
75
|
+
`ConfigurationPage` accepts custom `groups`, `policies` or `initialPolicies`, `features`, `columns`, `labels`, `onFeatureSelect`, and policy action callbacks. It manages policies locally unless you pass `policies` and `onPoliciesChange`. The toolbar searches and paginates the displayed rows; set `toolbarProps.pageSize` to change page size. `PolicyTable` accepts custom columns such as `{ key: 'owner', label: 'Owner' }`, with values read from each policy object. `DataTable` likewise accepts object columns, object rows, custom cell renderers, and `onRowClick`.
|
|
76
|
+
|
|
77
|
+
Every page imports its building blocks from the public widget entry, and the Storybook **Your…** and **Custom…** stories show the same prop patterns interactively. To use one piece without a full page, render it directly, for example `<MetricWidget title="Orders" value="128" caption="Today" onClick={openOrders} />`.
|
|
78
|
+
|
|
79
|
+
`AdminScreen` is a reference page gallery. Pass `screens={{ myScreen: MySettingsPage }}` or `renderScreen={id => ...}` to supply your own page; build it from the exported form widgets such as `Frame`, `FormRow`, `CheckRow`, `InlineSelect`, `DataTable`, and `SaveBar`.
|
|
80
|
+
|
|
81
|
+
For local package installation, run `npm pack` and install the resulting `.tgz` in the consuming project. React, React DOM, and Lucide React are peer dependencies. The library builds ESM and CommonJS files and includes CSS in the package.
|
|
82
|
+
|
|
83
|
+
## Publish to npm
|
|
84
|
+
|
|
85
|
+
The package name in `package.json` is `@kiteapps/lite-ui`. Sign in with an npm account that owns or has publish access to the `@kiteapps` scope. Choose and add the package's license before public release.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npm login
|
|
89
|
+
npm whoami
|
|
90
|
+
npm test -- --watch=false
|
|
91
|
+
npm run build:lib
|
|
92
|
+
npm pack --dry-run
|
|
93
|
+
npm publish --access public
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`prepack` also runs the library build when publishing. For a later release, update the version with `npm version patch` (or `minor`/`major`) before publishing again. See the [npm guide to scoped public packages](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages/).
|
|
97
|
+
|
|
98
|
+
The Storybook catalog separates **Widgets** from **Pages**. Open **Widgets → Reusable Components** to find editable, interactive stories for PageHeader, DashboardToolbar, report navigation and filters, ShellHeader, TopNavigation, ShellFooter, AppShell, collapsible and configuration sidebars, policy features and tables, settings tabs, and InlineSelect. Each story has **Controls** for text and data props and a **Last action** readout for callback behavior. PolicyTable includes custom-column and empty-state variations. The Administrator screen stories remain under Administrator.
|
|
99
|
+
|
|
100
|
+
| Widget | Content props | Action props |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| `PageHeader` | `title`, `help`, `action` (React node) | Pass a callback to the action node, for example `<Button onClick={addUser}>` |
|
|
103
|
+
| `DashboardToolbar` | `domains`, `domainLabel`, `menuItems` | `onDomainChange`, `onMenuAction`, `onToggleShortcuts`, `onExpand` |
|
|
104
|
+
| `ReportNavigation`, `ReportCategoryBar` | `groups`, `selected` or `defaultSelected` | `onSelect(id, item)` |
|
|
105
|
+
| `ReportFilters` | `domains`, `ouOptions`, `labels`, controlled `domain` and `ou` | `onDomainChange(value, item)`, `onOuChange(value, item)`, `onGenerate`, `onStop` |
|
|
106
|
+
| `ShellHeader`, `TopNavigation`, `ShellFooter` | `brand`, `sections`, `directories`, `items` and labels | `onSectionChange`, `onDirectoryChange`, `onItemSelect` and utility callbacks |
|
|
107
|
+
| `ConfigurationSidebar`, `PolicyFeatureStrip` | `groups`, `features`, `title`, `instruction` | `onSelect`, `onFeatureSelect` |
|
|
108
|
+
| `PolicyTable`, `DataTable` | Object rows, columns, custom cell renderers, empty messages | `onEdit`, `onDelete`, `onCopy`, `onRowClick` |
|
|
109
|
+
| `Frame`, `InlineSelect` | `tabs`, `title`, `options`, controlled or default values | `onTabChange`, `onChange` |
|
|
110
|
+
|
|
111
|
+
Forms and report filters keep state locally when controlled values are omitted. Save shows a local confirmation and does not connect to ADSelfService Plus.
|
|
112
|
+
|
|
113
|
+
## Reference coverage
|
|
114
|
+
|
|
115
|
+
The demo was inspected in its Administrator, Dashboard, Reports, and Configuration areas on October 14, 2026. Dashboard includes four summary cards, three report charts, the feature shortcut rail, and settings menu. Reports includes five category groups and their visible report names, searchable navigation, category menus, domain/OU filters, and result state. Configuration includes its collapsible navigation and Policy Configuration page with feature strip and policies table. Other Configuration selections currently show a generic settings panel. The displayed counts and policies are reference demo data. Some deeper tabs and configuration dialogs were unavailable in the demo; these examples use local interactions and representative content and should be checked against a working administrator installation before claiming pixel parity.
|