neba 1.17.0 → 1.17.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.
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as e,jsxs as r}from"react/jsx-runtime";import*as i from"react";import{useRender as a}from"@base-ui/react/use-render";import{linkMessages as t,useMessages as o}from"../../internal/i18n.js";import{ExternalLinkIcon as l,LinkIcon as s}from"../../internal/icons.js";import{opensElsewhere as c,safeHref as m,safeRel as u}from"../../internal/link.js";import{controlTextLeadingClasses as d,cx as p,focusRingClasses as b,srOnlyClasses as f}from"../../internal/styles.js";import{useStyleDefaults as h}from"../../internal/defaults.js";const k={always:"[&.neba-link]:underline",hover:"[&.neba-link]:no-underline [&.neba-link]:hover:underline",none:"[&.neba-link]:no-underline"},v=["neba-link","cursor-pointer","[&_svg]:pointer-events-none [&_svg]:inline [&_svg]:size-[0.95em] [&_svg]:shrink-0",["[transition-property:color,text-decoration-color]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]"].join(" "),b,"focus-visible:rounded-[0.25rem]"].join(" ");export const TextLink=/*@__PURE__*/i.forwardRef(function TextLink(i,b){const{href:g,underline:j="always",color:x,size:y,newTab:w=!1,icon:_,locale:N,render:T,className:z,style:C,children:L,...$}=h(i,["locale"]),F=o(t,N),R=_??w,q=!0===R?n(w?l:s,{}):R,A=p(v,y?d[y]:"",k[j],x?"[&.neba-link]:text-(--n-accent)":"[&.neba-link]:text-inherit",z??""),B={"--n-underline":"color-mix(in oklab, currentColor 45%, transparent)","--n-underline-hover":"currentColor","--n-ring":`var(--neba-${x??"primary"}-ring)`,...x?{"--n-accent":`var(--neba-${x}-accent)`}:null},{rel:D,target:E,...G}=$,H=w?"_blank":E,I=u(H,D),J=c(H);return a({render:T??n("a",{}),ref:b,props:{href:m(g),target:H,className:A,style:{...B,...C},children:r(e,{children:[L,q?n("span",{className:"ms-[0.25em]",children:q}):null,J?r(e,{children:[" ",n("span",{className:f,children:F.newTab})]}):null]}),...G,rel:I}})});
1
+ "use client";import{jsx as n,jsxs as e,Fragment as r}from"react/jsx-runtime";import*as i from"react";import{useRender as a}from"@base-ui/react/use-render";import{linkMessages as t,useMessages as o}from"../../internal/i18n.js";import{ExternalLinkIcon as l,LinkIcon as s}from"../../internal/icons.js";import{opensElsewhere as c,safeHref as m,safeRel as u}from"../../internal/link.js";import{controlTextLeadingClasses as d,cx as p,focusRingClasses as b,srOnlyClasses as f}from"../../internal/styles.js";import{useStyleDefaults as k}from"../../internal/defaults.js";const v={always:"[&.neba-link]:underline",hover:"[&.neba-link]:no-underline [&.neba-link]:hover:underline",none:"[&.neba-link]:no-underline"},h=["neba-link","cursor-pointer","[&_svg]:pointer-events-none [&_svg]:inline [&_svg]:size-[0.95em] [&_svg]:shrink-0",["[transition-property:color,text-decoration-color]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]"].join(" "),b,"focus-visible:rounded-[0.25rem]"].join(" ");export const TextLink=/*@__PURE__*/i.forwardRef(function TextLink(i,b){const{href:g,underline:j="always",color:x,size:y,newTab:w=!1,icon:_,locale:N,render:T,className:z,style:C,children:L,...$}=k(i,["locale"]),F=o(t,N),R=_??w,q=!0===R?n(w?l:s,{}):R,A=p(h,y?d[y]:"",v[j],x?"[&.neba-link]:text-(--n-accent)":"[&.neba-link]:text-inherit",z??""),B={"--n-underline":"color-mix(in oklab, currentColor 45%, transparent)","--n-underline-hover":"currentColor","--n-ring":`var(--neba-${x??"primary"}-ring)`,...x?{"--n-accent":`var(--neba-${x}-accent)`}:null},{rel:D,target:E,...G}=$,H=w?"_blank":E,I=u(H,D),J=c(H);return a({render:T??n("a",{}),ref:b,props:{href:m(g),target:H,className:A,style:{...B,...C},children:e(r,{children:[L,q?n("span",{className:"ms-[0.25em]",children:q}):null,J?e("span",{className:f,children:[" ",F.newTab]}):null]}),...G,rel:I}})});
@@ -7,7 +7,9 @@ import * as React from 'react';
7
7
  * invisible until it has already happened, and TextLink was the only link in
8
8
  * the library that said so. Every other component that lets a `target` reach an
9
9
  * `<a>` puts this last inside it. The space is a real text node, so the name
10
- * comes out as the label and then the sentence rather than as one word.
10
+ * comes out as the label and then the sentence rather than as one word — and
11
+ * it is inside the hidden span, as TextLink's is, because outside it the space
12
+ * is laid out at the end of any link that is not a flex container.
11
13
  *
12
14
  * The language is the component's own `locale` where it has one, and the
13
15
  * provider's where it has not — a Menu row or a NavigationMenu link takes no
@@ -1 +1 @@
1
- "use client";import{jsx as r,Fragment as t,jsxs as e}from"react/jsx-runtime";import*as s from"react";import{DefaultsContext as o}from"./defaults.js";import{linkMessages as a,useMessages as m}from"./i18n.js";import{opensElsewhere as n}from"./link.js";import{srOnlyClasses as i}from"./styles.js";export function NewTabNote({target:l,locale:c}){const f=s.useContext(o),p=m(a,c??f?.locale);return n(l)?e(t,{children:[" ",r("span",{className:i,children:p.newTab})]}):null}
1
+ "use client";import{jsxs as t}from"react/jsx-runtime";import*as r from"react";import{DefaultsContext as e}from"./defaults.js";import{linkMessages as o,useMessages as s}from"./i18n.js";import{opensElsewhere as m}from"./link.js";import{srOnlyClasses as a}from"./styles.js";export function NewTabNote({target:n,locale:i}){const l=r.useContext(e),c=s(o,i??l?.locale);return m(n)?t("span",{className:a,children:[" ",c.newTab]}):null}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neba",
3
- "version": "1.17.0",
3
+ "version": "1.17.1",
4
4
  "description": "A comprehensive React UI component library — buttons, fields, menus, dialogs, tables and much more — accessible and themeable, sharing one prop vocabulary and a translucent acrylic design language. ESM only, types included, dark mode built in.",
5
5
  "type": "module",
6
6
  "types": "dist/index.d.ts",