@ahmetilhn/hanui 2.8.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/build/index.cjs +15 -15
- package/build/index.cjs.map +1 -1
- package/build/index.d.ts +79 -24
- package/build/index.js +3365 -3170
- package/build/index.js.map +1 -1
- package/build/styles.css +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -49,6 +49,12 @@ export declare type AlertTone = 'info' | 'success' | 'warning' | 'danger';
|
|
|
49
49
|
/** Duyurunun aciliyeti. */
|
|
50
50
|
export declare type AnnouncePoliteness = 'polite' | 'assertive';
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Ezmeleri belgeye yazar. Aynı `<style>` etiketi tekrar kullanılır: her
|
|
54
|
+
* çağrıda yeni bir etiket eklemek, birbirini ezen onlarca blok bırakıyordu.
|
|
55
|
+
*/
|
|
56
|
+
export declare const applyThemeConfig: (config: HanuiThemeConfig | undefined) => void;
|
|
57
|
+
|
|
52
58
|
export declare const Avatar: typeof Avatar_2;
|
|
53
59
|
|
|
54
60
|
/** Avatar — kullanıcı madalyonu. */
|
|
@@ -284,6 +290,7 @@ export declare const Checkbox: typeof Checkbox_2;
|
|
|
284
290
|
/** Onay kutusu. */
|
|
285
291
|
declare const Checkbox_2: ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
286
292
|
label: ReactNode;
|
|
293
|
+
/** Etiketin altındaki açıklama; `aria-describedby` ile bağlanır. */
|
|
287
294
|
hint?: string;
|
|
288
295
|
testId?: string;
|
|
289
296
|
} & RefAttributes<HTMLInputElement>>;
|
|
@@ -354,7 +361,7 @@ declare type CircleProps = {
|
|
|
354
361
|
export declare const Combobox: typeof Combobox_2;
|
|
355
362
|
|
|
356
363
|
/** Aranabilir seçim kutusu. */
|
|
357
|
-
declare const Combobox_2: <T extends string>({ options, value, onChange, labels, isSearchHidden, onSearch, isLoading, isDisabled, isClearable, icon, id, className, testId, "aria-describedby": describedBy, "aria-invalid": isInvalid, }: ComboboxProps<T>) => JSX.Element;
|
|
364
|
+
declare const Combobox_2: <T extends string>({ options, value, onChange, labels, isSearchHidden, onSearch, isLoading, isDisabled, isClearable, icon, id, required, className, testId, "aria-describedby": describedBy, "aria-invalid": isInvalid, }: ComboboxProps<T>) => JSX.Element;
|
|
358
365
|
|
|
359
366
|
/** Bileşenin çizdiği metinler. */
|
|
360
367
|
export declare type ComboboxLabels = {
|
|
@@ -400,6 +407,8 @@ declare type ComboboxProps<T extends string> = {
|
|
|
400
407
|
/** Tetikleyicinin solundaki ikon. */
|
|
401
408
|
icon?: ReactNode;
|
|
402
409
|
id?: string;
|
|
410
|
+
/** Zorunluluk — `Field`in `FieldChildProps` sözleşmesi. Bkz. `Select.required`. */
|
|
411
|
+
required?: boolean;
|
|
403
412
|
'aria-describedby'?: string;
|
|
404
413
|
'aria-invalid'?: boolean;
|
|
405
414
|
className?: string;
|
|
@@ -529,6 +538,12 @@ export declare type DateRangeValue = {
|
|
|
529
538
|
/** Kütüphanenin varsayılan font yığınları — hepsi sistem fontlarına iner. */
|
|
530
539
|
export declare const DEFAULT_FONTS: Required<HanuiFonts>;
|
|
531
540
|
|
|
541
|
+
/**
|
|
542
|
+
* Bilgi yoğunluğunun taşındığı öznitelik.
|
|
543
|
+
* `<html data-hanui-density="compact">`.
|
|
544
|
+
*/
|
|
545
|
+
export declare const DENSITY_ATTRIBUTE = "data-hanui-density";
|
|
546
|
+
|
|
532
547
|
export declare const Directory: typeof Directory_2;
|
|
533
548
|
|
|
534
549
|
/**
|
|
@@ -772,6 +787,49 @@ export declare type HanuiLabels = Partial<{
|
|
|
772
787
|
copied: Formatter<[value: string]>;
|
|
773
788
|
announcement: string;
|
|
774
789
|
}>;
|
|
790
|
+
/**
|
|
791
|
+
* Dosya yukleme.
|
|
792
|
+
*
|
|
793
|
+
* ⚠ `tooLarge` bir BICIMLENDIRICI: mesaj dosya adini ve siniri TASIMALI.
|
|
794
|
+
* Sabit bir "cok buyuk" metni, on dosyalik bir listede hangisinin
|
|
795
|
+
* reddedildigini soylemiyordu.
|
|
796
|
+
*/
|
|
797
|
+
fileUpload: Partial<{
|
|
798
|
+
tooLarge: Formatter<[name: string, max: string]>;
|
|
799
|
+
/** Yukleme sirasindaki ekran okuyucu duyurusu. */
|
|
800
|
+
uploading: Formatter<[name: string]>;
|
|
801
|
+
/** Dosya secildiginde yapilan duyuru. */
|
|
802
|
+
added: Formatter<[count: number]>;
|
|
803
|
+
}>;
|
|
804
|
+
/**
|
|
805
|
+
* Sayisal gostergenin YON metni.
|
|
806
|
+
*
|
|
807
|
+
* ⚠ Uc deger de SR-ONLY: ok isareti gorsel bir sinyal ve ekran okuyucuya
|
|
808
|
+
* hicbir sey soylemiyor. Verilmezse gosterge "yuzde 12" der, artis mi
|
|
809
|
+
* azalis mi belirsiz kalir.
|
|
810
|
+
*/
|
|
811
|
+
stat: Partial<{
|
|
812
|
+
increase: string;
|
|
813
|
+
decrease: string;
|
|
814
|
+
unchanged: string;
|
|
815
|
+
}>;
|
|
816
|
+
/** Adim gostergesinin DURUM metinleri — hepsi sr-only. */
|
|
817
|
+
steps: Partial<{
|
|
818
|
+
completed: string;
|
|
819
|
+
current: string;
|
|
820
|
+
upcoming: string;
|
|
821
|
+
}>;
|
|
822
|
+
/** Zaman cizelgesinin DURUM metinleri — hepsi sr-only. */
|
|
823
|
+
timeline: Partial<{
|
|
824
|
+
completed: string;
|
|
825
|
+
current: string;
|
|
826
|
+
failed: string;
|
|
827
|
+
}>;
|
|
828
|
+
/** Etiket girisi. `removed` bir bicimlendirici: hangi etiketin kalktigi. */
|
|
829
|
+
tagInput: Partial<{
|
|
830
|
+
added: Formatter<[value: string]>;
|
|
831
|
+
removed: Formatter<[value: string]>;
|
|
832
|
+
}>;
|
|
775
833
|
rating: Partial<{
|
|
776
834
|
/** Yıldızların ekran okuyucu karşılığı ("5 üzerinden 4,5 — 12 değerlendirme"). */
|
|
777
835
|
srLabel: Formatter<[value: number, count: number | undefined]>;
|
|
@@ -947,9 +1005,6 @@ isTechnical?: boolean;
|
|
|
947
1005
|
testId?: string;
|
|
948
1006
|
} & RefAttributes<HTMLInputElement>>;
|
|
949
1007
|
|
|
950
|
-
/** Odaklanınca mobilde ekran klavyesini açacak bir öğe mi? */
|
|
951
|
-
export declare const isKeyboardOpeningElement: (element: Element | null) => boolean;
|
|
952
|
-
|
|
953
1008
|
/** AÇIK TEMA — varsayılan. */
|
|
954
1009
|
export declare const LIGHT_THEME: {
|
|
955
1010
|
readonly page: "#ffffff";
|
|
@@ -1258,12 +1313,6 @@ export declare type PositioningState = {
|
|
|
1258
1313
|
/** Yüzeyin tercih ettiği kenar. Yer yoksa karşıtına düşer. */
|
|
1259
1314
|
export declare type PositionSide = 'top' | 'bottom' | 'left' | 'right';
|
|
1260
1315
|
|
|
1261
|
-
/**
|
|
1262
|
-
* `showModal()` ÇAĞRILDIKTAN SONRA çağrılır. Odak bir metin alanına düştüyse
|
|
1263
|
-
* panelin kendisine geri alınır; düşmediyse hiçbir şey yapılmaz.
|
|
1264
|
-
*/
|
|
1265
|
-
export declare const preventAutoKeyboard: (dialog: HTMLDialogElement) => void;
|
|
1266
|
-
|
|
1267
1316
|
export declare const Price: typeof Price_2;
|
|
1268
1317
|
|
|
1269
1318
|
/** Tutar gösterimi. */
|
|
@@ -1383,6 +1432,8 @@ declare type Props_14 = {
|
|
|
1383
1432
|
maxTags?: number;
|
|
1384
1433
|
isDisabled?: boolean;
|
|
1385
1434
|
id?: string;
|
|
1435
|
+
/** Zorunluluk — `Field`in `FieldChildProps` sözleşmesi. Bkz. `Select.required`. */
|
|
1436
|
+
required?: boolean;
|
|
1386
1437
|
'aria-describedby'?: string;
|
|
1387
1438
|
'aria-invalid'?: boolean;
|
|
1388
1439
|
className?: string;
|
|
@@ -2055,6 +2106,18 @@ declare type Props_8<T extends string> = {
|
|
|
2055
2106
|
align?: 'start' | 'end';
|
|
2056
2107
|
isDisabled?: boolean;
|
|
2057
2108
|
id?: string;
|
|
2109
|
+
/**
|
|
2110
|
+
* Zorunluluk — `Field`in `FieldChildProps` sözleşmesinden gelir.
|
|
2111
|
+
*
|
|
2112
|
+
* ⚠ Bileşen `...rest` YAYMIYOR, yani `Props`ta bildirilmeyen her alan
|
|
2113
|
+
* sessizce buharlaşır. `required` bir dönem tam olarak öyleydi: `<Field
|
|
2114
|
+
* isRequired>{props => <Select {...props} …/>}</Field>` yazan çağıran
|
|
2115
|
+
* görsel `*` ve sr-only "(zorunlu)" alıyor ama KONTROLDE hiçbir işaret
|
|
2116
|
+
* olmuyordu — doğrudan kutuya atlayan ekran okuyucu kullanıcısı alanın
|
|
2117
|
+
* zorunlu olduğunu hiç duymuyordu. `props` taze bir nesne literali olmadığı
|
|
2118
|
+
* için TypeScript'in fazla-özellik denetimi de uyarmıyordu.
|
|
2119
|
+
*/
|
|
2120
|
+
required?: boolean;
|
|
2058
2121
|
'aria-describedby'?: string;
|
|
2059
2122
|
'aria-invalid'?: boolean;
|
|
2060
2123
|
className?: string;
|
|
@@ -2082,6 +2145,7 @@ export declare const Radio: typeof Radio_2;
|
|
|
2082
2145
|
/** Radyo düğmesi. */
|
|
2083
2146
|
declare const Radio_2: ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
2084
2147
|
label: ReactNode;
|
|
2148
|
+
/** Etiketin altındaki açıklama; `aria-describedby` ile bağlanır. */
|
|
2085
2149
|
hint?: string;
|
|
2086
2150
|
/** Sağda gösterilen sonuç adedi (filtre listelerinde). */
|
|
2087
2151
|
count?: number;
|
|
@@ -2184,7 +2248,7 @@ export declare type SegmentOption<T extends string = string> = {
|
|
|
2184
2248
|
export declare const Select: typeof Select_2;
|
|
2185
2249
|
|
|
2186
2250
|
/** Seçim kutusu. */
|
|
2187
|
-
declare const Select_2: <T extends string>({ options, value, onChange, label, placeholder, closeLabel, icon, size, align, isDisabled, id, className, testId, "aria-describedby": describedBy, "aria-invalid": isInvalid, }: Props_8<T>) => JSX.Element;
|
|
2251
|
+
declare const Select_2: <T extends string>({ options, value, onChange, label, placeholder, closeLabel, icon, size, align, isDisabled, id, className, testId, required, "aria-describedby": describedBy, "aria-invalid": isInvalid, }: Props_8<T>) => JSX.Element;
|
|
2188
2252
|
|
|
2189
2253
|
export declare type SelectOption<T extends string = string> = {
|
|
2190
2254
|
value: T;
|
|
@@ -2321,7 +2385,7 @@ declare const Tabs_2: FC<Props_37>;
|
|
|
2321
2385
|
export declare const TagInput: typeof TagInput_2;
|
|
2322
2386
|
|
|
2323
2387
|
/** Etiket girdisi — yazılan metni kaldırılabilir çiplere çevirir. */
|
|
2324
|
-
declare const TagInput_2: ({ values, onChange, label, placeholder, removeLabel, separators, maxTags, isDisabled, id, className, testId, "aria-describedby": describedBy, "aria-invalid": isInvalid, }: Props_14) => JSX.Element;
|
|
2388
|
+
declare const TagInput_2: ({ values, onChange, label, placeholder, removeLabel, separators, maxTags, isDisabled, id, required, className, testId, "aria-describedby": describedBy, "aria-invalid": isInvalid, }: Props_14) => JSX.Element;
|
|
2325
2389
|
|
|
2326
2390
|
export declare const Textarea: typeof Textarea_2;
|
|
2327
2391
|
|
|
@@ -2341,6 +2405,9 @@ export declare const TextLink: typeof TextLink_2;
|
|
|
2341
2405
|
/** Metin bağlantısı. */
|
|
2342
2406
|
declare const TextLink_2: ({ href, children, hasArrow, tone, size, className, linkProps, ...rest }: Props_2) => JSX.Element;
|
|
2343
2407
|
|
|
2408
|
+
/** Temanın taşındığı öznitelik. `<html data-hanui-theme="dark">`. */
|
|
2409
|
+
export declare const THEME_ATTRIBUTE = "data-hanui-theme";
|
|
2410
|
+
|
|
2344
2411
|
export declare const Tile: typeof Tile_2;
|
|
2345
2412
|
|
|
2346
2413
|
/** Karo — ikon madalyonu + etiket. */
|
|
@@ -2494,18 +2561,6 @@ export declare const usePositioning: (anchorRef: {
|
|
|
2494
2561
|
current: HTMLElement | null;
|
|
2495
2562
|
}, { side, align, offset, padding, isOpen }: PositioningOptions) => PositioningState;
|
|
2496
2563
|
|
|
2497
|
-
export declare const useScrollLock: (isLocked?: boolean) => void;
|
|
2498
|
-
|
|
2499
|
-
/**
|
|
2500
|
-
* Alt sayfayi <strong>gorunen</strong> alana yaslar.
|
|
2501
|
-
*
|
|
2502
|
-
* @param isActive Panel acik mi. Yalnizca acikken olculur: kendisi yalnizca
|
|
2503
|
-
* acikken cizilen bir panel varsayilani kullanir, ama sayfa boyunca DOM'da
|
|
2504
|
-
* duran bir panel bayraksiz cagirdiginda her kullanicida iki gorunum alani
|
|
2505
|
-
* dinleyicisi bos yere acik kaliyordu.
|
|
2506
|
-
*/
|
|
2507
|
-
export declare const useSheetViewport: (isActive?: boolean) => void;
|
|
2508
|
-
|
|
2509
2564
|
/** SANALLAŞTIRMA — yalnızca görünen satırları çiz. */
|
|
2510
2565
|
export declare const useVirtualList: (count: number, { rowHeight, overscan, isEnabled }?: {
|
|
2511
2566
|
rowHeight?: number | undefined;
|