@brightlocal/ui-components 3.1.0 → 3.2.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/README.md +6 -1
- package/component-meta.json +663 -38
- package/deprecations.json +1 -1
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +32 -3
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.js +61 -58
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +58 -57
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts +9 -0
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +50 -30
- package/dist/banner.cjs +1 -0
- package/dist/banner.d.ts +81 -0
- package/dist/banner.d.ts.map +1 -0
- package/dist/banner.js +176 -0
- package/dist/blocks/empty-state.cjs +1 -1
- package/dist/blocks/empty-state.d.ts +4 -3
- package/dist/blocks/empty-state.d.ts.map +1 -1
- package/dist/blocks/empty-state.js +21 -20
- package/dist/blocks/progress-state.d.ts +2 -2
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +17 -0
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +8 -2
- package/dist/brand-illustration-motif.d.ts +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +86 -6
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +185 -96
- package/dist/chart.cjs +3 -3
- package/dist/chart.d.ts +231 -13
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +466 -306
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.d.ts +1 -1
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.js +2 -1
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +2 -2
- package/dist/command.cjs +1 -1
- package/dist/command.js +1 -1
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +169 -22
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +695 -561
- package/dist/grid.d.ts +24 -1
- package/dist/grid.d.ts.map +1 -1
- package/dist/hooks/use-breakpoint.cjs +1 -1
- package/dist/hooks/use-breakpoint.d.ts +1 -1
- package/dist/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/hooks/use-breakpoint.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +593 -561
- package/dist/info-tooltip.cjs +1 -0
- package/dist/info-tooltip.d.ts +39 -0
- package/dist/info-tooltip.d.ts.map +1 -0
- package/dist/info-tooltip.js +41 -0
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +1 -1
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.d.ts +33 -2
- package/dist/input-group.d.ts.map +1 -1
- package/dist/input-group.js +167 -54
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +28 -6
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +5 -5
- package/dist/input.cjs +1 -1
- package/dist/input.js +10 -10
- package/dist/lib/block-illustration.cjs +1 -1
- package/dist/lib/block-illustration.d.ts +4 -1
- package/dist/lib/block-illustration.d.ts.map +1 -1
- package/dist/lib/block-illustration.js +12 -11
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +4 -3
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/multi-select-filter.cjs +1 -0
- package/dist/multi-select-filter.d.ts +178 -0
- package/dist/multi-select-filter.d.ts.map +1 -0
- package/dist/multi-select-filter.js +463 -0
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +123 -16
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +89 -75
- package/dist/rating.cjs +1 -1
- package/dist/rating.js +18 -18
- package/dist/relative-date.cjs +1 -0
- package/dist/relative-date.d.ts +65 -0
- package/dist/relative-date.d.ts.map +1 -0
- package/dist/relative-date.js +128 -0
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +11 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +97 -81
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +78 -2
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +192 -85
- package/dist/single-select-filter.cjs +1 -0
- package/dist/single-select-filter.d.ts +81 -0
- package/dist/single-select-filter.d.ts.map +1 -0
- package/dist/single-select-filter.js +226 -0
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +22 -22
- package/dist/split-layout.cjs +1 -1
- package/dist/split-layout.d.ts +1 -1
- package/dist/split-layout.js +13 -13
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +45 -4
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +90 -73
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +12 -1
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +148 -126
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.ts +38 -36
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.js +262 -73
- package/dist/typography-text.d.ts +1 -2
- package/dist/typography-text.d.ts.map +1 -1
- package/dist/typography.d.ts +1 -1
- package/package.json +5 -6
- package/src/blocks/empty-state.tsx +8 -3
- package/src/blocks/progress-state.tsx +2 -2
- package/src/blocks/sidebar.tsx +26 -2
- package/src/components/alert-dialog.tsx +50 -5
- package/src/components/alert.tsx +16 -8
- package/src/components/badge.tsx +40 -3
- package/src/components/banner.tsx +288 -0
- package/src/components/brand-illustration-motif.tsx +1 -1
- package/src/components/card.tsx +211 -24
- package/src/components/chart.tsx +523 -35
- package/src/components/checkbox.tsx +1 -1
- package/src/components/combobox.tsx +2 -2
- package/src/components/command.tsx +1 -1
- package/src/components/data-table.tsx +778 -195
- package/src/components/grid.tsx +32 -1
- package/src/components/info-tooltip.tsx +94 -0
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +246 -11
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +33 -11
- package/src/components/input.tsx +1 -1
- package/src/components/list.tsx +1 -1
- package/src/components/multi-select-filter.tsx +912 -0
- package/src/components/progress.tsx +190 -31
- package/src/components/rating.tsx +1 -1
- package/src/components/relative-date.tsx +230 -0
- package/src/components/select.tsx +35 -5
- package/src/components/sheet.tsx +240 -4
- package/src/components/single-select-filter.tsx +443 -0
- package/src/components/sonner.tsx +16 -5
- package/src/components/split-layout.tsx +2 -2
- package/src/components/table.tsx +71 -11
- package/src/components/tabs.tsx +93 -46
- package/src/components/textarea.tsx +1 -1
- package/src/components/tooltip.tsx +440 -68
- package/src/components/typography-text.tsx +1 -2
- package/src/components/typography.tsx +1 -1
- package/src/hooks/use-breakpoint.ts +2 -1
- package/src/index.ts +5 -0
- package/src/lib/block-illustration.tsx +5 -1
- package/src/lib/utils.ts +1 -0
package/dist/textarea.js
CHANGED
package/dist/tooltip.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 p=require("react/jsx-runtime"),V=require("react"),U=require("@radix-ui/react-popover"),J=require("@radix-ui/react-slot"),A=require("@brightlocal/ui-components/lib/utils");function F(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(i,n,l.get?l:{enumerable:!0,get:()=>t[n]})}}return i.default=t,Object.freeze(i)}const e=F(V),y=F(U),L=e.createContext({delayDuration:0,skipDelayDuration:0});function K({delayDuration:t=0,skipDelayDuration:i=0,children:n}){const l=e.useMemo(()=>({delayDuration:t,skipDelayDuration:i}),[t,i]);return p.jsx(L.Provider,{value:l,children:n})}function a(t,i){return n=>{t?.(n),n.defaultPrevented||i(n)}}const Q=200,M=e.createContext(null);function q(){const t=e.useContext(M);if(!t)throw new Error("Tooltip components must be used within <Tooltip>");return t}function W({open:t,defaultOpen:i=!1,onOpenChange:n,children:l}){const{delayDuration:v}=e.useContext(L),[k,x]=e.useState(i??!1),m=t!==void 0,d=m?t:k,f=e.useRef(void 0),g=e.useRef(void 0),P=e.useRef(null),T=e.useRef("hover"),c=e.useRef(null),b=e.useId(),s=e.useCallback(o=>{o||(T.current="hover"),m||x(o),n?.(o)},[m,n]),r=e.useCallback(()=>{f.current!==void 0&&(clearTimeout(f.current),f.current=void 0),g.current!==void 0&&(clearTimeout(g.current),g.current=void 0)},[]);e.useEffect(()=>r,[r]);const u=e.useCallback(()=>{r(),T.current!=="touch"&&(v>0?g.current=setTimeout(()=>s(!0),v):s(!0))},[r,v,s]),C=e.useCallback(()=>{r(),T.current!=="touch"&&(f.current=setTimeout(()=>s(!1),Q))},[r,s]),O=e.useCallback(o=>{o.pointerType!=="touch"&&u()},[u]),R=e.useCallback(o=>{o.pointerType!=="touch"&&(c.current=null,C())},[C]),j=e.useCallback(o=>{c.current=o.pointerType==="touch"?"touch":"mouse"},[]),w=e.useCallback(()=>{c.current=null},[]),E=e.useCallback(()=>{const o=c.current;c.current=null,o==="touch"&&(r(),d?s(!1):(T.current="touch",s(!0)))},[r,d,s]),N=e.useCallback(()=>{c.current||u()},[u]),I=e.useCallback(()=>{C()},[C]),h=e.useCallback(()=>{r()},[r]),_=e.useCallback(o=>{o.pointerType!=="touch"&&C()},[C]),D=e.useCallback(o=>{const S=o.target;S instanceof Node&&P.current?.contains(S)&&o.preventDefault()},[]),z=e.useCallback(o=>{o||(r(),s(!1))},[r,s]),G=e.useMemo(()=>({open:d,tooltipId:b,triggerRef:P,onTriggerPointerEnter:O,onTriggerPointerLeave:R,onTriggerPointerDown:j,onTriggerPointerCancel:w,onTriggerClick:E,onTriggerFocus:N,onTriggerBlur:I,onContentPointerEnter:h,onContentPointerLeave:_,onContentInteractOutside:D}),[d,b,O,R,j,w,E,N,I,h,_,D]);return p.jsx(M.Provider,{value:G,children:p.jsx(y.Root,{open:d,onOpenChange:z,children:l})})}const H=e.forwardRef(({dataHook:t,trackingEl:i,trackingLabel:n,asChild:l,children:v,onBlur:k,onClick:x,onFocus:m,onPointerCancel:d,onPointerDown:f,onPointerEnter:g,onPointerLeave:P,...T},c)=>{const{open:b,tooltipId:s,triggerRef:r,onTriggerPointerEnter:u,onTriggerPointerLeave:C,onTriggerPointerDown:O,onTriggerPointerCancel:R,onTriggerClick:j,onTriggerFocus:w,onTriggerBlur:E}=q(),N=e.useCallback(h=>{r.current=h,typeof c=="function"?c(h):c&&(c.current=h)},[c,r]),I=l?J.Slot:"button";return p.jsx(y.Anchor,{asChild:!0,children:p.jsx(I,{ref:N,"data-slot":"tooltip-trigger",...T,"aria-describedby":b?s:void 0,"data-hook":t,"data-tracking-el":i,"data-tracking-label":n,type:l?void 0:"button",onBlur:a(k,E),onClick:a(x,j),onFocus:a(m,w),onPointerCancel:a(d,R),onPointerDown:a(f,O),onPointerEnter:a(g,u),onPointerLeave:a(P,C),children:v})})});H.displayName="TooltipTrigger";const B=e.forwardRef(({className:t,side:i="top",sideOffset:n=0,dataHook:l,trackingEl:v,trackingLabel:k,hideArrow:x=!1,children:m,onInteractOutside:d,onPointerEnter:f,onPointerLeave:g,...P},T)=>{const{tooltipId:c,onContentPointerEnter:b,onContentPointerLeave:s,onContentInteractOutside:r}=q();return p.jsx(y.Portal,{children:p.jsxs(y.Content,{ref:T,className:A.cn("bg-secondary text-secondary-foreground text-body-xs z-50 w-max max-w-sm rounded-md px-3 py-1.5",A.FLOATING_CONTENT_ANIMATION,"**:data-[slot=tooltip-arrow]:-translate-y-px",t),"data-hook":l,"data-slot":"tooltip-content","data-tracking-el":v,"data-tracking-label":k,side:i,sideOffset:n,onCloseAutoFocus:u=>u.preventDefault(),onOpenAutoFocus:u=>u.preventDefault(),...P,role:"none",onInteractOutside:a(d,r),onPointerEnter:a(f,b),onPointerLeave:a(g,s),children:[p.jsx("span",{id:c,role:"tooltip",children:m}),!x&&p.jsx(y.Arrow,{className:"fill-secondary","data-slot":"tooltip-arrow",height:7,width:14})]})})});B.displayName="TooltipContent";exports.Tooltip=W;exports.TooltipContent=B;exports.TooltipProvider=K;exports.TooltipTrigger=H;
|
package/dist/tooltip.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
3
|
-
interface TooltipProviderProps
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
interface TooltipProviderProps {
|
|
4
|
+
/**
|
|
5
|
+
* The duration in ms to wait before showing the tooltip.
|
|
6
|
+
* @default 0
|
|
7
|
+
*/
|
|
4
8
|
delayDuration?: number;
|
|
9
|
+
/**
|
|
10
|
+
* The duration in ms to skip the delay when moving between tooltips.
|
|
11
|
+
* @default 0
|
|
12
|
+
*/
|
|
5
13
|
skipDelayDuration?: number;
|
|
14
|
+
children: React.ReactNode;
|
|
6
15
|
}
|
|
7
16
|
/**
|
|
8
17
|
* TooltipProvider - Wraps your application or a section of it to provide shared tooltip configuration.
|
|
@@ -20,12 +29,19 @@ interface TooltipProviderProps extends React.ComponentProps<typeof TooltipPrimit
|
|
|
20
29
|
* @param delayDuration - The duration in ms to wait before showing the tooltip (default: 0)
|
|
21
30
|
* @param skipDelayDuration - The duration in ms to skip the delay when moving between tooltips (default: 0)
|
|
22
31
|
*/
|
|
23
|
-
declare function TooltipProvider({ delayDuration, skipDelayDuration,
|
|
32
|
+
declare function TooltipProvider({ delayDuration, skipDelayDuration, children, }: TooltipProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
33
|
/**
|
|
25
|
-
* Tooltip - Displays a popup with additional information
|
|
34
|
+
* Tooltip - Displays a popup with additional information.
|
|
35
|
+
*
|
|
36
|
+
* Toggletip behaviour by input type:
|
|
37
|
+
* - **Mouse / pen / keyboard**: opens on hover or focus, closes when the pointer
|
|
38
|
+
* leaves (after a short grace period so the pointer can move onto the content)
|
|
39
|
+
* or focus moves away.
|
|
40
|
+
* - **Touch**: a tap toggles it. While open it ignores hover/blur signals so the
|
|
41
|
+
* text can be long-pressed and copied; it closes on a second tap of the
|
|
42
|
+
* trigger, a tap outside, or Escape.
|
|
26
43
|
*
|
|
27
44
|
* @example
|
|
28
|
-
* // Basic usage (requires TooltipProvider wrapper):
|
|
29
45
|
* <Tooltip>
|
|
30
46
|
* <TooltipTrigger asChild>
|
|
31
47
|
* <Button>Hover me</Button>
|
|
@@ -36,50 +52,36 @@ declare function TooltipProvider({ delayDuration, skipDelayDuration, ...props }:
|
|
|
36
52
|
* </Tooltip>
|
|
37
53
|
*
|
|
38
54
|
* @remarks
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* multiple tooltips.
|
|
55
|
+
* Wrap your app once in a TooltipProvider to share `delayDuration` across all
|
|
56
|
+
* tooltips. Without one the provider defaults (no delay) apply.
|
|
42
57
|
*/
|
|
43
|
-
declare function Tooltip({
|
|
44
|
-
interface TooltipTriggerProps extends React.
|
|
58
|
+
declare function Tooltip({ open: controlledOpen, defaultOpen, onOpenChange, children, }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
interface TooltipTriggerProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
45
60
|
/**
|
|
46
|
-
* Data hook for automated testing, rendered as the `data-hook` attribute
|
|
47
|
-
* (the platform test-selector contract).
|
|
48
|
-
*
|
|
61
|
+
* Data hook for automated testing, rendered as the `data-hook` attribute.
|
|
49
62
|
* Optional because `TooltipTrigger` is commonly used with `asChild`, where the
|
|
50
|
-
* child element
|
|
51
|
-
* `asChild` is set, the child's `data-hook` wins over this one.
|
|
63
|
+
* child element already carries its own `dataHook`.
|
|
52
64
|
*/
|
|
53
65
|
dataHook?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Optional analytics element identifier
|
|
56
|
-
*/
|
|
66
|
+
/** Optional analytics element identifier */
|
|
57
67
|
trackingEl?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Optional analytics label context
|
|
60
|
-
*/
|
|
68
|
+
/** Optional analytics label context */
|
|
61
69
|
trackingLabel?: string;
|
|
70
|
+
/** Render as child element using Radix Slot */
|
|
71
|
+
asChild?: boolean;
|
|
62
72
|
}
|
|
63
|
-
declare const TooltipTrigger: React.ForwardRefExoticComponent<
|
|
64
|
-
interface TooltipContentProps extends React.
|
|
65
|
-
/**
|
|
66
|
-
* Required data-hook attribute for testing and analytics
|
|
67
|
-
*/
|
|
73
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
74
|
+
interface TooltipContentProps extends Omit<React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>, "onOpenAutoFocus" | "onCloseAutoFocus"> {
|
|
75
|
+
/** Required data-hook attribute for testing and analytics */
|
|
68
76
|
dataHook: string;
|
|
69
|
-
/**
|
|
70
|
-
* Optional analytics element identifier
|
|
71
|
-
*/
|
|
77
|
+
/** Optional analytics element identifier */
|
|
72
78
|
trackingEl?: string;
|
|
73
|
-
/**
|
|
74
|
-
* Optional analytics label context
|
|
75
|
-
*/
|
|
79
|
+
/** Optional analytics label context */
|
|
76
80
|
trackingLabel?: string;
|
|
77
|
-
/**
|
|
78
|
-
* Hide the tooltip arrow
|
|
79
|
-
*/
|
|
81
|
+
/** Hide the tooltip arrow */
|
|
80
82
|
hideArrow?: boolean;
|
|
81
83
|
}
|
|
82
|
-
declare const TooltipContent: React.ForwardRefExoticComponent<
|
|
84
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
83
85
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
84
86
|
export type { TooltipContentProps, TooltipProviderProps, TooltipTriggerProps };
|
|
85
87
|
//# sourceMappingURL=tooltip.d.ts.map
|
package/dist/tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAU5D,UAAU,oBAAoB;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAcD;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,eAAe,CAAC,EACvB,aAAiB,EACjB,iBAAqB,EACrB,QAAQ,GACT,EAAE,oBAAoB,2CAUtB;AAqED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,iBAAS,OAAO,CAAC,EACf,IAAI,EAAE,cAAc,EACpB,WAAmB,EACnB,YAAY,EACZ,QAAQ,GACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CA8LpD;AAID,UAAU,mBAAoB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC;IAC5E;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,cAAc,+FA+EnB,CAAC;AAMF,UAAU,mBAAoB,SAAQ,IAAI,CACxC,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,EAC/D,iBAAiB,GAAG,kBAAkB,CACvC;IACC,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,cAAc,4FA4EnB,CAAC;AAIF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AACpE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/tooltip.js
CHANGED
|
@@ -1,83 +1,272 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as T, jsxs as j } from "react/jsx-runtime";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import * as y from "@radix-ui/react-popover";
|
|
4
|
+
import { Slot as G } from "@radix-ui/react-slot";
|
|
5
|
+
import { cn as V, FLOATING_CONTENT_ANIMATION as z } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
+
const _ = e.createContext(
|
|
7
|
+
{
|
|
8
|
+
delayDuration: 0,
|
|
9
|
+
skipDelayDuration: 0
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
function X({
|
|
13
|
+
delayDuration: n = 0,
|
|
14
|
+
skipDelayDuration: s = 0,
|
|
15
|
+
children: c
|
|
9
16
|
}) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
delayDuration: t,
|
|
14
|
-
skipDelayDuration: r,
|
|
15
|
-
...a
|
|
16
|
-
}
|
|
17
|
+
const d = e.useMemo(
|
|
18
|
+
() => ({ delayDuration: n, skipDelayDuration: s }),
|
|
19
|
+
[n, s]
|
|
17
20
|
);
|
|
21
|
+
return /* @__PURE__ */ T(_.Provider, { value: d, children: c });
|
|
22
|
+
}
|
|
23
|
+
function a(n, s) {
|
|
24
|
+
return (c) => {
|
|
25
|
+
n?.(c), c.defaultPrevented || s(c);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const U = 200, H = e.createContext(null);
|
|
29
|
+
function M() {
|
|
30
|
+
const n = e.useContext(H);
|
|
31
|
+
if (!n)
|
|
32
|
+
throw new Error("Tooltip components must be used within <Tooltip>");
|
|
33
|
+
return n;
|
|
18
34
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
35
|
+
function Y({
|
|
36
|
+
open: n,
|
|
37
|
+
defaultOpen: s = !1,
|
|
38
|
+
onOpenChange: c,
|
|
39
|
+
children: d
|
|
21
40
|
}) {
|
|
22
|
-
|
|
41
|
+
const { delayDuration: m } = e.useContext(_), [k, x] = e.useState(
|
|
42
|
+
s ?? !1
|
|
43
|
+
), v = n !== void 0, u = v ? n : k, p = e.useRef(void 0), f = e.useRef(void 0), P = e.useRef(null), g = e.useRef("hover"), r = e.useRef(null), h = e.useId(), i = e.useCallback(
|
|
44
|
+
(t) => {
|
|
45
|
+
t || (g.current = "hover"), v || x(t), c?.(t);
|
|
46
|
+
},
|
|
47
|
+
[v, c]
|
|
48
|
+
), o = e.useCallback(() => {
|
|
49
|
+
p.current !== void 0 && (clearTimeout(p.current), p.current = void 0), f.current !== void 0 && (clearTimeout(f.current), f.current = void 0);
|
|
50
|
+
}, []);
|
|
51
|
+
e.useEffect(() => o, [o]);
|
|
52
|
+
const l = e.useCallback(() => {
|
|
53
|
+
o(), g.current !== "touch" && (m > 0 ? f.current = setTimeout(() => i(!0), m) : i(!0));
|
|
54
|
+
}, [o, m, i]), C = e.useCallback(() => {
|
|
55
|
+
o(), g.current !== "touch" && (p.current = setTimeout(
|
|
56
|
+
() => i(!1),
|
|
57
|
+
U
|
|
58
|
+
));
|
|
59
|
+
}, [o, i]), w = e.useCallback(
|
|
60
|
+
(t) => {
|
|
61
|
+
t.pointerType !== "touch" && l();
|
|
62
|
+
},
|
|
63
|
+
[l]
|
|
64
|
+
), R = e.useCallback(
|
|
65
|
+
(t) => {
|
|
66
|
+
t.pointerType !== "touch" && (r.current = null, C());
|
|
67
|
+
},
|
|
68
|
+
[C]
|
|
69
|
+
), E = e.useCallback((t) => {
|
|
70
|
+
r.current = t.pointerType === "touch" ? "touch" : "mouse";
|
|
71
|
+
}, []), O = e.useCallback(() => {
|
|
72
|
+
r.current = null;
|
|
73
|
+
}, []), I = e.useCallback(() => {
|
|
74
|
+
const t = r.current;
|
|
75
|
+
r.current = null, t === "touch" && (o(), u ? i(!1) : (g.current = "touch", i(!0)));
|
|
76
|
+
}, [o, u, i]), N = e.useCallback(() => {
|
|
77
|
+
r.current || l();
|
|
78
|
+
}, [l]), A = e.useCallback(() => {
|
|
79
|
+
C();
|
|
80
|
+
}, [C]), b = e.useCallback(() => {
|
|
81
|
+
o();
|
|
82
|
+
}, [o]), F = e.useCallback(
|
|
83
|
+
(t) => {
|
|
84
|
+
t.pointerType !== "touch" && C();
|
|
85
|
+
},
|
|
86
|
+
[C]
|
|
87
|
+
), L = e.useCallback((t) => {
|
|
88
|
+
const D = t.target;
|
|
89
|
+
D instanceof Node && P.current?.contains(D) && t.preventDefault();
|
|
90
|
+
}, []), S = e.useCallback(
|
|
91
|
+
(t) => {
|
|
92
|
+
t || (o(), i(!1));
|
|
93
|
+
},
|
|
94
|
+
[o, i]
|
|
95
|
+
), B = e.useMemo(
|
|
96
|
+
() => ({
|
|
97
|
+
open: u,
|
|
98
|
+
tooltipId: h,
|
|
99
|
+
triggerRef: P,
|
|
100
|
+
onTriggerPointerEnter: w,
|
|
101
|
+
onTriggerPointerLeave: R,
|
|
102
|
+
onTriggerPointerDown: E,
|
|
103
|
+
onTriggerPointerCancel: O,
|
|
104
|
+
onTriggerClick: I,
|
|
105
|
+
onTriggerFocus: N,
|
|
106
|
+
onTriggerBlur: A,
|
|
107
|
+
onContentPointerEnter: b,
|
|
108
|
+
onContentPointerLeave: F,
|
|
109
|
+
onContentInteractOutside: L
|
|
110
|
+
}),
|
|
111
|
+
[
|
|
112
|
+
u,
|
|
113
|
+
h,
|
|
114
|
+
w,
|
|
115
|
+
R,
|
|
116
|
+
E,
|
|
117
|
+
O,
|
|
118
|
+
I,
|
|
119
|
+
N,
|
|
120
|
+
A,
|
|
121
|
+
b,
|
|
122
|
+
F,
|
|
123
|
+
L
|
|
124
|
+
]
|
|
125
|
+
);
|
|
126
|
+
return /* @__PURE__ */ T(H.Provider, { value: B, children: /* @__PURE__ */ T(y.Root, { open: u, onOpenChange: S, children: d }) });
|
|
23
127
|
}
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
128
|
+
const q = e.forwardRef(
|
|
129
|
+
({
|
|
130
|
+
dataHook: n,
|
|
131
|
+
trackingEl: s,
|
|
132
|
+
trackingLabel: c,
|
|
133
|
+
asChild: d,
|
|
134
|
+
children: m,
|
|
135
|
+
onBlur: k,
|
|
136
|
+
onClick: x,
|
|
137
|
+
onFocus: v,
|
|
138
|
+
onPointerCancel: u,
|
|
139
|
+
onPointerDown: p,
|
|
140
|
+
onPointerEnter: f,
|
|
141
|
+
onPointerLeave: P,
|
|
142
|
+
...g
|
|
143
|
+
}, r) => {
|
|
144
|
+
const {
|
|
145
|
+
open: h,
|
|
146
|
+
tooltipId: i,
|
|
147
|
+
triggerRef: o,
|
|
148
|
+
onTriggerPointerEnter: l,
|
|
149
|
+
onTriggerPointerLeave: C,
|
|
150
|
+
onTriggerPointerDown: w,
|
|
151
|
+
onTriggerPointerCancel: R,
|
|
152
|
+
onTriggerClick: E,
|
|
153
|
+
onTriggerFocus: O,
|
|
154
|
+
onTriggerBlur: I
|
|
155
|
+
} = M(), N = e.useCallback(
|
|
156
|
+
(b) => {
|
|
157
|
+
o.current = b, typeof r == "function" ? r(b) : r && (r.current = b);
|
|
158
|
+
},
|
|
159
|
+
[r, o]
|
|
160
|
+
), A = d ? G : "button";
|
|
161
|
+
return /* @__PURE__ */ T(y.Anchor, { asChild: !0, children: /* @__PURE__ */ T(
|
|
162
|
+
A,
|
|
163
|
+
{
|
|
164
|
+
ref: N,
|
|
165
|
+
"data-slot": "tooltip-trigger",
|
|
166
|
+
...g,
|
|
167
|
+
"aria-describedby": h ? i : void 0,
|
|
168
|
+
"data-hook": n,
|
|
169
|
+
"data-tracking-el": s,
|
|
170
|
+
"data-tracking-label": c,
|
|
171
|
+
type: d ? void 0 : "button",
|
|
172
|
+
onBlur: a(k, I),
|
|
173
|
+
onClick: a(x, E),
|
|
174
|
+
onFocus: a(v, O),
|
|
175
|
+
onPointerCancel: a(
|
|
176
|
+
u,
|
|
177
|
+
R
|
|
178
|
+
),
|
|
179
|
+
onPointerDown: a(
|
|
180
|
+
p,
|
|
181
|
+
w
|
|
182
|
+
),
|
|
183
|
+
onPointerEnter: a(
|
|
184
|
+
f,
|
|
185
|
+
l
|
|
186
|
+
),
|
|
187
|
+
onPointerLeave: a(
|
|
188
|
+
P,
|
|
189
|
+
C
|
|
190
|
+
),
|
|
191
|
+
children: m
|
|
192
|
+
}
|
|
193
|
+
) });
|
|
33
194
|
}
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
const
|
|
195
|
+
);
|
|
196
|
+
q.displayName = "TooltipTrigger";
|
|
197
|
+
const J = e.forwardRef(
|
|
37
198
|
({
|
|
38
|
-
className:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
199
|
+
className: n,
|
|
200
|
+
side: s = "top",
|
|
201
|
+
sideOffset: c = 0,
|
|
202
|
+
dataHook: d,
|
|
203
|
+
trackingEl: m,
|
|
204
|
+
trackingLabel: k,
|
|
205
|
+
hideArrow: x = !1,
|
|
206
|
+
children: v,
|
|
207
|
+
onInteractOutside: u,
|
|
208
|
+
onPointerEnter: p,
|
|
209
|
+
onPointerLeave: f,
|
|
210
|
+
...P
|
|
211
|
+
}, g) => {
|
|
212
|
+
const {
|
|
213
|
+
tooltipId: r,
|
|
214
|
+
onContentPointerEnter: h,
|
|
215
|
+
onContentPointerLeave: i,
|
|
216
|
+
onContentInteractOutside: o
|
|
217
|
+
} = M();
|
|
218
|
+
return /* @__PURE__ */ T(y.Portal, { children: /* @__PURE__ */ j(
|
|
219
|
+
y.Content,
|
|
220
|
+
{
|
|
221
|
+
ref: g,
|
|
222
|
+
className: V(
|
|
223
|
+
"bg-secondary text-secondary-foreground text-body-xs z-50 w-max max-w-sm rounded-md px-3 py-1.5",
|
|
224
|
+
z,
|
|
225
|
+
"**:data-[slot=tooltip-arrow]:-translate-y-px",
|
|
226
|
+
n
|
|
227
|
+
),
|
|
228
|
+
"data-hook": d,
|
|
229
|
+
"data-slot": "tooltip-content",
|
|
230
|
+
"data-tracking-el": m,
|
|
231
|
+
"data-tracking-label": k,
|
|
232
|
+
side: s,
|
|
233
|
+
sideOffset: c,
|
|
234
|
+
onCloseAutoFocus: (l) => l.preventDefault(),
|
|
235
|
+
onOpenAutoFocus: (l) => l.preventDefault(),
|
|
236
|
+
...P,
|
|
237
|
+
role: "none",
|
|
238
|
+
onInteractOutside: a(
|
|
239
|
+
u,
|
|
240
|
+
o
|
|
241
|
+
),
|
|
242
|
+
onPointerEnter: a(
|
|
243
|
+
p,
|
|
244
|
+
h
|
|
245
|
+
),
|
|
246
|
+
onPointerLeave: a(
|
|
247
|
+
f,
|
|
248
|
+
i
|
|
249
|
+
),
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ T("span", { id: r, role: "tooltip", children: v }),
|
|
252
|
+
!x && /* @__PURE__ */ T(
|
|
253
|
+
y.Arrow,
|
|
254
|
+
{
|
|
255
|
+
className: "fill-secondary",
|
|
256
|
+
"data-slot": "tooltip-arrow",
|
|
257
|
+
height: 7,
|
|
258
|
+
width: 14
|
|
259
|
+
}
|
|
260
|
+
)
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
) });
|
|
264
|
+
}
|
|
76
265
|
);
|
|
77
|
-
|
|
266
|
+
J.displayName = "TooltipContent";
|
|
78
267
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
268
|
+
Y as Tooltip,
|
|
269
|
+
J as TooltipContent,
|
|
270
|
+
X as TooltipProvider,
|
|
271
|
+
q as TooltipTrigger
|
|
83
272
|
};
|
|
@@ -9,8 +9,7 @@ import * as React from "react";
|
|
|
9
9
|
* proportional; add `tabular` where metrics sit in a column or the value
|
|
10
10
|
* updates in place.
|
|
11
11
|
* - `code` — Geist Mono 400 · 16/24. IDs, keys, coordinates a user copies verbatim.
|
|
12
|
-
* Inside a sentence use
|
|
13
|
-
* (0.9em, inherits the line's height).
|
|
12
|
+
* Inside a sentence use `text-code-inline` on a `code` element instead (deprecated alias — 0.9em, inherits the line's height).
|
|
14
13
|
*
|
|
15
14
|
* There are no standalone label variants on purpose: the `text-label` /
|
|
16
15
|
* `text-label-sm` tokens are reserved for control-owning components
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography-text.d.ts","sourceRoot":"","sources":["../../src/components/typography-text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B
|
|
1
|
+
{"version":3,"file":"typography-text.d.ts","sourceRoot":"","sources":["../../src/components/typography-text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;;;;;;;;;;;GAeG;AACH,KAAK,qBAAqB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEhF;;GAEG;AACH,KAAK,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvD;;;;;;GAMG;AACH,KAAK,mBAAmB,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;AAgE/D;;;GAGG;AACH,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACrE;;;;OAIG;IACH,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,cAAc,yFA8CnB,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,GACpB,CAAC"}
|
package/dist/typography.d.ts
CHANGED
|
@@ -136,7 +136,7 @@ interface TypographyInlineCodeProps extends React.ComponentProps<"code">, Omit<T
|
|
|
136
136
|
/**
|
|
137
137
|
* Inline code component for code snippets within text.
|
|
138
138
|
* Displays with monospace font and muted background.
|
|
139
|
-
* @deprecated Use `<code className="text-code-inline">` inside a sentence (
|
|
139
|
+
* @deprecated Use `<code className="text-code-inline">` inside a sentence (semantic type scale, DS-714).
|
|
140
140
|
*/
|
|
141
141
|
declare const TypographyInlineCode: React.ForwardRefExoticComponent<Omit<TypographyInlineCodeProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
142
142
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightlocal/ui-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "BrightLocal Design System UI Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -173,8 +173,8 @@
|
|
|
173
173
|
"vite-bundle-visualizer": "^1.2.1",
|
|
174
174
|
"vite-plugin-dts": "^4.5.4",
|
|
175
175
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
176
|
-
"@workspace/
|
|
177
|
-
"@workspace/
|
|
176
|
+
"@workspace/typescript-config": "0.0.0",
|
|
177
|
+
"@workspace/eslint-config": "0.0.0"
|
|
178
178
|
},
|
|
179
179
|
"publishConfig": {
|
|
180
180
|
"access": "public",
|
|
@@ -210,7 +210,6 @@
|
|
|
210
210
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
211
211
|
"@radix-ui/react-toggle": "^1.1.10",
|
|
212
212
|
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
213
|
-
"@radix-ui/react-tooltip": "^1.2.8",
|
|
214
213
|
"@tanstack/react-table": "^8.21.3",
|
|
215
214
|
"@tanstack/react-virtual": "^3.13.23",
|
|
216
215
|
"class-variance-authority": "^0.7.1",
|
|
@@ -228,8 +227,8 @@
|
|
|
228
227
|
"sonner": "^2.0.7",
|
|
229
228
|
"tailwind-merge": "^3.4.0",
|
|
230
229
|
"vaul": "^1.1.2",
|
|
231
|
-
"@brightlocal/icons": "2.4.
|
|
232
|
-
"@brightlocal/illustrations": "0.
|
|
230
|
+
"@brightlocal/icons": "2.4.1",
|
|
231
|
+
"@brightlocal/illustrations": "0.7.0"
|
|
233
232
|
},
|
|
234
233
|
"size-limit": [
|
|
235
234
|
{
|
|
@@ -99,7 +99,8 @@ interface EmptyStateBaseProps extends Omit<
|
|
|
99
99
|
dataHook: string;
|
|
100
100
|
/**
|
|
101
101
|
* What is missing, as a real heading. Name the thing, not the condition:
|
|
102
|
-
* "No locations yet", never "Empty".
|
|
102
|
+
* "No locations yet", never "Empty". Keep it short — at size lg it wraps
|
|
103
|
+
* at 32rem; the explanation belongs in `description`.
|
|
103
104
|
*/
|
|
104
105
|
title: React.ReactNode;
|
|
105
106
|
/**
|
|
@@ -171,7 +172,7 @@ interface EmptyStateLgProps extends EmptyStateBaseProps {
|
|
|
171
172
|
* Pass the illustration itself and do NOT set a size: the block renders it at
|
|
172
173
|
* the size the design specifies, whatever the element carries, so there is no
|
|
173
174
|
* number to get wrong per call site.
|
|
174
|
-
* @example <
|
|
175
|
+
* @example <SmallBusiness aria-hidden />
|
|
175
176
|
*/
|
|
176
177
|
illustration?: React.ReactNode;
|
|
177
178
|
/**
|
|
@@ -230,7 +231,7 @@ export type EmptyStateProps = EmptyStateMdProps | EmptyStateLgProps;
|
|
|
230
231
|
* <EmptyState
|
|
231
232
|
* dataHook="locations-empty-page"
|
|
232
233
|
* description={t("locations.empty.description")}
|
|
233
|
-
* illustration={<
|
|
234
|
+
* illustration={<SmallBusiness aria-hidden />}
|
|
234
235
|
* size="lg"
|
|
235
236
|
* title={t("locations.empty.title")}
|
|
236
237
|
* >
|
|
@@ -325,6 +326,10 @@ const EmptyState = React.forwardRef<HTMLDivElement, EmptyStateProps>(
|
|
|
325
326
|
>
|
|
326
327
|
<TypographyHeading
|
|
327
328
|
align={align === "center" ? "center" : "left"}
|
|
329
|
+
/* lg caps the title at 32rem, one step wider than the description
|
|
330
|
+
below it, so a long title wraps into the column instead of running
|
|
331
|
+
the full width of the page body. md is bounded by its frame. */
|
|
332
|
+
className={size === "lg" ? "max-w-lg" : undefined}
|
|
328
333
|
data-slot="empty-state-title"
|
|
329
334
|
dataHook={`${dataHook}-title`}
|
|
330
335
|
level={titleLevel ?? SIZE_TITLE_LEVEL[size]}
|
|
@@ -313,7 +313,7 @@ export interface ProgressStateProps extends Omit<
|
|
|
313
313
|
* title's companion, not the subject of the screen: much larger and it
|
|
314
314
|
* outweighs the 24px heading under it, and the eye lands on the artwork
|
|
315
315
|
* instead of the words that say what is happening.
|
|
316
|
-
* @example <
|
|
316
|
+
* @example <MapMagnifyingGlass aria-hidden />
|
|
317
317
|
*/
|
|
318
318
|
illustration?: React.ReactNode;
|
|
319
319
|
/**
|
|
@@ -378,7 +378,7 @@ export interface ProgressStateProps extends Omit<
|
|
|
378
378
|
* // The backend reports real progress.
|
|
379
379
|
* <ProgressState
|
|
380
380
|
* dataHook="lsg-generating"
|
|
381
|
-
* illustration={<
|
|
381
|
+
* illustration={<MapMagnifyingGlass aria-hidden />}
|
|
382
382
|
* title={t("reports.building.title")}
|
|
383
383
|
* description={t("reports.building.description")}
|
|
384
384
|
* value={run.percent}
|