@nadicodeai/ui 10.1.0 → 12.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/AGENTS.md +39 -24
- package/README.md +58 -124
- package/dist/agent-orb.d.ts +1 -1
- package/dist/agent-orb.d.ts.map +1 -1
- package/dist/assets/brand/index.json +1 -1
- package/dist/components/action-menu.js +1 -1
- package/dist/components/agent-card.d.ts.map +1 -1
- package/dist/components/agent-card.js +2 -4
- package/dist/components/agent-orb.d.ts +11 -5
- package/dist/components/agent-orb.d.ts.map +1 -1
- package/dist/components/agent-orb.js +8 -6
- package/dist/components/alert.js +3 -3
- package/dist/components/badge.js +6 -6
- package/dist/components/brand-field.d.ts +2 -0
- package/dist/components/brand-field.d.ts.map +1 -1
- package/dist/components/brand-field.js +3 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +4 -5
- package/dist/components/carousel.js +2 -2
- package/dist/components/chart-bar-horizontal.js +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/context-menu.js +1 -1
- package/dist/components/diff-count.js +1 -1
- package/dist/components/dropdown-menu.js +3 -3
- package/dist/components/footer.d.ts +4 -7
- package/dist/components/footer.d.ts.map +1 -1
- package/dist/components/footer.js +1 -4
- package/dist/components/item.js +1 -1
- package/dist/components/kpi-card.js +2 -2
- package/dist/components/label-system.d.ts +1 -5
- package/dist/components/label-system.d.ts.map +1 -1
- package/dist/components/label-system.js +2 -6
- package/dist/components/menu-choice-row.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/object-workspace.js +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/scope-switcher.d.ts +24 -0
- package/dist/components/scope-switcher.d.ts.map +1 -0
- package/dist/components/scope-switcher.js +34 -0
- package/dist/components/settings-section.d.ts +2 -1
- package/dist/components/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section.js +2 -2
- package/dist/components/status-dot.js +1 -1
- package/dist/components/status-row.js +1 -1
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.d.ts +11 -5
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +37 -5
- package/dist/components/tooltip.js +1 -1
- package/dist/components/trend-badge.d.ts.map +1 -1
- package/dist/components/trend-badge.js +1 -2
- package/dist/eslint/index.js +4 -0
- package/dist/eslint/rules/jsx-class-utility.js +1 -1
- package/dist/eslint/rules/no-shadcn-appearance-override.js +3 -3
- package/dist/eslint/rules/one-control-height.js +94 -0
- package/dist/eslint/rules/settings-section-description.js +45 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/agent-orb-motion.d.ts +1 -0
- package/dist/internal/agent-orb-motion.d.ts.map +1 -1
- package/dist/internal/agent-orb-motion.js +6 -3
- package/dist/internal/agent-orb.d.ts +10 -2
- package/dist/internal/agent-orb.d.ts.map +1 -1
- package/dist/internal/agent-orb.js +19 -9
- package/dist/internal/assistant-ui/attachment.js +4 -4
- package/dist/internal/assistant-ui/follow-up-suggestions.js +1 -1
- package/dist/internal/assistant-ui/markdown-text.js +4 -4
- package/dist/internal/assistant-ui/reasoning.js +2 -2
- package/dist/internal/assistant-ui/thread.d.ts.map +1 -1
- package/dist/internal/assistant-ui/thread.js +11 -9
- package/dist/internal/assistant-ui/tool-group.js +2 -2
- package/dist/styles/components.css +9 -5
- package/dist/styles/globals.css +43 -0
- package/package.json +3 -4
- package/dist/components/handoff-banner.d.ts +0 -9
- package/dist/components/handoff-banner.d.ts.map +0 -1
- package/dist/components/handoff-banner.js +0 -6
- package/docs/activity.md +0 -113
- package/docs/agent-orb.md +0 -168
- package/docs/component-classification.md +0 -45
- package/docs/consuming-cross-repo.md +0 -116
- package/docs/contract.md +0 -388
- package/docs/icon-assets.md +0 -106
- package/docs/migration/1.0.0.md +0 -75
- package/docs/migration/10.0.0.md +0 -144
- package/docs/migration/2.0.0.md +0 -69
- package/docs/migration/6.0.0.md +0 -30
- package/docs/migration/9.0.0.md +0 -35
- package/docs/migration/base-ui-migration.md +0 -62
- package/docs/model-identity.md +0 -18
- package/docs/product-compositions.md +0 -96
- package/docs/product-sections.md +0 -200
package/AGENTS.md
CHANGED
|
@@ -1,29 +1,44 @@
|
|
|
1
1
|
# @nadicodeai/ui
|
|
2
2
|
|
|
3
|
-
Shared React components, primitives, Agent
|
|
4
|
-
Source lives in `src/`; consumers receive `dist/` through
|
|
5
|
-
exports.
|
|
3
|
+
Shared React components, primitives, the Agent conversation interface, and
|
|
4
|
+
product compositions. Source lives in `src/`; consumers receive `dist/` through
|
|
5
|
+
`package.json` exports.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- System activity indicators: `docs/activity.md`.
|
|
12
|
-
- `ModelIdentity`, the adapter over `ModelMark`: `docs/model-identity.md`.
|
|
13
|
-
- Icons as SVG files, for a consumer without React: `docs/icon-assets.md`.
|
|
14
|
-
- Shared compositions and whether a component is package or app owned:
|
|
15
|
-
`docs/product-compositions.md`, `docs/component-classification.md`.
|
|
16
|
-
- Shell skeletons, plugin, installer, automation and settings sections:
|
|
17
|
-
`docs/product-sections.md`.
|
|
18
|
-
- What belongs in this package and what belongs in a product: `docs/contract.md`,
|
|
19
|
-
"Placement". Nadia's entry screen is the worked example that moved out.
|
|
20
|
-
- Package releases: `../../docs/agents/publish.md`.
|
|
7
|
+
Every design rule a component follows is in `../design-system/DESIGN.md`:
|
|
8
|
+
tokens, roles, materials, glass, motion, status, activity, Agent orbs, marks and
|
|
9
|
+
the component rules in its "Components" section. This file holds only how the
|
|
10
|
+
package is kept.
|
|
21
11
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
- **Styling.** A component uses the semantic roles and the generated tokens, and
|
|
13
|
+
nothing else: no raw colour, no `dark:` utility, no mode branch, no second
|
|
14
|
+
token vocabulary. A new value is added to `DESIGN.md` first.
|
|
15
|
+
- **Placement.** This package holds what at least two products use; what one
|
|
16
|
+
product alone needs lives in that product. A component admitted without a
|
|
17
|
+
consumer, or left unconsumed after the migration it was built for, is removed.
|
|
18
|
+
- **Boundaries.** The package owns presentation. Apps own routing, auth, data,
|
|
19
|
+
server actions, runtime adapters, permissions and copy. Apps change a
|
|
20
|
+
component's appearance only through its typed variants and slots; a new
|
|
21
|
+
appearance is added here.
|
|
22
|
+
- **Source.** Components stay flat under `src/components/`; reviewed registry
|
|
23
|
+
source sits in `src/internal/` and is not a public namespace. Base UI is the
|
|
24
|
+
primitive base: no Radix or vaul, and `cmdk` only for the stock Command. A
|
|
25
|
+
shadcn block named in a task (`dashboard-01`, `login-02`) is used as that
|
|
26
|
+
registry item. Auth screens start from their shadcn block in the app; this
|
|
27
|
+
package ships no auth abstraction.
|
|
28
|
+
- **Agents.** `@nadicodeai/ui/agents` re-exports assistant-ui and our reviewed
|
|
29
|
+
compositions; `@nadicodeai/ui/agent-orb` is the React-free entry a native
|
|
30
|
+
startup screen paints an orb with before React loads.
|
|
31
|
+
- **Brand marks** are generated, never drawn or edited by hand: add a brand to
|
|
32
|
+
the allow-list in `scripts/build-brand-icons.mjs` and run
|
|
33
|
+
`npm run generate:brand-icons -w @nadicodeai/ui`. Every upstream travels with
|
|
34
|
+
its licence in `LICENSES/` and `NOTICE`.
|
|
35
|
+
- **Charts** are stock shadcn registry items; the deliberate deviations are held
|
|
36
|
+
by `tests/guards/chart-kit.test.ts`. A chart the kit lacks is pulled from
|
|
37
|
+
`https://ui.shadcn.com/r/styles/new-york-v4/<name>.json`.
|
|
38
|
+
- **Releases.** A change to anything the package ships bumps both packages in
|
|
39
|
+
lockstep: `../../docs/agents/publish.md`.
|
|
25
40
|
|
|
26
|
-
|
|
27
|
-
`
|
|
28
|
-
Use current shadcn or assistant-ui discovery for
|
|
29
|
-
`--overwrite` requires authorization to replace
|
|
41
|
+
`npm run dev -w @nadicodeai/ui` watches source and refreshes `dist/`;
|
|
42
|
+
`build:dev` refreshes it once. Validation policy is in
|
|
43
|
+
`../../docs/agents/develop.md`. Use current shadcn or assistant-ui discovery for
|
|
44
|
+
their components; `--overwrite` requires authorization to replace a component.
|
package/README.md
CHANGED
|
@@ -1,152 +1,87 @@
|
|
|
1
1
|
# @nadicodeai/ui
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
`@nadicodeai/design-system`: the design-system package owns brand tokens,
|
|
9
|
-
framework-agnostic geometry, fonts, assets, and CSS components; this package owns
|
|
10
|
-
React components and reusable section compositions on those tokens. Shared
|
|
11
|
-
product compositions ship when their source, public subpath export, contract,
|
|
12
|
-
and tests exist together.
|
|
13
|
-
|
|
14
|
-
The package ships:
|
|
15
|
-
|
|
16
|
-
- shadcn source components under `@nadicodeai/ui/components/*`, backed by Base UI primitives where a headless primitive is needed
|
|
17
|
-
- the Agent UI interface at `@nadicodeai/ui/agents`
|
|
18
|
-
- React adapters over the design-system grammar and assets
|
|
19
|
-
- reusable marketing/section compositions
|
|
20
|
-
- presentational product components for shared application surfaces
|
|
21
|
-
- package-local agent guidance: `AGENTS.md`, `docs/contract.md`, and
|
|
22
|
-
`docs/migration/`
|
|
23
|
-
|
|
24
|
-
The package surface is source-backed and flat under `src/components/`. Reviewed
|
|
25
|
-
third-party registry source stays under `src/internal/` and is not a package
|
|
26
|
-
namespace. Do not document folders or package namespaces that do not exist.
|
|
27
|
-
Do not add top-level exports for recipes, blocks, agent, or terminal groupings
|
|
28
|
-
until a concrete package API decision adds source, built files, docs, and tests
|
|
29
|
-
together. Routes, persistence, auth behavior, server state, runtime adapters,
|
|
30
|
-
and app-owned product features/use cases stay in consuming apps such as
|
|
31
|
-
`apps/website/`, `apps/portal/`, and sibling Nadia apps. The package contract owns the
|
|
32
|
-
admission boundary; this README does not maintain a second rule set.
|
|
3
|
+
nadicode's React components, published as a built package: shadcn components on
|
|
4
|
+
Base UI, the chart kit, the Agent conversation interface, and the product
|
|
5
|
+
compositions the website, the Portal and Nadia share. They build on
|
|
6
|
+
`@nadicodeai/design-system`, whose `DESIGN.md` is the design system and its only
|
|
7
|
+
design authority.
|
|
33
8
|
|
|
34
9
|
## Install
|
|
35
10
|
|
|
36
|
-
|
|
37
|
-
install command, exact-version policy, peer requirements, dependency boundary,
|
|
38
|
-
and separate-asset exception. The package is scoped for public npm registry
|
|
39
|
-
publishing.
|
|
11
|
+
Pin an exact version, never `latest` or a range:
|
|
40
12
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
[`docs/consuming-cross-repo.md`](docs/consuming-cross-repo.md) for the complete
|
|
45
|
-
consumer setup contract.
|
|
46
|
-
|
|
47
|
-
Component styling rules live in [`docs/contract.md`](docs/contract.md). That
|
|
48
|
-
contract owns token-only styling, canonical role use, and the ban on
|
|
49
|
-
component-local dark implementations. This README does not
|
|
50
|
-
restate those rules.
|
|
51
|
-
|
|
52
|
-
## Imports
|
|
53
|
-
|
|
54
|
-
Prefer direct subpath imports in app code:
|
|
55
|
-
|
|
56
|
-
```tsx
|
|
57
|
-
import { Button } from "@nadicodeai/ui/components/button";
|
|
58
|
-
import { Thread } from "@nadicodeai/ui/agents";
|
|
13
|
+
```bash
|
|
14
|
+
npm view @nadicodeai/ui version
|
|
15
|
+
npm install @nadicodeai/ui@<exact-version> react@^19 react-dom@^19 tailwindcss@^4 @tailwindcss/postcss@^4
|
|
59
16
|
```
|
|
60
17
|
|
|
61
|
-
The
|
|
62
|
-
|
|
18
|
+
The package installs its exact `@nadicodeai/design-system` and its Agent UI
|
|
19
|
+
implementation. Import conversation presentation, runtimes, providers and hooks
|
|
20
|
+
from `@nadicodeai/ui/agents`, never from assistant-ui directly. Declare
|
|
21
|
+
`@nadicodeai/design-system` yourself only for a separate public API of it, such
|
|
22
|
+
as its static CSS or its asset files, pinned to the version the installed UI
|
|
23
|
+
release requires (`npm view @nadicodeai/ui@<version> dependencies`).
|
|
63
24
|
|
|
64
|
-
|
|
25
|
+
## Stylesheet
|
|
65
26
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
import { Thread } from "@nadicodeai/ui/agents";
|
|
69
|
-
```
|
|
27
|
+
An application this design system styles whole imports one stylesheet, once, at
|
|
28
|
+
its root:
|
|
70
29
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
prose. In this repository, `src/components/**/*.tsx` owns the module set;
|
|
75
|
-
`src/index.ts` owns the barrel. `package.json` exposes
|
|
76
|
-
that source-backed surface through `./components/*`, and the build writes the
|
|
77
|
-
consumer view to `dist/components/**/*.d.ts`.
|
|
78
|
-
|
|
79
|
-
Use the source tree while maintaining this package. In an installed package,
|
|
80
|
-
use its `package.json` exports and generated declarations for current subpaths,
|
|
81
|
-
exports, and prop types.
|
|
30
|
+
```ts
|
|
31
|
+
import "@nadicodeai/ui/globals.css";
|
|
32
|
+
```
|
|
82
33
|
|
|
83
|
-
|
|
34
|
+
It composes Tailwind v4, shadcn, the complete design-system CSS and the brand
|
|
35
|
+
typeface; add no other font loader for Geist, and no design-system stylesheet
|
|
36
|
+
beside it. A host that runs Tailwind over base styles of its own imports
|
|
37
|
+
`@nadicodeai/design-system/css/host` and then `@nadicodeai/ui/components.css`
|
|
38
|
+
instead, keeping its own shadcn roles.
|
|
84
39
|
|
|
85
|
-
|
|
86
|
-
admission rules, and accessibility invariants. Current modules are discovered
|
|
87
|
-
from source and package exports, not from prose. assistant-ui runtime ownership
|
|
88
|
-
and migration readiness live in the linked package docs; this README does not
|
|
89
|
-
summarize them.
|
|
40
|
+
## Lint
|
|
90
41
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
one-second delay, accessibility and usage examples.
|
|
42
|
+
The package exports the rules this repository uses. Add them after the
|
|
43
|
+
framework and TypeScript configs:
|
|
94
44
|
|
|
95
|
-
|
|
45
|
+
```js
|
|
46
|
+
import nadicodeai from "@nadicodeai/ui/eslint";
|
|
96
47
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
registry snapshot, or inventory update script in `@nadicodeai/ui`; the source
|
|
100
|
-
files and package exports are the committed surface.
|
|
48
|
+
export default [...nadicodeai.configs["flat/strict"]];
|
|
49
|
+
```
|
|
101
50
|
|
|
102
|
-
|
|
103
|
-
|
|
51
|
+
They reject design values the installed design system does not define, raw
|
|
52
|
+
colours, deep imports, native visible controls and appearance overrides on
|
|
53
|
+
shared components.
|
|
104
54
|
|
|
105
|
-
|
|
106
|
-
npx shadcn@latest mcp init --client codex
|
|
107
|
-
```
|
|
55
|
+
## Imports
|
|
108
56
|
|
|
109
|
-
|
|
57
|
+
Import each component from its subpath:
|
|
110
58
|
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
npx shadcn@latest view @shadcn/button
|
|
116
|
-
npx shadcn@latest add @shadcn/button --dry-run
|
|
117
|
-
npx assistant-ui@latest add thread --help
|
|
59
|
+
```tsx
|
|
60
|
+
import { Button } from "@nadicodeai/ui/components/button";
|
|
61
|
+
import { BrandWordmark } from "@nadicodeai/ui/components/brand";
|
|
62
|
+
import { Thread } from "@nadicodeai/ui/agents";
|
|
118
63
|
```
|
|
119
64
|
|
|
120
|
-
`
|
|
121
|
-
|
|
122
|
-
registries. The active primitive base is Base UI; do not add Radix or vaul to
|
|
123
|
-
package source or dependencies. `cmdk` is present only for the stock shadcn
|
|
124
|
-
Command component while the Base UI registry declares it. Use `search`, `docs`, and `view` to inspect current registry items
|
|
125
|
-
before adding or refreshing source. Review `add --dry-run` or `add --diff`
|
|
126
|
-
output before changing files, and do not use `--overwrite` unless the maintainer
|
|
127
|
-
explicitly asks for an upstream refresh.
|
|
128
|
-
|
|
129
|
-
## Forms
|
|
65
|
+
`package.json` exports and the built declarations under `dist/components/` are
|
|
66
|
+
the component inventory and the prop reference.
|
|
130
67
|
|
|
131
|
-
|
|
68
|
+
Forms use one model: the controls (`Input`, `Select`, `Checkbox`…), the
|
|
69
|
+
`Field` layout primitives, and `Form` for React Hook Form. There is no separate
|
|
70
|
+
form-control family.
|
|
132
71
|
|
|
133
|
-
|
|
134
|
-
- `FieldGroup`, `Field`, `FieldLabel`, `FieldDescription`, and `FieldError`
|
|
135
|
-
provide field layout and accessible label/error structure.
|
|
136
|
-
- `Form`, `FormField`, `FormItem`, `FormControl`, `FormLabel`,
|
|
137
|
-
`FormDescription`, and `FormMessage` are the React Hook Form integration.
|
|
72
|
+
## Icons as files
|
|
138
73
|
|
|
139
|
-
|
|
140
|
-
new input size or behavior is needed, add it to the canonical shadcn control or
|
|
141
|
-
field primitive instead of creating a parallel form-control API.
|
|
74
|
+
The same icons ship as SVG files for a consumer that renders without React:
|
|
142
75
|
|
|
143
|
-
|
|
76
|
+
| What | Path |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| Third-party brand marks | `@nadicodeai/ui/assets/brand/<slug>.svg` |
|
|
79
|
+
| Their index, with each mark's aliases | `@nadicodeai/ui/assets/brand/index.json` |
|
|
80
|
+
| Lucide under the house render, and the house's three icons | `@nadicodeai/design-system/icons/<name>.svg` |
|
|
144
81
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
`node_modules/@nadicodeai/ui/AGENTS.md`. They are packaged through npm `files`;
|
|
149
|
-
they are not runtime module exports.
|
|
82
|
+
To resolve an app name the way `AppMark` does, lowercase it and keep letters and
|
|
83
|
+
digits, take an exact alias match, and otherwise the longest alias the name
|
|
84
|
+
contains. A name that matches nothing has no mark: show its initial.
|
|
150
85
|
|
|
151
86
|
## Build
|
|
152
87
|
|
|
@@ -154,5 +89,4 @@ they are not runtime module exports.
|
|
|
154
89
|
npm run build -w @nadicodeai/ui
|
|
155
90
|
```
|
|
156
91
|
|
|
157
|
-
`
|
|
158
|
-
to inspect the consumer artifact rather than maintaining an output list here.
|
|
92
|
+
`npm pack --dry-run -w @nadicodeai/ui` shows exactly what consumers receive.
|
package/dist/agent-orb.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type AgentOrbFigure, type AgentOrbForm, type AgentOrbMountOptions, type AgentOrbPresence, type AgentOrbSize, mountAgentOrb, } from "./internal/agent-orb.js";
|
|
1
|
+
export { type AgentOrbFigure, type AgentOrbForm, type AgentOrbMountOptions, type AgentOrbMotion, type AgentOrbPresence, type AgentOrbSize, mountAgentOrb, } from "./internal/agent-orb.js";
|
|
2
2
|
export type { AgentOrbState } from "./internal/agent-orb-motion.js";
|
|
3
3
|
//# sourceMappingURL=agent-orb.d.ts.map
|
package/dist/agent-orb.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-orb.d.ts","sourceRoot":"","sources":["../src/agent-orb.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"agent-orb.d.ts","sourceRoot":"","sources":["../src/agent-orb.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "Generated by packages/ui/scripts/build-icon-assets.mjs. Each mark ships beside this file as <file>. `aliases` are the connector spellings @nadicodeai/ui resolves to the mark, squashed to letters and digits; see
|
|
2
|
+
"$comment": "Generated by packages/ui/scripts/build-icon-assets.mjs. Each mark ships beside this file as <file>. `aliases` are the connector spellings @nadicodeai/ui resolves to the mark, squashed to letters and digits; see the package README, \"Icons as files\".",
|
|
3
3
|
"marks": [
|
|
4
4
|
{
|
|
5
5
|
"slug": "aionlabs",
|
|
@@ -4,5 +4,5 @@ import { EllipsisIcon } from "lucide-react";
|
|
|
4
4
|
import { Button } from "./button.js";
|
|
5
5
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "./dropdown-menu.js";
|
|
6
6
|
export function ActionMenu({ label, triggerId, children }) {
|
|
7
|
-
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { id: triggerId, "aria-label": label, render: _jsx(Button, { variant: "ghost", size: "icon
|
|
7
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { id: triggerId, "aria-label": label, render: _jsx(Button, { variant: "ghost", size: "icon" }), children: _jsx(EllipsisIcon, { "aria-hidden": "true" }) }), _jsx(DropdownMenuContent, { align: "end", children: children })] }));
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-card.d.ts","sourceRoot":"","sources":["../../src/components/agent-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"agent-card.d.ts","sourceRoot":"","sources":["../../src/components/agent-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,IAAI,EAA0C,MAAM,mBAAmB,CAAC;AAGjF,KAAK,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG;IAC1E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,SAAS,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAMF,iBAAS,SAAS,CAAC,EACjB,MAAM,EACN,SAAS,EACT,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,MAAM,EACN,GAAG,KAAK,EACT,EAAE,cAAc,+BA8ChB;AAED,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Card,
|
|
3
|
-
import { Separator } from "./separator.js";
|
|
2
|
+
import { Card, CardDescription, CardFooter, CardTitle } from "./card.js";
|
|
4
3
|
import { cn } from "../lib/utils.js";
|
|
5
4
|
function hasSlotContent(value) {
|
|
6
5
|
return value !== null && value !== undefined && value !== false;
|
|
@@ -9,7 +8,6 @@ function AgentCard({ action, className, job, meta, name, status, visual, ...prop
|
|
|
9
8
|
const hasStatus = hasSlotContent(status);
|
|
10
9
|
const hasMeta = hasSlotContent(meta);
|
|
11
10
|
const hasAction = hasSlotContent(action);
|
|
12
|
-
|
|
13
|
-
return (_jsxs(Card, { className: cn("h-full", className), ...props, children: [_jsxs(CardHeader, { className: "relative min-h-40 pr-32", children: [_jsx(CardTitle, { className: "text-lg", children: name }), _jsx(CardDescription, { className: "max-w-sm leading-6", children: job }), _jsx("div", { className: "absolute top-5 right-5 size-24 overflow-hidden rounded-md", "data-slot": "agent-card-visual", children: visual })] }), hasFooter ? (_jsxs(CardContent, { className: "mt-auto grid gap-5", children: [_jsx(Separator, {}), _jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [hasStatus ? _jsx("div", { "data-slot": "agent-card-status", children: status }) : null, hasMeta ? (_jsx("div", { className: "min-w-0 flex-1", "data-slot": "agent-card-meta", children: meta })) : null, hasAction ? (_jsx("div", { className: "ml-auto", "data-slot": "agent-card-action", children: action })) : null] })] })) : null] }));
|
|
11
|
+
return (_jsxs(Card, { className: cn("h-full", className), ...props, children: [_jsxs("div", { className: "grid grid-cols-[auto_minmax(0,1fr)] items-start gap-(--card-spacing) px-(--card-spacing)", children: [_jsx("div", { className: "grid size-24 place-items-center overflow-hidden", "data-slot": "agent-card-visual", children: visual }), _jsxs("div", { className: "grid min-w-0 content-start gap-nadicode-xs", children: [_jsx(CardTitle, { className: "leading-tight font-semibold", children: name }), _jsx(CardDescription, { className: "leading-snug", children: job }), hasStatus ? (_jsx("div", { className: "flex flex-wrap items-center gap-nadicode-xxs pt-nadicode-xxs", "data-slot": "agent-card-status", children: status })) : null] })] }), hasMeta || hasAction ? (_jsxs(CardFooter, { className: "mt-auto gap-nadicode-sm border-t py-nadicode-sm", children: [hasMeta ? (_jsx("div", { className: "min-w-0 flex-1 text-xs text-muted-foreground", "data-slot": "agent-card-meta", children: meta })) : null, hasAction ? (_jsx("div", { className: "ml-auto shrink-0", "data-slot": "agent-card-action", children: action })) : null] })) : null] }));
|
|
14
12
|
}
|
|
15
13
|
export { AgentCard };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type CSSProperties } from "react";
|
|
2
2
|
import { type AgentOrbFigure, type AgentOrbPresence, type AgentOrbSize } from "../internal/agent-orb.js";
|
|
3
|
-
export type { AgentOrbFigure, AgentOrbForm, AgentOrbPresence, AgentOrbSize, } from "../internal/agent-orb.js";
|
|
3
|
+
export type { AgentOrbFigure, AgentOrbForm, AgentOrbMotion, AgentOrbPresence, AgentOrbSize, } from "../internal/agent-orb.js";
|
|
4
4
|
import type { AgentOrbState } from "../internal/agent-orb-motion.js";
|
|
5
5
|
export type { AgentOrbState } from "../internal/agent-orb-motion.js";
|
|
6
|
-
|
|
6
|
+
type AgentOrbBaseProps = {
|
|
7
7
|
/** A chosen form, or `nadia`: her striped ribbon, whose colours are fixed. */
|
|
8
8
|
form: AgentOrbFigure;
|
|
9
9
|
/** The pigment of a chosen form; on Nadia, only her third, white stripe takes it. */
|
|
@@ -13,15 +13,21 @@ export type AgentOrbProps = {
|
|
|
13
13
|
/** How loudly this one orb reads on its ground. `over-picture` sits on a photograph. */
|
|
14
14
|
presence?: AgentOrbPresence;
|
|
15
15
|
paused?: boolean;
|
|
16
|
-
state?: AgentOrbState;
|
|
17
16
|
motionKey?: number;
|
|
18
17
|
className?: string;
|
|
19
|
-
}
|
|
18
|
+
};
|
|
19
|
+
export type AgentOrbProps = AgentOrbBaseProps & ({
|
|
20
|
+
motion?: "status";
|
|
21
|
+
state?: AgentOrbState;
|
|
22
|
+
} | {
|
|
23
|
+
motion: "ambient";
|
|
24
|
+
state?: never;
|
|
25
|
+
}) & ({
|
|
20
26
|
decorative: true;
|
|
21
27
|
label?: never;
|
|
22
28
|
} | {
|
|
23
29
|
decorative?: false;
|
|
24
30
|
label: string;
|
|
25
31
|
});
|
|
26
|
-
export declare function AgentOrb({ form, color, size, presence, paused, state, motionKey, decorative, label, className, }: AgentOrbProps): import("react").JSX.Element;
|
|
32
|
+
export declare function AgentOrb({ form, color, size, presence, paused, state, motion, motionKey, decorative, label, className, }: AgentOrbProps): import("react").JSX.Element;
|
|
27
33
|
//# sourceMappingURL=agent-orb.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-orb.d.ts","sourceRoot":"","sources":["../../src/components/agent-orb.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAqB,MAAM,OAAO,CAAC;AAE9D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAElB,MAAM,uBAAuB,CAAC;AAG/B,YAAY,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,YAAY,GACb,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,
|
|
1
|
+
{"version":3,"file":"agent-orb.d.ts","sourceRoot":"","sources":["../../src/components/agent-orb.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAqB,MAAM,OAAO,CAAC;AAE9D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAElB,MAAM,uBAAuB,CAAC;AAG/B,YAAY,EACV,cAAc,EACd,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,KAAK,iBAAiB,GAAG;IACvB,8EAA8E;IAC9E,IAAI,EAAE,cAAc,CAAC;IACrB,qFAAqF;IACrF,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,qEAAqE;IACrE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,CAAC;IAAE,MAAM,CAAC,EAAE,QAAQ,CAAC;IAAC,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,GACrF,CAAC;IAAE,UAAU,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,UAAU,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEhF,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,IAAS,EACT,QAAkB,EAClB,MAAc,EACd,KAAc,EACd,MAAiB,EACjB,SAAa,EACb,UAAkB,EAClB,KAAK,EACL,SAAS,GACV,EAAE,aAAa,+BAwDf"}
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
4
|
import { mountAgentOrb, } from "../internal/agent-orb.js";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
-
export function AgentOrb({ form, color, size = 32, presence = "plain", paused = false, state = "idle", motionKey = 0, decorative = false, label, className, }) {
|
|
6
|
+
export function AgentOrb({ form, color, size = 32, presence = "plain", paused = false, state = "idle", motion = "status", motionKey = 0, decorative = false, label, className, }) {
|
|
7
7
|
const canvas = useRef(null);
|
|
8
8
|
const renderer = useRef(null);
|
|
9
9
|
// A remount, from a changed form, size or presence, carries the current
|
|
@@ -13,28 +13,30 @@ export function AgentOrb({ form, color, size = 32, presence = "plain", paused =
|
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
if (!canvas.current)
|
|
15
15
|
return;
|
|
16
|
+
const behavior = motion === "ambient" ? { motion } : { motion, state: shown.current };
|
|
16
17
|
const mounted = mountAgentOrb(canvas.current, {
|
|
17
18
|
form,
|
|
18
19
|
size,
|
|
19
20
|
paused: pause.current,
|
|
20
|
-
state: shown.current,
|
|
21
21
|
presence,
|
|
22
|
+
...behavior,
|
|
22
23
|
});
|
|
23
24
|
renderer.current = mounted;
|
|
24
25
|
return () => {
|
|
25
26
|
mounted.destroy();
|
|
26
27
|
renderer.current = null;
|
|
27
28
|
};
|
|
28
|
-
}, [form, size, presence]);
|
|
29
|
+
}, [form, size, presence, motion]);
|
|
29
30
|
useEffect(() => {
|
|
30
31
|
pause.current = paused;
|
|
31
32
|
renderer.current?.setPaused(paused);
|
|
32
33
|
}, [paused]);
|
|
33
34
|
useEffect(() => {
|
|
34
35
|
shown.current = state;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
if (motion === "status")
|
|
37
|
+
renderer.current?.setState(state);
|
|
38
|
+
}, [state, motion, motionKey]);
|
|
39
|
+
return (_jsx("canvas", { ref: canvas, "data-slot": "agent-orb", "data-form": form, "data-state": state, "data-motion": motion, role: decorative ? undefined : "img", "aria-hidden": decorative || undefined, "aria-label": decorative ? undefined : label, className: cn("inline-block size-(--nc-agent-orb-size) shrink-0 align-middle", className), width: size, height: size,
|
|
38
40
|
// The size is a class, not an inline rule, so a caller that sizes the
|
|
39
41
|
// orb from its layout overrides it; the engine then paints that box.
|
|
40
42
|
style: { color, "--nc-agent-orb-size": `${size}px` }, children: decorative ? null : label }));
|
package/dist/components/alert.js
CHANGED
|
@@ -5,9 +5,9 @@ const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-md b
|
|
|
5
5
|
variants: {
|
|
6
6
|
variant: {
|
|
7
7
|
default: "bg-card text-card-foreground",
|
|
8
|
-
info: "bg-
|
|
9
|
-
warning: "bg-
|
|
10
|
-
destructive: "bg-
|
|
8
|
+
info: "bg-info-soft text-info-soft-foreground *:data-[slot=alert-description]:text-info-soft-foreground",
|
|
9
|
+
warning: "bg-warning-soft text-warning-soft-foreground *:data-[slot=alert-description]:text-warning-soft-foreground",
|
|
10
|
+
destructive: "bg-destructive-soft text-destructive-soft-foreground *:data-[slot=alert-description]:text-destructive-soft-foreground",
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
13
|
defaultVariants: {
|
package/dist/components/badge.js
CHANGED
|
@@ -7,7 +7,7 @@ const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-cent
|
|
|
7
7
|
variant: {
|
|
8
8
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary-hover",
|
|
9
9
|
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-accent",
|
|
10
|
-
destructive: "bg-
|
|
10
|
+
destructive: "bg-destructive-soft text-destructive-soft-foreground [a]:hover:border-destructive-soft-foreground",
|
|
11
11
|
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
12
12
|
ghost: "hover:bg-muted hover:text-muted-foreground",
|
|
13
13
|
link: "text-primary underline-offset-4 hover:underline",
|
|
@@ -15,11 +15,11 @@ const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-cent
|
|
|
15
15
|
// ground with its own deep label — so a status reads as one unit at
|
|
16
16
|
// AA in both modes. They are variants, not call-site classes, because
|
|
17
17
|
// repainting a primitive where it is used is forbidden.
|
|
18
|
-
gray: "bg-
|
|
19
|
-
green: "bg-
|
|
20
|
-
red: "bg-
|
|
21
|
-
amber: "bg-
|
|
22
|
-
blue: "bg-
|
|
18
|
+
gray: "bg-accent text-muted-foreground",
|
|
19
|
+
green: "bg-success-soft text-success-soft-foreground",
|
|
20
|
+
red: "bg-destructive-soft text-destructive-soft-foreground",
|
|
21
|
+
amber: "bg-warning-soft text-warning-soft-foreground",
|
|
22
|
+
blue: "bg-info-soft text-info-soft-foreground",
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
defaultVariants: {
|
|
@@ -5,6 +5,8 @@ import * as React from "react";
|
|
|
5
5
|
* It deliberately owns no interaction, state, or color variant: an identity
|
|
6
6
|
* plane is a plane, not a control. Callers may add structural layout classes,
|
|
7
7
|
* while the canonical black-and-white paint remains internal to the primitive.
|
|
8
|
+
* It is dark by nature, so it scopes `.dark` and every role and control inside
|
|
9
|
+
* takes its dark value in either theme.
|
|
8
10
|
*/
|
|
9
11
|
declare function BrandField({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
12
|
export { BrandField };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-field.d.ts","sourceRoot":"","sources":["../../src/components/brand-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B
|
|
1
|
+
{"version":3,"file":"brand-field.d.ts","sourceRoot":"","sources":["../../src/components/brand-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;GAQG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -6,8 +6,10 @@ import { cn } from "../lib/utils.js";
|
|
|
6
6
|
* It deliberately owns no interaction, state, or color variant: an identity
|
|
7
7
|
* plane is a plane, not a control. Callers may add structural layout classes,
|
|
8
8
|
* while the canonical black-and-white paint remains internal to the primitive.
|
|
9
|
+
* It is dark by nature, so it scopes `.dark` and every role and control inside
|
|
10
|
+
* takes its dark value in either theme.
|
|
9
11
|
*/
|
|
10
12
|
function BrandField({ className, ...props }) {
|
|
11
|
-
return (_jsx("div", { "data-slot": "brand-field", className: cn(className, "bg-nc-identity-ink text-nc-identity-white"), ...props }));
|
|
13
|
+
return (_jsx("div", { "data-slot": "brand-field", className: cn(className, "dark bg-nc-identity-ink text-nc-identity-white"), ...props }));
|
|
12
14
|
}
|
|
13
15
|
export { BrandField };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "brandGhost" | "brandSolid" | "destructive" |
|
|
4
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "brandGhost" | "brandSolid" | "destructive" | null | undefined;
|
|
5
5
|
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;8EAuCnB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,+BAQ7D;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -6,19 +6,18 @@ const buttonVariants = cva("group/button inline-flex min-h-touch-target min-w-to
|
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
default: "bg-primary text-primary-foreground hover:bg-primary-hover active:bg-primary-active",
|
|
9
|
-
outline: "border-
|
|
10
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-accent aria-expanded:bg-accent aria-expanded:text-accent-foreground",
|
|
9
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
10
|
+
secondary: "border-border bg-secondary text-secondary-foreground hover:bg-accent aria-expanded:bg-accent aria-expanded:text-accent-foreground",
|
|
11
11
|
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
12
12
|
brandGhost: "text-nc-identity-white hover:bg-nc-identity-white/10 hover:text-nc-identity-white aria-expanded:bg-nc-identity-white/10 aria-expanded:text-nc-identity-white",
|
|
13
13
|
brandSolid: "bg-nc-identity-white text-nc-identity-ink hover:bg-nc-identity-white/90 hover:text-nc-identity-ink active:bg-nc-identity-white/80 active:text-nc-identity-ink",
|
|
14
|
-
destructive: "bg-
|
|
14
|
+
destructive: "bg-destructive-soft text-destructive-soft-foreground hover:border-destructive-soft-foreground",
|
|
15
15
|
link: "text-primary underline-offset-4 hover:underline",
|
|
16
|
-
onPrimary: "bg-primary-foreground text-primary hover:bg-primary-foreground/90",
|
|
17
16
|
},
|
|
18
17
|
size: {
|
|
19
18
|
default: "h-control-height gap-1.5 px-control-padding-inline has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
20
19
|
xs: "h-6 gap-1 px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
21
|
-
sm: "h-7 gap-1 px-control-padding-inline text-
|
|
20
|
+
sm: "h-7 gap-1 px-control-padding-inline text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
22
21
|
lg: "h-9 gap-1.5 px-control-padding-inline has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
23
22
|
icon: "size-control-height",
|
|
24
23
|
"icon-xs": "size-6 in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
@@ -79,13 +79,13 @@ function CarouselItem({ className, ...props }) {
|
|
|
79
79
|
}
|
|
80
80
|
function CarouselPrevious({ className, variant = "outline", size = "icon-sm", ...props }) {
|
|
81
81
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
82
|
-
return (_jsxs(Button, { "data-slot": "carousel-previous", variant: variant, size: size, className: cn("absolute touch-manipulation
|
|
82
|
+
return (_jsxs(Button, { "data-slot": "carousel-previous", variant: variant, size: size, className: cn("absolute touch-manipulation", orientation === "horizontal"
|
|
83
83
|
? "inset-y-0 -left-12 my-auto"
|
|
84
84
|
: "-top-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick: scrollPrev, ...props, children: [_jsx(ChevronLeftIcon, {}), _jsx("span", { className: "sr-only", children: "Previous slide" })] }));
|
|
85
85
|
}
|
|
86
86
|
function CarouselNext({ className, variant = "outline", size = "icon-sm", ...props }) {
|
|
87
87
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
88
|
-
return (_jsxs(Button, { "data-slot": "carousel-next", variant: variant, size: size, className: cn("absolute touch-manipulation
|
|
88
|
+
return (_jsxs(Button, { "data-slot": "carousel-next", variant: variant, size: size, className: cn("absolute touch-manipulation", orientation === "horizontal"
|
|
89
89
|
? "inset-y-0 -right-12 my-auto"
|
|
90
90
|
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext, ...props, children: [_jsx(ChevronRightIcon, {}), _jsx("span", { className: "sr-only", children: "Next slide" })] }));
|
|
91
91
|
}
|
|
@@ -7,7 +7,7 @@ import { niceAxisMax, niceAxisTicks, niceStep } from "./chart-axis.js";
|
|
|
7
7
|
import { CHART_LEGEND_CLASS, ChartCard, chartPlotClassName, defaultValueFormatter, } from "./chart-card.js";
|
|
8
8
|
const POSITIVE_KEY = "__positive";
|
|
9
9
|
const NEGATIVE_KEY = "__negative";
|
|
10
|
-
const POSITIVE_BAR_COLOR = "var(--
|
|
10
|
+
const POSITIVE_BAR_COLOR = "var(--success)";
|
|
11
11
|
const NEGATIVE_BAR_COLOR = "var(--destructive)";
|
|
12
12
|
function signedAxis(data, valueKey) {
|
|
13
13
|
const values = data.flatMap((datum) => {
|
package/dist/components/chart.js
CHANGED
|
@@ -85,7 +85,7 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
|
|
|
85
85
|
return null;
|
|
86
86
|
}
|
|
87
87
|
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
88
|
-
return (_jsxs("div", { className: cn("grid min-w-32 items-start gap-1.5 rounded-md border-0 bg-popover px-nadicode-sm py-
|
|
88
|
+
return (_jsxs("div", { className: cn("grid min-w-32 items-start gap-1.5 rounded-md border-0 bg-popover px-nadicode-sm py-1.5 text-xs text-popover-foreground nc-elevation-floating", className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload
|
|
89
89
|
.filter((item) => item.type !== "none")
|
|
90
90
|
.map((item, index) => {
|
|
91
91
|
const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
|
|
@@ -9,7 +9,7 @@ function Command({ className, ...props }) {
|
|
|
9
9
|
return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("flex size-full flex-col overflow-hidden rounded-md! nc-glass p-nadicode-xxs text-popover-foreground", className), ...props }));
|
|
10
10
|
}
|
|
11
11
|
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = false, ...props }) {
|
|
12
|
-
return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn("top-1/3 translate-y-0 overflow-hidden rounded-md! bg-transparent p-0", className), motion: "instant", showCloseButton: showCloseButton, children: children })] }));
|
|
12
|
+
return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn("top-1/3 translate-y-0 overflow-hidden rounded-md! bg-transparent p-0!", className), motion: "instant", showCloseButton: showCloseButton, children: children })] }));
|
|
13
13
|
}
|
|
14
14
|
function CommandInput({ className, ...props }) {
|
|
15
15
|
return (_jsx("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: _jsxs(InputGroup, { className: "h-control-height! rounded-md! border-input bg-background shadow-none! *:data-[slot=input-group-addon]:pl-2!", children: [_jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className), ...props }), _jsx(InputGroupAddon, { children: _jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }) })] }) }));
|