@allxsmith/bestax-bulma 5.16.6 → 5.16.8
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 +1 -1
- package/dist/index.cjs +16 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +16 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/Avatar.d.ts +18 -9
- package/dist/types/components/Avatars.d.ts +1 -1
- package/dist/types/components/Dropdown.d.ts +1 -1
- package/dist/types/components/Menu.d.ts +1 -1
- package/dist/types/components/Navbar.d.ts +2 -2
- package/dist/types/elements/Buttons.d.ts +2 -2
- package/dist/types/helpers/polymorphic.d.ts +52 -18
- package/dist/types-cjs/components/Avatar.d.ts +18 -9
- package/dist/types-cjs/components/Avatars.d.ts +1 -1
- package/dist/types-cjs/components/Dropdown.d.ts +1 -1
- package/dist/types-cjs/components/Menu.d.ts +1 -1
- package/dist/types-cjs/components/Navbar.d.ts +2 -2
- package/dist/types-cjs/elements/Buttons.d.ts +2 -2
- package/dist/types-cjs/helpers/polymorphic.d.ts +52 -18
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://github.com/allxsmith/bestax/blob/main/bulma-ui/jest.config.js)
|
|
8
8
|
[](https://bulma.io)
|
|
9
9
|
[](https://opensource.org/licenses/MIT)
|
|
10
|
-
[](https://socket.dev/npm/package/@allxsmith/bestax-bulma/overview)
|
|
11
11
|
[](https://scorecard.dev/viewer/?uri=github.com/allxsmith/bestax)
|
|
12
12
|
[](https://www.bestpractices.dev/projects/14361)
|
|
13
13
|
[](https://www.npmjs.com/package/@allxsmith/bestax-bulma#provenance)
|
package/dist/index.cjs
CHANGED
|
@@ -1385,7 +1385,22 @@ const Avatar = React.forwardRef(function Avatar(avatarProps, ref) {
|
|
|
1385
1385
|
// Only forward link attributes when rendering an anchor or a custom (non-DOM)
|
|
1386
1386
|
// component; a plain `as="div"` must not receive a stray `href`/`target`/`rel`.
|
|
1387
1387
|
const isLinkLike = Tag === 'a' || typeof Tag !== 'string' || isCustomElement(Tag);
|
|
1388
|
-
|
|
1388
|
+
// Present-only, not `{ href, target, rel }`. An unconditional spread hands the
|
|
1389
|
+
// target these keys whatever the caller passed, and a key existing is not free:
|
|
1390
|
+
// a target that tests for one sees a link where there is none, and one that
|
|
1391
|
+
// spreads its own `{...rest}` onward passes the nothing along. It is NOT about
|
|
1392
|
+
// a destructuring default, which an explicit `undefined` triggers just as an
|
|
1393
|
+
// absent key does. What stops a target that REQUIRES one from being rendered
|
|
1394
|
+
// without it is the type (#665) — this is the smaller half, and the backstop for
|
|
1395
|
+
// the callers a type does not reach: a plain-JavaScript one and a loose spread,
|
|
1396
|
+
// the same pair `Button` and `Menu.Item` keep their own filters for.
|
|
1397
|
+
const linkProps = isLinkLike
|
|
1398
|
+
? {
|
|
1399
|
+
...(href !== undefined && { href }),
|
|
1400
|
+
...(target !== undefined && { target }),
|
|
1401
|
+
...(rel !== undefined && { rel }),
|
|
1402
|
+
}
|
|
1403
|
+
: {};
|
|
1389
1404
|
// alt coalesces with ?? (not ||) so an explicit alt="" survives as the
|
|
1390
1405
|
// standard decorative marker instead of being overridden by name.
|
|
1391
1406
|
const accessibleName = alt ?? name;
|