@mesgflow/ui-kit 0.6.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/LICENSE +21 -0
- package/README.md +200 -0
- package/fesm2022/mesgflow-ui-kit-accordion.mjs +75 -0
- package/fesm2022/mesgflow-ui-kit-accordion.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-alert.mjs +165 -0
- package/fesm2022/mesgflow-ui-kit-alert.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-avatar-group.mjs +88 -0
- package/fesm2022/mesgflow-ui-kit-avatar-group.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-avatar.mjs +123 -0
- package/fesm2022/mesgflow-ui-kit-avatar.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-badge.mjs +68 -0
- package/fesm2022/mesgflow-ui-kit-badge.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-banner.mjs +111 -0
- package/fesm2022/mesgflow-ui-kit-banner.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-box-input.mjs +78 -0
- package/fesm2022/mesgflow-ui-kit-box-input.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-brand.mjs +120 -0
- package/fesm2022/mesgflow-ui-kit-brand.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-breadcrumb.mjs +84 -0
- package/fesm2022/mesgflow-ui-kit-breadcrumb.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-button-group.mjs +37 -0
- package/fesm2022/mesgflow-ui-kit-button-group.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-button.mjs +359 -0
- package/fesm2022/mesgflow-ui-kit-button.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-card.mjs +128 -0
- package/fesm2022/mesgflow-ui-kit-card.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-chart.mjs +538 -0
- package/fesm2022/mesgflow-ui-kit-chart.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-checkbox.mjs +45 -0
- package/fesm2022/mesgflow-ui-kit-checkbox.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-chip.mjs +123 -0
- package/fesm2022/mesgflow-ui-kit-chip.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-code-block.mjs +71 -0
- package/fesm2022/mesgflow-ui-kit-code-block.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-collapsible.mjs +89 -0
- package/fesm2022/mesgflow-ui-kit-collapsible.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-color-picker.mjs +210 -0
- package/fesm2022/mesgflow-ui-kit-color-picker.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-combobox.mjs +181 -0
- package/fesm2022/mesgflow-ui-kit-combobox.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-command.mjs +491 -0
- package/fesm2022/mesgflow-ui-kit-command.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-context-menu.mjs +92 -0
- package/fesm2022/mesgflow-ui-kit-context-menu.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-copy-button.mjs +167 -0
- package/fesm2022/mesgflow-ui-kit-copy-button.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-core.mjs +624 -0
- package/fesm2022/mesgflow-ui-kit-core.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-date-picker.mjs +643 -0
- package/fesm2022/mesgflow-ui-kit-date-picker.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-description-list.mjs +76 -0
- package/fesm2022/mesgflow-ui-kit-description-list.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-dialog.mjs +700 -0
- package/fesm2022/mesgflow-ui-kit-dialog.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-divider.mjs +62 -0
- package/fesm2022/mesgflow-ui-kit-divider.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-dropzone.mjs +126 -0
- package/fesm2022/mesgflow-ui-kit-dropzone.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-empty-state.mjs +70 -0
- package/fesm2022/mesgflow-ui-kit-empty-state.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-field.mjs +42 -0
- package/fesm2022/mesgflow-ui-kit-field.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-hover-card.mjs +171 -0
- package/fesm2022/mesgflow-ui-kit-hover-card.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-i18n-tr.mjs +258 -0
- package/fesm2022/mesgflow-ui-kit-i18n-tr.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-icon.mjs +174 -0
- package/fesm2022/mesgflow-ui-kit-icon.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-input.mjs +448 -0
- package/fesm2022/mesgflow-ui-kit-input.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-kbd.mjs +24 -0
- package/fesm2022/mesgflow-ui-kit-kbd.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-link.mjs +48 -0
- package/fesm2022/mesgflow-ui-kit-link.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-menu.mjs +105 -0
- package/fesm2022/mesgflow-ui-kit-menu.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-number-input.mjs +153 -0
- package/fesm2022/mesgflow-ui-kit-number-input.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-otp-input.mjs +164 -0
- package/fesm2022/mesgflow-ui-kit-otp-input.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-page-header.mjs +83 -0
- package/fesm2022/mesgflow-ui-kit-page-header.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-pagination.mjs +99 -0
- package/fesm2022/mesgflow-ui-kit-pagination.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-password-input.mjs +120 -0
- package/fesm2022/mesgflow-ui-kit-password-input.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-popover.mjs +213 -0
- package/fesm2022/mesgflow-ui-kit-popover.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-progress.mjs +82 -0
- package/fesm2022/mesgflow-ui-kit-progress.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-radio.mjs +123 -0
- package/fesm2022/mesgflow-ui-kit-radio.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-rating.mjs +116 -0
- package/fesm2022/mesgflow-ui-kit-rating.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-scroll-area.mjs +84 -0
- package/fesm2022/mesgflow-ui-kit-scroll-area.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-search-input.mjs +154 -0
- package/fesm2022/mesgflow-ui-kit-search-input.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-segmented-control.mjs +95 -0
- package/fesm2022/mesgflow-ui-kit-segmented-control.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-select.mjs +227 -0
- package/fesm2022/mesgflow-ui-kit-select.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-sidebar.mjs +449 -0
- package/fesm2022/mesgflow-ui-kit-sidebar.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-skeleton.mjs +74 -0
- package/fesm2022/mesgflow-ui-kit-skeleton.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-slider.mjs +179 -0
- package/fesm2022/mesgflow-ui-kit-slider.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-spinner.mjs +67 -0
- package/fesm2022/mesgflow-ui-kit-spinner.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-splitter.mjs +97 -0
- package/fesm2022/mesgflow-ui-kit-splitter.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-stat-tile.mjs +98 -0
- package/fesm2022/mesgflow-ui-kit-stat-tile.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-stepper.mjs +133 -0
- package/fesm2022/mesgflow-ui-kit-stepper.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-switch.mjs +73 -0
- package/fesm2022/mesgflow-ui-kit-switch.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-table.mjs +1783 -0
- package/fesm2022/mesgflow-ui-kit-table.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-tabs.mjs +569 -0
- package/fesm2022/mesgflow-ui-kit-tabs.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-tag-input.mjs +138 -0
- package/fesm2022/mesgflow-ui-kit-tag-input.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-theme-switcher.mjs +53 -0
- package/fesm2022/mesgflow-ui-kit-theme-switcher.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-theming.mjs +1016 -0
- package/fesm2022/mesgflow-ui-kit-theming.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-time-picker.mjs +138 -0
- package/fesm2022/mesgflow-ui-kit-time-picker.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-timeline.mjs +91 -0
- package/fesm2022/mesgflow-ui-kit-timeline.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-toast.mjs +202 -0
- package/fesm2022/mesgflow-ui-kit-toast.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-toggle.mjs +243 -0
- package/fesm2022/mesgflow-ui-kit-toggle.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-toolbar.mjs +99 -0
- package/fesm2022/mesgflow-ui-kit-toolbar.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-tooltip.mjs +160 -0
- package/fesm2022/mesgflow-ui-kit-tooltip.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-tour.mjs +272 -0
- package/fesm2022/mesgflow-ui-kit-tour.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-tree-select.mjs +177 -0
- package/fesm2022/mesgflow-ui-kit-tree-select.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-tree.mjs +82 -0
- package/fesm2022/mesgflow-ui-kit-tree.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit.mjs +12851 -0
- package/fesm2022/mesgflow-ui-kit.mjs.map +1 -0
- package/package.json +374 -0
- package/preset.css +20 -0
- package/tokens/color.css +693 -0
- package/tokens/contrast.css +68 -0
- package/tokens/elevation.css +68 -0
- package/tokens/motion.css +277 -0
- package/tokens/radius.css +69 -0
- package/tokens/typography.css +127 -0
- package/tokens.css +41 -0
- package/types/mesgflow-ui-kit-accordion.d.ts +42 -0
- package/types/mesgflow-ui-kit-alert.d.ts +60 -0
- package/types/mesgflow-ui-kit-avatar-group.d.ts +28 -0
- package/types/mesgflow-ui-kit-avatar.d.ts +23 -0
- package/types/mesgflow-ui-kit-badge.d.ts +39 -0
- package/types/mesgflow-ui-kit-banner.d.ts +42 -0
- package/types/mesgflow-ui-kit-box-input.d.ts +45 -0
- package/types/mesgflow-ui-kit-brand.d.ts +48 -0
- package/types/mesgflow-ui-kit-breadcrumb.d.ts +26 -0
- package/types/mesgflow-ui-kit-button-group.d.ts +17 -0
- package/types/mesgflow-ui-kit-button.d.ts +75 -0
- package/types/mesgflow-ui-kit-card.d.ts +71 -0
- package/types/mesgflow-ui-kit-chart.d.ts +242 -0
- package/types/mesgflow-ui-kit-checkbox.d.ts +17 -0
- package/types/mesgflow-ui-kit-chip.d.ts +46 -0
- package/types/mesgflow-ui-kit-code-block.d.ts +56 -0
- package/types/mesgflow-ui-kit-collapsible.d.ts +39 -0
- package/types/mesgflow-ui-kit-color-picker.d.ts +78 -0
- package/types/mesgflow-ui-kit-combobox.d.ts +74 -0
- package/types/mesgflow-ui-kit-command.d.ts +185 -0
- package/types/mesgflow-ui-kit-context-menu.d.ts +40 -0
- package/types/mesgflow-ui-kit-copy-button.d.ts +47 -0
- package/types/mesgflow-ui-kit-core.d.ts +508 -0
- package/types/mesgflow-ui-kit-date-picker.d.ts +215 -0
- package/types/mesgflow-ui-kit-description-list.d.ts +23 -0
- package/types/mesgflow-ui-kit-dialog.d.ts +342 -0
- package/types/mesgflow-ui-kit-divider.d.ts +23 -0
- package/types/mesgflow-ui-kit-dropzone.d.ts +47 -0
- package/types/mesgflow-ui-kit-empty-state.d.ts +18 -0
- package/types/mesgflow-ui-kit-field.d.ts +26 -0
- package/types/mesgflow-ui-kit-hover-card.d.ts +52 -0
- package/types/mesgflow-ui-kit-i18n-tr.d.ts +14 -0
- package/types/mesgflow-ui-kit-icon.d.ts +76 -0
- package/types/mesgflow-ui-kit-input.d.ts +186 -0
- package/types/mesgflow-ui-kit-kbd.d.ts +9 -0
- package/types/mesgflow-ui-kit-link.d.ts +20 -0
- package/types/mesgflow-ui-kit-menu.d.ts +53 -0
- package/types/mesgflow-ui-kit-number-input.d.ts +55 -0
- package/types/mesgflow-ui-kit-otp-input.d.ts +44 -0
- package/types/mesgflow-ui-kit-page-header.d.ts +31 -0
- package/types/mesgflow-ui-kit-pagination.d.ts +50 -0
- package/types/mesgflow-ui-kit-password-input.d.ts +33 -0
- package/types/mesgflow-ui-kit-popover.d.ts +62 -0
- package/types/mesgflow-ui-kit-progress.d.ts +32 -0
- package/types/mesgflow-ui-kit-radio.d.ts +59 -0
- package/types/mesgflow-ui-kit-rating.d.ts +56 -0
- package/types/mesgflow-ui-kit-scroll-area.d.ts +27 -0
- package/types/mesgflow-ui-kit-search-input.d.ts +72 -0
- package/types/mesgflow-ui-kit-segmented-control.d.ts +54 -0
- package/types/mesgflow-ui-kit-select.d.ts +89 -0
- package/types/mesgflow-ui-kit-sidebar.d.ts +224 -0
- package/types/mesgflow-ui-kit-skeleton.d.ts +29 -0
- package/types/mesgflow-ui-kit-slider.d.ts +40 -0
- package/types/mesgflow-ui-kit-spinner.d.ts +31 -0
- package/types/mesgflow-ui-kit-splitter.d.ts +40 -0
- package/types/mesgflow-ui-kit-stat-tile.d.ts +54 -0
- package/types/mesgflow-ui-kit-stepper.d.ts +48 -0
- package/types/mesgflow-ui-kit-switch.d.ts +34 -0
- package/types/mesgflow-ui-kit-table.d.ts +805 -0
- package/types/mesgflow-ui-kit-tabs.d.ts +269 -0
- package/types/mesgflow-ui-kit-tag-input.d.ts +33 -0
- package/types/mesgflow-ui-kit-theme-switcher.d.ts +27 -0
- package/types/mesgflow-ui-kit-theming.d.ts +745 -0
- package/types/mesgflow-ui-kit-time-picker.d.ts +54 -0
- package/types/mesgflow-ui-kit-timeline.d.ts +27 -0
- package/types/mesgflow-ui-kit-toast.d.ts +94 -0
- package/types/mesgflow-ui-kit-toggle.d.ts +110 -0
- package/types/mesgflow-ui-kit-toolbar.d.ts +52 -0
- package/types/mesgflow-ui-kit-tooltip.d.ts +55 -0
- package/types/mesgflow-ui-kit-tour.d.ts +66 -0
- package/types/mesgflow-ui-kit-tree-select.d.ts +65 -0
- package/types/mesgflow-ui-kit-tree.d.ts +44 -0
- package/types/mesgflow-ui-kit.d.ts +5444 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _mesgflow_ui_kit_core from '@mesgflow/ui-kit/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Kategorik grafik renkleri — `color.css`'in `--mf-chart-1..8` rol token'larına SABİT sıralı
|
|
6
|
+
* referans (dataviz doktrini: "Assign categorical hues in fixed order, never cycled"). Sekiz
|
|
7
|
+
* slotun sırası CVD güvenlik mekanizmasıdır (bkz. color.css yorumu — `validate_palette.js` ile
|
|
8
|
+
* iki modda doğrulandı); 9. ve sonraki seriler ASLA döngüye girip 1. seriyle aynı rengi almaz,
|
|
9
|
+
* nötr "Diğer" (`chart-other`) rengine düşer — tüketici o serileri tek bir "Diğer"de toplamalı
|
|
10
|
+
* veya küçük çoklulara bölmeli.
|
|
11
|
+
*
|
|
12
|
+
* Renk VARLIĞI izler, sırasını DEĞİL: bir filtre seri sayısını değiştirdiğinde kalan seriler
|
|
13
|
+
* yeniden boyanmasın diye tüketici `slot`'u varlığa bağlı SABİT bir değerden türetmeli (ör. seri
|
|
14
|
+
* tanımındaki `colorIndex`), o anki dizideki pozisyondan değil.
|
|
15
|
+
*
|
|
16
|
+
* Class isimleri TAM/LİTERAL string — Tailwind'in JIT tarayıcısı çalışma zamanında birleştirilen
|
|
17
|
+
* (`` `fill-chart-${n}` ``) isimleri göremez. Tema utility'leri (`fill-chart-1`) değeri
|
|
18
|
+
* `var(--mf-chart-1)` olarak GÖMER — `--color-chart-*` takma adının `:root`'tan budanmasından
|
|
19
|
+
* etkilenmez (bkz. color.css / `docs/tr/mimari.md` "@theme inline" notu).
|
|
20
|
+
*/
|
|
21
|
+
declare const MF_CHART_SLOT_COUNT = 8;
|
|
22
|
+
/** SVG dolgu (bar/alan/nokta). `slot` 0 tabanlı; 0-7 dışı → "Diğer". */
|
|
23
|
+
declare function chartFillClass(slot: number): string;
|
|
24
|
+
/** SVG çizgi (line/sparkline). `slot` 0 tabanlı; 0-7 dışı → "Diğer". */
|
|
25
|
+
declare function chartStrokeClass(slot: number): string;
|
|
26
|
+
/** HTML zemin (lejant/tooltip anahtarı, BarList çubuğu). `slot` 0 tabanlı; 0-7 dışı → "Diğer". */
|
|
27
|
+
declare function chartBgClass(slot: number): string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* "Temiz" eksen işaretleri — dataviz: y ekseni işaretleri yuvarlak sayılara oturur (0 / 250 /
|
|
31
|
+
* 500, asla 0 / 237 / 474). Heckbert'in "nice numbers" algoritması: aralığı 1/2/5 × 10^n
|
|
32
|
+
* adımlarına yuvarlar, dönen ilk/son işaret ölçeğin alt/üst sınırı olur (veri onların İÇİNDE).
|
|
33
|
+
* Tüm değerler aynıysa (ör. hepsi 0) ölçek çökmesin diye aralık 1 birim açılır.
|
|
34
|
+
*/
|
|
35
|
+
declare function niceTicks(min: number, max: number, count?: number): number[];
|
|
36
|
+
|
|
37
|
+
interface BarChartPoint {
|
|
38
|
+
label: string;
|
|
39
|
+
value: number;
|
|
40
|
+
}
|
|
41
|
+
interface BarChartBar extends BarChartPoint {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
squareFootY: number;
|
|
47
|
+
squareFootHeight: number;
|
|
48
|
+
labelY: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* `<mf-bar-chart [points]="monthly" [ariaLabel]="'Son 6 ayda katılan üyeler'" />`
|
|
52
|
+
*
|
|
53
|
+
* Tek seri, elle yazılmış inline SVG — grafik kütüphanesi eklenmedi (bu kitin
|
|
54
|
+
* "npm paketi olmayan, kaynağı elinde" doktrini). Tek seri olduğu için LEJANT yok (dataviz doktrini: "a single
|
|
55
|
+
* series needs no legend box"), değerler her çubuğun tepesinde DOĞRUDAN etiketlenir (6 nokta —
|
|
56
|
+
* "her noktayı etiketleme" uyarısının kapsamı yoğun serilere yönelik, 6 noktada tamamı okunabilir).
|
|
57
|
+
*/
|
|
58
|
+
declare class BarChart {
|
|
59
|
+
readonly points: _angular_core.InputSignal<BarChartPoint[]>;
|
|
60
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
61
|
+
readonly valueFormatter: _angular_core.InputSignal<(value: number) => string>;
|
|
62
|
+
protected readonly viewBox = "0 0 300 132";
|
|
63
|
+
protected readonly baselineY = 96;
|
|
64
|
+
protected readonly fillClass: string;
|
|
65
|
+
protected readonly bars: _angular_core.Signal<BarChartBar[]>;
|
|
66
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BarChart, never>;
|
|
67
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BarChart, "mf-bar-chart", never, { "points": { "alias": "points"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "valueFormatter": { "alias": "valueFormatter"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface BarListItem {
|
|
71
|
+
label: string;
|
|
72
|
+
value: number;
|
|
73
|
+
/**
|
|
74
|
+
* Opsiyonel SABİT kategorik slot (0-7) — aynı varlık (ör. 'Yönetici') başka bir grafikte de
|
|
75
|
+
* aynı renkle görünsün isteniyorsa. Verilmezse satır tek serinin rengini (slot 0) alır.
|
|
76
|
+
*/
|
|
77
|
+
colorIndex?: number;
|
|
78
|
+
}
|
|
79
|
+
interface BarListRow extends BarListItem {
|
|
80
|
+
percent: number;
|
|
81
|
+
colorClass: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* `<mf-bar-list [items]="roleDistribution" />`
|
|
85
|
+
*
|
|
86
|
+
* Yatay oranlı liste — TEK bir ölçünün nominal kategorileri: kimliği METİN etiketi, büyüklüğü bar
|
|
87
|
+
* uzunluğu + sayı taşır. Bu yüzden bütün çubuklar TEK serinin rengini (slot 0) alır — dataviz
|
|
88
|
+
* doktrini: nominal çubukları sıraya/değere göre renklendirmek, uzunluğun zaten gösterdiğini
|
|
89
|
+
* renkle tekrar kodlar ve "renk varlığı izler, sırasını değil" kuralını çiğner (eskiden
|
|
90
|
+
* pozisyona göre boyanıyordu — veri sırası değişince aynı rol başka renge bürünüyordu).
|
|
91
|
+
* Varlığa kalıcı bir renk bağlamak için öğe başına `colorIndex`.
|
|
92
|
+
*/
|
|
93
|
+
declare class BarList {
|
|
94
|
+
readonly items: _angular_core.InputSignal<BarListItem[]>;
|
|
95
|
+
readonly valueFormatter: _angular_core.InputSignal<(value: number) => string>;
|
|
96
|
+
protected readonly rows: _angular_core.Signal<BarListRow[]>;
|
|
97
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BarList, never>;
|
|
98
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BarList, "mf-bar-list", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "valueFormatter": { "alias": "valueFormatter"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
interface LineChartSeries {
|
|
102
|
+
name: string;
|
|
103
|
+
values: readonly number[];
|
|
104
|
+
/**
|
|
105
|
+
* SABİT kategorik slot (0-7). Renk VARLIĞI izlemeli — bir filtre seri sayısını değiştirince
|
|
106
|
+
* kalan seriler yeniden boyanmasın diye kalıcı bir değer verin. Verilmezse dizideki pozisyon.
|
|
107
|
+
*/
|
|
108
|
+
colorIndex?: number;
|
|
109
|
+
}
|
|
110
|
+
interface PlotPoint {
|
|
111
|
+
x: number;
|
|
112
|
+
y: number;
|
|
113
|
+
}
|
|
114
|
+
interface PlotSeries {
|
|
115
|
+
name: string;
|
|
116
|
+
values: readonly number[];
|
|
117
|
+
points: PlotPoint[];
|
|
118
|
+
path: string;
|
|
119
|
+
areaPath: string;
|
|
120
|
+
strokeClass: string;
|
|
121
|
+
fillClass: string;
|
|
122
|
+
keyClass: string;
|
|
123
|
+
}
|
|
124
|
+
interface AxisTick {
|
|
125
|
+
value: number;
|
|
126
|
+
y: number;
|
|
127
|
+
label: string;
|
|
128
|
+
}
|
|
129
|
+
interface XLabel {
|
|
130
|
+
x: number;
|
|
131
|
+
text: string;
|
|
132
|
+
anchor: 'start' | 'middle' | 'end';
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* `<mf-line-chart [labels]="months" [series]="series" ariaLabel="Aylık aktif kullanıcı" area />`
|
|
136
|
+
*
|
|
137
|
+
* Çok serili çizgi / alan grafiği — elle yazılmış SVG, grafik kütüphanesi YOK (kitin bağımlılık
|
|
138
|
+
* politikası). Dataviz metoduna göre:
|
|
139
|
+
* - 2px çizgi, yuvarlak birleşim; uç noktada ≥8px işaret + 2px yüzey halkası; alan dolgusu
|
|
140
|
+
* serinin %10'u (doygun blok değil, "yıkama").
|
|
141
|
+
* - Y ekseni temiz sayılara (`niceTicks`), ızgara 1px düz hairline; TEK eksen (çift y ekseni yok).
|
|
142
|
+
* - ≥2 seride lejant HER ZAMAN var; tek seride lejant yok (başlık seriyi adlandırır), uç değer
|
|
143
|
+
* çizginin ucunda doğrudan etiketlenir. Metin ASLA seri rengini taşımaz.
|
|
144
|
+
* - Hover katmanı varsayılan: crosshair en yakın X'e oturur, TEK tooltip o X'teki TÜM serileri
|
|
145
|
+
* listeler (değer önde/güçlü, seri adı ikincil, çizgi anahtarı). Klavyede aynı bilgi: odakta
|
|
146
|
+
* ←/→/Home/End, `aria-live` ile okunur.
|
|
147
|
+
* - Tooltip hiçbir değeri KAPILAMAZ: "Tablo olarak göster" ile aynı veri HTML tablosu olarak.
|
|
148
|
+
*
|
|
149
|
+
* Genişlik kapsayıcıdan (`ResizeObserver`) okunur ve çizim gerçek piksellerle yapılır — sabit
|
|
150
|
+
* `viewBox` ölçeklemesinin aksine etiketler dar kartta küçülmez, çizgiler kalınlaşmaz.
|
|
151
|
+
*/
|
|
152
|
+
declare class LineChart {
|
|
153
|
+
readonly labels: _angular_core.InputSignal<readonly string[]>;
|
|
154
|
+
readonly series: _angular_core.InputSignal<readonly LineChartSeries[]>;
|
|
155
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
156
|
+
readonly area: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
157
|
+
readonly height: _angular_core.InputSignal<number>;
|
|
158
|
+
readonly valueFormatter: _angular_core.InputSignal<(value: number) => string>;
|
|
159
|
+
protected readonly i18n: _angular_core.Signal<_mesgflow_ui_kit_core.MfChartLabels>;
|
|
160
|
+
protected readonly focusRecipe = "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring";
|
|
161
|
+
protected readonly tooltipSurface = "rounded-lg border border-hairline bg-overlay shadow-2";
|
|
162
|
+
private readonly elementRef;
|
|
163
|
+
protected readonly width: _angular_core.WritableSignal<number>;
|
|
164
|
+
protected readonly activeIndex: _angular_core.WritableSignal<number | null>;
|
|
165
|
+
protected readonly tableView: _angular_core.WritableSignal<boolean>;
|
|
166
|
+
protected readonly single: _angular_core.Signal<boolean>;
|
|
167
|
+
protected readonly padRight: _angular_core.Signal<16 | 52>;
|
|
168
|
+
protected readonly plotBottom: _angular_core.Signal<number>;
|
|
169
|
+
protected readonly plotLeft = 44;
|
|
170
|
+
protected readonly plotRight: _angular_core.Signal<number>;
|
|
171
|
+
private readonly domain;
|
|
172
|
+
private readonly scaleY;
|
|
173
|
+
private readonly scaleX;
|
|
174
|
+
protected readonly yTicks: _angular_core.Signal<AxisTick[]>;
|
|
175
|
+
protected readonly xLabels: _angular_core.Signal<XLabel[]>;
|
|
176
|
+
/** Alan dolgusunun ve eksen çizgisinin oturduğu taban — 0 ölçekteyse 0, değilse alt sınır. */
|
|
177
|
+
protected readonly baselineY: _angular_core.Signal<number>;
|
|
178
|
+
protected readonly plotSeries: _angular_core.Signal<PlotSeries[]>;
|
|
179
|
+
protected readonly activeX: _angular_core.Signal<number | null>;
|
|
180
|
+
/** Tooltip crosshair'in sağında; grafiğin sağ yarısındaysa taşmasın diye solunda. */
|
|
181
|
+
protected readonly tooltipStyle: _angular_core.Signal<{
|
|
182
|
+
right: string;
|
|
183
|
+
left?: undefined;
|
|
184
|
+
} | {
|
|
185
|
+
left: string;
|
|
186
|
+
right?: undefined;
|
|
187
|
+
} | null>;
|
|
188
|
+
protected readonly readout: _angular_core.Signal<{
|
|
189
|
+
label: string;
|
|
190
|
+
rows: {
|
|
191
|
+
name: string;
|
|
192
|
+
keyClass: string;
|
|
193
|
+
value: string;
|
|
194
|
+
}[];
|
|
195
|
+
} | null>;
|
|
196
|
+
protected readonly liveText: _angular_core.Signal<string>;
|
|
197
|
+
protected readonly tableRows: _angular_core.Signal<{
|
|
198
|
+
label: string;
|
|
199
|
+
values: string[];
|
|
200
|
+
}[]>;
|
|
201
|
+
constructor();
|
|
202
|
+
protected toggleTable(): void;
|
|
203
|
+
protected onPointerMove(event: PointerEvent): void;
|
|
204
|
+
protected onFocus(): void;
|
|
205
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
206
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LineChart, never>;
|
|
207
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LineChart, "mf-line-chart", ["mfLineChart"], { "labels": { "alias": "labels"; "required": true; "isSignal": true; }; "series": { "alias": "series"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": true; "isSignal": true; }; "area": { "alias": "area"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "valueFormatter": { "alias": "valueFormatter"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* `<mf-sparkline [values]="last12" ariaLabel="Son 12 ay: 120'den 184'e" />`
|
|
212
|
+
*
|
|
213
|
+
* Eksensiz, etkileşimsiz trend glifi — StatTile'ın "trend" satırı (dataviz figür sözleşmesi:
|
|
214
|
+
* çizgi geri planda kalan tonla, GÜNCEL dönem vurgu renginde). Değerin kendisi yanındaki metinde
|
|
215
|
+
* yazdığı için hover katmanı YOK; `ariaLabel` verilmezse süs sayılır (`aria-hidden`).
|
|
216
|
+
* Gerçek piksellerle çizilir (sabit `width`/`height`) — `viewBox` ölçeklemesi uç noktayı
|
|
217
|
+
* elipse çevirirdi.
|
|
218
|
+
*/
|
|
219
|
+
declare class Sparkline {
|
|
220
|
+
readonly values: _angular_core.InputSignal<readonly number[]>;
|
|
221
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
222
|
+
readonly width: _angular_core.InputSignal<number>;
|
|
223
|
+
readonly height: _angular_core.InputSignal<number>;
|
|
224
|
+
readonly area: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
225
|
+
protected readonly geometry: _angular_core.Signal<{
|
|
226
|
+
line: string;
|
|
227
|
+
area: string;
|
|
228
|
+
end: null;
|
|
229
|
+
} | {
|
|
230
|
+
line: string;
|
|
231
|
+
area: string;
|
|
232
|
+
end: {
|
|
233
|
+
x: number;
|
|
234
|
+
y: number;
|
|
235
|
+
};
|
|
236
|
+
}>;
|
|
237
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Sparkline, never>;
|
|
238
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Sparkline, "mf-sparkline", never, { "values": { "alias": "values"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "area": { "alias": "area"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export { BarChart, BarList, LineChart, MF_CHART_SLOT_COUNT, Sparkline, chartBgClass, chartFillClass, chartStrokeClass, niceTicks };
|
|
242
|
+
export type { BarChartPoint, BarListItem, LineChartSeries };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { MfSize } from '@mesgflow/ui-kit/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<input type="checkbox" mfCheckbox">` — `accent-color` (modern tarayıcı
|
|
6
|
+
* desteği) native checkbox'ın kendi tik/kutu görselini renklendiriyor, ayrı
|
|
7
|
+
* bir cva şemasına gerek yok (Switch'in aksine burada özel track+thumb
|
|
8
|
+
* görseli istemiyoruz, native checkbox görünümü + marka rengi yeterli).
|
|
9
|
+
*/
|
|
10
|
+
declare class Checkbox {
|
|
11
|
+
readonly size: _angular_core.InputSignal<MfSize>;
|
|
12
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
13
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Checkbox, never>;
|
|
14
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Checkbox, "input[type=checkbox][mfCheckbox]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Checkbox };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* `<mf-chip removable (removed)="onRemove()">Rol: Yönetici</mf-chip>` — asıl
|
|
7
|
+
* içerik `<ng-content />` ile projekte edilir (ör. `TableFilterBar`'ın
|
|
8
|
+
* kendi tıklanabilir düzenleme düğmesi, bkz. `table-filter-bar.html`); Chip
|
|
9
|
+
* SADECE kabuğu (tonal dolgu + opsiyonel kaldırma düğmesi) sağlar, içeriğin
|
|
10
|
+
* kendi tıklama davranışına karışmaz.
|
|
11
|
+
*/
|
|
12
|
+
declare class Chip {
|
|
13
|
+
readonly tone: _angular_core.InputSignal<"neutral" | "primary" | "success" | "warning" | "danger" | "info" | "help" | null | undefined>;
|
|
14
|
+
readonly size: _angular_core.InputSignal<"sm" | "md" | null | undefined>;
|
|
15
|
+
readonly selected: _angular_core.InputSignal<boolean>;
|
|
16
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
17
|
+
readonly removable: _angular_core.InputSignal<boolean>;
|
|
18
|
+
readonly removeLabel: _angular_core.InputSignal<string | undefined>;
|
|
19
|
+
readonly removed: _angular_core.OutputEmitterRef<void>;
|
|
20
|
+
private readonly chipLabels;
|
|
21
|
+
protected readonly effectiveRemoveLabel: _angular_core.Signal<string>;
|
|
22
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
23
|
+
protected onRemoveClick(event: Event): void;
|
|
24
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Chip, never>;
|
|
25
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Chip, "mf-chip", ["mfChip"], { "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "removeLabel": { "alias": "removeLabel"; "required": false; "isSignal": true; }; }, { "removed": "removed"; }, never, ["*"], true, never>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Badge (bkz. badge.variants.ts) ile AYNI tonal işaret rol token'ı
|
|
30
|
+
* (`bg-X-tint text-X-tint-fg`) — chip Badge'in ETKİLEŞİMLİ (kaldırılabilir/
|
|
31
|
+
* seçilebilir) hali, o yüzden aynı görsel aileyi paylaşıyor. `text-eyebrow`'un
|
|
32
|
+
* mono/büyük-harf kimliği BİLEREK burada YOK — chip genelde "Rol: Yönetici"
|
|
33
|
+
* gibi okunabilir, karma büyük/küçük harfli içerik taşıyor (Badge'in kısa
|
|
34
|
+
* durum etiketlerinin aksine).
|
|
35
|
+
*/
|
|
36
|
+
declare const chipVariants: (props?: ({
|
|
37
|
+
tone?: "neutral" | "primary" | "success" | "warning" | "danger" | "info" | "help" | null | undefined;
|
|
38
|
+
size?: "sm" | "md" | null | undefined;
|
|
39
|
+
selected?: boolean | null | undefined;
|
|
40
|
+
disabled?: boolean | null | undefined;
|
|
41
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
42
|
+
type ChipTone = VariantProps<typeof chipVariants>['tone'];
|
|
43
|
+
type ChipSize = VariantProps<typeof chipVariants>['size'];
|
|
44
|
+
|
|
45
|
+
export { Chip, chipVariants };
|
|
46
|
+
export type { ChipSize, ChipTone };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, Provider } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<mf-code-block [code]="snippet" filename="app.config.ts" language="ts" lineNumbers />`
|
|
6
|
+
*
|
|
7
|
+
* Başlık şeridi (dosya adı · dil rozeti · kopyala) yalnızca `filename`/`language` verilince
|
|
8
|
+
* çizilir; yoksa kopyala düğmesi sağ üst köşede yüzer. Kaydırma alanı odaklanabilir ve adlı bir
|
|
9
|
+
* `role="group"` (klavyeyle kaydırılabilsin — axe `scrollable-region-focusable`). `region`
|
|
10
|
+
* DEĞİL: region bir landmark; bir sayfadaki onlarca "Kod" bölgesi landmark listesini kirletip
|
|
11
|
+
* axe `landmark-unique` ihlali veriyordu (showcase rota taramasında yakalandı).
|
|
12
|
+
*
|
|
13
|
+
* Satır numaraları kaydırma alanının İÇİNDE, yatayda yapışkan (`sticky start-0`) bir oluk —
|
|
14
|
+
* dikey kaydırmada satırlarla hizalı kalır, yatayda yerinde durur; seçimle kopyalanmaz.
|
|
15
|
+
* `wrap` satır kaydırır ama numaralarla birlikte kullanılamaz (kaydırılan satır numara
|
|
16
|
+
* hizasını bozar) — ikisi birden verilirse `lineNumbers` kazanır.
|
|
17
|
+
*
|
|
18
|
+
* Vurgulama isteğe bağlı: `provideCodeHighlighter()` (bkz. `code-highlighter.ts`).
|
|
19
|
+
*/
|
|
20
|
+
declare class CodeBlock {
|
|
21
|
+
readonly code: _angular_core.InputSignal<string>;
|
|
22
|
+
readonly language: _angular_core.InputSignal<string | undefined>;
|
|
23
|
+
readonly filename: _angular_core.InputSignal<string | undefined>;
|
|
24
|
+
readonly lineNumbers: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
25
|
+
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
26
|
+
readonly copyable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
27
|
+
/** Kaydırma alanının azami yüksekliği (CSS uzunluğu, ör. `'20rem'`); verilmezse sınırsız. */
|
|
28
|
+
readonly maxHeight: _angular_core.InputSignal<string | undefined>;
|
|
29
|
+
private readonly highlighter;
|
|
30
|
+
private readonly labels;
|
|
31
|
+
protected readonly hasHeader: _angular_core.Signal<boolean>;
|
|
32
|
+
protected readonly regionLabel: _angular_core.Signal<string>;
|
|
33
|
+
protected readonly highlighted: _angular_core.Signal<string | object | null>;
|
|
34
|
+
/** Sondaki satır sonu boş bir satır numarası üretmesin. */
|
|
35
|
+
protected readonly lines: _angular_core.Signal<number[]>;
|
|
36
|
+
protected readonly wraps: _angular_core.Signal<boolean>;
|
|
37
|
+
protected readonly preClasses: _angular_core.Signal<string>;
|
|
38
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CodeBlock, never>;
|
|
39
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CodeBlock, "mf-code-block", ["mfCodeBlock"], { "code": { "alias": "code"; "required": true; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "filename": { "alias": "filename"; "required": false; "isSignal": true; }; "lineNumbers": { "alias": "lineNumbers"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "copyable": { "alias": "copyable"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Kod → vurgulanmış HTML. Dönüş `[innerHTML]` ile basılır: düz `string` Angular'ın sanitizer'ından
|
|
44
|
+
* geçer (sınıflar kalır, satır içi `style` atılır — highlight.js/Prism gibi SINIF tabanlı
|
|
45
|
+
* vurgulayıcılar olduğu gibi çalışır). Satır içi renk kullanan bir çıktıya (ör. varsayılan shiki)
|
|
46
|
+
* güveniyorsanız `DomSanitizer.bypassSecurityTrustHtml` çıktısını döndürün — sorumluluk sizde.
|
|
47
|
+
* (Tip `object`: kit `@angular/platform-browser`'a peer bağımlılık eklemesin diye `SafeHtml` yerine.)
|
|
48
|
+
*/
|
|
49
|
+
type MfCodeHighlighter = (code: string, language: string | undefined) => string | object;
|
|
50
|
+
/** Varsayılan `null` — kit vurgulama kütüphanesi GÖMMEZ (bağımlılık politikası); düz metin. */
|
|
51
|
+
declare const MF_CODE_HIGHLIGHTER: InjectionToken<MfCodeHighlighter | null>;
|
|
52
|
+
/** `providers: [provideCodeHighlighter((code, lang) => hljs.highlight(code, { language: lang ?? 'plaintext' }).value)]` */
|
|
53
|
+
declare function provideCodeHighlighter(highlighter: MfCodeHighlighter): Provider;
|
|
54
|
+
|
|
55
|
+
export { CodeBlock, MF_CODE_HIGHLIGHTER, provideCodeHighlighter };
|
|
56
|
+
export type { MfCodeHighlighter };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `<mf-collapsible [(open)]="advanced">
|
|
5
|
+
* <button mfButton mfCollapsibleTrigger>Gelişmiş ayarlar</button>
|
|
6
|
+
* <mf-collapsible-content>…</mf-collapsible-content>
|
|
7
|
+
* </mf-collapsible>`
|
|
8
|
+
*
|
|
9
|
+
* Tek bir aç/kapa bölümü (WAI-ARIA "disclosure"). Birden çok bölüm ve "yalnızca biri açık"
|
|
10
|
+
* kuralı için `Accordion`. Tetikleyici herhangi bir `<button>` — görünümü tüketicide.
|
|
11
|
+
*/
|
|
12
|
+
declare class Collapsible {
|
|
13
|
+
readonly open: i0.ModelSignal<boolean>;
|
|
14
|
+
readonly disabled: i0.InputSignalWithTransform<boolean, unknown>;
|
|
15
|
+
readonly contentId: string;
|
|
16
|
+
toggle(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Collapsible, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Collapsible, "mf-collapsible", ["mfCollapsible"], { "open": { "alias": "open"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, ["*"], true, never>;
|
|
19
|
+
}
|
|
20
|
+
/** `button[mfCollapsibleTrigger]` — `aria-expanded`/`aria-controls` bağlı; bkz. `Collapsible`. */
|
|
21
|
+
declare class CollapsibleTrigger {
|
|
22
|
+
protected readonly collapsible: Collapsible;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleTrigger, never>;
|
|
24
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CollapsibleTrigger, "button[mfCollapsibleTrigger]", ["mfCollapsibleTrigger"], {}, {}, never, never, true, never>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Yükseklik `grid-template-rows: 0fr → 1fr` ile animasyonlanır — içerik yüksekliği ölçülmez
|
|
28
|
+
* (JS yok, içerik sonradan büyüse de doğru). Kapalıyken `inert`: içindeki odaklanabilir öğeler
|
|
29
|
+
* sekme sırasından ve erişilebilirlik ağacından çıkar (yalnızca `height: 0` bunu yapmazdı).
|
|
30
|
+
* `prefers-reduced-motion`'da geçiş süresi tokens/motion.css'teki genel kuralla sıfırlanır.
|
|
31
|
+
*/
|
|
32
|
+
declare class CollapsibleContent {
|
|
33
|
+
protected readonly collapsible: Collapsible;
|
|
34
|
+
protected readonly classes: i0.Signal<string>;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleContent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CollapsibleContent, "mf-collapsible-content", ["mfCollapsibleContent"], {}, {}, never, ["*"], true, never>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as _mesgflow_ui_kit_core from '@mesgflow/ui-kit/core';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { ElementRef } from '@angular/core';
|
|
4
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
5
|
+
|
|
6
|
+
interface Hsv {
|
|
7
|
+
h: number;
|
|
8
|
+
s: number;
|
|
9
|
+
v: number;
|
|
10
|
+
}
|
|
11
|
+
interface Rgb {
|
|
12
|
+
r: number;
|
|
13
|
+
g: number;
|
|
14
|
+
b: number;
|
|
15
|
+
}
|
|
16
|
+
declare function hexToRgb(hex: string): Rgb | null;
|
|
17
|
+
declare function rgbToHex({ r, g, b }: Rgb): string;
|
|
18
|
+
declare function rgbToHsv({ r, g, b }: Rgb): Hsv;
|
|
19
|
+
declare function hsvToRgb({ h, s, v }: Hsv): Rgb;
|
|
20
|
+
|
|
21
|
+
interface EyeDropperResult {
|
|
22
|
+
sRGBHex: string;
|
|
23
|
+
}
|
|
24
|
+
interface EyeDropperApi {
|
|
25
|
+
open(): Promise<EyeDropperResult>;
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface Window {
|
|
29
|
+
EyeDropper?: new () => EyeDropperApi;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* `<mf-color-picker [(value)]="brandColor" [palette]="brandPalette" />` —
|
|
34
|
+
* HSV alanı + hue slider + hex girdi + marka paleti + (destekleniyorsa)
|
|
35
|
+
* `EyeDropper` API. `@angular/aria`'da hazır bir color-picker pattern'i YOK
|
|
36
|
+
* — HSV alanı ve hue slider'ı `Slider`'daki AYNI hand-rolled pointer/klavye
|
|
37
|
+
* yaklaşımıyla kuruldu. Overlay pozisyonlaması `Select`'in kanıtlanmış
|
|
38
|
+
* `cdkConnectedOverlay` deseni.
|
|
39
|
+
*/
|
|
40
|
+
declare class ColorPicker implements ControlValueAccessor {
|
|
41
|
+
/** Varsayılan — kitin kendi marka rengi (`--color-primary-600`, bkz. tokens/color.css) — jenerik bir Tailwind yeşili DEĞİL. */
|
|
42
|
+
readonly value: _angular_core.ModelSignal<string>;
|
|
43
|
+
readonly palette: _angular_core.InputSignal<string[]>;
|
|
44
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
45
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
46
|
+
private onChange;
|
|
47
|
+
private onTouched;
|
|
48
|
+
protected readonly colorPickerLabels: _angular_core.Signal<_mesgflow_ui_kit_core.MfColorPickerLabels>;
|
|
49
|
+
protected readonly effectiveAriaLabel: _angular_core.Signal<string>;
|
|
50
|
+
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
51
|
+
protected readonly hexDraft: _angular_core.WritableSignal<string>;
|
|
52
|
+
protected readonly areaEl: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
|
|
53
|
+
protected readonly hueTrackEl: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
|
|
54
|
+
protected readonly hsv: _angular_core.Signal<Hsv>;
|
|
55
|
+
protected readonly areaBackground: _angular_core.Signal<string>;
|
|
56
|
+
protected readonly supportsEyeDropper: boolean;
|
|
57
|
+
writeValue(value: string): void;
|
|
58
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
59
|
+
registerOnTouched(fn: () => void): void;
|
|
60
|
+
protected toggle(): void;
|
|
61
|
+
protected close(): void;
|
|
62
|
+
private setHsv;
|
|
63
|
+
protected onAreaPointerDown(event: PointerEvent): void;
|
|
64
|
+
protected onAreaPointerMove(event: PointerEvent): void;
|
|
65
|
+
private updateFromAreaPointer;
|
|
66
|
+
protected onHuePointerDown(event: PointerEvent): void;
|
|
67
|
+
protected onHuePointerMove(event: PointerEvent): void;
|
|
68
|
+
private updateFromHuePointer;
|
|
69
|
+
protected onHexInput(raw: string): void;
|
|
70
|
+
protected selectPaletteColor(hex: string): void;
|
|
71
|
+
protected pickWithEyeDropper(): Promise<void>;
|
|
72
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
73
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorPicker, never>;
|
|
74
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColorPicker, "mf-color-picker", ["mfColorPicker"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "palette": { "alias": "palette"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { ColorPicker, hexToRgb, hsvToRgb, rgbToHex, rgbToHsv };
|
|
78
|
+
export type { Hsv, Rgb };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as _mesgflow_ui_kit_core from '@mesgflow/ui-kit/core';
|
|
2
|
+
import { MfSize } from '@mesgflow/ui-kit/core';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
5
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
+
import { VariantProps } from 'class-variance-authority';
|
|
7
|
+
|
|
8
|
+
interface ComboboxOption<T> {
|
|
9
|
+
label: string;
|
|
10
|
+
value: T;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* `<mf-combobox [options]="opts" [(value)]="chosen" placeholder="Ara..." />`
|
|
14
|
+
*
|
|
15
|
+
* `Select`'in (bkz. select.ts) genişletilmiş hâli — filtrelenebilir/typeahead
|
|
16
|
+
* seçim. `@angular/aria/combobox` + `@angular/aria/listbox` zincirini
|
|
17
|
+
* KULLANMADI, bilinçli bir tercih: o zincir kendi popup pozisyonlamasını
|
|
18
|
+
* taşımıyor (headless), `Select`'in ZATEN kanıtlanmış CDK Overlay + elle ARIA
|
|
19
|
+
* deseni (highlighted index, `role="listbox"`/`role="option"`) buraya
|
|
20
|
+
* genişletmek, dört ayrı directive'i (Combobox/ComboboxPopup/ComboboxWidget/
|
|
21
|
+
* Listbox/Option) doğru sırayla bağlamaktan daha az riskli.
|
|
22
|
+
*
|
|
23
|
+
* `(mousedown)="$event.preventDefault()"` seçenek satırında ZORUNLU —
|
|
24
|
+
* aksi halde input'un `blur`'ı `click`'ten ÖNCE tetiklenip paneli kapatır
|
|
25
|
+
* (klasik combobox tuzağı).
|
|
26
|
+
*/
|
|
27
|
+
declare class Combobox<T> implements ControlValueAccessor {
|
|
28
|
+
readonly options: _angular_core.InputSignal<ComboboxOption<T>[]>;
|
|
29
|
+
readonly value: _angular_core.ModelSignal<T | null>;
|
|
30
|
+
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
31
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
32
|
+
readonly size: _angular_core.InputSignal<MfSize>;
|
|
33
|
+
readonly hasError: _angular_core.InputSignal<boolean>;
|
|
34
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
35
|
+
private onChange;
|
|
36
|
+
private onTouched;
|
|
37
|
+
protected readonly comboboxLabels: _angular_core.Signal<_mesgflow_ui_kit_core.MfComboboxLabels>;
|
|
38
|
+
protected readonly effectivePlaceholder: _angular_core.Signal<string>;
|
|
39
|
+
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
40
|
+
protected readonly query: _angular_core.WritableSignal<string>;
|
|
41
|
+
protected readonly highlighted: _angular_core.WritableSignal<number>;
|
|
42
|
+
protected readonly triggerClasses: _angular_core.Signal<string>;
|
|
43
|
+
/** ARIA 1.2 combobox deseni: input'un `aria-controls`'ü panel listbox'ına işaret etmeli. */
|
|
44
|
+
protected readonly listboxId: string;
|
|
45
|
+
protected readonly selectedLabel: _angular_core.Signal<string>;
|
|
46
|
+
protected readonly filteredOptions: _angular_core.Signal<ComboboxOption<T>[]>;
|
|
47
|
+
writeValue(value: T | null): void;
|
|
48
|
+
registerOnChange(fn: (value: T | null) => void): void;
|
|
49
|
+
registerOnTouched(fn: () => void): void;
|
|
50
|
+
protected onFocus(): void;
|
|
51
|
+
protected onQueryInput(raw: string): void;
|
|
52
|
+
protected select(option: ComboboxOption<T>): void;
|
|
53
|
+
protected close(): void;
|
|
54
|
+
protected isSelected(option: ComboboxOption<T>): boolean;
|
|
55
|
+
protected optionClasses(option: ComboboxOption<T>, index: number): string;
|
|
56
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
57
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Combobox<any>, never>;
|
|
58
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Combobox<any>, "mf-combobox", ["mfCombobox"], { "options": { "alias": "options"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "hasError": { "alias": "hasError"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** `Select`'in trigger/option görsel diliyle AYNI — bkz. select.variants.ts / `core/recipes.ts`. */
|
|
62
|
+
declare const comboboxTriggerVariants: (props?: ({
|
|
63
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
64
|
+
hasError?: boolean | null | undefined;
|
|
65
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
66
|
+
type ComboboxSize = VariantProps<typeof comboboxTriggerVariants>['size'];
|
|
67
|
+
type ComboboxHasError = VariantProps<typeof comboboxTriggerVariants>['hasError'];
|
|
68
|
+
declare const comboboxOptionVariants: (props?: ({
|
|
69
|
+
highlighted?: boolean | null | undefined;
|
|
70
|
+
selected?: boolean | null | undefined;
|
|
71
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
72
|
+
|
|
73
|
+
export { Combobox, comboboxOptionVariants, comboboxTriggerVariants };
|
|
74
|
+
export type { ComboboxHasError, ComboboxOption, ComboboxSize };
|