@kiteapps/lite-ui 0.0.0-stage → 0.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.
package/README.md CHANGED
@@ -1,3 +1,117 @@
1
- # Temporary Holding Version
1
+ # @kiteapps/lite-ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
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
12
+ ```
13
+
14
+ `npm run build` creates the distributable package in `dist`. `npm run build:demo` builds the standalone demo; `npm run build-storybook` builds the component catalog. The demo starts on Login Settings. Use the top navigation to open Dashboard, Reports, and Configuration.
15
+
16
+ ## Package entries
17
+
18
+ The root entry exports every widget and page. Install the package and its peer dependencies in your React project:
19
+
20
+ ```bash
21
+ npm install @kiteapps/lite-ui react react-dom lucide-react
22
+ ```
23
+
24
+ ```jsx
25
+ import '@kiteapps/lite-ui/styles.css';
26
+ import {
27
+ AppShell, TopNavigation, CollapsibleSidebar, MetricWidget, MfaChart,
28
+ ShortcutRail, ReportCategoryBar, ReportNavigation, PolicyTable,
29
+ DashboardPage, ReportsPage, ConfigurationPage, AdminScreen,
30
+ } from '@kiteapps/lite-ui';
31
+ ```
32
+
33
+ ## Use your own content
34
+
35
+ The ADSelfService Plus text and counts are defaults for the demo. Pass your own labels, data, and callbacks to each widget or page:
36
+
37
+ ```jsx
38
+ import { ShoppingCart } from 'lucide-react';
39
+ import '@kiteapps/lite-ui/styles.css';
40
+ import { AppShell, MetricWidget, ReportNavigation, PolicyTable, DashboardPage, ReportsPage } from '@kiteapps/lite-ui';
41
+
42
+ const metrics = [
43
+ { id: 'orders', title: 'Orders Today', value: '128', caption: 'Across all stores', icon: ShoppingCart, report: 'daily' },
44
+ ];
45
+ const reportGroups = [
46
+ { label: 'Sales Reports', items: [{ id: 'daily', label: 'Daily Sales' }] },
47
+ ];
48
+
49
+ <AppShell
50
+ activeSection="Dashboard"
51
+ hideSidebar
52
+ mainClassName="ad-main--dashboard"
53
+ headerProps={{
54
+ brand: 'Acme Console', sections: ['Dashboard', 'Reports'],
55
+ directories: ['Production', 'Staging'], showDownload: false,
56
+ utilityItems: [], showNotifications: false, showBrandOrbit: false,
57
+ }}
58
+ footerProps={{ items: [{ id: 'help', label: 'Help Center', href: '/help' }] }}
59
+ >
60
+ <DashboardPage
61
+ metrics={metrics}
62
+ directoryData={[{ id: 'open', label: 'Open Orders', value: 64 }]}
63
+ mfaData={[{ id: 'web', label: 'Web', value: 70, color: '#3b82f6' }]}
64
+ selfServiceData={[{ id: 'returns', label: 'Returns', value: 12 }]}
65
+ shortcuts={[{ title: 'Store Tools', links: [{ id: 'inventory', label: 'Inventory' }] }]}
66
+ chartTitles={{ directory: 'Order Status', mfa: 'Sales Channels', selfService: 'Operations' }}
67
+ chartProps={{ directory: { max: 100, axisLabel: 'Orders' } }}
68
+ domains={['Production', 'Staging']}
69
+ onReportSelect={(reportId, item) => console.log(reportId, item)}
70
+ onShortcutSelect={(id, item) => console.log(id, item)}
71
+ />
72
+ </AppShell>
73
+ ```
74
+
75
+ `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 }`.
76
+
77
+ `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`.
78
+
79
+ Every page imports its building blocks from the public widget entry, and the Storybook **Widgets** and **Pages** 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} />`.
80
+
81
+ `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`.
82
+
83
+ 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, TypeScript declarations, and CSS. Import the stylesheet once in your app. The `/pages` import path remains available for existing consumers.
84
+
85
+ ## Publish to npm
86
+
87
+ 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.
88
+
89
+ ```bash
90
+ npm login
91
+ npm whoami
92
+ npm test -- --watch=false
93
+ npm run build:lib
94
+ npm pack --dry-run
95
+ npm publish --access public
96
+ ```
97
+
98
+ `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/).
99
+
100
+ The Storybook catalog has only **Widgets** and **Pages**. Widgets contains 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.
101
+
102
+ | Widget | Content props | Action props |
103
+ | --- | --- | --- |
104
+ | `PageHeader` | `title`, `help`, `action` (React node) | Pass a callback to the action node, for example `<Button onClick={addUser}>` |
105
+ | `DashboardToolbar` | `domains`, `domainLabel`, `menuItems` | `onDomainChange`, `onMenuAction`, `onToggleShortcuts`, `onExpand` |
106
+ | `ReportNavigation`, `ReportCategoryBar` | `groups`, `selected` or `defaultSelected` | `onSelect(id, item)` |
107
+ | `ReportFilters` | `domains`, `ouOptions`, `labels`, controlled `domain` and `ou` | `onDomainChange(value, item)`, `onOuChange(value, item)`, `onGenerate`, `onStop` |
108
+ | `ShellHeader`, `TopNavigation`, `ShellFooter` | `brand`, `sections`, `directories`, `items` and labels | `onSectionChange`, `onDirectoryChange`, `onItemSelect` and utility callbacks |
109
+ | `ConfigurationSidebar`, `PolicyFeatureStrip` | `groups`, `features`, `title`, `instruction` | `onSelect`, `onFeatureSelect` |
110
+ | `PolicyTable`, `DataTable` | Object rows, columns, custom cell renderers, empty messages | `onEdit`, `onDelete`, `onCopy`, `onRowClick` |
111
+ | `Frame`, `InlineSelect` | `tabs`, `title`, `options`, controlled or default values | `onTabChange`, `onChange` |
112
+
113
+ Forms and report filters keep state locally when controlled values are omitted. Save shows a local confirmation and does not connect to ADSelfService Plus.
114
+
115
+ ## Reference coverage
116
+
117
+ 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.