@qumra/fanar 0.0.12 → 0.0.13
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 +115 -8
- package/dist/ai.js +1 -1
- package/dist/chunk-3EPEIAG2.js +2 -0
- package/dist/chunk-6DTSIOCB.js +2 -0
- package/dist/chunk-CTMW25W5.js +2 -0
- package/dist/chunk-K3TNXSD7.js +2 -0
- package/dist/{chunk-GMIBQMMR.js → chunk-NIEWNSOB.js} +1 -1
- package/dist/editor.js +1 -1
- package/dist/index.d.ts +291 -139
- package/dist/index.js +1 -1
- package/dist/native/ai.js +1 -0
- package/dist/native/chunk-LZHT3H7B.js +1 -0
- package/dist/native/chunk-RGKCDRSY.js +2 -0
- package/dist/native/editor.js +1 -0
- package/dist/native/index.js +1 -0
- package/dist/native/notifications.js +1 -0
- package/dist/native/orb.js +1 -0
- package/dist/notifications.js +1 -1
- package/package.json +32 -6
- package/dist/chunk-77ZZDWR4.js +0 -2
- package/dist/chunk-ENHEJXVH.js +0 -2
- package/dist/chunk-VAMRF7HE.js +0 -2
- package/dist/chunk-ZE4S6DBP.js +0 -2
package/dist/chunk-ZE4S6DBP.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var TEXT_SCALE=["micro","caption","ui","body","lead","base","h4","h3","h2","h1","display","hero","title","mega"];var RADIUS_SCALE=["mark","xs","sm","field","card","lg","section","full"];var SHADOW_SCALE=["raise","tip","panel","pop","modal","toast","sheet"];var CONTAINER_SCALE=["page","shell","note","lead"];var ANIMATE_SCALE=["qfade","qslide","tip","tip-up","drawer","drawer-rtl","savebar","skeleton"];var COLOR_SCALE=["surface","bg","line","hover","ink","ink2","muted","muted2","border","soft","soft2","brand-100","brand-900","brand-ink","brand","brand-hover","brand-deep","skeleton","tint","tint2","mint","amber-900","amber","amber-bg","amber-ink","amber-line","amber-hover","green","green-bg","green-bg2","green-line","green-solid","violet","violet-bg","violet-line","violet-solid","red-100","red","red-bg","red-line","danger","danger-hover","night","hero-body","hero-meta","hero-dim","hero-text","code-bg","code-plain","code-key","code-tag","code-attr","code-str","code-num","code-note","code-dim","code-line","code-chip"];var TOKENS={"--font-sans":'"Alexandria", system-ui, sans-serif',"--color-surface":"#ffffff","--color-bg":"#f7f9f9","--color-line":"#edf1f1","--color-hover":"#f2f6f6","--color-ink":"#020809","--color-ink2":"#3d4545","--color-muted":"#5f6a6a","--color-muted2":"#687373","--color-border":"#7f8c8c","--color-soft":"#eaf2f3","--color-soft2":"#dceded","--color-brand-100":"#a5c9cc","--color-brand-900":"#0a2528","--color-brand-ink":"#0f4a4e","--color-brand":"#207982","--color-brand-hover":"#1a646c","--color-brand-deep":"#0b3b3e","--color-skeleton":"#d6dcdc","--color-tint":"#f4faf8","--color-tint2":"#eff6f3","--color-mint":"#7dd3c0","--color-amber-900":"#3d2a05","--color-amber":"#f8ac33","--color-amber-bg":"#fef6e9","--color-amber-ink":"#85570f","--color-amber-line":"#fbd79a","--color-amber-hover":"#de9219","--color-green":"#1e7a45","--color-green-bg":"#f1faf4","--color-green-bg2":"#e9f6ee","--color-green-line":"#bfe6ce","--color-green-solid":"#1e7a45","--color-violet":"#4b3e8e","--color-violet-bg":"#edeaf6","--color-violet-line":"#ded8ef","--color-violet-solid":"#6d5eb8","--color-red-100":"#f3a79e","--color-red":"#8e2b20","--color-red-bg":"#fdecea","--color-red-line":"#f3c9c4","--color-danger":"#c94134","--color-danger-hover":"#a3362b","--color-night":"#0b0f12","--color-hero-body":"#bfd9d8","--color-hero-meta":"#8fb3b2","--color-hero-dim":"#5e7a79","--color-hero-text":"#d7e3e2","--color-code-bg":"#1f1f1f","--color-code-plain":"#d4d4d4","--color-code-key":"#569cd6","--color-code-tag":"#4ec9b0","--color-code-attr":"#9cdcfe","--color-code-str":"#ce9178","--color-code-num":"#b5cea8","--color-code-note":"#6a9955","--color-code-dim":"#858585","--color-code-line":"#303031","--color-code-chip":"#f4f7f7","--text-micro":"11px","--text-caption":"12px","--text-ui":"13px","--text-body":"14px","--text-lead":"15px","--text-base":"16px","--text-base--line-height":"initial","--text-h4":"17px","--text-h3":"20px","--text-h2":"24px","--text-h1":"30px","--text-display":"36px","--text-hero":"44px","--text-title":"40px","--text-mega":"54px","--container-page":"1600px","--container-shell":"1600px","--container-note":"340px","--container-lead":"520px","--radius-mark":"3px","--radius-xs":"5px","--radius-sm":"7px","--radius-field":"9px","--radius-card":"12px","--radius-lg":"14px","--radius-section":"18px","--radius-full":"999px","--shadow-raise":"0 1px 3px var(--shadow-color)","--shadow-tip":"0 6px 18px var(--shadow-color)","--shadow-panel":"0 10px 30px var(--shadow-color)","--shadow-pop":"0 18px 44px var(--shadow-color)","--shadow-modal":"0 24px 60px rgb(2 8 9 / 0.28)","--shadow-toast":"0 16px 40px rgb(2 8 9 / 0.26)","--shadow-sheet":"0 -14px 40px rgb(2 8 9 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.06)","--shadow-color":"rgb(2 8 9 / 0.14)","--animate-qfade":"qfade 0.16s ease-out","--animate-qslide":"qslidein 0.22s ease-out","--animate-tip":"tip-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1)","--animate-tip-up":"tip-up 0.3s cubic-bezier(0.2, 0.9, 0.2, 1)","--animate-drawer":"drawer-ltr 0.32s cubic-bezier(0.2, 0.9, 0.2, 1)","--animate-drawer-rtl":"drawer-rtl 0.32s cubic-bezier(0.2, 0.9, 0.2, 1)","--animate-savebar":"savebar-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1)","--animate-skeleton":"skeleton-pulse 1.6s ease-in-out infinite","--num-align":"right","--num-align-far":"left","--num-pad-right":"0.875rem","--num-pad-left":"3.5rem","--num-icon-pad-right":"2.5rem","--num-icon-pad-left":"0.875rem"};var DARK_TOKENS={"--color-surface":"#101718","--color-bg":"#0a0f10","--color-line":"#1e2829","--color-hover":"#1a2425","--color-ink":"#f2f6f6","--color-ink2":"#c7d1d1","--color-muted":"#93a0a0","--color-muted2":"#7a8787","--color-border":"#5e6b6c","--color-soft":"#12363a","--color-soft2":"#17454a","--color-brand-ink":"#7dd3c0","--color-skeleton":"#2c3232","--color-amber":"#f8ac33","--color-amber-bg":"#2b2009","--color-amber-ink":"#f5c77a","--color-amber-line":"#5c4415","--color-green":"#6ecf9a","--color-green-bg":"#0d2119","--color-green-bg2":"#102a22","--color-green-line":"#245140","--color-violet":"#b9aeea","--color-violet-bg":"#1e1a33","--color-violet-line":"#38305c","--color-red":"#f3a79e","--color-red-bg":"#2c1613","--color-red-line":"#5c2a24","--color-code-chip":"#17201f","--shadow-color":"rgb(0 0 0 / 0.55)"};import{extendTailwindMerge}from"tailwind-merge";var twMerge=extendTailwindMerge({extend:{classGroups:{"font-size":[{text:TEXT_SCALE}],rounded:[{rounded:RADIUS_SCALE}],shadow:[{shadow:SHADOW_SCALE}],"max-w":[{"max-w":CONTAINER_SCALE}],animate:[{animate:ANIMATE_SCALE}]}}});function cn(...parts){return twMerge(parts.filter(p=>typeof p==="string"&&p.length>0).join(" "))}var TONE_SOFT={neutral:"bg-hover text-muted",brand:"bg-soft text-brand-ink",amber:"bg-amber-bg text-amber-ink",green:"bg-green-bg2 text-green",red:"bg-red-bg text-red",violet:"bg-violet-bg text-violet"};var TONE_SOLID={neutral:"bg-ink2 text-surface",brand:"bg-brand text-white",amber:"bg-amber text-amber-900",green:"bg-green-solid text-white",red:"bg-danger text-white",violet:"bg-violet-solid text-white"};function toLatinDigits(s){return s.replace(/[٠-٩۰-۹٫٬]/g,c=>{const code=c.charCodeAt(0);if(code===1643)return".";if(code===1644)return"";const base=code>=1776?1776:1632;return String(code-base)})}var VARIANTS={primary:"bg-brand border-brand text-white hover:bg-brand-hover",soft:"bg-soft border-soft2 text-brand-ink hover:bg-soft2",outline:"bg-surface border-border text-ink2 hover:border-brand hover:text-brand-ink",ghost:"bg-transparent border-transparent text-ink2 hover:bg-hover",danger:"bg-danger border-danger text-white hover:bg-danger-hover",link:"bg-transparent border-transparent text-brand-ink hover:underline underline-offset-4 px-0!"};var SIZES={sm:"h-9 px-3.5 gap-1.5 text-ui rounded-sm",md:"h-11 px-4 gap-2 text-body rounded-field",lg:"h-12 px-5 gap-2 text-lead rounded-card",xl:"h-14 px-5.5 gap-4 text-h3 font-extrabold rounded-field"};function buttonClasses(variant="primary",size="md",extra){return cn("inline-flex items-center justify-center border font-bold whitespace-nowrap","cursor-pointer transition-colors duration-150 select-none","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand",SIZES[size],VARIANTS[variant],extra)}import{createContext,useCallback,useContext,useSyncExternalStore}from"react";var langStore={subscribe(cb){if(typeof MutationObserver==="undefined")return()=>{};const o=new MutationObserver(cb);o.observe(document.documentElement,{attributes:true,attributeFilter:["lang"]});return()=>o.disconnect()},get:()=>typeof document==="undefined"?"ar-EG":document.documentElement.lang||"ar-EG"};var LocaleCtx=createContext(null);function useMoneyLocale(){const fromProvider=useContext(LocaleCtx);const serverSnapshot=useCallback(()=>fromProvider??"ar-EG",[fromProvider]);return useSyncExternalStore(langStore.subscribe,langStore.get,serverSnapshot)}function useMoneyLang(){return useMoneyLocale().startsWith("en")}var AR=0;var EN=1;var TEXT={close:["\u0625\u063A\u0644\u0627\u0642","Close"],select:["\u0627\u062E\u062A\u0631\u2026","Select\u2026"],search:["\u0627\u0628\u062D\u062B\u2026","Search\u2026"],searchEverything:["\u0627\u0628\u062D\u062B \u0641\u064A \u0643\u0644 \u062D\u0627\u062C\u0629\u2026","Search everything\u2026"],noResults:["\u0645\u0627\u0641\u064A\u0634 \u0646\u062A\u0627\u064A\u062C","No results"],searchOrAdd:["\u0627\u0628\u062D\u062B \u0623\u0648 \u0623\u0636\u0641\u2026","Search or add\u2026"],now:["\u0627\u0644\u0622\u0646","Now"],videoPlayer:["\u0645\u0634\u063A\u0651\u0644 \u0627\u0644\u0641\u064A\u062F\u064A\u0648","Video player"],rating:["\u0627\u0644\u062A\u0642\u064A\u064A\u0645","Rating"],activeFilters:["\u0627\u0644\u0641\u0644\u0627\u062A\u0631 \u0627\u0644\u0645\u0637\u0628\u0651\u0642\u0629:","Active filters:"],clearAll:["\u0645\u0633\u062D \u0627\u0644\u0643\u0644","Clear all"],row:["\u0635\u0641\u0651","row"],dropImages:["\u0627\u0633\u062D\u0628 \u0627\u0644\u0635\u0648\u0631 \u0647\u0646\u0627","Drop images here"],chooseFromDevice:["\u0627\u062E\u062A\u0631 \u0645\u0646 \u0627\u0644\u062C\u0647\u0627\u0632","Choose from device"],previousPeriod:["\u0627\u0644\u0641\u062A\u0631\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629","Previous period"],less:["\u0623\u0642\u0644","Less"],more:["\u0623\u0643\u062B\u0631","More"],totalSales:["\u0625\u062C\u0645\u0627\u0644\u064A \u0627\u0644\u0645\u0628\u064A\u0639\u0627\u062A","Total sales"],netToYou:["\u0635\u0627\u0641\u064A \u0644\u0643","Net to you"],verifiedAccount:["\u062D\u0633\u0627\u0628 \u0645\u0648\u062B\u0651\u0642","Verified account"],grabHint:["\u0639\u0646\u0635\u0631 \u0642\u0627\u0628\u0644 \u0644\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u062A\u0631\u062A\u064A\u0628. \u0627\u0636\u063A\u0637 \u0645\u0633\u0627\u0641\u0629 \u0644\u0645\u0633\u0643\u0647 \u062B\u0645 \u0627\u0644\u0623\u0633\u0647\u0645 \u0644\u062A\u062D\u0631\u064A\u0643\u0647.","Reorderable item. Press space to grab it, then the arrows to move it."],notifications:["\u0627\u0644\u0625\u0634\u0639\u0627\u0631\u0627\u062A","Notifications"],dismiss:["\u0625\u062E\u0641\u0627\u0621","Dismiss"],unread:["\u063A\u064A\u0631 \u0645\u0642\u0631\u0648\u0621","Unread"],noNotifications:["\u0645\u0641\u064A\u0634 \u0625\u0634\u0639\u0627\u0631\u0627\u062A","No notifications"],noNotificationsDesc:["\u0623\u0648\u0644 \u0645\u0627 \u064A\u062D\u0635\u0644 \u062D\u0627\u062C\u0629 \u062A\u0633\u062A\u0627\u0647\u0644\u060C \u0647\u062A\u0644\u0627\u0642\u064A\u0647\u0627 \u0647\u0646\u0627.","When something worth knowing happens, it lands here."],markAllRead:["\u062A\u0639\u0644\u064A\u0645 \u0627\u0644\u0643\u0644 \u0643\u0645\u0642\u0631\u0648\u0621","Mark all as read"],viewAllNotifications:["\u0639\u0631\u0636 \u0643\u0644 \u0627\u0644\u0625\u0634\u0639\u0627\u0631\u0627\u062A","View all notifications"],newNotifications:["\u0625\u0634\u0639\u0627\u0631\u0627\u062A \u062C\u062F\u064A\u062F\u0629","New notifications"],reloadPreview:["\u0625\u0639\u0627\u062F\u0629 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u0639\u0627\u064A\u0646\u0629","Reload preview"],previousMonth:["\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0644\u064A \u0642\u0628\u0644\u0647","Previous month"],nextMonth:["\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0644\u064A \u0628\u0639\u062F\u0647","Next month"],whatIsThisNumber:["\u0645\u0627 \u0645\u0639\u0646\u0649 \u0647\u0630\u0627 \u0627\u0644\u0631\u0642\u0645\u061F","What does this number mean?"],explainToMe:["\u0627\u0634\u0631\u062D \u0644\u064A","Explain this"],clearSearch:["\u0645\u0633\u062D \u0627\u0644\u0628\u062D\u062B","Clear search"],alerts:["\u0627\u0644\u062A\u0646\u0628\u064A\u0647\u0627\u062A","Alerts"],whatIsThisOption:["\u0645\u0627 \u0647\u0630\u0627 \u0627\u0644\u062E\u064A\u0627\u0631\u061F","What is this option?"],shouldBeHere:["\u0627\u0644\u0645\u0641\u0631\u0648\u0636 \u062A\u0643\u0648\u0646 \u0647\u0646\u0627","Should be here"],closeExplainer:["\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0634\u0631\u062D","Close explainer"],cancelRecording:["\u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u062A\u0633\u062C\u064A\u0644","Cancel recording"],sendRecording:["\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u062A\u0633\u062C\u064A\u0644","Send recording"],attachFile:["\u0625\u0631\u0641\u0627\u0642 \u0645\u0644\u0641","Attach file"],recordVoice:["\u062A\u0633\u062C\u064A\u0644 \u0635\u0648\u062A\u064A","Record a voice note"],playbackPosition:["\u0645\u0648\u0636\u0639 \u0627\u0644\u062A\u0634\u063A\u064A\u0644","Playback position"],volume:["\u0645\u0633\u062A\u0648\u0649 \u0627\u0644\u0635\u0648\u062A","Volume"],hideSuggestions:["\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D\u0627\u062A","Hide suggestions"],askShehab:["\u0627\u0633\u0623\u0644 \u0634\u0647\u0627\u0628\u2026","Ask Shehab\u2026"],shehabThinking:["\u0634\u0647\u0627\u0628 \u0628\u064A\u0641\u0643\u0651\u0631\u2026","Shehab is thinking\u2026"],undo:["\u062A\u0631\u0627\u062C\u0639","Undo"],from:["\u0645\u0646","from"],tryAnotherReply:["\u062C\u0631\u0651\u0628 \u0631\u062F \u062A\u0627\u0646\u064A","Try another reply"],helpfulReply:["\u0631\u062F \u0645\u0641\u064A\u062F","Helpful reply"],unhelpfulReply:["\u0631\u062F \u0645\u0634 \u0645\u0641\u064A\u062F","Unhelpful reply"],aiDisclaimer:["\u0634\u0647\u0627\u0628 \u0645\u0645\u0643\u0646 \u064A\u063A\u0644\u0637. \u0631\u0627\u062C\u0639 \u0627\u0644\u0623\u0631\u0642\u0627\u0645 \u0642\u0628\u0644 \u0645\u0627 \u062A\u062A\u0635\u0631\u0651\u0641 \u0639\u0644\u064A\u0647\u0627.","Shehab can get things wrong. Check the numbers before acting on them."],back10:["\u0631\u062C\u0648\u0639 \u0661\u0660 \u062B\u0648\u0627\u0646\u064A","Back 10 seconds"],forward10:["\u062A\u0642\u062F\u064A\u0645 \u0661\u0660 \u062B\u0648\u0627\u0646\u064A","Forward 10 seconds"],playbackSpeed:["\u0633\u0631\u0639\u0629 \u0627\u0644\u062A\u0634\u063A\u064A\u0644","Playback speed"],arabic:["\u0627\u0644\u0639\u0631\u0628\u064A\u0629","Arabic"],seeMore:["\u0634\u0648\u0641 \u0643\u0645\u0627\u0646","See more"],pictureInPicture:["\u0646\u0627\u0641\u0630\u0629 \u0639\u0627\u0626\u0645\u0629","Picture in picture"]};function useUIText(){return useMoneyLang()?BUNDLES[EN]:BUNDLES[AR]}function build(i){const out={};for(const key of Object.keys(TEXT))out[key]=TEXT[key][i];return out}var BUNDLES=[build(AR),build(EN)];import{useEffect,useId}from"react";import{AlertTriangle,CheckCircle2,Info,X,XCircle}from"lucide-react";import{jsx,jsxs}from"react/jsx-runtime";function Sheet({open,title,onClose,action,children,closeLabel}){const ui=useUIText();useEffect(()=>{if(!open)return;function onKey(e){if(e.key==="Escape")onClose()}document.addEventListener("keydown",onKey);return()=>document.removeEventListener("keydown",onKey)},[open,onClose]);if(!open)return null;return jsxs("div",{className:"fixed inset-0 z-50 flex flex-col justify-end",role:"dialog","aria-modal":"true","aria-label":title,children:[jsx("button",{type:"button","aria-label":closeLabel??ui.close,onClick:onClose,className:"flex-1 bg-black/50 backdrop-blur-[3px] cursor-default animate-[fade-in_0.2s_ease-out]"}),jsxs("div",{className:cn("bg-surface rounded-t-section max-h-[82dvh] flex flex-col overflow-clip shadow-sheet","animate-[sheet-up_0.26s_cubic-bezier(.22,.61,.36,1)]","pb-[env(safe-area-inset-bottom)]"),children:[jsx("button",{type:"button",onClick:onClose,"aria-label":closeLabel??ui.close,className:"shrink-0 pt-3 pb-1.5 flex justify-center cursor-grab active:cursor-grabbing",children:jsx("span",{"aria-hidden":"true",className:"h-1.5 w-11 rounded-full bg-border"})}),jsxs("div",{className:"shrink-0 flex items-center justify-between gap-3 px-5 pb-3",children:[jsx("span",{className:"text-h4 font-black tracking-tight",children:title}),jsxs("span",{className:"flex items-center gap-3",children:[action,jsx("button",{type:"button",onClick:onClose,"aria-label":closeLabel??ui.close,className:"size-9 rounded-full bg-bg flex items-center justify-center text-muted active:bg-hover active:scale-95 transition-transform cursor-pointer",children:jsx(X,{size:17,strokeWidth:2.4,"aria-hidden":"true"})})]})]}),jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-3 pb-4 flex flex-col overscroll-contain",children})]})]})}function Modal({open,title,description,onClose,footer,children,size="md",closeLabel}){const ui=useUIText();const titleId=useId();useEffect(()=>{if(!open)return;function onKey(e){if(e.key==="Escape")onClose()}document.addEventListener("keydown",onKey);return()=>document.removeEventListener("keydown",onKey)},[open,onClose]);if(!open)return null;const widths={sm:"max-w-md",md:"max-w-xl",lg:"max-w-3xl"};return jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":titleId,children:[jsx("button",{type:"button","aria-label":closeLabel??ui.close,onClick:onClose,className:"absolute inset-0 bg-black/45 backdrop-blur-[2px] cursor-default"}),jsxs("div",{className:cn("relative w-full bg-surface rounded-lg border border-line flex flex-col max-h-[85dvh] animate-qfade shadow-modal",widths[size]),children:[jsxs("header",{className:"shrink-0 flex items-start justify-between gap-4 p-5 border-b border-line",children:[jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[jsx("h2",{id:titleId,className:"text-h4 font-extrabold text-ink m-0",children:title}),description&&jsx("p",{className:"text-ui text-muted m-0",children:description})]}),jsx("button",{type:"button",onClick:onClose,"aria-label":closeLabel??ui.close,className:"shrink-0 size-8 rounded-sm flex items-center justify-center text-muted hover:bg-hover hover:text-ink transition-colors cursor-pointer",children:jsx(X,{size:17,"aria-hidden":"true"})})]}),children&&jsx("div",{className:"flex-1 min-h-0 overflow-y-auto p-5",children}),footer&&jsx("footer",{className:"shrink-0 flex items-center justify-end gap-2.5 p-5 border-t border-line",children:footer})]})]})}function Drawer({open,title,description,onClose,footer,children,bodyClassName,closeLabel}){const ui=useUIText();const titleId=useId();useEffect(()=>{if(!open)return;function onKey(e){if(e.key==="Escape")onClose()}document.addEventListener("keydown",onKey);return()=>document.removeEventListener("keydown",onKey)},[open,onClose]);if(!open)return null;return jsxs("div",{className:"fixed inset-0 z-50 flex",role:"dialog","aria-modal":"true","aria-labelledby":titleId,children:[jsx("button",{type:"button","aria-label":closeLabel??ui.close,onClick:onClose,className:"flex-1 bg-black/45 backdrop-blur-[2px] cursor-default"}),jsxs("aside",{className:"w-full sm:w-[420px] bg-surface border-s border-line flex flex-col animate-qfade",children:[jsxs("header",{className:"shrink-0 h-16 px-4 border-b border-line flex items-center justify-between gap-3",children:[jsxs("span",{className:"flex flex-col gap-0.5 min-w-0",children:[jsx("span",{id:titleId,className:"text-lead font-extrabold truncate",children:title}),description&&jsx("span",{className:"text-caption text-muted truncate",children:description})]}),jsx("button",{type:"button",onClick:onClose,"aria-label":closeLabel??ui.close,className:"shrink-0 size-8 rounded-sm flex items-center justify-center text-muted hover:bg-hover hover:text-ink transition-colors cursor-pointer",children:jsx(X,{size:17,"aria-hidden":"true"})})]}),children&&jsx("div",{className:cn("flex-1 min-h-0 overflow-y-auto",bodyClassName??"p-4"),children}),footer&&jsx("footer",{className:"shrink-0 p-4 border-t border-line flex gap-2.5",children:footer})]})]})}var ALERT_ICON={neutral:Info,brand:Info,amber:AlertTriangle,green:CheckCircle2,red:XCircle,violet:Info};var ALERT_BORDER={neutral:"border-line",brand:"border-soft2",amber:"border-amber-line",green:"border-green-line",red:"border-red-line",violet:"border-violet-line"};function Alert({tone="brand",title,children,actions}){const Icon=ALERT_ICON[tone];const urgent=tone==="red"||tone==="amber";return jsxs("div",{role:urgent?"alert":"status",className:cn("flex items-start gap-3 p-4 rounded-card border",TONE_SOFT[tone],ALERT_BORDER[tone]),children:[jsx(Icon,{size:18,strokeWidth:2,"aria-hidden":"true"}),jsxs("div",{className:"flex flex-col gap-1.5 flex-1 min-w-0",children:[title&&jsx("span",{className:"text-body font-extrabold",children:title}),children&&jsx("span",{className:"text-ui leading-[1.7] opacity-90 [text-wrap:pretty]",children}),actions&&jsx("span",{className:"flex items-center gap-2 mt-1",children:actions})]})]})}function Toast({children,action,icon}){return jsxs("div",{role:"status","aria-live":"polite",className:"flex items-center gap-3 px-4 py-3.5 rounded-card bg-brand-900 shadow-toast animate-[fade-in_0.18s_ease-out]",children:[icon??jsx(CheckCircle2,{size:17,className:"text-brand-100 shrink-0","aria-hidden":"true"}),jsx("span",{className:"text-body font-bold text-white flex-1",children}),action]})}function EmptyState({icon:Icon,title,description,action}){return jsxs("div",{className:"flex flex-col items-center justify-center gap-2.5 py-12 px-5 text-center",children:[Icon&&jsx("span",{"aria-hidden":"true",className:"size-12 rounded-card bg-hover flex items-center justify-center text-muted mb-1",children:jsx(Icon,{size:21})}),jsx("span",{className:"text-lead font-extrabold text-ink",children:title}),description&&jsx("span",{className:"text-ui leading-[1.75] text-muted max-w-note [text-wrap:pretty]",children:description}),action&&jsx("span",{className:"mt-1",children:action})]})}export{TEXT_SCALE,RADIUS_SCALE,SHADOW_SCALE,CONTAINER_SCALE,ANIMATE_SCALE,COLOR_SCALE,TOKENS,DARK_TOKENS,cn,TONE_SOFT,TONE_SOLID,toLatinDigits,buttonClasses,LocaleCtx,useMoneyLocale,useMoneyLang,useUIText,Sheet,Modal,Drawer,Alert,Toast,EmptyState};
|