@alexandregme/zljs 3.7.1 → 3.8.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 +8 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +11 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@ A change that needs action in an app has a **Migration** note. When updating, re
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [3.8.0] - 2026-11-12
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `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
|
|
16
|
+
|
|
11
17
|
## [3.7.0] - 2026-11-11
|
|
12
18
|
|
|
13
19
|
### Added
|
|
@@ -459,7 +465,8 @@ Replace the shade with the class of the `color` being tested, for example `/(^|\
|
|
|
459
465
|
|
|
460
466
|
The message of `Error` is `text-zl-danger`. `none` and `ghost` didn't change.
|
|
461
467
|
|
|
462
|
-
[Unreleased]: https://github.com/alexandregme/zljs/compare/v3.
|
|
468
|
+
[Unreleased]: https://github.com/alexandregme/zljs/compare/v3.8.0...HEAD
|
|
469
|
+
[3.8.0]: https://github.com/alexandregme/zljs/compare/v3.7.0...v3.8.0
|
|
463
470
|
[3.7.0]: https://github.com/alexandregme/zljs/compare/v3.6.0...v3.7.0
|
|
464
471
|
[3.6.0]: https://github.com/alexandregme/zljs/compare/v3.5.0...v3.6.0
|
|
465
472
|
[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
|
|
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
|
|
392
|
+
size,
|
|
386
393
|
icon: "X",
|
|
387
394
|
"aria-label": removeLabel,
|
|
388
395
|
onClick: onRemove
|