@alexandregme/zljs 3.7.1 → 3.9.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/CHANGELOG.md CHANGED
@@ -8,6 +8,18 @@ A change that needs action in an app has a **Migration** note. When updating, re
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [3.9.0] - 2026-11-12
12
+
13
+ ### Changed
14
+
15
+ - `DataGrid` takes what is left of a flex column when it is a direct child of one, such as under a page header, so an app needs no wrapper with a height around it. In a parent with a height it fills it, as before
16
+
17
+ ## [3.8.0] - 2026-11-12
18
+
19
+ ### Added
20
+
21
+ - `size` on `Tag`: `sm`, the default, is the tag as it was, and `md` and `lg` have larger text and more padding. The remove button follows the size
22
+
11
23
  ## [3.7.0] - 2026-11-11
12
24
 
13
25
  ### Added
@@ -459,7 +471,9 @@ Replace the shade with the class of the `color` being tested, for example `/(^|\
459
471
 
460
472
  The message of `Error` is `text-zl-danger`. `none` and `ghost` didn't change.
461
473
 
462
- [Unreleased]: https://github.com/alexandregme/zljs/compare/v3.7.0...HEAD
474
+ [Unreleased]: https://github.com/alexandregme/zljs/compare/v3.9.0...HEAD
475
+ [3.9.0]: https://github.com/alexandregme/zljs/compare/v3.8.0...v3.9.0
476
+ [3.8.0]: https://github.com/alexandregme/zljs/compare/v3.7.0...v3.8.0
463
477
  [3.7.0]: https://github.com/alexandregme/zljs/compare/v3.6.0...v3.7.0
464
478
  [3.6.0]: https://github.com/alexandregme/zljs/compare/v3.5.0...v3.6.0
465
479
  [3.5.0]: https://github.com/alexandregme/zljs/compare/v3.3.0...v3.5.0
package/dist/index.d.ts CHANGED
@@ -270,11 +270,13 @@ type TagColor = Exclude<SemanticColor, "none"> | AuxiliaryColor;
270
270
  interface TagProps {
271
271
  children: ReactNode;
272
272
  color?: TagColor;
273
+ /** The text and the padding. `sm`, the default, is the smallest. */
274
+ size?: Size;
273
275
  onRemove?: () => void;
274
276
  removeLabel?: string;
275
277
  }
276
278
 
277
- declare const Tag: ({ children, color, onRemove, removeLabel, }: TagProps) => react.JSX.Element;
279
+ declare const Tag: ({ children, color, size, onRemove, removeLabel, }: TagProps) => react.JSX.Element;
278
280
 
279
281
  declare const Toaster: () => react.JSX.Element;
280
282
 
package/dist/index.js CHANGED
@@ -349,7 +349,7 @@ var DataGridToolbar = ({
349
349
  // core/tag/tag.styles.ts
350
350
  import { tv as tv6 } from "tailwind-variants";
351
351
  var tag = tv6({
352
- base: "inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium",
352
+ base: "inline-flex items-center gap-1 rounded font-medium",
353
353
  variants: {
354
354
  color: {
355
355
  primary: "bg-zl-primary/15 text-zl-primary-strong",
@@ -361,10 +361,16 @@ var tag = tv6({
361
361
  orange: "bg-zl-orange/15 text-zl-orange-strong",
362
362
  pink: "bg-zl-pink/15 text-zl-pink-strong",
363
363
  purple: "bg-zl-purple/15 text-zl-purple-strong"
364
+ },
365
+ size: {
366
+ sm: "px-2 py-0.5 text-xs",
367
+ md: "px-2.5 py-1 text-sm",
368
+ lg: "px-3 py-1.5 text-base"
364
369
  }
365
370
  },
366
371
  defaultVariants: {
367
- color: "primary"
372
+ color: "primary",
373
+ size: "sm"
368
374
  }
369
375
  });
370
376
 
@@ -373,16 +379,17 @@ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
373
379
  var Tag = ({
374
380
  children,
375
381
  color = "primary",
382
+ size = "sm",
376
383
  onRemove,
377
384
  removeLabel = "Remover"
378
385
  }) => {
379
- return /* @__PURE__ */ jsxs6("span", { "data-testid": "tag", className: tag({ color }), children: [
386
+ return /* @__PURE__ */ jsxs6("span", { "data-testid": "tag", className: tag({ color, size }), children: [
380
387
  children,
381
388
  onRemove && /* @__PURE__ */ jsx7(
382
389
  Button,
383
390
  {
384
391
  color: "ghost",
385
- size: "sm",
392
+ size,
386
393
  icon: "X",
387
394
  "aria-label": removeLabel,
388
395
  onClick: onRemove
@@ -465,7 +472,7 @@ var dataGridTheme = themeAlpine.withParams({
465
472
  import { tv as tv7 } from "tailwind-variants";
466
473
  var dataGrid = tv7({
467
474
  slots: {
468
- base: "grid grid-rows-[auto_auto_1fr] grid-cols-1 h-full w-full",
475
+ base: "grid grid-rows-[auto_auto_1fr] grid-cols-1 h-full w-full flex-1",
469
476
  table: "ag-grid h-full min-h-80 w-full z-0"
470
477
  }
471
478
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexandregme/zljs",
3
- "version": "3.7.1",
3
+ "version": "3.9.0",
4
4
  "description": "Opinionated, accessible React component library for enterprise apps (Next.js, Tailwind CSS v4).",
5
5
  "keywords": [
6
6
  "react",