@apliteni/apliteni-ui 0.31.0 → 0.32.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 CHANGED
@@ -4,29 +4,26 @@
4
4
  [![license: MIT](https://img.shields.io/npm/l/@apliteni/apliteni-ui?color=3b9dff)](./LICENSE)
5
5
  [![live: ui.apli.tech](https://img.shields.io/badge/live-ui.apli.tech-9b5dff)](https://ui.apli.tech)
6
6
 
7
- The Apliteni design system & UI kit one source of UI for every product surface
8
- (the strategy deck, the text portal, `/account`, the operating model, and whatever
9
- ships next).
7
+ The Apliteni design system and UI kit supplies shared UI for the strategy deck,
8
+ the text portal, `/account`, the operating model, and future product surfaces.
10
9
 
11
- Two layers over one set of design tokens: framework-agnostic **HTML + CSS**, and
12
- **React components** for stateful surfaces. Themeable dark and light with **accent
13
- sub-themes**. Showcased and reviewed in **Storybook**, and published on **ui.apli.tech**.
10
+ It provides framework-agnostic **HTML + CSS** and **React components** for stateful
11
+ surfaces, with shared tokens, dark and light themes, and **accent sub-themes**.
12
+ Review components in **Storybook** at **ui.apli.tech**.
14
13
 
15
- - 🎨 **Live site + Storybook** → [ui.apli.tech](https://ui.apli.tech)
16
- - 📦 **Package** → [`@apliteni/apliteni-ui`](https://www.npmjs.com/package/@apliteni/apliteni-ui) (public npm)
17
- - ⚛️ **React components** → `@apliteni/apliteni-ui/react` — a subpath of the same package, source in [`react/`](./react)
14
+ - **Live site + Storybook** → [ui.apli.tech](https://ui.apli.tech)
15
+ - **Package** → [`@apliteni/apliteni-ui`](https://www.npmjs.com/package/@apliteni/apliteni-ui) (public npm)
16
+ - **React components** → `@apliteni/apliteni-ui/react` — a subpath of the same package, source in [`react/`](./react)
18
17
 
19
18
  ## HTML + CSS *and* React
20
19
 
21
- The core is HTML + CSS because the strategy portal (`apliteni/strategy`, `viz/`)
22
- server-renders HTML strings (`.mjs` modules), not a component framework. So the kit
23
- ships the same shape: token CSS + component CSS + tiny HTML-string factories. That
24
- makes it a *true* single source of truth — the portal imports it with no rewrite and
25
- no framework drift. Storybook (`@storybook/html-vite`) renders exactly what ships.
20
+ The strategy portal (`apliteni/strategy`, `viz/`) server-renders HTML strings from
21
+ `.mjs` modules without a component framework. The kit supplies token CSS, component
22
+ CSS, and HTML-string factories that the portal can import without a rewrite.
23
+ Storybook (`@storybook/html-vite`) renders those same strings.
26
24
 
27
- React sits on top for surfaces that hold real client state dashboards, tables,
28
- filters, forms. Those components render the same `.ui-*` classes and the same tokens
29
- as the vanilla kit, so the two layers can't drift.
25
+ React components handle client state in dashboards, tables, filters, and forms.
26
+ They use the vanilla kit's `.ui-*` classes and tokens.
30
27
 
31
28
  **Which one:** does the surface hold meaningful client state? No → the HTML-string
32
29
  factories below. Yes → the [React components](#react-components-stateful-surfaces).
@@ -67,10 +64,9 @@ tables, fields, paragraphs, chat, which is most of an application. Weights 300-7
67
64
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap">
68
65
  ```
69
66
 
70
- Load only one of them and the other falls through to the system stack behind it, without
71
- saying so. Want the old
72
- single-family look back? Set both roles to the same family in your own stylesheet, after the
73
- kit's:
67
+ If either font is missing, that role falls back to its system stack, and nothing says so.
68
+ For the old single-family appearance, set both roles to the same family in your stylesheet,
69
+ after the kit's:
74
70
 
75
71
  ```css
76
72
  :root { --font-sans: var(--font-display); }
@@ -111,18 +107,17 @@ import { tokensCss, topbarCss, cssText } from '@apliteni/apliteni-ui/inline';
111
107
  same tokens, TypeScript types included. They ship as a **subpath of this package**,
112
108
  not as a package of their own: one install, one version, one pin.
113
109
 
114
- **You install React yourself.** The kit declares no dependency on it — not a
115
- dependency, not a peer so npm will not warn you and will not pull it in. Bring your
116
- own `react` and `react-dom`, version 18 or newer:
110
+ Install `react` and `react-dom`, version 18 or newer, yourself. The kit declares
111
+ neither a regular nor a peer dependency on React, so npm neither installs it nor
112
+ warns when it is missing:
117
113
 
118
114
  ```bash
119
115
  npm install @apliteni/apliteni-ui react react-dom
120
116
  ```
121
117
 
122
- Miss them and the import of `@apliteni/apliteni-ui/react` fails at build or at
123
- runtime with a module-not-found error for `react`. Everything else in the kit is
124
- unaffected, so a plain HTML consumer installs the kit alone and never gets React in
125
- its tree.
118
+ Without them, importing `@apliteni/apliteni-ui/react` fails at build or runtime with
119
+ a module-not-found error for `react`. Plain HTML consumers can install the kit alone;
120
+ the other entry points are unaffected and do not bring React into the dependency tree.
126
121
 
127
122
  ```tsx
128
123
  import '@apliteni/apliteni-ui/css'; // kit tokens + .ui-* classes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
package/react/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # React components
2
2
 
3
- Source for the kit's React layer for surfaces that hold real client state
4
- (dashboards, tables, filters, forms). They render the same `.ui-*` classes and
5
- tokens as the vanilla kit, so the two layers can't drift.
3
+ The kit's React layer supplies components for stateful surfaces: dashboards, tables,
4
+ filters, and forms. They use the vanilla kit's `.ui-*` classes and tokens.
6
5
 
7
6
  This directory is a **private workspace**, not a package. It builds to `react/dist/`
8
7
  and ships as the `@apliteni/apliteni-ui/react` subpath of the kit — one package, one
@@ -29,7 +28,7 @@ import '@apliteni/apliteni-ui/react/css'; // React components' shell styles (mo
29
28
  import { DataTable, Modal, Button } from '@apliteni/apliteni-ui/react';
30
29
  ```
31
30
 
32
- Components: `DataTable`, `Pagination`, `Modal`, `Drawer`, `CommandPalette`, `Button`, `Badge`, `Card`, `Icon`.
31
+ Components: `DataTable`, `Pagination`, `StatBand`, `Modal`, `Drawer`, `CommandPalette`, `Button`, `Badge`, `Card`, `Icon`.
33
32
 
34
33
  `CommandPalette` renders the kit's `commandPalette()` markup, class for class, and imports the
35
34
  kit's ranking rather than repeating it — so a palette a server rendered and the same palette
@@ -105,16 +104,15 @@ npm run storybook -w react # http://localhost:6007
105
104
  npm run build # tsup -> react/dist/
106
105
  ```
107
106
 
108
- 6007 is a request, not a promise: if something else already holds it, Storybook
109
- walks upward to the next free port. The root Storybook composes these components
110
- by following that drift — it probes 6007 through 6016 (the window Storybook's own
107
+ If port 6007 is occupied, Storybook tries higher ports until one is free. The root
108
+ Storybook composes these components by following that drift it probes 6007 through 6016 (the window Storybook's own
111
109
  port-finder searches) and takes the first one whose `index.json` lists every story
112
110
  file this workspace has on disk. A stranger on the port fails that check and is
113
111
  never shown under "React components"; the section is simply absent, and the root
114
112
  Storybook's terminal says which ports it tried and what it found.
115
113
 
116
- The probe runs once, while the root Storybook boots. Start this one afterwards and
117
- you have to restart the root Storybook before it appears.
114
+ The probe runs once when the root Storybook starts. If you start the React Storybook
115
+ later, restart the root Storybook to include it.
118
116
 
119
117
  The bare `@apliteni/apliteni-ui` specifier in this source resolves to the kit itself
120
118
  once installed. In the repo there is no copy to resolve to, so `kit-alias.ts` points
@@ -17,6 +17,15 @@
17
17
  }
18
18
  }
19
19
 
20
+ /* ../src/styles/field-zoom.css */
21
+ @media (pointer: coarse) {
22
+ input:not(:where([type=button], [type=checkbox], [type=color], [type=file], [type=hidden], [type=image], [type=radio], [type=range], [type=reset], [type=submit])),
23
+ select,
24
+ textarea {
25
+ font-size: 16px !important;
26
+ }
27
+ }
28
+
20
29
  /* src/Modal.css */
21
30
  .rx-scrim {
22
31
  position: fixed;
@@ -34,10 +43,9 @@
34
43
  }
35
44
  .rx-modal {
36
45
  width: min(480px, 92vw);
37
- background: var(--surface);
46
+ background: var(--bg-elevated);
38
47
  border: 1px solid var(--border);
39
48
  border-radius: var(--radius-xl);
40
- box-shadow: var(--shadow-lg);
41
49
  overflow: hidden;
42
50
  transform: translateY(8px);
43
51
  transition: transform var(--dur-med) var(--ease);
@@ -31,6 +31,30 @@ declare function Card({ title, sub, level, children }: {
31
31
  children?: ReactNode;
32
32
  }): react.JSX.Element;
33
33
 
34
+ type StatTone = 'good' | 'bad' | 'neutral';
35
+ type StatVariant = 'band' | 'tiles' | 'open';
36
+ interface StatDelta {
37
+ value: string | null;
38
+ tone?: StatTone;
39
+ basis?: string;
40
+ direction?: 'up' | 'down' | 'flat';
41
+ none?: string;
42
+ }
43
+ interface StatFigure {
44
+ label: string;
45
+ value: ReactNode;
46
+ delta?: StatDelta;
47
+ trend?: ReactNode;
48
+ }
49
+ interface StatBandProps {
50
+ stats: StatFigure[];
51
+ variant?: StatVariant;
52
+ basis?: string;
53
+ label?: string;
54
+ id?: string;
55
+ }
56
+ declare function StatBand({ stats, variant, basis, label, id }: StatBandProps): react.JSX.Element;
57
+
34
58
  type ModalProps = {
35
59
  open: boolean;
36
60
  title: string;
@@ -222,4 +246,4 @@ declare function Denied({ title, sub, need, icon, className, children, }: Denied
222
246
  declare const PAGE_SIZES: readonly number[];
223
247
  declare const DEFAULT_PAGE_SIZE: number;
224
248
 
225
- export { Badge, BusyRegion, type BusyRegionProps, Button, type ButtonProps, Card, type Column, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, DEFAULT_PAGE_SIZE, DataTable, type DataTableProps, Denied, type DeniedProps, Drawer, type DrawerProps, Icon, Modal, type ModalProps, PAGE_SIZES, Pagination, type PaginationProps, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, type TableSort, sortTableRows };
249
+ export { Badge, BusyRegion, type BusyRegionProps, Button, type ButtonProps, Card, type Column, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, DEFAULT_PAGE_SIZE, DataTable, type DataTableProps, Denied, type DeniedProps, Drawer, type DrawerProps, Icon, Modal, type ModalProps, PAGE_SIZES, Pagination, type PaginationProps, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, StatBand, type StatBandProps, type StatDelta, type StatFigure, type StatTone, type StatVariant, type TableSort, sortTableRows };