@brightlocal/ui-components 2.23.0 → 2.24.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/AI_USAGE.md +1 -1
- package/README.md +3 -2
- package/component-meta.json +116 -25
- package/deprecations.json +22 -0
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +6 -9
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +151 -156
- package/dist/brand-illustration-motif.cjs +1 -0
- package/dist/brand-illustration-motif.d.ts +55 -0
- package/dist/brand-illustration-motif.d.ts.map +1 -0
- package/dist/brand-illustration-motif.js +67 -0
- package/dist/chart.cjs +7 -7
- package/dist/chart.d.ts +287 -2
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +408 -152
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +14 -1
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +387 -376
- package/dist/data-table.cjs +1 -0
- package/dist/{blocks/data-table.d.ts → data-table.d.ts} +159 -4
- package/dist/data-table.d.ts.map +1 -0
- package/dist/data-table.js +721 -0
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +16 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +23 -7
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +32 -2
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +179 -109
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +526 -511
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts +9 -0
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +26 -22
- package/dist/lib/spring-settle.cjs +1 -0
- package/dist/lib/spring-settle.d.ts +20 -0
- package/dist/lib/spring-settle.d.ts.map +1 -0
- package/dist/lib/spring-settle.js +4 -0
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +3 -2
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +22 -11
- package/dist/loading.cjs +1 -1
- package/dist/loading.d.ts +2 -1
- package/dist/loading.d.ts.map +1 -1
- package/dist/loading.js +106 -85
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +16 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +112 -79
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +29 -0
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +2 -2
- package/dist/text-reveal-motion.cjs +1 -1
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/text-reveal-motion.js +236 -219
- package/dist/typography.cjs +1 -1
- package/dist/typography.d.ts +20 -4
- package/dist/typography.d.ts.map +1 -1
- package/dist/typography.js +263 -228
- package/package.json +7 -7
- package/src/blocks/sidebar.tsx +11 -23
- package/src/components/alert.tsx +1 -4
- package/src/components/brand-illustration-motif.tsx +143 -0
- package/src/components/chart.tsx +632 -1
- package/src/components/combobox.tsx +47 -0
- package/src/{blocks → components}/data-table.tsx +270 -16
- package/src/components/field.tsx +31 -0
- package/src/components/global-layout.tsx +144 -5
- package/src/components/label.tsx +13 -1
- package/src/components/link.tsx +13 -1
- package/src/components/loading.tsx +71 -38
- package/src/components/select.tsx +82 -2
- package/src/components/table.tsx +31 -2
- package/src/components/text-reveal-motion.tsx +90 -64
- package/src/components/typography.tsx +74 -18
- package/src/index.ts +2 -1
- package/src/lib/spring-settle.ts +19 -0
- package/dist/blocks/data-table.cjs +0 -1
- package/dist/blocks/data-table.d.ts.map +0 -1
- package/dist/blocks/data-table.js +0 -654
package/dist/typography.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),V=require("react"),y=require("@radix-ui/react-slot"),p=require("class-variance-authority"),i=require("@brightlocal/ui-components/lib/utils");function H(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const o in a)if(o!=="default"){const e=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(t,o,e.get?e:{enumerable:!0,get:()=>a[o]})}}return t.default=a,Object.freeze(t)}const g=H(V),f=p.cva("",{variants:{align:{left:"text-left",center:"text-center",right:"text-right"}}}),q=p.cva("self-stretch text-foreground text-4xl leading-12 font-medium font-display md:text-5xl"),m=g.forwardRef(({className:a,align:t,asChild:o=!1,dataHook:e,trackingEl:r,trackingLabel:n,...l},s)=>{const d=o?y.Slot:"h1";return c.jsx(d,{ref:s,className:i.cn(q(),f({align:t}),a),"data-hook":e,"data-slot":"typography-h1","data-tracking-el":r,"data-tracking-label":n,...l})});m.displayName="TypographyH1";const L=p.cva("pb-2 text-foreground text-3xl font-semibold font-display leading-9 md:text-4xl"),h=g.forwardRef(({className:a,align:t,asChild:o=!1,dataHook:e,trackingEl:r,trackingLabel:n,...l},s)=>{const d=o?y.Slot:"h2";return c.jsx(d,{ref:s,className:i.cn(L(),f({align:t}),a),"data-hook":e,"data-slot":"typography-h2","data-tracking-el":r,"data-tracking-label":n,...l})});h.displayName="TypographyH2";const O=p.cva("text-foreground text-xl font-semibold font-display leading-8 md:text-3xl"),u=g.forwardRef(({className:a,align:t,asChild:o=!1,dataHook:e,trackingEl:r,trackingLabel:n,...l},s)=>{const d=o?y.Slot:"h3";return c.jsx(d,{ref:s,className:i.cn(O(),f({align:t}),a),"data-hook":e,"data-slot":"typography-h3","data-tracking-el":r,"data-tracking-label":n,...l})});u.displayName="TypographyH3";const P=p.cva("text-foreground text-lg font-semibold font-display leading-7 md:text-2xl"),x=g.forwardRef(({className:a,align:t,asChild:o=!1,dataHook:e,trackingEl:r,trackingLabel:n,...l},s)=>{const d=o?y.Slot:"h4";return c.jsx(d,{ref:s,className:i.cn(P(),f({align:t}),a),"data-hook":e,"data-slot":"typography-h4","data-tracking-el":r,"data-tracking-label":n,...l})});x.displayName="TypographyH4";const M=p.cva("text-foreground text-base font-normal font-sans"),k=g.forwardRef(({className:a,align:t,asChild:o=!1,dataHook:e,trackingEl:r,trackingLabel:n,...l},s)=>{const d=o?y.Slot:"p";return c.jsx(d,{ref:s,className:i.cn(M(),f({align:t}),a),"data-hook":e,"data-slot":"typography-p","data-tracking-el":r,"data-tracking-label":n,...l})});k.displayName="TypographyP";const I=p.cva("mt-6 border-l-2 pl-6 text-foreground text-base font-normal font-sans"),T=g.forwardRef(({className:a,align:t,asChild:o=!1,dataHook:e,trackingEl:r,trackingLabel:n,...l},s)=>{const d=o?y.Slot:"blockquote";return c.jsx(d,{ref:s,className:i.cn(I(),f({align:t}),a),"data-hook":e,"data-slot":"typography-blockquote","data-tracking-el":r,"data-tracking-label":n,...l})});T.displayName="TypographyBlockquote";const B=p.cva("self-stretch ml-6 list-disc text-foreground text-base font-normal font-sans leading-6"),b=g.forwardRef(({className:a,align:t,asChild:o=!1,dataHook:e,trackingEl:r,trackingLabel:n,...l},s)=>{const d=o?y.Slot:"ul",R=t==="center"||t==="right";return c.jsx(d,{ref:s,className:i.cn(B(),R&&"ml-0 list-inside",f({align:t}),a),"data-hook":e,"data-slot":"typography-list","data-tracking-el":r,"data-tracking-label":n,...l})});b.displayName="TypographyList";const _=p.cva("inline-flex justify-center items-center gap-2 bg-muted rounded-md px-1.5 py-0.5 text-foreground text-sm font-normal font-mono leading-5"),N=g.forwardRef(({className:a,asChild:t=!1,dataHook:o,trackingEl:e,trackingLabel:r,...n},l)=>{const s=t?y.Slot:"code";return c.jsx(s,{ref:l,className:i.cn(_(),a),"data-hook":o,"data-slot":"typography-inline-code","data-tracking-el":e,"data-tracking-label":r,...n})});N.displayName="TypographyInlineCode";const D=p.cva("block w-full p-4 bg-muted rounded-lg border border-border text-muted-foreground text-base font-normal font-mono leading-6 overflow-x-auto focus-visible:shadow-default outline-none"),v=g.forwardRef(({className:a,align:t,asChild:o=!1,dataHook:e,trackingEl:r,trackingLabel:n,...l},s)=>{const d=o?y.Slot:"pre";return c.jsx(d,{ref:s,className:i.cn(D(),f({align:t}),a),"data-hook":e,"data-slot":"typography-code","data-tracking-el":r,"data-tracking-label":n,tabIndex:0,...l})});v.displayName="TypographyCode";const z=p.cva("text-muted-foreground text-xl font-normal font-sans leading-7"),S=g.forwardRef(({className:a,align:t,asChild:o=!1,dataHook:e,trackingEl:r,trackingLabel:n,...l},s)=>{const d=o?y.Slot:"p";return c.jsx(d,{ref:s,className:i.cn(z(),f({align:t}),a),"data-hook":e,"data-slot":"typography-lead","data-tracking-el":r,"data-tracking-label":n,...l})});S.displayName="TypographyLead";const A=p.cva("text-foreground text-lg font-semibold font-sans leading-7"),j=g.forwardRef(({className:a,align:t,asChild:o=!1,dataHook:e,trackingEl:r,trackingLabel:n,...l},s)=>{const d=o?y.Slot:"div";return c.jsx(d,{ref:s,className:i.cn(A(),f({align:t}),a),"data-hook":e,"data-slot":"typography-large","data-tracking-el":r,"data-tracking-label":n,...l})});j.displayName="TypographyLarge";const W=p.cva("text-foreground text-sm font-medium font-sans leading-5"),C=g.forwardRef(({className:a,asChild:t=!1,dataHook:o,trackingEl:e,trackingLabel:r,...n},l)=>{const s=t?y.Slot:"small";return c.jsx(s,{ref:l,className:i.cn(W(),a),"data-hook":o,"data-slot":"typography-small","data-tracking-el":e,"data-tracking-label":r,...n})});C.displayName="TypographySmall";const E=p.cva("text-muted-foreground text-sm font-medium font-sans leading-5"),w=g.forwardRef(({className:a,align:t,asChild:o=!1,dataHook:e,trackingEl:r,trackingLabel:n,...l},s)=>{const d=o?y.Slot:"p";return c.jsx(d,{ref:s,className:i.cn(E(),f({align:t}),a),"data-hook":e,"data-slot":"typography-muted","data-tracking-el":r,"data-tracking-label":n,...l})});w.displayName="TypographyMuted";exports.TypographyBlockquote=T;exports.TypographyCode=v;exports.TypographyH1=m;exports.TypographyH2=h;exports.TypographyH3=u;exports.TypographyH4=x;exports.TypographyInlineCode=N;exports.TypographyLarge=j;exports.TypographyLead=S;exports.TypographyList=b;exports.TypographyMuted=w;exports.TypographyP=k;exports.TypographySmall=C;
|
package/dist/typography.d.ts
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Text alignment options supported by all typography components.
|
|
4
|
+
*/
|
|
5
|
+
type TypographyAlign = "left" | "center" | "right";
|
|
2
6
|
/**
|
|
3
7
|
* Common props shared by all typography components.
|
|
4
8
|
* Provides consistent testing, analytics, and composition patterns.
|
|
5
9
|
*/
|
|
6
10
|
interface TypographyBaseProps {
|
|
11
|
+
/**
|
|
12
|
+
* Text alignment. When omitted, no alignment class is applied and
|
|
13
|
+
* text keeps the default (left) or inherited alignment.
|
|
14
|
+
* Alignment is only visible when the element spans the available
|
|
15
|
+
* width — block elements do by default, but inside a flex/grid
|
|
16
|
+
* parent that shrink-wraps its children add `className="w-full"`.
|
|
17
|
+
* Not available on inline components (TypographyInlineCode,
|
|
18
|
+
* TypographySmall) where text alignment has no effect.
|
|
19
|
+
* @example "center"
|
|
20
|
+
*/
|
|
21
|
+
align?: TypographyAlign;
|
|
7
22
|
/**
|
|
8
23
|
* Render as a different element using Radix Slot pattern.
|
|
9
24
|
* When true, merges props onto the child element.
|
|
@@ -35,7 +50,8 @@ interface TypographyH1Props extends React.ComponentProps<"h1">, TypographyBasePr
|
|
|
35
50
|
}
|
|
36
51
|
/**
|
|
37
52
|
* Main page heading component (h1).
|
|
38
|
-
* Used for the primary title on a page.
|
|
53
|
+
* Used for the primary title on a page. Uses the display font (Poppins) with
|
|
54
|
+
* responsive sizing — 36px on mobile, 48px from the `md` breakpoint.
|
|
39
55
|
*/
|
|
40
56
|
declare const TypographyH1: React.ForwardRefExoticComponent<Omit<TypographyH1Props, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
41
57
|
/**
|
|
@@ -108,7 +124,7 @@ declare const TypographyList: React.ForwardRefExoticComponent<Omit<TypographyLis
|
|
|
108
124
|
* Props for the TypographyInlineCode component.
|
|
109
125
|
* Extends native code props with design system tracking attributes.
|
|
110
126
|
*/
|
|
111
|
-
interface TypographyInlineCodeProps extends React.ComponentProps<"code">, TypographyBaseProps {
|
|
127
|
+
interface TypographyInlineCodeProps extends React.ComponentProps<"code">, Omit<TypographyBaseProps, "align"> {
|
|
112
128
|
}
|
|
113
129
|
/**
|
|
114
130
|
* Inline code component for code snippets within text.
|
|
@@ -152,7 +168,7 @@ declare const TypographyLarge: React.ForwardRefExoticComponent<Omit<TypographyLa
|
|
|
152
168
|
* Props for the TypographySmall component.
|
|
153
169
|
* Extends native small props with design system tracking attributes.
|
|
154
170
|
*/
|
|
155
|
-
interface TypographySmallProps extends React.ComponentProps<"small">, TypographyBaseProps {
|
|
171
|
+
interface TypographySmallProps extends React.ComponentProps<"small">, Omit<TypographyBaseProps, "align"> {
|
|
156
172
|
}
|
|
157
173
|
/**
|
|
158
174
|
* Small text component for compact content.
|
|
@@ -171,5 +187,5 @@ interface TypographyMutedProps extends React.ComponentProps<"p">, TypographyBase
|
|
|
171
187
|
*/
|
|
172
188
|
declare const TypographyMuted: React.ForwardRefExoticComponent<Omit<TypographyMutedProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
173
189
|
export { TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyP, TypographyBlockquote, TypographyList, TypographyInlineCode, TypographyCode, TypographyLead, TypographyLarge, TypographySmall, TypographyMuted, };
|
|
174
|
-
export type { TypographyH1Props, TypographyH2Props, TypographyH3Props, TypographyH4Props, TypographyPProps, TypographyBlockquoteProps, TypographyListProps, TypographyInlineCodeProps, TypographyCodeProps, TypographyLeadProps, TypographyLargeProps, TypographySmallProps, TypographyMutedProps, };
|
|
190
|
+
export type { TypographyAlign, TypographyH1Props, TypographyH2Props, TypographyH3Props, TypographyH4Props, TypographyPProps, TypographyBlockquoteProps, TypographyListProps, TypographyInlineCodeProps, TypographyCodeProps, TypographyLeadProps, TypographyLargeProps, TypographySmallProps, TypographyMutedProps, };
|
|
175
191
|
//# sourceMappingURL=typography.d.ts.map
|
package/dist/typography.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/components/typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;GAGG;AACH,UAAU,mBAAmB;IAC3B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/components/typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;GAEG;AACH,KAAK,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAYnD;;;GAGG;AACH,UAAU,mBAAmB;IAC3B;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAUD;;;GAGG;AACH,UAAU,iBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,mBAAmB;CAAG;AAE5D;;;;GAIG;AACH,QAAA,MAAM,YAAY,2GA0BjB,CAAC;AAWF;;;GAGG;AACH,UAAU,iBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,mBAAmB;CAAG;AAE5D;;;GAGG;AACH,QAAA,MAA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