@qumra/fanar 0.0.13 → 0.0.14
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 +8 -115
- package/dist/ai.js +1 -1
- package/dist/chunk-ENHEJXVH.js +2 -0
- package/dist/chunk-EXX6U5BJ.js +2 -0
- package/dist/{chunk-NIEWNSOB.js → chunk-GMIBQMMR.js} +1 -1
- package/dist/chunk-VAMRF7HE.js +2 -0
- package/dist/chunk-ZE4S6DBP.js +2 -0
- package/dist/editor.js +1 -1
- package/dist/index.d.ts +174 -293
- package/dist/index.js +1 -1
- package/dist/notifications.js +1 -1
- package/package.json +6 -32
- package/dist/chunk-3EPEIAG2.js +0 -2
- package/dist/chunk-6DTSIOCB.js +0 -2
- package/dist/chunk-CTMW25W5.js +0 -2
- package/dist/chunk-K3TNXSD7.js +0 -2
- package/dist/native/ai.js +0 -1
- package/dist/native/chunk-LZHT3H7B.js +0 -1
- package/dist/native/chunk-RGKCDRSY.js +0 -2
- package/dist/native/editor.js +0 -1
- package/dist/native/index.js +0 -1
- package/dist/native/notifications.js +0 -1
- package/dist/native/orb.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -180,21 +180,6 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
180
180
|
}
|
|
181
181
|
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
182
182
|
|
|
183
|
-
/**
|
|
184
|
-
* Sets the display language for every Qumra component in the tree.
|
|
185
|
-
*
|
|
186
|
-
* ── نفس الاسم على المنصّتين ────────────────────────────────────────────
|
|
187
|
-
* النيتف مافيهوش `<html lang>`، فـ`lang.native.ts` بيمسك التبديل في
|
|
188
|
-
* مخزن جوّه الموديول. والويب مصدره الـDOM — فالتبديل هنا **بيكتب في
|
|
189
|
-
* المصدر نفسه** بدل ما يعمل مخزن تاني جنبه.
|
|
190
|
-
*
|
|
191
|
-
* والنتيجة إن `setLang('en-US')` بتشتغل زي بعضها على الاتنين، وإن الويب
|
|
192
|
-
* مافيهوش مصدرين للحقيقة يتخانقوا: `langStore` بيراقب السمة وبيعيد
|
|
193
|
-
* الرسم لوحده.
|
|
194
|
-
*
|
|
195
|
-
* `null` بترجّع للافتراضي (`ar-EG`).
|
|
196
|
-
*/
|
|
197
|
-
declare function setLang(tag: string | null): void;
|
|
198
183
|
/**
|
|
199
184
|
* لغة الصفحة كاملةً — لا `boolean`.
|
|
200
185
|
*
|
|
@@ -313,7 +298,6 @@ type UITextKey = keyof typeof TEXT;
|
|
|
313
298
|
declare function useUIText(): Record<"select" | "search" | "row" | "from" | "close" | "searchEverything" | "noResults" | "searchOrAdd" | "now" | "videoPlayer" | "rating" | "activeFilters" | "clearAll" | "dropImages" | "chooseFromDevice" | "previousPeriod" | "less" | "more" | "totalSales" | "netToYou" | "verifiedAccount" | "grabHint" | "notifications" | "dismiss" | "unread" | "noNotifications" | "noNotificationsDesc" | "markAllRead" | "viewAllNotifications" | "newNotifications" | "reloadPreview" | "previousMonth" | "nextMonth" | "whatIsThisNumber" | "explainToMe" | "clearSearch" | "alerts" | "whatIsThisOption" | "shouldBeHere" | "closeExplainer" | "cancelRecording" | "sendRecording" | "attachFile" | "recordVoice" | "playbackPosition" | "volume" | "hideSuggestions" | "askShehab" | "shehabThinking" | "undo" | "tryAnotherReply" | "helpfulReply" | "unhelpfulReply" | "aiDisclaimer" | "back10" | "forward10" | "playbackSpeed" | "arabic" | "seeMore" | "pictureInPicture", string>;
|
|
314
299
|
|
|
315
300
|
type FieldSize = 'sm' | 'md' | 'lg';
|
|
316
|
-
|
|
317
301
|
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
318
302
|
label?: ReactNode;
|
|
319
303
|
/** فعل ثانوي جنب التسمية — «سجّل بالبريد بدل الهاتف» مثلاً */
|
|
@@ -390,30 +374,13 @@ declare function Switch({ checked, onCheckedChange, label, description, disabled
|
|
|
390
374
|
id?: string;
|
|
391
375
|
}): react.JSX.Element;
|
|
392
376
|
|
|
393
|
-
/**
|
|
394
|
-
* قواعد المبالغ ورموزها — **مشتركة بين الويب والنيتف**.
|
|
395
|
-
*
|
|
396
|
-
* التنسيق (`format`) واختيار الشكل (`resolve`) **منطق خالص**، ونسخهم
|
|
397
|
-
* معناه إن مبلغ يتكتب `١٬٢٥٠٫٥٠` على الويب و`1,250.50` على الموبايل.
|
|
398
|
-
* الشرح الكامل لكل قرار في `Money.tsx`.
|
|
399
|
-
*/
|
|
400
|
-
|
|
401
|
-
/** الشكل المعروض للوحدة */
|
|
402
|
-
type Base = 'short' | 'word' | 'code' | 'sign';
|
|
403
|
-
/**
|
|
404
|
-
* الشكل المطلوب — و`best` رأي المكتبة لكل عملة.
|
|
405
|
-
*
|
|
406
|
-
* `short` الاختصار العربي · `word` الكلمة · `code` رمز ISO ·
|
|
407
|
-
* `sign` الرمز المرسوم.
|
|
408
|
-
*/
|
|
409
|
-
type SymbolStyle = Base | 'best';
|
|
410
377
|
declare const CURRENCY: {
|
|
411
378
|
SAR: {
|
|
412
379
|
short: string;
|
|
413
380
|
word: string;
|
|
414
381
|
best: "sign";
|
|
415
382
|
code: string;
|
|
416
|
-
sign:
|
|
383
|
+
sign: react.JSX.Element;
|
|
417
384
|
name: string;
|
|
418
385
|
en: string;
|
|
419
386
|
decimals: number;
|
|
@@ -473,7 +440,7 @@ declare const CURRENCY: {
|
|
|
473
440
|
word: string;
|
|
474
441
|
best: "word";
|
|
475
442
|
code: string;
|
|
476
|
-
sign:
|
|
443
|
+
sign: react.JSX.Element;
|
|
477
444
|
name: string;
|
|
478
445
|
en: string;
|
|
479
446
|
decimals: number;
|
|
@@ -623,7 +590,7 @@ declare const CURRENCY: {
|
|
|
623
590
|
word: string;
|
|
624
591
|
best: "sign";
|
|
625
592
|
code: string;
|
|
626
|
-
sign:
|
|
593
|
+
sign: react.JSX.Element;
|
|
627
594
|
name: string;
|
|
628
595
|
en: string;
|
|
629
596
|
decimals: number;
|
|
@@ -633,7 +600,7 @@ declare const CURRENCY: {
|
|
|
633
600
|
word: string;
|
|
634
601
|
best: "sign";
|
|
635
602
|
code: string;
|
|
636
|
-
sign:
|
|
603
|
+
sign: react.JSX.Element;
|
|
637
604
|
name: string;
|
|
638
605
|
en: string;
|
|
639
606
|
decimals: number;
|
|
@@ -643,29 +610,65 @@ declare const CURRENCY: {
|
|
|
643
610
|
word: string;
|
|
644
611
|
best: "sign";
|
|
645
612
|
code: string;
|
|
646
|
-
sign:
|
|
613
|
+
sign: react.JSX.Element;
|
|
647
614
|
name: string;
|
|
648
615
|
en: string;
|
|
649
616
|
decimals: number;
|
|
650
617
|
};
|
|
651
618
|
};
|
|
619
|
+
/** The displayed unit form */
|
|
620
|
+
/** The explicit forms — each names one exact shape */
|
|
621
|
+
type Base = 'short' | 'word' | 'code' | 'sign';
|
|
622
|
+
/**
|
|
623
|
+
* The displayed unit form.
|
|
624
|
+
*
|
|
625
|
+
* `short` Arabic abbreviation · `word` the word · `code` the ISO code ·
|
|
626
|
+
* `sign` the graphic symbol · `best` whatever the library picks.
|
|
627
|
+
*
|
|
628
|
+
* ## `best` is an opinion, not an algorithm
|
|
629
|
+
*
|
|
630
|
+
* Every currency has a row in the table saying which form reads fastest **for
|
|
631
|
+
* that currency**, because the answer differs between them:
|
|
632
|
+
*
|
|
633
|
+
* - Saudi riyal → its symbol, because it has an official one its readers know
|
|
634
|
+
* - Pound, dinar, dirham → the word, because they have no official symbol
|
|
635
|
+
* and the abbreviation takes two characters before it means anything
|
|
636
|
+
* - Dollar, euro, sterling → their symbols, which read worldwide and are
|
|
637
|
+
* shorter than spelling them out
|
|
638
|
+
*
|
|
639
|
+
* Derive these from one rule ("symbol if there is one") and the Egyptian
|
|
640
|
+
* pound comes out as `£` — technically correct, and read as *sterling* in
|
|
641
|
+
* Egypt. A written opinion per currency is truer than a rule that looks
|
|
642
|
+
* tidier.
|
|
643
|
+
*
|
|
644
|
+
* ## In English
|
|
645
|
+
*
|
|
646
|
+
* `best` becomes the symbol where one exists and the ISO code otherwise. The
|
|
647
|
+
* Arabic word means nothing on an English page, and «جنيه» is not rendered as
|
|
648
|
+
* "pound" because that conflates it with sterling.
|
|
649
|
+
*/
|
|
650
|
+
type SymbolStyle = Base | 'best';
|
|
652
651
|
type Currency = keyof typeof CURRENCY;
|
|
652
|
+
/**
|
|
653
|
+
* Checks a currency code coming from the server before passing it to `Money`.
|
|
654
|
+
*
|
|
655
|
+
* ## Why a guard and not `as`
|
|
656
|
+
*
|
|
657
|
+
* `Money.currency` is a closed union and servers return `string`, so every
|
|
658
|
+
* caller was writing `code as Currency` — which **silences rather than
|
|
659
|
+
* checks**: an unknown code (`XYZ`, or an empty field) passes through and
|
|
660
|
+
* then fails at the table lookup.
|
|
661
|
+
*
|
|
662
|
+
* The guard turns the unknown into `undefined`, and `Money` then falls back
|
|
663
|
+
* to the store currency from `MoneyProvider` — which is the **right**
|
|
664
|
+
* behaviour: showing the amount in the dashboard's currency does less damage
|
|
665
|
+
* than showing it with the wrong symbol, or none.
|
|
666
|
+
*
|
|
667
|
+
* ```tsx
|
|
668
|
+
* <Money value={total} currency={isCurrency(code) ? code : undefined} />
|
|
669
|
+
* ```
|
|
670
|
+
*/
|
|
653
671
|
declare function isCurrency(c?: string | null): c is Currency;
|
|
654
|
-
declare const SIZE$1: {
|
|
655
|
-
readonly inherit: "";
|
|
656
|
-
readonly sm: "text-caption";
|
|
657
|
-
readonly md: "text-ui";
|
|
658
|
-
readonly lg: "text-body font-extrabold";
|
|
659
|
-
readonly xl: "text-h2 font-black";
|
|
660
|
-
};
|
|
661
|
-
declare const TONE: {
|
|
662
|
-
readonly inherit: "";
|
|
663
|
-
readonly muted: "text-muted";
|
|
664
|
-
readonly ink: "text-ink";
|
|
665
|
-
readonly green: "text-green";
|
|
666
|
-
readonly red: "text-red";
|
|
667
|
-
};
|
|
668
|
-
|
|
669
672
|
declare function MoneyProvider({ currency, locale, children, }: {
|
|
670
673
|
currency: Currency;
|
|
671
674
|
/**
|
|
@@ -686,40 +689,26 @@ declare function MoneyProvider({ currency, locale, children, }: {
|
|
|
686
689
|
* header, the "priced in …" line.
|
|
687
690
|
*/
|
|
688
691
|
declare function useCurrency(): Currency;
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
* survives being small because it is two characters, and the symbol survives
|
|
704
|
-
* because it is a single shape.
|
|
705
|
-
*
|
|
706
|
-
* ## And the letters are slightly tracked
|
|
707
|
-
*
|
|
708
|
-
* `tracking-wide` separates the word from the number visually without adding
|
|
709
|
-
* a space — so it reads as an attached unit, not as the next word in the line.
|
|
710
|
-
*/
|
|
711
|
-
/**
|
|
712
|
-
* Resolves `best` into an explicit form — the one place that holds the opinion.
|
|
713
|
-
*
|
|
714
|
-
* Kept out of `Money` because `currencySymbol` needs it too: a column header
|
|
715
|
-
* and a field suffix have to match what their own rows display.
|
|
716
|
-
*/
|
|
692
|
+
declare const SIZE: {
|
|
693
|
+
readonly inherit: "";
|
|
694
|
+
readonly sm: "text-caption";
|
|
695
|
+
readonly md: "text-ui";
|
|
696
|
+
readonly lg: "text-body font-extrabold";
|
|
697
|
+
readonly xl: "text-h2 font-black";
|
|
698
|
+
};
|
|
699
|
+
declare const TONE: {
|
|
700
|
+
readonly inherit: "";
|
|
701
|
+
readonly muted: "text-muted";
|
|
702
|
+
readonly ink: "text-ink";
|
|
703
|
+
readonly green: "text-green";
|
|
704
|
+
readonly red: "text-red";
|
|
705
|
+
};
|
|
717
706
|
interface MoneyProps {
|
|
718
707
|
/** The amount in major units — pounds, not piastres */
|
|
719
708
|
value: number;
|
|
720
709
|
/** A local override that beats the store currency — a dollar price in an Egyptian store */
|
|
721
710
|
currency?: Currency;
|
|
722
|
-
size?: keyof typeof SIZE
|
|
711
|
+
size?: keyof typeof SIZE;
|
|
723
712
|
/**
|
|
724
713
|
* The colour.
|
|
725
714
|
*
|
|
@@ -798,19 +787,14 @@ declare const currencyName: (c?: Currency) => string;
|
|
|
798
787
|
*/
|
|
799
788
|
declare function useCurrencySymbol(c?: Currency, style?: SymbolStyle): ReactNode;
|
|
800
789
|
|
|
801
|
-
|
|
802
|
-
* أنماط العدّاد — **مشتركة بين الويب والنيتف**.
|
|
803
|
-
* نفس سبب `Display.variants.ts`.
|
|
804
|
-
*/
|
|
805
|
-
type StepperSize = 'sm' | 'md' | 'lg';
|
|
806
|
-
|
|
790
|
+
type Size = 'sm' | 'md' | 'lg';
|
|
807
791
|
interface NumberStepperProps {
|
|
808
792
|
value: number;
|
|
809
793
|
onChange: (v: number) => void;
|
|
810
794
|
min?: number;
|
|
811
795
|
max?: number;
|
|
812
796
|
step?: number;
|
|
813
|
-
size?:
|
|
797
|
+
size?: Size;
|
|
814
798
|
/** وحدة صغيرة بجانب الرقم — «قطعة»، «كجم» */
|
|
815
799
|
unit?: ReactNode;
|
|
816
800
|
/**
|
|
@@ -828,6 +812,22 @@ interface NumberStepperProps {
|
|
|
828
812
|
}
|
|
829
813
|
declare function NumberStepper({ value, onChange, min, max, step, size, unit, onRemove, disabled, label, className, }: NumberStepperProps): react.JSX.Element;
|
|
830
814
|
|
|
815
|
+
/**
|
|
816
|
+
* علامة واتساب.
|
|
817
|
+
*
|
|
818
|
+
* ── لماذا مرسومة ولماذا مصمتة ───────────────────────────────────────────
|
|
819
|
+
* كانت `MessageCircle` من lucide، وهي فقاعة كلام عامّة. وفقاعة عامّة
|
|
820
|
+
* بجانب فقاعة الرسائل النصّيّة تجعل الزرّين متشابهين، والمستخدم يقرأ
|
|
821
|
+
* «رسالة» و«رسالة» فيتردّد قبل كلّ ضغطة.
|
|
822
|
+
*
|
|
823
|
+
* والعلامة مصمتة بين أيقونات محدّدة الخطوط عن قصد: علامة الخدمة تُعرف
|
|
824
|
+
* بشكلها لا بأسلوب المجموعة، وتحويلها إلى خطوط لتناسب البقيّة يفقدها
|
|
825
|
+
* الشيء الوحيد الذي تؤدّيه. والمسار من `simple-icons` — لا مرسوم
|
|
826
|
+
* بالتقدير، لأن علامة خدمة تُخمَّن تخرج علامةً أخرى.
|
|
827
|
+
*/
|
|
828
|
+
declare function WhatsAppIcon({ size, ...rest }: React.SVGProps<SVGSVGElement> & {
|
|
829
|
+
size?: number;
|
|
830
|
+
}): react.JSX.Element;
|
|
831
831
|
interface PhoneParts {
|
|
832
832
|
/** المفتاح الدوليّ بلا `+` — فارغ إن لم يُعرف */
|
|
833
833
|
dial: string;
|
|
@@ -855,44 +855,6 @@ declare function parsePhone(raw: string, defaultDial?: string): PhoneParts;
|
|
|
855
855
|
* و`spaces` لمن يريد الصورة الدوليّة الخام: `101 234 5678`.
|
|
856
856
|
*/
|
|
857
857
|
type PhoneFormat = 'parens' | 'spaces';
|
|
858
|
-
/**
|
|
859
|
-
* `inherit` لا مقاس ولا وزن ولا لون — للرقم داخل صفّ يحدّد تنسيقه
|
|
860
|
-
* أصلاً. والمكوّن هناك للاتّجاه والتقطيع لا للحجم.
|
|
861
|
-
*/
|
|
862
|
-
declare const SIZE: {
|
|
863
|
-
readonly inherit: "";
|
|
864
|
-
readonly sm: "text-caption";
|
|
865
|
-
readonly md: "text-ui";
|
|
866
|
-
};
|
|
867
|
-
type PhoneSize = keyof typeof SIZE;
|
|
868
|
-
|
|
869
|
-
/**
|
|
870
|
-
* علامة واتساب.
|
|
871
|
-
*
|
|
872
|
-
* ── لماذا مرسومة ولماذا مصمتة ───────────────────────────────────────────
|
|
873
|
-
* كانت `MessageCircle` من lucide، وهي فقاعة كلام عامّة. وفقاعة عامّة
|
|
874
|
-
* بجانب فقاعة الرسائل النصّيّة تجعل الزرّين متشابهين، والمستخدم يقرأ
|
|
875
|
-
* «رسالة» و«رسالة» فيتردّد قبل كلّ ضغطة.
|
|
876
|
-
*
|
|
877
|
-
* والعلامة مصمتة بين أيقونات محدّدة الخطوط عن قصد: علامة الخدمة تُعرف
|
|
878
|
-
* بشكلها لا بأسلوب المجموعة، وتحويلها إلى خطوط لتناسب البقيّة يفقدها
|
|
879
|
-
* الشيء الوحيد الذي تؤدّيه. والمسار من `simple-icons` — لا مرسوم
|
|
880
|
-
* بالتقدير، لأن علامة خدمة تُخمَّن تخرج علامةً أخرى.
|
|
881
|
-
*/
|
|
882
|
-
declare function WhatsAppIcon({ size, ...rest }: React.SVGProps<SVGSVGElement> & {
|
|
883
|
-
size?: number;
|
|
884
|
-
}): react.JSX.Element;
|
|
885
|
-
/**
|
|
886
|
-
* قواعد التجميع لكل مفتاح دوليّ.
|
|
887
|
-
*
|
|
888
|
-
* المجموعات من الطول المحلّيّ **بعد** المفتاح وبعد نزع الصفر الوطنيّ:
|
|
889
|
-
* `+20 112 505 2692` محلّيّه `1125052692` فقاعدته `[3, 3, 4]` لا
|
|
890
|
-
* `[3, 4, 4]` — والفرق أن الصفر يُكتب في `01125052692` ولا يُكتب في
|
|
891
|
-
* الصورة الدوليّة، فمن يعدّه في القاعدة يُزيح كل مجموعة بعده.
|
|
892
|
-
*
|
|
893
|
-
* وما زاد على القاعدة يُجمَّع ثلاثات: أفضل من سطر متّصل، وأصدق من
|
|
894
|
-
* ادّعاء قاعدة بلد لا نعرفها.
|
|
895
|
-
*/
|
|
896
858
|
interface PhoneProps {
|
|
897
859
|
/** الرقم كما هو في البيانات — منسَّقاً أو خاماً */
|
|
898
860
|
value: string;
|
|
@@ -913,7 +875,7 @@ interface PhoneProps {
|
|
|
913
875
|
* تنسيقه أصلاً: سطر ثانٍ تحت اسم عميل، أو سطر عنوان فرع.
|
|
914
876
|
* والمكوّن هناك للاتّجاه والتقطيع لا للحجم.
|
|
915
877
|
*/
|
|
916
|
-
size?:
|
|
878
|
+
size?: 'inherit' | 'sm' | 'md';
|
|
917
879
|
className?: string;
|
|
918
880
|
}
|
|
919
881
|
/**
|
|
@@ -930,17 +892,6 @@ interface PhoneProps {
|
|
|
930
892
|
*/
|
|
931
893
|
declare function Phone({ value, defaultDial, format, mask, call, sms, whatsapp, size, className, }: PhoneProps): react.JSX.Element;
|
|
932
894
|
|
|
933
|
-
/**
|
|
934
|
-
* قواعد القيم التقنية وأنماطها — **مشتركة بين الويب والنيتف**.
|
|
935
|
-
*
|
|
936
|
-
* `normalizeHex` **منطق خالص** وبيتنادى من المكوّن ومن التطبيق —
|
|
937
|
-
* ونسخته معناها إن `#abc` بتتفكّ لستّ خانات في منصّة وتفضل تلاتة في
|
|
938
|
-
* التانية.
|
|
939
|
-
*/
|
|
940
|
-
type TechnicalKind = 'hex' | 'url' | 'slug' | 'code' | 'id';
|
|
941
|
-
/** يرجّع `#RRGGBB` بحروف كبيرة، أو `null` لو القيمة ليست لوناً بعد */
|
|
942
|
-
declare function normalizeHex(input: string): string | null;
|
|
943
|
-
|
|
944
895
|
/**
|
|
945
896
|
* القيم التقنية داخل واجهة عربية.
|
|
946
897
|
*
|
|
@@ -962,6 +913,7 @@ declare function normalizeHex(input: string): string | null;
|
|
|
962
913
|
* `[dir=rtl]_&` لا `rtl:` — لأن `dir="ltr"` موضوع على العنصر نفسه،
|
|
963
914
|
* فسمة `rtl:` لن تنطبق عليه أبداً؛ والاستعلام لا بدّ أن يسأل عن **جدّه**.
|
|
964
915
|
*/
|
|
916
|
+
type TechnicalKind = 'hex' | 'url' | 'slug' | 'code' | 'id';
|
|
965
917
|
interface TechnicalInputProps extends Omit<InputProps, 'numeric' | 'type' | 'dir'> {
|
|
966
918
|
/** نوع القيمة — يضبط لوحة المفاتيح والتلميح فقط، لا يفرض تحقّقاً */
|
|
967
919
|
kind?: TechnicalKind;
|
|
@@ -995,6 +947,8 @@ declare function ColorField({ label, note, value, onChange, disabled, id: idProp
|
|
|
995
947
|
disabled?: boolean;
|
|
996
948
|
id?: string;
|
|
997
949
|
}): react.JSX.Element;
|
|
950
|
+
/** يرجّع `#RRGGBB` بحروف كبيرة، أو `null` لو القيمة ليست لوناً بعد */
|
|
951
|
+
declare function normalizeHex(input: string): string | null;
|
|
998
952
|
|
|
999
953
|
interface Product3DViewerProps {
|
|
1000
954
|
/** رابط الموديل — GLB أو GLTF */
|
|
@@ -1038,7 +992,6 @@ interface TabItem {
|
|
|
1038
992
|
count?: number;
|
|
1039
993
|
icon?: ComponentType<{
|
|
1040
994
|
size?: number;
|
|
1041
|
-
color?: string;
|
|
1042
995
|
}>;
|
|
1043
996
|
}
|
|
1044
997
|
/**
|
|
@@ -1076,23 +1029,6 @@ declare function FilterChips({ chips, onClearAll, label, clearAllLabel, }: {
|
|
|
1076
1029
|
clearAllLabel?: string;
|
|
1077
1030
|
}): react.JSX.Element | null;
|
|
1078
1031
|
|
|
1079
|
-
/**
|
|
1080
|
-
* أنماط الأسطح — **مشتركة بين الويب والنيتف**.
|
|
1081
|
-
* نفس سبب `Display.variants.ts`.
|
|
1082
|
-
*
|
|
1083
|
-
* ── واللي بيخصّ الويب مفصول صراحةً ───────────────────────────────────────
|
|
1084
|
-
* التموضع الثابت (`fixed inset-0 z-50`) والتبلير والحركات كلها بتخصّ
|
|
1085
|
-
* المتصفّح — RN بيرسم الأسطح جوّه `<Modal>` وهو بيتكفّل بالطبقة. الثوابت
|
|
1086
|
-
* اللي فيها `WEB` في اسمها هي دي.
|
|
1087
|
-
*/
|
|
1088
|
-
|
|
1089
|
-
declare const MODAL_WIDTHS: {
|
|
1090
|
-
readonly sm: "max-w-md";
|
|
1091
|
-
readonly md: "max-w-xl";
|
|
1092
|
-
readonly lg: "max-w-3xl";
|
|
1093
|
-
};
|
|
1094
|
-
type ModalSize = keyof typeof MODAL_WIDTHS;
|
|
1095
|
-
|
|
1096
1032
|
/**
|
|
1097
1033
|
* الـaction sheet — كل حاجة بتطلع من تحت على الموبايل.
|
|
1098
1034
|
*
|
|
@@ -1116,7 +1052,7 @@ declare function Modal({ open, title, description, onClose, footer, children, si
|
|
|
1116
1052
|
onClose: () => void;
|
|
1117
1053
|
footer?: ReactNode;
|
|
1118
1054
|
children?: ReactNode;
|
|
1119
|
-
size?:
|
|
1055
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1120
1056
|
closeLabel?: string;
|
|
1121
1057
|
}): react.JSX.Element | null;
|
|
1122
1058
|
/** بيفتح من inline-end — الشمال في العربي واليمين في الإنجليزي، لوحده */
|
|
@@ -1149,20 +1085,13 @@ declare function Toast({ children, action, icon, }: {
|
|
|
1149
1085
|
declare function EmptyState({ icon: Icon, title, description, action, }: {
|
|
1150
1086
|
icon?: ComponentType<{
|
|
1151
1087
|
size?: number;
|
|
1152
|
-
color?: string;
|
|
1153
1088
|
}>;
|
|
1154
1089
|
title: ReactNode;
|
|
1155
1090
|
description?: ReactNode;
|
|
1156
1091
|
action?: ReactNode;
|
|
1157
1092
|
}): react.JSX.Element;
|
|
1158
1093
|
|
|
1159
|
-
/**
|
|
1160
|
-
* أنماط التوستات والتلميحة — **مشتركة بين الويب والنيتف**.
|
|
1161
|
-
* نفس سبب `Display.variants.ts`.
|
|
1162
|
-
*/
|
|
1163
|
-
|
|
1164
1094
|
type ToastTone = Extract<Tone, 'brand' | 'green' | 'amber' | 'red'> | 'neutral';
|
|
1165
|
-
|
|
1166
1095
|
interface ToastItem {
|
|
1167
1096
|
id: number;
|
|
1168
1097
|
tone: ToastTone;
|
|
@@ -1246,15 +1175,6 @@ declare function Tooltip({ content, children, side, }: {
|
|
|
1246
1175
|
side?: 'top' | 'bottom';
|
|
1247
1176
|
}): react.JSX.Element;
|
|
1248
1177
|
|
|
1249
|
-
/**
|
|
1250
|
-
* أنماط القوايم وفلترتها — **مشتركة بين الويب والنيتف**.
|
|
1251
|
-
*
|
|
1252
|
-
* القاعدة اللي المكتبة الأصلية بتقولها في قسم ٠٣:
|
|
1253
|
-
* أقل من ٦ خيارات → أزرار مجزّأة (`Tabs variant="segmented"`)
|
|
1254
|
-
* ٦ لـ١٥ خيار → `Dropdown` من غير بحث
|
|
1255
|
-
* أكتر من ١٥ → `Combobox` ببحث
|
|
1256
|
-
*/
|
|
1257
|
-
|
|
1258
1178
|
interface Option {
|
|
1259
1179
|
value: string;
|
|
1260
1180
|
label: string;
|
|
@@ -1263,15 +1183,6 @@ interface Option {
|
|
|
1263
1183
|
icon?: ReactNode;
|
|
1264
1184
|
disabled?: boolean;
|
|
1265
1185
|
}
|
|
1266
|
-
interface CommandItem {
|
|
1267
|
-
id: string;
|
|
1268
|
-
title: string;
|
|
1269
|
-
meta?: string;
|
|
1270
|
-
icon?: ReactNode;
|
|
1271
|
-
group: string;
|
|
1272
|
-
onRun?: () => void;
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
1186
|
declare function Dropdown({ label, value, onChange, options, placeholder, className, }: {
|
|
1276
1187
|
label?: ReactNode;
|
|
1277
1188
|
value: string | null;
|
|
@@ -1305,6 +1216,14 @@ declare function MultiSelect({ label, values, onChange, options, placeholder, cr
|
|
|
1305
1216
|
onCreate?: (query: string) => void;
|
|
1306
1217
|
className?: string;
|
|
1307
1218
|
}): react.JSX.Element;
|
|
1219
|
+
interface CommandItem {
|
|
1220
|
+
id: string;
|
|
1221
|
+
title: string;
|
|
1222
|
+
meta?: string;
|
|
1223
|
+
icon?: ReactNode;
|
|
1224
|
+
group: string;
|
|
1225
|
+
onRun?: () => void;
|
|
1226
|
+
}
|
|
1308
1227
|
/**
|
|
1309
1228
|
* لوحة الأوامر — ⌘K.
|
|
1310
1229
|
*
|
|
@@ -1325,7 +1244,6 @@ interface AccordionItem {
|
|
|
1325
1244
|
description?: ReactNode;
|
|
1326
1245
|
icon?: ComponentType<{
|
|
1327
1246
|
size?: number;
|
|
1328
|
-
color?: string;
|
|
1329
1247
|
}>;
|
|
1330
1248
|
children: ReactNode;
|
|
1331
1249
|
}
|
|
@@ -1478,7 +1396,6 @@ declare function presets(today: Date): {
|
|
|
1478
1396
|
label: string;
|
|
1479
1397
|
range: Range;
|
|
1480
1398
|
}[];
|
|
1481
|
-
|
|
1482
1399
|
declare function DateRangePicker({ value, onChange, month, onMonthChange, today, className, }: {
|
|
1483
1400
|
value: Range;
|
|
1484
1401
|
onChange: (range: Range) => void;
|
|
@@ -1490,10 +1407,6 @@ declare function DateRangePicker({ value, onChange, month, onMonthChange, today,
|
|
|
1490
1407
|
className?: string;
|
|
1491
1408
|
}): react.JSX.Element;
|
|
1492
1409
|
|
|
1493
|
-
/**
|
|
1494
|
-
* أنماط الرفع وصيغته — **مشتركة بين الويب والنيتف**.
|
|
1495
|
-
* نفس سبب `Display.variants.ts`.
|
|
1496
|
-
*/
|
|
1497
1410
|
type UploadState = 'uploading' | 'done' | 'rejected';
|
|
1498
1411
|
interface UploadFile {
|
|
1499
1412
|
id: string;
|
|
@@ -1505,11 +1418,10 @@ interface UploadFile {
|
|
|
1505
1418
|
progress?: number;
|
|
1506
1419
|
/** سبب الرفض — لازم يتكتب، «فشل» لوحدها مش معلومة */
|
|
1507
1420
|
error?: string;
|
|
1508
|
-
/** رابط معاينة
|
|
1421
|
+
/** رابط معاينة (object URL أو data URI) */
|
|
1509
1422
|
preview?: string;
|
|
1510
1423
|
}
|
|
1511
1424
|
declare function formatBytes(bytes: number): string;
|
|
1512
|
-
|
|
1513
1425
|
declare function Dropzone({ onFiles, accept, multiple, disabled, title, hint, buttonLabel, className, }: {
|
|
1514
1426
|
onFiles: (files: File[]) => void;
|
|
1515
1427
|
accept?: string;
|
|
@@ -1731,8 +1643,6 @@ interface BrowserFrameProps {
|
|
|
1731
1643
|
}
|
|
1732
1644
|
declare function BrowserFrame({ url, device, tab, nav, loading, contentWidth, onScale, onReload, children, className, }: BrowserFrameProps): react.JSX.Element;
|
|
1733
1645
|
|
|
1734
|
-
type ShareTone = 'brand' | 'amber' | 'red' | 'muted';
|
|
1735
|
-
|
|
1736
1646
|
interface BarSeries {
|
|
1737
1647
|
label: string;
|
|
1738
1648
|
values: number[];
|
|
@@ -1744,12 +1654,32 @@ interface BarSeries {
|
|
|
1744
1654
|
*
|
|
1745
1655
|
* السلسلتان جنب بعضهما لا فوق بعض: التكديس يخفي أن أحدهما تراجع
|
|
1746
1656
|
* حين يرتفع الآخر.
|
|
1657
|
+
*
|
|
1658
|
+
* ── ⚠️ كان رسماً يُنظر إليه، فصار رسماً يُقرأ منه ────────────────────────
|
|
1659
|
+
* النسخة الأولى كانت أعمدةً بلا محور ولا أرقام: تقول «الخميس أطول من
|
|
1660
|
+
* الاثنين» ولا تقول بكم. والفرق بين ٩٥ و٦٦ قرارٌ يُتّخذ، وبين ٩٥ و٩٣
|
|
1661
|
+
* لا شيء — والعين لا تفرّق بينهما في عمودين.
|
|
1662
|
+
*
|
|
1663
|
+
* فأُضيف ثلاثة:
|
|
1664
|
+
* ١. **علامات المحور** — الأعلى والنصف والصفر، كما في `TrendChart`.
|
|
1665
|
+
* ٢. **الرقم فوق كل عمود** حين تكون سلسلةً واحدة؛ فإن كانتا سلسلتين
|
|
1666
|
+
* فالأرقام ستّة عشر رقماً في صفّ فتُقرأ ضجيجاً، ومكانها التلميح.
|
|
1667
|
+
* ٣. **عمودٌ نشط** بالمؤشّر أو بالأسهم، وتلميحٌ يعرض كل السلاسل عنده.
|
|
1668
|
+
*
|
|
1669
|
+
* والتنقّل بلوحة المفاتيح ليس زينة: القيم هنا هي كلّ ما في الرسم، ومن لا
|
|
1670
|
+
* يستعمل الفأرة لا يصل إليها بغيره.
|
|
1747
1671
|
*/
|
|
1748
|
-
declare function BarChart({ labels, series, height, formatValue, className, }: {
|
|
1672
|
+
declare function BarChart({ labels, series, height, formatValue, showValues, className, }: {
|
|
1749
1673
|
labels: string[];
|
|
1750
1674
|
series: BarSeries[];
|
|
1751
1675
|
height?: number;
|
|
1752
1676
|
formatValue?: (v: number) => string;
|
|
1677
|
+
/**
|
|
1678
|
+
* الرقم فوق كل عمود.
|
|
1679
|
+
*
|
|
1680
|
+
* افتراضه: نعم للسلسلة الواحدة، لا لأكثر — والشرح فوق.
|
|
1681
|
+
*/
|
|
1682
|
+
showValues?: boolean;
|
|
1753
1683
|
className?: string;
|
|
1754
1684
|
}): react.JSX.Element;
|
|
1755
1685
|
/**
|
|
@@ -1829,7 +1759,7 @@ interface ShareItem {
|
|
|
1829
1759
|
*/
|
|
1830
1760
|
trailing?: ReactNode;
|
|
1831
1761
|
/** لون الشريط — الافتراضي لون العلامة */
|
|
1832
|
-
tone?:
|
|
1762
|
+
tone?: 'brand' | 'amber' | 'red' | 'muted';
|
|
1833
1763
|
}
|
|
1834
1764
|
/**
|
|
1835
1765
|
* قائمة بحصص — للفئات المرتّبة (المصادر، المنتجات، المدن).
|
|
@@ -1867,14 +1797,6 @@ declare function ShareList({ items, total, layout, showPercent, labelWidth, form
|
|
|
1867
1797
|
className?: string;
|
|
1868
1798
|
}): react.JSX.Element;
|
|
1869
1799
|
|
|
1870
|
-
/**
|
|
1871
|
-
* حسابات رسوم التجارة وأنماطها — **مشتركة بين الويب والنيتف**.
|
|
1872
|
-
*
|
|
1873
|
-
* الحسابات هنا **إجابات على أسئلة تاجر**، لا أشكال: «أكبر خصم فين؟»
|
|
1874
|
-
* و«كام صنف بيعمل ٨٠٪؟» و«المخزن هيكفي كام يوم؟». نسخها معناها إن
|
|
1875
|
-
* الرقم اللي التاجر بيتصرّف على أساسه يفرق بين شاشة وشاشة.
|
|
1876
|
-
*/
|
|
1877
|
-
|
|
1878
1800
|
interface WaterfallStep {
|
|
1879
1801
|
key: string;
|
|
1880
1802
|
label: ReactNode;
|
|
@@ -1883,36 +1805,6 @@ interface WaterfallStep {
|
|
|
1883
1805
|
/** سطر يشرح الخصم — «٤٪ عمولة بوّابة الدفع» */
|
|
1884
1806
|
meta?: ReactNode;
|
|
1885
1807
|
}
|
|
1886
|
-
interface ParetoItem {
|
|
1887
|
-
key: string;
|
|
1888
|
-
label: ReactNode;
|
|
1889
|
-
value: number;
|
|
1890
|
-
}
|
|
1891
|
-
interface RunwayItem {
|
|
1892
|
-
key: string;
|
|
1893
|
-
label: ReactNode;
|
|
1894
|
-
/** ما في المخزن الآن */
|
|
1895
|
-
stock: number;
|
|
1896
|
-
/** متوسّط ما يُباع في اليوم */
|
|
1897
|
-
perDay: number;
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
/**
|
|
1901
|
-
* الشلّال — من إجمالي البيع إلى ما يصل جيبك.
|
|
1902
|
-
*
|
|
1903
|
-
* ── لماذا هو أهمّ رسم للتاجر ───────────────────────────────────────────
|
|
1904
|
-
* التاجر يعرف كم باع ولا يعرف كم كسب. «بعت ٧١ ألفاً» رقم يُقال، و«وصلك
|
|
1905
|
-
* ٢٧» رقم يُتصرّف بناءً عليه — والفرق بينهما هو الشلّال كلّه.
|
|
1906
|
-
*
|
|
1907
|
-
* ── ولماذا مدرّج لا أعمدة ──────────────────────────────────────────────
|
|
1908
|
-
* كل خطوة تبدأ من حيث انتهت السابقة، فالنزول **يُرى** لا يُحسب. الأعمدة
|
|
1909
|
-
* المستقلّة تجعل العين تطرح الأرقام بنفسها، وهذا بالضبط ما جاء الرسم
|
|
1910
|
-
* ليوفّره.
|
|
1911
|
-
*
|
|
1912
|
-
* ── وأكبر خصم يُعلَّم ──────────────────────────────────────────────────
|
|
1913
|
-
* كما في `FunnelChart`: البند الذي يأكل أكثر من غيره هو المكان الوحيد
|
|
1914
|
-
* الذي يستحقّ عملاً هذا الشهر، والباقي يبقى محايداً حتى لا يزاحمه.
|
|
1915
|
-
*/
|
|
1916
1808
|
declare function WaterfallChart({ total, steps, totalLabel, netLabel, formatValue, className, }: {
|
|
1917
1809
|
/** نقطة البداية — إجمالي المبيعات قبل أي خصم */
|
|
1918
1810
|
total: number;
|
|
@@ -1941,6 +1833,11 @@ pace, label, formatValue, className, }: {
|
|
|
1941
1833
|
formatValue?: (v: number) => string;
|
|
1942
1834
|
className?: string;
|
|
1943
1835
|
}): react.JSX.Element;
|
|
1836
|
+
interface ParetoItem {
|
|
1837
|
+
key: string;
|
|
1838
|
+
label: ReactNode;
|
|
1839
|
+
value: number;
|
|
1840
|
+
}
|
|
1944
1841
|
/**
|
|
1945
1842
|
* كم صنفاً يصنع معظم المبيعات.
|
|
1946
1843
|
*
|
|
@@ -1959,6 +1856,14 @@ declare function ParetoChart({ items, height, threshold, formatValue, className,
|
|
|
1959
1856
|
formatValue?: (v: number) => string;
|
|
1960
1857
|
className?: string;
|
|
1961
1858
|
}): react.JSX.Element;
|
|
1859
|
+
interface RunwayItem {
|
|
1860
|
+
key: string;
|
|
1861
|
+
label: ReactNode;
|
|
1862
|
+
/** ما في المخزن الآن */
|
|
1863
|
+
stock: number;
|
|
1864
|
+
/** متوسّط ما يُباع في اليوم */
|
|
1865
|
+
perDay: number;
|
|
1866
|
+
}
|
|
1962
1867
|
/**
|
|
1963
1868
|
* كم يوماً يكفي المخزون.
|
|
1964
1869
|
*
|
|
@@ -2116,26 +2021,6 @@ declare function useAudioLevel(ref: RefObject<HTMLMediaElement | null>, { bands,
|
|
|
2116
2021
|
}): AudioLevel;
|
|
2117
2022
|
|
|
2118
2023
|
type ProviderLevel = 1 | 2 | 3;
|
|
2119
|
-
declare const PROVIDER_LEVEL_LABEL: Record<ProviderLevel, string>;
|
|
2120
|
-
declare const PROVIDER_LEVEL_LABEL_EN: Record<ProviderLevel, string>;
|
|
2121
|
-
/**
|
|
2122
|
-
* المقاسين.
|
|
2123
|
-
*
|
|
2124
|
-
* `sm` أربعة وعشرين — وده **حدّ الهدف اللمسي** لا رقم مختار. الشارة
|
|
2125
|
-
* بتاخد تركيز، واللي بياخد تركيز بيتضغط عليه. وعلى الموبايل ده أهمّ لا أقلّ.
|
|
2126
|
-
*/
|
|
2127
|
-
declare const SIZES: {
|
|
2128
|
-
readonly sm: {
|
|
2129
|
-
readonly box: "size-6";
|
|
2130
|
-
readonly mark: 14;
|
|
2131
|
-
};
|
|
2132
|
-
readonly md: {
|
|
2133
|
-
readonly box: "size-7";
|
|
2134
|
-
readonly mark: 16;
|
|
2135
|
-
};
|
|
2136
|
-
};
|
|
2137
|
-
type ProviderBadgeSize = keyof typeof SIZES;
|
|
2138
|
-
|
|
2139
2024
|
/**
|
|
2140
2025
|
* التسميات جوّه المكتبة لا في التطبيق.
|
|
2141
2026
|
*
|
|
@@ -2144,6 +2029,8 @@ type ProviderBadgeSize = keyof typeof SIZES;
|
|
|
2144
2029
|
* المكوّن زي أسماء العملات في `Money` بالظبط — وهنا هو **الاسم
|
|
2145
2030
|
* المتاح الوحيد**، فتفرّقه بيدّي شارتين مالهمش علاقة ببعض.
|
|
2146
2031
|
*/
|
|
2032
|
+
declare const PROVIDER_LEVEL_LABEL: Record<ProviderLevel, string>;
|
|
2033
|
+
declare const PROVIDER_LEVEL_LABEL_EN: Record<ProviderLevel, string>;
|
|
2147
2034
|
interface ProviderMarkProps {
|
|
2148
2035
|
level: ProviderLevel;
|
|
2149
2036
|
/** ضلع المربّع بالبكسل */
|
|
@@ -2156,6 +2043,23 @@ interface ProviderMarkProps {
|
|
|
2156
2043
|
* بلا `aria-label`: العلامة زينة جوّه `ProviderBadge` اللي بيحمل الاسم.
|
|
2157
2044
|
*/
|
|
2158
2045
|
declare function ProviderMark({ level, size, className }: ProviderMarkProps): react.JSX.Element;
|
|
2046
|
+
/**
|
|
2047
|
+
* المقاسين.
|
|
2048
|
+
*
|
|
2049
|
+
* `sm` أربعة وعشرين — وده **حدّ الهدف اللمسي** لا رقم مختار. الشارة
|
|
2050
|
+
* بتاخد تركيز (تحت)، واللي بياخد تركيز بيتضغط عليه.
|
|
2051
|
+
*/
|
|
2052
|
+
declare const SIZES: {
|
|
2053
|
+
readonly sm: {
|
|
2054
|
+
readonly box: "size-6";
|
|
2055
|
+
readonly mark: 14;
|
|
2056
|
+
};
|
|
2057
|
+
readonly md: {
|
|
2058
|
+
readonly box: "size-7";
|
|
2059
|
+
readonly mark: 16;
|
|
2060
|
+
};
|
|
2061
|
+
};
|
|
2062
|
+
type ProviderBadgeSize = keyof typeof SIZES;
|
|
2159
2063
|
interface ProviderBadgeProps {
|
|
2160
2064
|
level: ProviderLevel;
|
|
2161
2065
|
/**
|
|
@@ -2319,13 +2223,6 @@ declare function Coach({ id, asChild, children, }: {
|
|
|
2319
2223
|
children: ReactNode;
|
|
2320
2224
|
}): react.JSX.Element;
|
|
2321
2225
|
|
|
2322
|
-
/**
|
|
2323
|
-
* أنماط كروت الاختيار والسبارك‑لاين — **مشتركة بين الويب والنيتف**.
|
|
2324
|
-
* نفس سبب `Display.variants.ts`.
|
|
2325
|
-
*/
|
|
2326
|
-
|
|
2327
|
-
type SparkTone = 'brand' | 'green' | 'red' | 'muted';
|
|
2328
|
-
|
|
2329
2226
|
interface ChoiceOption {
|
|
2330
2227
|
value: string;
|
|
2331
2228
|
label: ReactNode;
|
|
@@ -2335,7 +2232,6 @@ interface ChoiceOption {
|
|
|
2335
2232
|
icon?: ComponentType<{
|
|
2336
2233
|
size?: number;
|
|
2337
2234
|
strokeWidth?: number;
|
|
2338
|
-
color?: string;
|
|
2339
2235
|
}>;
|
|
2340
2236
|
disabled?: boolean;
|
|
2341
2237
|
/** سبب التعطيل — «معطّل» من غير سبب بيسيب المستخدم واقف */
|
|
@@ -2392,45 +2288,30 @@ declare function ChoiceCards({ name, value, onChange, options, columns, hideMark
|
|
|
2392
2288
|
* و`preserveAspectRatio="none"` بيمطّ أفقياً. وعشان المطّ ده السُمك
|
|
2393
2289
|
* بيتحسب من الشاشة لا من المقاس (`vectorEffect`)، وإلا الخط بيرفع
|
|
2394
2290
|
* على الشاشة العريضة ويرفع أكتر على الضيقة.
|
|
2291
|
+
*
|
|
2292
|
+
* ── والقيمة تُقرأ بالمرور ───────────────────────────────────────────────
|
|
2293
|
+
* القاعدة فوق («مش يتقري منه قيمة») تبقى صحيحةً في **الشكل الساكن**:
|
|
2294
|
+
* مافيش محاور ولا أرقام مرسومة. لكن الخط اللي جوّه كرت لوحة بيجاوب
|
|
2295
|
+
* سؤالاً تانياً لمّا المؤشّر يقف عليه: «الجمعة كام؟» — والجواب ده كان
|
|
2296
|
+
* بيحتاج فتح شاشة تانية.
|
|
2297
|
+
*
|
|
2298
|
+
* فالمرور بيظهر نقطةً وفقاعةً بقيمة اليوم واسمه إن اتبعت `labels`.
|
|
2299
|
+
* والرسم بيفضل `aria-hidden` وجنبه قائمة `sr-only` بالقيم لمّا يكون
|
|
2300
|
+
* ليها أسماء — الشكل مايوصلش لقارئ الشاشة أصلاً.
|
|
2395
2301
|
*/
|
|
2396
|
-
declare function Sparkline({ values, width, height, tone, fluid, className, }: {
|
|
2302
|
+
declare function Sparkline({ values, width, height, tone, fluid, labels, formatValue, className, }: {
|
|
2397
2303
|
values: number[];
|
|
2398
2304
|
width?: number;
|
|
2399
2305
|
height?: number;
|
|
2400
|
-
tone?:
|
|
2306
|
+
tone?: 'brand' | 'green' | 'red' | 'muted';
|
|
2401
2307
|
/** يملا عرض الحاوية بدل المقاس الثابت — `width` بيبقى نسبة الرسم */
|
|
2402
2308
|
fluid?: boolean;
|
|
2309
|
+
/** اسم كل نقطة — بيظهر في الفقاعة وفي قائمة قارئ الشاشة */
|
|
2310
|
+
labels?: string[];
|
|
2311
|
+
formatValue?: (v: number) => string;
|
|
2403
2312
|
className?: string;
|
|
2404
2313
|
}): react.JSX.Element | null;
|
|
2405
2314
|
|
|
2406
|
-
/**
|
|
2407
|
-
* أنماط مكوّنات العرض — **مشتركة بين الويب والنيتف**.
|
|
2408
|
-
*
|
|
2409
|
-
* ══ ليه الملف ده موجود ═══════════════════════════════════════════════════
|
|
2410
|
-
* `buttonClasses` كانت في `lib.ts` من الأول، فـ`Button.tsx` و
|
|
2411
|
-
* `Button.native.tsx` بيوصلوا لنفس السلسلة بلا مجهود.
|
|
2412
|
-
*
|
|
2413
|
-
* باقي المكوّنات مكانتش كده: أنماط `Badge` و`Card` و`Progress` كانت
|
|
2414
|
-
* **مكتوبة جوّه `Display.tsx`** — وهي المكان الصح ما دام فيه منصّة واحدة.
|
|
2415
|
-
*
|
|
2416
|
-
* وأول ما بقى فيه اتنين، الكتابة جوّه المكوّن معناها **نسختين**: تغيير
|
|
2417
|
-
* حشوة الشارة بيتعمل مرتين، وأول مرة حد ينسى واحدة الشارة بتفرق بين
|
|
2418
|
-
* الويب والموبايل — من غير خطأ ولا تحذير.
|
|
2419
|
-
*
|
|
2420
|
-
* ودي بالظبط الحتة اللي الطلب اتكتب عشانها: «تعديل في التوكنز أو
|
|
2421
|
-
* الأنماط أو المقاسات يوصل لكل المنصّات من مصدر واحد».
|
|
2422
|
-
*
|
|
2423
|
-
* ── والملف ده مالوش React ────────────────────────────────────────────────
|
|
2424
|
-
* نصوص وخرايط وبس — زي `lib.ts` بالظبط. يعني بيعدّي حدّ RSC بلا
|
|
2425
|
-
* `"use client"`، والنيتف بياخده من غير ما يجرّ DOM.
|
|
2426
|
-
*
|
|
2427
|
-
* ── والقاعدة: أي نمط بيتشاف على المنصّتين مكانه هنا ─────────────────────
|
|
2428
|
-
* اللي بيفضل جوّه ملف المنصّة هو اللي **بيخصّها هي**: `overflow-clip`
|
|
2429
|
-
* بتاعة الويب مثلاً، أو تخطيط `<Modal>` بتاع RN.
|
|
2430
|
-
*/
|
|
2431
|
-
|
|
2432
|
-
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
2433
|
-
|
|
2434
2315
|
interface BadgeProps {
|
|
2435
2316
|
children: ReactNode;
|
|
2436
2317
|
tone?: Tone;
|
|
@@ -2447,6 +2328,7 @@ declare function Counter({ value, max }: {
|
|
|
2447
2328
|
value: number;
|
|
2448
2329
|
max?: number;
|
|
2449
2330
|
}): react.JSX.Element | null;
|
|
2331
|
+
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
2450
2332
|
declare function Avatar({ name, src, size, square, className, }: {
|
|
2451
2333
|
name: string;
|
|
2452
2334
|
src?: string;
|
|
@@ -2459,7 +2341,6 @@ interface StatCardProps {
|
|
|
2459
2341
|
icon?: ComponentType<{
|
|
2460
2342
|
size?: number;
|
|
2461
2343
|
strokeWidth?: number;
|
|
2462
|
-
color?: string;
|
|
2463
2344
|
}>;
|
|
2464
2345
|
tone?: Tone;
|
|
2465
2346
|
label: ReactNode;
|
|
@@ -2529,4 +2410,4 @@ declare function Skeleton({ variant, width, className, }: {
|
|
|
2529
2410
|
className?: string;
|
|
2530
2411
|
}): react.JSX.Element;
|
|
2531
2412
|
|
|
2532
|
-
export { ANIMATE_SCALE, Accordion, type AccordionItem, Alert, type Animation, type AudioLevel, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarSize, Badge, type BadgeProps, BarChart, type BarSeries, BrowserFrame, type BrowserFrameProps, Button, type ButtonProps, ButtonSize, ButtonVariant, COLOR_SCALE, CONTAINER_SCALE, Card, CardHeader, Carousel, type CarouselProps, type Chapter, Checkbox, ChoiceCards, type ChoiceOption, type ChoiceProps, Coach, type CoachApi, type CoachAudio, type CoachHint, type CoachItem, type CoachLine, type CoachOrb, CoachProvider, type CoachProviderProps, type CoachRegion, type CoachWhen, type CoachWhere, ColorField, type ColorToken, type Column, Combobox, type CommandItem, CommandPalette, type Container, Counter, type Currency, DARK_TOKENS, DataTable, type DataTableProps, DateRangePicker, Drawer, Dropdown, Dropzone, EmptyState, type FieldSize, FileRow, type FilterChip, FilterChips, FunnelChart, type FunnelStage, Gallery, type GalleryImage, type GalleryProps, GoalBar, Heatmap, Input, type InputProps, Lightbox, type LightboxProps, LocaleCtx, type MediaState, Modal, Money, type MoneyProps, MoneyProvider, MultiSelect, NumberStepper, type NumberStepperProps, type Option, PROVIDER_LEVEL_LABEL, PROVIDER_LEVEL_LABEL_EN, PageHeader, ParetoChart, type ParetoItem, Phone, type PhoneFormat, type PhoneParts, type PhoneProps, Product3DViewer, type Product3DViewerProps, Progress, ProviderBadge, type ProviderBadgeProps, type ProviderBadgeSize, type ProviderLevel, ProviderMark, type ProviderMarkProps, RADIUS_SCALE, Radio, RadioGroup, type Radius, type Range, RatingInput, type RatingInputProps, type RunwayItem, SHADOW_SCALE, Scrubber, SearchInput, Select, type SelectProps, type Shadow, type ShareItem, ShareList, Sheet, Skeleton, type SortableApi, type SortableItemProps, SortableStatus, Sparkline, Stars, type StarsProps, StatCard, type StatCardProps, Stepper, type StepperStep, StockRunway, Switch, type SymbolStyle, TEXT_SCALE, TOKENS, type TabItem, Tabs, TechnicalInput, type TechnicalInputProps, type TechnicalKind, TechnicalText, type TextSize, Textarea, type TextareaProps, Timeline, type TimelineStep, Toast, ToastHost, type ToastInput, type ToastItem, type ToastTone, type TokenName, Tone, Tooltip, TrendChart, type UITextKey, type UploadFile, type UploadState, type UseSortableOptions, VerifiedBadge, type VerifiedBadgeProps, VideoPlayer, type VideoPlayerProps, type VideoSuggestion, WaterfallChart, type WaterfallStep, WhatsAppIcon, coachSeconds, currencyName, currencySymbol, daysBetween, formatBytes, formatDate, formatRange, formatTime, isCurrency, normalizeHex, parsePhone, presets,
|
|
2413
|
+
export { ANIMATE_SCALE, Accordion, type AccordionItem, Alert, type Animation, type AudioLevel, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarSize, Badge, type BadgeProps, BarChart, type BarSeries, BrowserFrame, type BrowserFrameProps, Button, type ButtonProps, ButtonSize, ButtonVariant, COLOR_SCALE, CONTAINER_SCALE, Card, CardHeader, Carousel, type CarouselProps, type Chapter, Checkbox, ChoiceCards, type ChoiceOption, type ChoiceProps, Coach, type CoachApi, type CoachAudio, type CoachHint, type CoachItem, type CoachLine, type CoachOrb, CoachProvider, type CoachProviderProps, type CoachRegion, type CoachWhen, type CoachWhere, ColorField, type ColorToken, type Column, Combobox, type CommandItem, CommandPalette, type Container, Counter, type Currency, DARK_TOKENS, DataTable, type DataTableProps, DateRangePicker, Drawer, Dropdown, Dropzone, EmptyState, type FieldSize, FileRow, type FilterChip, FilterChips, FunnelChart, type FunnelStage, Gallery, type GalleryImage, type GalleryProps, GoalBar, Heatmap, Input, type InputProps, Lightbox, type LightboxProps, LocaleCtx, type MediaState, Modal, Money, type MoneyProps, MoneyProvider, MultiSelect, NumberStepper, type NumberStepperProps, type Option, PROVIDER_LEVEL_LABEL, PROVIDER_LEVEL_LABEL_EN, PageHeader, ParetoChart, type ParetoItem, Phone, type PhoneFormat, type PhoneParts, type PhoneProps, Product3DViewer, type Product3DViewerProps, Progress, ProviderBadge, type ProviderBadgeProps, type ProviderBadgeSize, type ProviderLevel, ProviderMark, type ProviderMarkProps, RADIUS_SCALE, Radio, RadioGroup, type Radius, type Range, RatingInput, type RatingInputProps, type RunwayItem, SHADOW_SCALE, Scrubber, SearchInput, Select, type SelectProps, type Shadow, type ShareItem, ShareList, Sheet, Skeleton, type SortableApi, type SortableItemProps, SortableStatus, Sparkline, Stars, type StarsProps, StatCard, type StatCardProps, Stepper, type StepperStep, StockRunway, Switch, type SymbolStyle, TEXT_SCALE, TOKENS, type TabItem, Tabs, TechnicalInput, type TechnicalInputProps, type TechnicalKind, TechnicalText, type TextSize, Textarea, type TextareaProps, Timeline, type TimelineStep, Toast, ToastHost, type ToastInput, type ToastItem, type ToastTone, type TokenName, Tone, Tooltip, TrendChart, type UITextKey, type UploadFile, type UploadState, type UseSortableOptions, VerifiedBadge, type VerifiedBadgeProps, VideoPlayer, type VideoPlayerProps, type VideoSuggestion, WaterfallChart, type WaterfallStep, WhatsAppIcon, coachSeconds, currencyName, currencySymbol, daysBetween, formatBytes, formatDate, formatRange, formatTime, isCurrency, normalizeHex, parsePhone, presets, useAudioLevel, useCoach, useCoachOptional, useCurrency, useCurrencySymbol, useMedia, useMoneyLang, useMoneyLocale, useSortable, useToasts, useUIText };
|