@kiteapps/lite-ui 0.1.0 → 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
@@ -8,23 +8,26 @@ A React widget library and interactive reference implementation of the [ADSelfSe
8
8
  npm install
9
9
  npm start
10
10
  npm run storybook
11
- npm run build:lib
11
+ npm run build
12
12
  ```
13
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.
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
15
 
16
16
  ## Package entries
17
17
 
18
- The root entry exports only reusable widgets and reference data. Full page compositions are a separate entry:
18
+ The root entry exports every widget and page. Install the package and its peer dependencies in your React project:
19
19
 
20
20
  ```bash
21
- npm install @kiteapps/lite-ui lucide-react
21
+ npm install @kiteapps/lite-ui react react-dom lucide-react
22
22
  ```
23
23
 
24
24
  ```jsx
25
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';
26
+ import {
27
+ AppShell, TopNavigation, CollapsibleSidebar, MetricWidget, MfaChart,
28
+ ShortcutRail, ReportCategoryBar, ReportNavigation, PolicyTable,
29
+ DashboardPage, ReportsPage, ConfigurationPage, AdminScreen,
30
+ } from '@kiteapps/lite-ui';
28
31
  ```
29
32
 
30
33
  ## Use your own content
@@ -34,8 +37,7 @@ The ADSelfService Plus text and counts are defaults for the demo. Pass your own
34
37
  ```jsx
35
38
  import { ShoppingCart } from 'lucide-react';
36
39
  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';
40
+ import { AppShell, MetricWidget, ReportNavigation, PolicyTable, DashboardPage, ReportsPage } from '@kiteapps/lite-ui';
39
41
 
40
42
  const metrics = [
41
43
  { id: 'orders', title: 'Orders Today', value: '128', caption: 'Across all stores', icon: ShoppingCart, report: 'daily' },
@@ -74,11 +76,11 @@ const reportGroups = [
74
76
 
75
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`.
76
78
 
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} />`.
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} />`.
78
80
 
79
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`.
80
82
 
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.
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.
82
84
 
83
85
  ## Publish to npm
84
86
 
@@ -95,7 +97,7 @@ npm publish --access public
95
97
 
96
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/).
97
99
 
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.
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.
99
101
 
100
102
  | Widget | Content props | Action props |
101
103
  | --- | --- | --- |