@apliteni/apliteni-ui 0.30.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 +23 -28
- package/package.json +1 -1
- package/react/README.md +7 -9
- package/react/dist/index.css +10 -2
- package/react/dist/index.d.ts +25 -1
- package/react/dist/index.js +136 -92
- package/src/components/index.js +2 -2
- package/src/components/pagination.js +9 -31
- package/src/components/stat.js +75 -0
- package/src/index.css +2 -0
- package/src/index.js +1 -0
- package/src/inline.js +4 -0
- package/src/styles/button.css +6 -5
- package/src/styles/callout.css +7 -4
- package/src/styles/card.css +12 -19
- package/src/styles/command-palette.css +6 -5
- package/src/styles/confirm.css +10 -19
- package/src/styles/drawer.css +6 -6
- package/src/styles/dropdown.css +19 -12
- package/src/styles/feedback.css +11 -13
- package/src/styles/field-zoom.css +20 -0
- package/src/styles/input.css +17 -2
- package/src/styles/layout.css +8 -3
- package/src/styles/motion.css +3 -3
- package/src/styles/pagination.css +1 -0
- package/src/styles/segmented.css +1 -2
- package/src/styles/stat.css +121 -0
- package/src/styles/success.css +2 -2
- package/src/styles/tooltip.css +3 -4
- package/src/styles/topbar.css +8 -8
- package/src/tokens/accents.css +7 -6
- package/src/tokens/tokens.css +51 -38
package/README.md
CHANGED
|
@@ -4,29 +4,26 @@
|
|
|
4
4
|
[](./LICENSE)
|
|
5
5
|
[](https://ui.apli.tech)
|
|
6
6
|
|
|
7
|
-
The Apliteni design system
|
|
8
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
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
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
28
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
package/react/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# React components
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
109
|
-
|
|
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
|
|
117
|
-
|
|
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
|
package/react/dist/index.css
CHANGED
|
@@ -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(--
|
|
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);
|
package/react/dist/index.d.ts
CHANGED
|
@@ -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 };
|