@nadicodeai/ui 12.1.77 → 12.1.79

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.
@@ -27,6 +27,7 @@ type DataTableFeatures = {
27
27
  numeric?: boolean;
28
28
  narrow?: boolean;
29
29
  prose?: boolean;
30
+ wraps?: boolean;
30
31
  };
31
32
  };
32
33
  /** A column definition typed for this table's feature set. */
@@ -1 +1 @@
1
- {"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/components/data-table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EAEnB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,WAAW,EAGX,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,SAAS,EAGd,KAAK,OAAO,EAEb,MAAM,uBAAuB,CAAC;AAa/B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAY5E,OAAO,EAAuB,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAgB1F,KAAK,iBAAiB,GAAG;IACvB,sBAAsB,EAAE,OAAO,sBAAsB,CAAC;IACtD,uBAAuB,EAAE,OAAO,uBAAuB,CAAC;IACxD,oBAAoB,EAAE,OAAO,oBAAoB,CAAC;IAClD,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,gBAAgB,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;IAC5D,iBAAiB,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;IAC9D,cAAc,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;IACxD,SAAS,EAAE;Q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MAAM,CAAC;IAChC,yFAAyF;IACzF,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,MAAM,CAAC;IACjC,mFAAmF;IACnF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEN,MAAM,MAAM,cAAc,CAAC,KAAK,SAAS,OAAO,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAC3E,eAAe,CAAC,KAAK,CAAC,CAAC;AA4EzB,wBAAgB,eAAe,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM,SAAS,QAAQ,GAAG,QAAQ,EACvF,MAAM,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,GACrC,MAAM,CAGR;AAqFD,wBAAgB,SAAS,CAAC,KAAK,SAAS,OAAO,EAAE,EAC/C,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,aAAa,EAAE,sBAAsB,EACrC,UAAU,EACV,OAAO,EACP,MAAM,EACN,iBAAyB,EACzB,QAAgB,EAChB,OAAO,EACP,OAAO,EACP,QAAQ,EACR,eAAe,EACf,KAAK,EACL,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,cAAc,EACd,OAAO,EAAE,eAAe,EACxB,UAAU,EACV,aAA8B,EAC9B,aAA8B,EAC9B,QAAQ,GACT,EAAE,cAAc,CAAC,KAAK,CAAC,qBA2TvB"}
1
+ {"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/components/data-table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EAEnB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,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UAAU,EACV,OAAO,EACP,MAAM,EACN,iBAAyB,EACzB,QAAgB,EAChB,OAAO,EACP,OAAO,EACP,QAAQ,EACR,eAAe,EACf,KAAK,EACL,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,cAAc,EACd,OAAO,EAAE,eAAe,EACxB,UAAU,EACV,aAA8B,EAC9B,aAA8B,EAC9B,QAAQ,GACT,EAAE,cAAc,CAAC,KAAK,CAAC,qBA8TvB"}
@@ -49,6 +49,9 @@ const NARROW_COLUMN_CLASS = "w-px whitespace-nowrap";
49
49
  const IDENTITY_COLUMN_CLASS = "w-1/3 max-w-0 min-w-24 sm:min-w-44";
50
50
  const IDENTITY_CONTENT_CLASS = "truncate";
51
51
  const PROSE_COLUMN_CLASS = "min-w-32";
52
+ // A document's text, such as a legal table's, is read whole: it wraps between
53
+ // words and is never cut, so its row grows instead.
54
+ const WRAPPING_COLUMN_CLASS = "min-w-32 whitespace-normal align-top";
52
55
  // A one-track grid whose track runs from zero to the words' own width: the
53
56
  // cell asks for its words up to the cap, yet a narrow table can still shrink
54
57
  // the column to its floor instead of being pushed wider than its container.
@@ -79,6 +82,8 @@ function widthClass(column, identityColumnId, compactLayout, identityAlone) {
79
82
  return NARROW_COLUMN_CLASS;
80
83
  if (column.columnDef.meta?.prose === true)
81
84
  return PROSE_COLUMN_CLASS;
85
+ if (column.columnDef.meta?.wraps === true)
86
+ return WRAPPING_COLUMN_CLASS;
82
87
  if (column.id !== identityColumnId)
83
88
  return false;
84
89
  // Beside controls alone the identity takes the whole row, so the controls
@@ -159,7 +164,7 @@ export function DataTable({ columns, data, getRowId, filterColumnId, filterPlace
159
164
  const [columnVisibility, setColumnVisibility] = React.useState({});
160
165
  // One column absorbs the slack: a column of sentences when the table has
161
166
  // one, otherwise the identity, the first column that is not a control.
162
- const identityColumnId = definitionId(columns.find((column) => column.meta?.narrow !== true && column.meta?.prose !== true));
167
+ const identityColumnId = definitionId(columns.find((column) => column.meta?.narrow !== true && column.meta?.prose !== true && column.meta?.wraps !== true));
163
168
  const identityAlone = columns.every((column) => column.meta?.narrow === true || definitionId(column) === identityColumnId);
164
169
  // An external pager means `data` is already one bounded server page:
165
170
  // `manualPagination` makes the paginated row model a passthrough so every
@@ -17,7 +17,7 @@ type KpiCardDelta = {
17
17
  upIsGood?: boolean;
18
18
  /** A volume change keeps its arrow, which is a fact, and takes no tone, which would be a judgment. */
19
19
  neutral?: boolean;
20
- /** The whole comparison line in the reader's language, e.g. "vs August", "rispetto ad agosto". */
20
+ /** The whole comparison line in the reader's language, e.g. "vs August", "rispetto al mese di agosto". */
21
21
  comparison: string;
22
22
  /** The direction in the reader's language, for a screen reader. */
23
23
  directionLabel?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"kpi-card.d.ts","sourceRoot":"","sources":["../../src/components/kpi-card.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAW3D,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEtF;;;;;GAKG;AAEH,KAAK,gBAAgB,GAAG,cAAc,CAAC;AACvC,KAAK,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtD,KAAK,YAAY,GAAG;IAClB,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kGAAkG;IAClG,UAAU,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAQF,iBAAS,OAAO,CAAC,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,IAAgB,EAChB,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,EACJ,IAAgB,EAChB,MAAM,EACN,SAAS,GACV,EAAE;IACD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,qBA4CA;AAED,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC"}
@@ -14,8 +14,8 @@
14
14
  * hop cannot see is guessed at. That is the minimum that holds the package
15
15
  * repaint ban (`packages/design-system/DESIGN.md`, "Components") against the way
16
16
  * this repository actually authors classes — a tone table beside its component
17
- * and a lookup at the call site, as in
18
- * `apps/portal/src/components/portal-overview/overview-usage-tone.ts`. Without the
17
+ * and a lookup at the call site, as `VALUE_TONE_CLASS` is in
18
+ * `packages/ui/src/components/kpi-card.tsx`. Without the
19
19
  * hop, `<Card className={tones.warning} />` repaints a primitive and no rule
20
20
  * sees it; with it, the table's own values are read.
21
21
  *
@@ -103,7 +103,7 @@ function literalFragments(node, fragments, { skipPropertyKeys, context }) {
103
103
  literalFragments(node.callee.object, fragments, { skipPropertyKeys, context });
104
104
  return;
105
105
  }
106
- // `USAGE_TONE_CLASS[kpi.tone ?? "normal"]` selects a class string, it does
106
+ // `VALUE_TONE_CLASS[tone]` selects a class string, it does
107
107
  // not contain one: the names inside the lookup are keys. The hop reads the
108
108
  // table instead — any of its values can be the one selected — and the
109
109
  // property is never descended into.
@@ -1,31 +1,30 @@
1
1
  /*
2
2
  * Legacy Zod 3 APIs, in two sets that are enforced from two different places.
3
3
  *
4
- * UNANNOTATED — the four Zod itself leaves without a `@deprecated` tag.
5
- * Verified against zod 4.4.3's declarations: `nativeEnum` and `promise` carry
6
- * only prose, `.strict()` and `.strip()` carry only a "consider…" hint. No tag
7
- * means no type-aware rule can ever fire on them, so they are this rule's own
8
- * policy and are reported in every workspace.
4
+ * UNANNOTATED — the three the installed zod 4.6.5 leaves without a
5
+ * `@deprecated` tag: `promise` carries only prose, `.strict()` and `.strip()`
6
+ * carry only a "consider…" hint. No tag means no type-aware rule can fire on
7
+ * them, so they are this rule's own policy and are reported in every
8
+ * workspace.
9
9
  *
10
- * ANNOTATED — the rest, which Zod does tag `@deprecated`.
11
- * `@typescript-eslint/no-deprecated` reports those with the library's own
12
- * replacement text, but only where lint parses with type information. In this
13
- * repository that is `@nadicodeai/ui` alone: switching the Portal on measured
14
- * 10.4s → 25.8s per lint run and surfaced 15 unrelated findings (React's
15
- * `FormEvent`, vitest's `toThrowError`), so typed lint stays ui-only (#821).
16
- * The Portal and the website are where this repository writes most of its Zod,
17
- * so the names stay listed here for them — a second copy of an upstream
18
- * annotation, kept deliberately because the alternative is no coverage at all
19
- * in two of three workspaces (#822).
10
+ * ANNOTATED — the rest, which Zod does tag `@deprecated`, `nativeEnum`
11
+ * included. `@typescript-eslint/no-deprecated` reports those with the
12
+ * library's own replacement text, but only where it is turned on, and it needs
13
+ * type information. In this repository that is `@nadicodeai/ui` alone:
14
+ * switching the Portal on measured 10.4s → 25.8s per lint run and surfaced 15
15
+ * unrelated findings (React's `FormEvent`, vitest's `toThrowError`), so it
16
+ * stays ui-only (#821). The Portal and the website are where this repository
17
+ * writes most of its Zod, so the names stay listed here for them — a second
18
+ * copy of an upstream annotation, kept deliberately because the alternative is
19
+ * no coverage at all in two of three workspaces (#822).
20
20
  *
21
21
  * The split is a rule option: `upstreamAnnotated: "report"` (default) names
22
22
  * them, `"defer"` leaves them to the type-aware rule. `@nadicodeai/ui` selects
23
- * `"defer"` in the root config, so no file is reported twice.
23
+ * `"defer"` in the root config, so no tagged API is reported twice there.
24
24
  */
25
- const LEGACY_FACTORIES = new Map([
26
- ["nativeEnum", "z.enum()"],
27
- ["promise", "await the value before parsing it"],
28
- ]);
25
+ const LEGACY_FACTORIES = new Map([["promise", "await the value before parsing it"]]);
26
+
27
+ const UPSTREAM_ANNOTATED_FACTORIES = new Map([["nativeEnum", "z.enum()"]]);
29
28
 
30
29
  const LEGACY_METHODS = {
31
30
  object: new Map([
@@ -73,9 +72,19 @@ const UPSTREAM_ANNOTATED_METHODS = {
73
72
  ]),
74
73
  };
75
74
 
76
- /** The method table a run consults: the four always, the annotated names unless deferred. */
75
+ function defersAnnotated(context) {
76
+ return context.options?.[0]?.upstreamAnnotated === "defer";
77
+ }
78
+
79
+ /** The factory table a run consults: the unannotated always, the annotated unless deferred. */
80
+ function legacyFactories(context) {
81
+ if (defersAnnotated(context)) return LEGACY_FACTORIES;
82
+ return new Map([...UPSTREAM_ANNOTATED_FACTORIES, ...LEGACY_FACTORIES]);
83
+ }
84
+
85
+ /** The method table a run consults: the unannotated always, the annotated unless deferred. */
77
86
  function legacyMethods(context) {
78
- if (context.options?.[0]?.upstreamAnnotated === "defer") return LEGACY_METHODS;
87
+ if (defersAnnotated(context)) return LEGACY_METHODS;
79
88
  const merged = {};
80
89
  for (const family of new Set([
81
90
  ...Object.keys(LEGACY_METHODS),
@@ -120,6 +129,7 @@ export const noDeprecatedZodApi = {
120
129
 
121
130
  create(context) {
122
131
  const sourceCode = context.sourceCode;
132
+ const factories = legacyFactories(context);
123
133
  const methods = legacyMethods(context);
124
134
  const zodBindings = new Set();
125
135
 
@@ -177,7 +187,7 @@ export const noDeprecatedZodApi = {
177
187
  }
178
188
 
179
189
  if (node.callee.object.type === "Identifier" && isZodBinding(node.callee.object)) {
180
- const replacement = LEGACY_FACTORIES.get(method);
190
+ const replacement = factories.get(method);
181
191
  if (replacement) {
182
192
  context.report({
183
193
  node: node.callee.property,
@@ -2,7 +2,7 @@
2
2
  * A route does not re-declare a component the package already ships.
3
3
  *
4
4
  * `@nadicodeai/ui` is the website's component surface. A route that declares
5
- * its own `Hero`, `Footer` or `NavBar` forks a shipped component into a page,
5
+ * its own `Footer`, `Card` or `Badge` forks a shipped component into a page,
6
6
  * where the package's next change does not reach it — and the two are then
7
7
  * told apart only by their import paths.
8
8
  *
@@ -10,7 +10,7 @@
10
10
  * can type the argument but cannot require that a call happened. The tier-1
11
11
  * option — a `defineAction` wrapper that makes an unvalidated or unauthorized
12
12
  * action untypeable — was tried and rejected for this change: Next binds the
13
- * exported function itself, so adopting it rewrites all 62 exported actions in
13
+ * exported function itself, so adopting it rewrites every exported action in
14
14
  * the same diff that retires the guard.
15
15
  *
16
16
  * The rule reads one function at a time — no whole-tree scan, no cross-file
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * A dropdown and a context menu carry the same commands over the same dense rows, so both take this solid floating
3
- * surface; DESIGN.md ("Elevation & Depth") keeps glass for chrome that floats over colour or motion.
3
+ * surface; DESIGN.md ("Elevation & Depth") keeps glass for chrome over content that scrolls or moves under it.
4
4
  */
5
5
  export declare const menuSurface = "group/menu z-50 max-h-(--available-height) w-max min-w-[min(14rem,var(--available-width))] max-w-(--available-width) overflow-x-hidden overflow-y-auto rounded-lg border-0 bg-popover p-nadicode-xxs text-popover-foreground nc-elevation-floating outline-none data-closed:overflow-hidden";
6
6
  //# sourceMappingURL=menu-surface.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * A dropdown and a context menu carry the same commands over the same dense rows, so both take this solid floating
3
- * surface; DESIGN.md ("Elevation & Depth") keeps glass for chrome that floats over colour or motion.
3
+ * surface; DESIGN.md ("Elevation & Depth") keeps glass for chrome over content that scrolls or moves under it.
4
4
  */
5
5
  export const menuSurface = "group/menu z-50 max-h-(--available-height) w-max min-w-[min(14rem,var(--available-width))] max-w-(--available-width) overflow-x-hidden overflow-y-auto rounded-lg border-0 bg-popover p-nadicode-xxs text-popover-foreground nc-elevation-floating outline-none data-closed:overflow-hidden";
@@ -27,8 +27,8 @@
27
27
  * The one glass material (DESIGN.md "Elevation & Depth"): floating chrome —
28
28
  * menus, popovers, selects, comboboxes, the command palette, and bars — may
29
29
  * carry it; content surfaces stay solid. Glass composites only over our own
30
- * content. Its edge is the floating rung's recipe, whose inset top highlight
31
- * and inner hairline only show once the fill turns translucent. A fine grain
30
+ * content. Its edge is the floating rung's recipe, its 1 px ring and faint
31
+ * shadow (DESIGN.md, "Glass"). A fine grain
32
32
  * over the fill keeps the blurred colour behind it from banding. Declared as a
33
33
  * utility so variant prefixes can gate it (navigation-menu's non-viewport
34
34
  * popup). Reduced transparency falls back to the same solid surface at the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "12.1.77",
3
+ "version": "12.1.79",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -75,7 +75,7 @@
75
75
  "@base-ui/react": "^1.8.0",
76
76
  "@iconify-icons/logos": "^2.0.2",
77
77
  "@iconify/react": "^6.0.2",
78
- "@nadicodeai/design-system": "12.1.77",
78
+ "@nadicodeai/design-system": "12.1.79",
79
79
  "@tanstack/react-table": "^9.2.4",
80
80
  "class-variance-authority": "^0.7.1",
81
81
  "clsx": "^2.1.1",