@mesgflow/ui-kit 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -5
- package/fesm2022/mesgflow-ui-kit-accordion.mjs +3 -2
- package/fesm2022/mesgflow-ui-kit-accordion.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-agenda.mjs +208 -0
- package/fesm2022/mesgflow-ui-kit-agenda.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-aspect-ratio.mjs +37 -0
- package/fesm2022/mesgflow-ui-kit-aspect-ratio.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-blocks.mjs +207 -0
- package/fesm2022/mesgflow-ui-kit-blocks.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-box-input.mjs +2 -2
- package/fesm2022/mesgflow-ui-kit-box-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-button.mjs +188 -242
- package/fesm2022/mesgflow-ui-kit-button.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-card.mjs +37 -16
- package/fesm2022/mesgflow-ui-kit-card.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-carousel.mjs +308 -0
- package/fesm2022/mesgflow-ui-kit-carousel.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-checkbox.mjs +16 -21
- package/fesm2022/mesgflow-ui-kit-checkbox.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-chip.mjs +2 -2
- package/fesm2022/mesgflow-ui-kit-chip.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-code-block.mjs +9 -5
- package/fesm2022/mesgflow-ui-kit-code-block.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-color-picker.mjs +6 -4
- package/fesm2022/mesgflow-ui-kit-color-picker.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-combobox.mjs +145 -65
- package/fesm2022/mesgflow-ui-kit-combobox.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-context-menu.mjs +4 -6
- package/fesm2022/mesgflow-ui-kit-context-menu.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-core.mjs +441 -128
- package/fesm2022/mesgflow-ui-kit-core.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-countdown.mjs +149 -0
- package/fesm2022/mesgflow-ui-kit-countdown.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-date-picker.mjs +131 -10
- package/fesm2022/mesgflow-ui-kit-date-picker.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-dialog.mjs +117 -34
- package/fesm2022/mesgflow-ui-kit-dialog.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-drawer.mjs +109 -0
- package/fesm2022/mesgflow-ui-kit-drawer.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-dropzone.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-dropzone.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-field.mjs +53 -12
- package/fesm2022/mesgflow-ui-kit-field.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-file-upload.mjs +356 -0
- package/fesm2022/mesgflow-ui-kit-file-upload.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-i18n-tr.mjs +131 -0
- package/fesm2022/mesgflow-ui-kit-i18n-tr.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-icon.mjs +6 -1
- package/fesm2022/mesgflow-ui-kit-icon.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-icons-lucide.mjs +371 -0
- package/fesm2022/mesgflow-ui-kit-icons-lucide.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-inline-edit.mjs +279 -0
- package/fesm2022/mesgflow-ui-kit-inline-edit.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-input.mjs +147 -4
- package/fesm2022/mesgflow-ui-kit-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-lightbox.mjs +299 -0
- package/fesm2022/mesgflow-ui-kit-lightbox.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-link.mjs +2 -2
- package/fesm2022/mesgflow-ui-kit-link.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-listbox.mjs +151 -0
- package/fesm2022/mesgflow-ui-kit-listbox.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-mention.mjs +283 -0
- package/fesm2022/mesgflow-ui-kit-mention.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-menu.mjs +169 -5
- package/fesm2022/mesgflow-ui-kit-menu.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-nav-menu.mjs +276 -0
- package/fesm2022/mesgflow-ui-kit-nav-menu.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-notification-center.mjs +281 -0
- package/fesm2022/mesgflow-ui-kit-notification-center.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-number-input.mjs +7 -4
- package/fesm2022/mesgflow-ui-kit-number-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-pagination.mjs +4 -3
- package/fesm2022/mesgflow-ui-kit-pagination.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-password-input.mjs +7 -2
- package/fesm2022/mesgflow-ui-kit-password-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-popover.mjs +9 -49
- package/fesm2022/mesgflow-ui-kit-popover.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-progress.mjs +162 -21
- package/fesm2022/mesgflow-ui-kit-progress.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-radio.mjs +4 -6
- package/fesm2022/mesgflow-ui-kit-radio.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-rating.mjs +2 -2
- package/fesm2022/mesgflow-ui-kit-rating.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-search-input.mjs +9 -5
- package/fesm2022/mesgflow-ui-kit-search-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-segmented-control.mjs +12 -8
- package/fesm2022/mesgflow-ui-kit-segmented-control.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-select.mjs +3 -2
- package/fesm2022/mesgflow-ui-kit-select.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-sidebar.mjs +16 -13
- package/fesm2022/mesgflow-ui-kit-sidebar.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-skeleton.mjs +4 -3
- package/fesm2022/mesgflow-ui-kit-skeleton.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-slider.mjs +250 -3
- package/fesm2022/mesgflow-ui-kit-slider.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-sortable.mjs +526 -0
- package/fesm2022/mesgflow-ui-kit-sortable.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-spinner.mjs +42 -13
- package/fesm2022/mesgflow-ui-kit-spinner.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-split-button.mjs +205 -0
- package/fesm2022/mesgflow-ui-kit-split-button.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-splitter.mjs +210 -3
- package/fesm2022/mesgflow-ui-kit-splitter.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-stat-tile.mjs +11 -4
- package/fesm2022/mesgflow-ui-kit-stat-tile.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-stepper.mjs +167 -60
- package/fesm2022/mesgflow-ui-kit-stepper.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-switch.mjs +2 -2
- package/fesm2022/mesgflow-ui-kit-switch.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-table.mjs +16 -10
- package/fesm2022/mesgflow-ui-kit-table.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-tabs.mjs +410 -169
- package/fesm2022/mesgflow-ui-kit-tabs.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-tag-input.mjs +7 -2
- package/fesm2022/mesgflow-ui-kit-tag-input.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-theming.mjs +4 -4
- package/fesm2022/mesgflow-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-time-picker.mjs +3 -3
- package/fesm2022/mesgflow-ui-kit-time-picker.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-toast.mjs +113 -30
- package/fesm2022/mesgflow-ui-kit-toast.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-toggle.mjs +3 -2
- package/fesm2022/mesgflow-ui-kit-toggle.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-toolbar.mjs +4 -2
- package/fesm2022/mesgflow-ui-kit-toolbar.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-tooltip.mjs +73 -50
- package/fesm2022/mesgflow-ui-kit-tooltip.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-tour.mjs +8 -20
- package/fesm2022/mesgflow-ui-kit-tour.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-transfer-list.mjs +288 -0
- package/fesm2022/mesgflow-ui-kit-transfer-list.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit-tree.mjs +1 -1
- package/fesm2022/mesgflow-ui-kit-tree.mjs.map +1 -1
- package/fesm2022/mesgflow-ui-kit-virtual-list.mjs +109 -0
- package/fesm2022/mesgflow-ui-kit-virtual-list.mjs.map +1 -0
- package/fesm2022/mesgflow-ui-kit.mjs +92 -12836
- package/fesm2022/mesgflow-ui-kit.mjs.map +1 -1
- package/package.json +87 -3
- package/schematics/collection.json +10 -0
- package/schematics/migration.json +10 -0
- package/schematics/migrations/v0-7.cjs +70 -0
- package/schematics/ng-add/index.cjs +234 -0
- package/schematics/ng-add/schema.json +43 -0
- package/tokens/color.css +96 -0
- package/tokens/controls.css +145 -0
- package/tokens/elevation.css +62 -6
- package/tokens/motion.css +304 -66
- package/tokens/radius.css +14 -0
- package/tokens.css +1 -0
- package/tokens.json +1583 -0
- package/types/mesgflow-ui-kit-agenda.d.ts +49 -0
- package/types/mesgflow-ui-kit-aspect-ratio.d.ts +18 -0
- package/types/mesgflow-ui-kit-blocks.d.ts +128 -0
- package/types/mesgflow-ui-kit-button.d.ts +23 -38
- package/types/mesgflow-ui-kit-card.d.ts +26 -16
- package/types/mesgflow-ui-kit-carousel.d.ts +51 -0
- package/types/mesgflow-ui-kit-checkbox.d.ts +8 -5
- package/types/mesgflow-ui-kit-code-block.d.ts +4 -1
- package/types/mesgflow-ui-kit-combobox.d.ts +47 -22
- package/types/mesgflow-ui-kit-core.d.ts +271 -21
- package/types/mesgflow-ui-kit-countdown.d.ts +47 -0
- package/types/mesgflow-ui-kit-date-picker.d.ts +31 -1
- package/types/mesgflow-ui-kit-dialog.d.ts +29 -6
- package/types/mesgflow-ui-kit-drawer.d.ts +45 -0
- package/types/mesgflow-ui-kit-field.d.ts +17 -8
- package/types/mesgflow-ui-kit-file-upload.d.ts +64 -0
- package/types/mesgflow-ui-kit-hover-card.d.ts +2 -2
- package/types/mesgflow-ui-kit-icons-lucide.d.ts +27 -0
- package/types/mesgflow-ui-kit-inline-edit.d.ts +42 -0
- package/types/mesgflow-ui-kit-input.d.ts +64 -2
- package/types/mesgflow-ui-kit-lightbox.d.ts +54 -0
- package/types/mesgflow-ui-kit-listbox.d.ts +30 -0
- package/types/mesgflow-ui-kit-mention.d.ts +59 -0
- package/types/mesgflow-ui-kit-menu.d.ts +41 -2
- package/types/mesgflow-ui-kit-nav-menu.d.ts +58 -0
- package/types/mesgflow-ui-kit-notification-center.d.ts +41 -0
- package/types/mesgflow-ui-kit-number-input.d.ts +3 -1
- package/types/mesgflow-ui-kit-password-input.d.ts +3 -1
- package/types/mesgflow-ui-kit-popover.d.ts +13 -5
- package/types/mesgflow-ui-kit-progress.d.ts +33 -12
- package/types/mesgflow-ui-kit-radio.d.ts +2 -2
- package/types/mesgflow-ui-kit-search-input.d.ts +3 -1
- package/types/mesgflow-ui-kit-segmented-control.d.ts +4 -0
- package/types/mesgflow-ui-kit-sidebar.d.ts +1 -1
- package/types/mesgflow-ui-kit-slider.d.ts +60 -1
- package/types/mesgflow-ui-kit-sortable.d.ts +103 -0
- package/types/mesgflow-ui-kit-spinner.d.ts +5 -8
- package/types/mesgflow-ui-kit-split-button.d.ts +47 -0
- package/types/mesgflow-ui-kit-splitter.d.ts +64 -1
- package/types/mesgflow-ui-kit-stat-tile.d.ts +3 -0
- package/types/mesgflow-ui-kit-stepper.d.ts +54 -32
- package/types/mesgflow-ui-kit-table.d.ts +2 -0
- package/types/mesgflow-ui-kit-tabs.d.ts +193 -93
- package/types/mesgflow-ui-kit-tag-input.d.ts +3 -1
- package/types/mesgflow-ui-kit-toast.d.ts +48 -22
- package/types/mesgflow-ui-kit-tooltip.d.ts +15 -12
- package/types/mesgflow-ui-kit-transfer-list.d.ts +34 -0
- package/types/mesgflow-ui-kit-virtual-list.d.ts +35 -0
- package/types/mesgflow-ui-kit.d.ts +87 -5444
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, input, computed, signal, DestroyRef, afterNextRender, effect, Directive, viewChild, afterRenderEffect, Component, model, output } from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, input, computed, signal, DestroyRef, afterNextRender, effect, Directive, booleanAttribute, viewChild, contentChildren, afterRenderEffect, Component, forwardRef, contentChild, model, output } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/aria/tabs';
|
|
4
|
-
import { TabList as TabList$1, Tab as Tab$1,
|
|
5
|
-
import { isRtl, scrollFromInlineStart, MF_TABS_LABELS, cn } from '@mesgflow/ui-kit/core';
|
|
4
|
+
import { TabList as TabList$1, Tab as Tab$1, Tabs as Tabs$1, TabPanel as TabPanel$1 } from '@angular/aria/tabs';
|
|
5
|
+
import { isRtl, scrollFromInlineStart, transitionRecipe, focusRecipe, controlSize, MF_TABS_LABELS, cn, SlidingIndicator } from '@mesgflow/ui-kit/core';
|
|
6
6
|
import { Button } from '@mesgflow/ui-kit/button';
|
|
7
7
|
import { Icon } from '@mesgflow/ui-kit/icon';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
@@ -106,131 +106,201 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
106
106
|
}], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }] } });
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* `card` görünümünde her sekme zaten kendi kenarlığıyla ayrık bir kutu —
|
|
113
|
-
* kayan tek bir gösterge o kutuların üstünden "kayarak" geçmezdi, doğal
|
|
114
|
-
* durmazdı. `relative` — kayan gösterge `absolute` konumlanıyor buna göre.
|
|
115
|
-
*
|
|
116
|
-
* `orientation` ekseni sol dikey grup rayı gerektiren ekranlar için eklendi —
|
|
117
|
-
* `@angular/aria/tabs`'ın ARIA/klavye desteği zaten yön-agnostik
|
|
118
|
-
* (`hostDirectives`'in `orientation` girdisi, bkz. `tab-list.ts`), eksik
|
|
119
|
-
* olan sadece bu görsel katmandı.
|
|
109
|
+
* Sekme satırı (`#row`). `relative` — kayan göstergeler `absolute` konumlanır ve
|
|
110
|
+
* satır onların `offsetParent`'ı. `fill`: satır rayı tüm genişliğe yayılsın mı
|
|
111
|
+
* (underline'ın hairline'ı, `stretch`, `align` ≠ start).
|
|
120
112
|
*/
|
|
121
113
|
const tabListVariants = cva('relative flex', {
|
|
122
114
|
variants: {
|
|
123
115
|
variant: {
|
|
124
|
-
underline: 'gap-1',
|
|
116
|
+
underline: 'gap-1 border-hairline',
|
|
117
|
+
pills: 'gap-1',
|
|
118
|
+
segmented: 'gap-0.5 rounded-lg bg-surface-alt p-0.5',
|
|
125
119
|
card: 'gap-1.5',
|
|
126
120
|
},
|
|
127
121
|
orientation: {
|
|
128
122
|
horizontal: 'min-w-max items-center',
|
|
129
123
|
vertical: 'w-full flex-col items-stretch',
|
|
130
124
|
},
|
|
125
|
+
align: {
|
|
126
|
+
start: 'justify-start',
|
|
127
|
+
center: 'justify-center',
|
|
128
|
+
end: 'justify-end',
|
|
129
|
+
},
|
|
130
|
+
fill: { true: 'w-full', false: '' },
|
|
131
|
+
},
|
|
132
|
+
compoundVariants: [
|
|
133
|
+
{ variant: 'underline', orientation: 'horizontal', class: 'border-b' },
|
|
134
|
+
{ variant: 'underline', orientation: 'vertical', class: 'border-s' },
|
|
135
|
+
],
|
|
136
|
+
defaultVariants: { variant: 'underline', orientation: 'horizontal', align: 'start', fill: false },
|
|
137
|
+
});
|
|
138
|
+
/**
|
|
139
|
+
* Seçili sekmeyi izleyen kayan öğe (`[mfSlidingIndicator]`). Motor yalnız ana
|
|
140
|
+
* ekseni (konum + genişlik/yükseklik) yazar; çapraz eksen buradan gelir.
|
|
141
|
+
* `card`'da kayan gösterge YOK — ayrık kutuların arasından kayması doğal durmaz.
|
|
142
|
+
*/
|
|
143
|
+
const tabIndicatorVariants = cva('', {
|
|
144
|
+
variants: {
|
|
145
|
+
variant: {
|
|
146
|
+
underline: 'rounded-full bg-accent-fill',
|
|
147
|
+
pills: 'rounded-md bg-primary-tint',
|
|
148
|
+
segmented: 'rounded-md bg-surface shadow-1',
|
|
149
|
+
card: 'hidden',
|
|
150
|
+
},
|
|
151
|
+
orientation: { horizontal: '', vertical: '' },
|
|
131
152
|
},
|
|
153
|
+
compoundVariants: [
|
|
154
|
+
{ variant: 'underline', orientation: 'horizontal', class: '-bottom-px h-0.5' },
|
|
155
|
+
{ variant: 'underline', orientation: 'vertical', class: '-start-px w-0.5' },
|
|
156
|
+
{ variant: 'pills', orientation: 'horizontal', class: 'inset-y-0' },
|
|
157
|
+
{ variant: 'pills', orientation: 'vertical', class: 'inset-x-0' },
|
|
158
|
+
{ variant: 'segmented', orientation: 'horizontal', class: 'inset-y-0.5' },
|
|
159
|
+
{ variant: 'segmented', orientation: 'vertical', class: 'inset-x-0.5' },
|
|
160
|
+
],
|
|
161
|
+
defaultVariants: { variant: 'underline', orientation: 'horizontal' },
|
|
162
|
+
});
|
|
163
|
+
/** İmleç altındaki sekmeyi izleyen yumuşak vurgu (yalnız underline/pills). */
|
|
164
|
+
const tabHoverVariants = cva('rounded-md bg-state-hover', {
|
|
165
|
+
variants: {
|
|
166
|
+
variant: { underline: '', pills: '' },
|
|
167
|
+
orientation: { horizontal: '', vertical: '' },
|
|
168
|
+
},
|
|
169
|
+
compoundVariants: [
|
|
170
|
+
{ variant: 'underline', orientation: 'horizontal', class: 'inset-y-1' },
|
|
171
|
+
{ variant: 'underline', orientation: 'vertical', class: 'inset-x-1' },
|
|
172
|
+
{ variant: 'pills', orientation: 'horizontal', class: 'inset-y-0' },
|
|
173
|
+
{ variant: 'pills', orientation: 'vertical', class: 'inset-x-0' },
|
|
174
|
+
],
|
|
132
175
|
defaultVariants: { variant: 'underline', orientation: 'horizontal' },
|
|
133
176
|
});
|
|
134
177
|
/**
|
|
135
|
-
* `
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
178
|
+
* Sekme (`button[mfTab]`, `a[mfTabLink]`, TabStrip). Seçili durum yalnız RENK
|
|
179
|
+
* değiştirir — `font-medium` her durumda, genişlik zıplaması olmaz. `ownHover`:
|
|
180
|
+
* satır hover vurgusunu kendisi çizmiyorsa sekme kendi hover zeminini çizer.
|
|
181
|
+
* `selected`/`disabled` CSS öznitelik seçicisiyle değil, sekmenin kendi
|
|
182
|
+
* sinyalleriyle besleniyor (Select `optionClasses`, Table `rowClasses` deseni).
|
|
183
|
+
*
|
|
184
|
+
* Odak halkası İÇERİDE (`-outline-offset-2`): sekmeler taşma kaydırıcısının
|
|
185
|
+
* (`overflow: auto`) içinde; dışa taşan halka kapsayıcı kenarında kırpılıyordu.
|
|
140
186
|
*/
|
|
141
|
-
const tabVariants = cva('relative inline-flex shrink-0 cursor-pointer appearance-none items-center gap-1.5 whitespace-nowrap border-0 bg-transparent
|
|
142
|
-
|
|
187
|
+
const tabVariants = cva('relative inline-flex shrink-0 cursor-pointer appearance-none items-center justify-center gap-1.5 whitespace-nowrap border-0 bg-transparent font-medium text-fg-muted no-underline active:scale-[0.99] ' +
|
|
188
|
+
transitionRecipe +
|
|
189
|
+
' ' +
|
|
190
|
+
focusRecipe +
|
|
191
|
+
' focus-visible:-outline-offset-2', {
|
|
143
192
|
variants: {
|
|
144
193
|
variant: {
|
|
145
|
-
underline: 'rounded-
|
|
146
|
-
|
|
194
|
+
underline: 'rounded-md',
|
|
195
|
+
pills: 'rounded-md',
|
|
196
|
+
segmented: 'rounded-md',
|
|
197
|
+
card: 'rounded-sm border border-transparent',
|
|
198
|
+
},
|
|
199
|
+
size: {
|
|
200
|
+
sm: controlSize.sm,
|
|
201
|
+
md: controlSize.md,
|
|
202
|
+
lg: controlSize.lg,
|
|
147
203
|
},
|
|
148
204
|
orientation: {
|
|
149
205
|
horizontal: '',
|
|
150
206
|
vertical: 'w-full justify-start text-start',
|
|
151
207
|
},
|
|
152
208
|
selected: {
|
|
153
|
-
true: '',
|
|
154
|
-
false: 'hover:
|
|
209
|
+
true: 'text-fg',
|
|
210
|
+
false: 'hover:text-fg',
|
|
155
211
|
},
|
|
156
212
|
disabled: {
|
|
157
213
|
true: 'pointer-events-none opacity-50 active:scale-100',
|
|
158
214
|
false: '',
|
|
159
215
|
},
|
|
216
|
+
stretch: { true: 'flex-1', false: '' },
|
|
217
|
+
ownHover: { true: '', false: '' },
|
|
160
218
|
},
|
|
161
219
|
compoundVariants: [
|
|
162
|
-
{
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
* `@theme inline`'ın `--color-accent-fill` katmanını DEĞİL doğrudan
|
|
170
|
-
* `--mf-*`'i hedefliyor — `box-shadow` arbitrary value'su bir utility
|
|
171
|
-
* DEĞİL, Tailwind'in "bu inline değişkeni emit et" taramasına
|
|
172
|
-
* güvenmek yerine kaynağa doğrudan bağlanmak daha sağlam.
|
|
173
|
-
*/
|
|
220
|
+
{ selected: false, ownHover: true, class: 'hover:bg-state-hover' },
|
|
221
|
+
{ variant: 'pills', selected: true, class: 'text-primary-tint-fg' },
|
|
222
|
+
{
|
|
223
|
+
variant: 'card',
|
|
224
|
+
selected: true,
|
|
225
|
+
class: "border-border bg-canvas after:pointer-events-none after:absolute after:rounded-full after:bg-accent-fill after:content-['']",
|
|
226
|
+
},
|
|
174
227
|
{
|
|
175
228
|
variant: 'card',
|
|
176
229
|
orientation: 'horizontal',
|
|
177
230
|
selected: true,
|
|
178
|
-
class: '
|
|
231
|
+
class: 'after:inset-x-0 after:bottom-0 after:h-0.5',
|
|
179
232
|
},
|
|
180
233
|
{
|
|
181
234
|
variant: 'card',
|
|
182
235
|
orientation: 'vertical',
|
|
183
236
|
selected: true,
|
|
184
|
-
class: '
|
|
237
|
+
class: 'after:inset-y-0 after:start-0 after:w-0.5',
|
|
185
238
|
},
|
|
186
239
|
],
|
|
187
240
|
defaultVariants: {
|
|
188
241
|
variant: 'underline',
|
|
242
|
+
size: 'md',
|
|
189
243
|
orientation: 'horizontal',
|
|
190
244
|
selected: false,
|
|
191
245
|
disabled: false,
|
|
246
|
+
stretch: false,
|
|
247
|
+
ownHover: true,
|
|
192
248
|
},
|
|
193
249
|
});
|
|
250
|
+
/** `<span mfTabCount>12</span>` — sekme içi sayaç rozeti; seçili sekmede tonlanır. */
|
|
251
|
+
const tabCountVariants = cva('inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-medium tabular-nums ' +
|
|
252
|
+
transitionRecipe, {
|
|
253
|
+
variants: {
|
|
254
|
+
selected: {
|
|
255
|
+
true: 'bg-primary-tint text-primary-tint-fg',
|
|
256
|
+
false: 'bg-surface-alt text-fg-muted',
|
|
257
|
+
},
|
|
258
|
+
variant: { underline: '', pills: '', segmented: '', card: '' },
|
|
259
|
+
},
|
|
260
|
+
compoundVariants: [
|
|
261
|
+
// Hap zaten primary-tint — sayaç üstünde ayrışsın diye yüzey rengi.
|
|
262
|
+
{ variant: 'pills', selected: true, class: 'bg-surface text-fg shadow-1' },
|
|
263
|
+
{ variant: 'segmented', selected: true, class: 'bg-surface-alt text-fg' },
|
|
264
|
+
],
|
|
265
|
+
defaultVariants: { selected: false, variant: 'underline' },
|
|
266
|
+
});
|
|
194
267
|
|
|
195
268
|
/**
|
|
196
|
-
* `<mf-tab-list [(selectedTab)]="active" variant="
|
|
197
|
-
* — `mf-tabs` içine konur, `mfTab`
|
|
198
|
-
*
|
|
199
|
-
* `hostDirectives` ile
|
|
200
|
-
*
|
|
201
|
-
* İki premium detay burada yaşıyor:
|
|
202
|
-
* 1. **Kayan ray göstergesi** (`underline` varyantı) — aktif sekme
|
|
203
|
-
* değişince `positionIndicator()` DOM'dan `[aria-selected="true"]`
|
|
204
|
-
* elemanın `offsetLeft`/`offsetWidth`'ini (yatayda) ya da `offsetTop`/
|
|
205
|
-
* `offsetHeight`'ını (dikeyde) ölçüp göstergeyi kaydırıyor (emsal:
|
|
206
|
-
* `table-pagination.ts`'in odak restorasyonundaki `afterRenderEffect` +
|
|
207
|
-
* `viewChild(ElementRef)` deseni). `ResizeObserver` yeniden boyutlanmada
|
|
208
|
-
* (font yüklenmesi, viewport) yeniden ölçer. `card` varyantında AYRI bir
|
|
209
|
-
* gösterge YOK — ray her sekmenin kendi `box-shadow`'unda yaşıyor
|
|
210
|
-
* (bkz. tabs.variants.ts).
|
|
211
|
-
* 2. **Taşma yönetimi** — `mfTabScroller` (bkz. o dosya) kaydırma+kenar
|
|
212
|
-
* solma maskesi sağlıyor; ok butonları SADECE o yönde taşma varken
|
|
213
|
-
* render edilir. Aktif sekme değişince görünür alana kaydırılır.
|
|
269
|
+
* `<mf-tab-list [(selectedTab)]="active" variant="pills" size="sm">…</mf-tab-list>`
|
|
270
|
+
* — `mf-tabs` içine konur, `mfTab` düğmelerini sarar. ARIA/klavye (oklar,
|
|
271
|
+
* Home/End, Enter/Boşluk) `@angular/aria/tabs`'ın `TabList`'inden
|
|
272
|
+
* `hostDirectives` ile gelir; `orientation`/`selectedTab`/`selectionMode`…
|
|
273
|
+
* oradan iletilir (burada ikinci kez `input()` TANIMLANMAZ — NG2017).
|
|
214
274
|
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* `
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
275
|
+
* Premium katman:
|
|
276
|
+
* - **Kayan gösterge** — `underline` çizgisi, `pills` hapı, `segmented` parçası
|
|
277
|
+
* tek motorla (`[mfSlidingIndicator]`, core) yay eğrisiyle kayar. `card`'da
|
|
278
|
+
* seçili çizgi her kutunun kendisinde (bkz. tabs.variants.ts).
|
|
279
|
+
* - **Hover izleme** — `hoverHighlight` (underline/pills): imlecin altındaki
|
|
280
|
+
* sekmenin arkasında ikinci bir yumuşak vurgu kayar; dokunmatikte yok.
|
|
281
|
+
* - **Boyut** `sm | md | lg` — Button/Input ile aynı kontrol yüksekliği merdiveni.
|
|
282
|
+
* - **Yerleşim** — `stretch` (sekmeler eşit genişler), `align` (yatay hizalama);
|
|
283
|
+
* `orientation="vertical"` olunca `mf-tabs` kendiliğinden yan yana yerleşir.
|
|
284
|
+
* - **Taşma** — `mfTabScroller` kaydırma + kenar maskesi; oklar yalnız taşma
|
|
285
|
+
* varken çıkar, seçili sekme görünür alana kaydırılır.
|
|
286
|
+
* - Hiçbir sekme bağlı değilse ilk etkin sekme seçilir.
|
|
223
287
|
*
|
|
224
|
-
* `
|
|
225
|
-
* `
|
|
226
|
-
*
|
|
227
|
-
* preserveContent`'teki aynı kısıt), `ariaTabList.orientation()` üzerinden
|
|
228
|
-
* `protected readonly orientation` olarak okunuyor; `Tab` (tab.ts) bunu
|
|
229
|
-
* `variant()` ile aynı `inject()` deseniyle ebeveynden alıyor.
|
|
288
|
+
* `tab-list.html`'deki sarmalayıcının dikeydeki `items-stretch`'i BİLEREK —
|
|
289
|
+
* `items-center` genişliği scroller/satır/sekmelere iletmiyor, `truncate`
|
|
290
|
+
* hiç devreye girmiyordu (gerçek bir hataydı).
|
|
230
291
|
*/
|
|
231
292
|
class TabList {
|
|
232
293
|
variant = input('underline', /* @ts-ignore */
|
|
233
294
|
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
295
|
+
size = input('md', /* @ts-ignore */
|
|
296
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
297
|
+
/** Yatay: sekmeler satırı eşit paylaşır. */
|
|
298
|
+
stretch = input(false, { ...(ngDevMode ? { debugName: "stretch" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
299
|
+
/** Yatay hizalama. */
|
|
300
|
+
align = input('start', /* @ts-ignore */
|
|
301
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
302
|
+
/** İmleci izleyen yumuşak vurgu (yalnız `underline` ve `pills`). */
|
|
303
|
+
hoverHighlight = input(true, { ...(ngDevMode ? { debugName: "hoverHighlight" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
234
304
|
scrollStartLabel = input(/* @ts-ignore */
|
|
235
305
|
...(ngDevMode ? [undefined, { debugName: "scrollStartLabel" }] : /* istanbul ignore next */ []));
|
|
236
306
|
scrollEndLabel = input(/* @ts-ignore */
|
|
@@ -240,17 +310,37 @@ class TabList {
|
|
|
240
310
|
...(ngDevMode ? [{ debugName: "effectiveScrollStartLabel" }] : /* istanbul ignore next */ []));
|
|
241
311
|
effectiveScrollEndLabel = computed(() => this.scrollEndLabel() ?? this.tabsLabels().scrollEnd, /* @ts-ignore */
|
|
242
312
|
...(ngDevMode ? [{ debugName: "effectiveScrollEndLabel" }] : /* istanbul ignore next */ []));
|
|
243
|
-
/** `
|
|
313
|
+
/** `Tab`, `TabCount` ve `Tabs` bu sınıfı `inject()` ile okur — tek kaynak. */
|
|
244
314
|
ariaTabList = inject(TabList$1);
|
|
245
|
-
/** `Tab` (tab.ts) bunu `variant()` ile aynı `inject()` deseniyle okuyor — bu yüzden `public`. */
|
|
246
315
|
orientation = computed(() => this.ariaTabList.orientation(), /* @ts-ignore */
|
|
247
316
|
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
248
317
|
isVertical = computed(() => this.orientation() === 'vertical', /* @ts-ignore */
|
|
249
318
|
...(ngDevMode ? [{ debugName: "isVertical" }] : /* istanbul ignore next */ []));
|
|
250
|
-
|
|
319
|
+
axis = computed(() => (this.isVertical() ? 'y' : 'x'), /* @ts-ignore */
|
|
320
|
+
...(ngDevMode ? [{ debugName: "axis" }] : /* istanbul ignore next */ []));
|
|
321
|
+
/** Satır kendi hover vurgusunu çiziyor mu — öyleyse sekmeler kendininkini çizmez. */
|
|
322
|
+
drawsHover = computed(() => this.hoverHighlight() && (this.variant() === 'underline' || this.variant() === 'pills'), /* @ts-ignore */
|
|
323
|
+
...(ngDevMode ? [{ debugName: "drawsHover" }] : /* istanbul ignore next */ []));
|
|
324
|
+
listClasses = computed(() => {
|
|
325
|
+
const vertical = this.isVertical();
|
|
326
|
+
return cn(tabListVariants({
|
|
327
|
+
variant: this.variant(),
|
|
328
|
+
orientation: this.orientation(),
|
|
329
|
+
align: vertical ? 'start' : this.align(),
|
|
330
|
+
fill: !vertical &&
|
|
331
|
+
(this.variant() === 'underline' || this.stretch() || this.align() !== 'start'),
|
|
332
|
+
}));
|
|
333
|
+
}, /* @ts-ignore */
|
|
251
334
|
...(ngDevMode ? [{ debugName: "listClasses" }] : /* istanbul ignore next */ []));
|
|
252
|
-
indicatorClasses = computed(() =>
|
|
335
|
+
indicatorClasses = computed(() => tabIndicatorVariants({ variant: this.variant(), orientation: this.orientation() }), /* @ts-ignore */
|
|
253
336
|
...(ngDevMode ? [{ debugName: "indicatorClasses" }] : /* istanbul ignore next */ []));
|
|
337
|
+
hoverClasses = computed(() => tabHoverVariants({
|
|
338
|
+
variant: this.variant() === 'pills' ? 'pills' : 'underline',
|
|
339
|
+
orientation: this.orientation(),
|
|
340
|
+
}), /* @ts-ignore */
|
|
341
|
+
...(ngDevMode ? [{ debugName: "hoverClasses" }] : /* istanbul ignore next */ []));
|
|
342
|
+
hoveredTab = signal(null, /* @ts-ignore */
|
|
343
|
+
...(ngDevMode ? [{ debugName: "hoveredTab" }] : /* istanbul ignore next */ []));
|
|
254
344
|
scroller = viewChild(TabScroller, /* @ts-ignore */
|
|
255
345
|
...(ngDevMode ? [{ debugName: "scroller" }] : /* istanbul ignore next */ []));
|
|
256
346
|
showStartArrow = computed(() => this.scroller()?.canScrollStart() ?? false, /* @ts-ignore */
|
|
@@ -259,50 +349,39 @@ class TabList {
|
|
|
259
349
|
...(ngDevMode ? [{ debugName: "showEndArrow" }] : /* istanbul ignore next */ []));
|
|
260
350
|
rowEl = viewChild('row', /* @ts-ignore */
|
|
261
351
|
...(ngDevMode ? [{ debugName: "rowEl" }] : /* istanbul ignore next */ []));
|
|
262
|
-
|
|
263
|
-
...(ngDevMode ? [{ debugName: "indicatorEl" }] : /* istanbul ignore next */ []));
|
|
352
|
+
tabs = contentChildren(Tab$1, { ...(ngDevMode ? { debugName: "tabs" } : /* istanbul ignore next */ {}), descendants: true });
|
|
264
353
|
constructor() {
|
|
265
|
-
const destroyRef = inject(DestroyRef);
|
|
266
354
|
afterRenderEffect(() => {
|
|
267
355
|
this.ariaTabList.selectedTab();
|
|
268
|
-
this.
|
|
356
|
+
const active = this.rowEl()?.nativeElement.querySelector('[aria-selected="true"]');
|
|
357
|
+
if (active)
|
|
358
|
+
this.scroller()?.scrollIntoViewIfNeeded(active);
|
|
269
359
|
});
|
|
360
|
+
// Bağlı bir seçim yoksa ilk etkin sekme — boş bir panel alanı hiç görünmesin.
|
|
270
361
|
afterNextRender(() => {
|
|
271
|
-
|
|
272
|
-
if (!row || typeof ResizeObserver === 'undefined')
|
|
362
|
+
if (this.ariaTabList.selectedTab() !== undefined)
|
|
273
363
|
return;
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
|
|
364
|
+
const first = this.tabs().find((tab) => !tab.disabled());
|
|
365
|
+
if (first)
|
|
366
|
+
this.ariaTabList.open(first.value());
|
|
277
367
|
});
|
|
278
368
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
const indicator = this.indicatorEl()?.nativeElement;
|
|
282
|
-
if (!row || !indicator)
|
|
369
|
+
onPointerOver(event) {
|
|
370
|
+
if (!this.drawsHover() || event.pointerType === 'touch')
|
|
283
371
|
return;
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
if (this.isVertical()) {
|
|
291
|
-
indicator.style.transform = `translateY(${active.offsetTop}px)`;
|
|
292
|
-
indicator.style.height = `${active.offsetHeight}px`;
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
indicator.style.transform = `translateX(${active.offsetLeft}px)`;
|
|
296
|
-
indicator.style.width = `${active.offsetWidth}px`;
|
|
297
|
-
}
|
|
298
|
-
this.scroller()?.scrollIntoViewIfNeeded(active);
|
|
372
|
+
const tab = event.target?.closest('[role="tab"]:not([aria-disabled="true"])');
|
|
373
|
+
if (tab)
|
|
374
|
+
this.hoveredTab.set(tab);
|
|
375
|
+
}
|
|
376
|
+
onPointerLeave() {
|
|
377
|
+
this.hoveredTab.set(null);
|
|
299
378
|
}
|
|
300
379
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
301
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: TabList, isStandalone: true, selector: "mf-tab-list", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, scrollStartLabel: { classPropertyName: "scrollStartLabel", publicName: "scrollStartLabel", isSignal: true, isRequired: false, transformFunction: null }, scrollEndLabel: { classPropertyName: "scrollEndLabel", publicName: "scrollEndLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" },
|
|
380
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: TabList, isStandalone: true, selector: "mf-tab-list", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, stretch: { classPropertyName: "stretch", publicName: "stretch", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, hoverHighlight: { classPropertyName: "hoverHighlight", publicName: "hoverHighlight", isSignal: true, isRequired: false, transformFunction: null }, scrollStartLabel: { classPropertyName: "scrollStartLabel", publicName: "scrollStartLabel", isSignal: true, isRequired: false, transformFunction: null }, scrollEndLabel: { classPropertyName: "scrollEndLabel", publicName: "scrollEndLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.shrink-0": "isVertical()" }, classAttribute: "block min-w-0" }, queries: [{ propertyName: "tabs", predicate: Tab$1, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "scroller", first: true, predicate: TabScroller, descendants: true, isSignal: true }, { propertyName: "rowEl", first: true, predicate: ["row"], descendants: true, isSignal: true }], exportAs: ["mfTabList"], hostDirectives: [{ directive: i1.TabList, inputs: ["orientation", "orientation", "wrap", "wrap", "softDisabled", "softDisabled", "focusMode", "focusMode", "selectionMode", "selectionMode", "disabled", "disabled", "selectedTab", "selectedTab"], outputs: ["selectedTabChange", "selectedTabChange"] }], ngImport: i0, template: "<div\r\n class=\"flex gap-1\"\r\n [class.flex-col]=\"isVertical()\"\r\n [class.items-center]=\"!isVertical()\"\r\n [class.items-stretch]=\"isVertical()\"\r\n>\r\n @if (showStartArrow()) {\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n class=\"shrink-0\"\r\n [attr.aria-label]=\"effectiveScrollStartLabel()\"\r\n (click)=\"scroller()?.scrollByDir(-1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">{{\r\n isVertical() ? 'keyboard_arrow_up' : 'chevron_left'\r\n }}</span>\r\n </button>\r\n }\r\n\r\n <div mfTabScroller [orientation]=\"orientation()\" class=\"grow\">\r\n <div\r\n #row\r\n [class]=\"listClasses()\"\r\n (pointerover)=\"onPointerOver($event)\"\r\n (pointerleave)=\"onPointerLeave()\"\r\n >\r\n <!-- G\u00F6stergeler i\u00E7erikten \u00D6NCE: `relative` sekmeler onlar\u0131n \u00FCst\u00FCne boyan\u0131r. -->\r\n @if (drawsHover()) {\r\n <span\r\n mfSlidingIndicator\r\n data-tab-hover\r\n [axis]=\"axis()\"\r\n [target]=\"hoveredTab()\"\r\n [class]=\"hoverClasses()\"\r\n ></span>\r\n }\r\n @if (variant() !== 'card') {\r\n <span\r\n mfSlidingIndicator\r\n data-tab-indicator\r\n [axis]=\"axis()\"\r\n [track]=\"ariaTabList.selectedTab()\"\r\n [class]=\"indicatorClasses()\"\r\n ></span>\r\n }\r\n <ng-content />\r\n </div>\r\n </div>\r\n\r\n @if (showEndArrow()) {\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n class=\"shrink-0\"\r\n [attr.aria-label]=\"effectiveScrollEndLabel()\"\r\n (click)=\"scroller()?.scrollByDir(1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">{{\r\n isVertical() ? 'keyboard_arrow_down' : 'chevron_right'\r\n }}</span>\r\n </button>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "component", type: Button, selector: "button[mfButton], a[mfButton]", inputs: ["tone", "appearance", "size", "shape", "type", "loading", "iconStart", "iconEnd"], exportAs: ["mfButton"] }, { kind: "directive", type: Icon, selector: "span[mfIcon]", inputs: ["size", "filled"] }, { kind: "directive", type: TabScroller, selector: "[mfTabScroller]", inputs: ["orientation"] }, { kind: "directive", type: SlidingIndicator, selector: "[mfSlidingIndicator]", inputs: ["axis", "target", "track", "container"], exportAs: ["mfSlidingIndicator"] }] });
|
|
302
381
|
}
|
|
303
382
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabList, decorators: [{
|
|
304
383
|
type: Component,
|
|
305
|
-
args: [{ selector: 'mf-tab-list', imports: [Button, Icon, TabScroller], hostDirectives: [
|
|
384
|
+
args: [{ selector: 'mf-tab-list', exportAs: 'mfTabList', imports: [Button, Icon, TabScroller, SlidingIndicator], hostDirectives: [
|
|
306
385
|
{
|
|
307
386
|
directive: TabList$1,
|
|
308
387
|
inputs: [
|
|
@@ -316,42 +395,219 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
316
395
|
],
|
|
317
396
|
outputs: ['selectedTabChange'],
|
|
318
397
|
},
|
|
319
|
-
], host: { class: 'block' }, template: "<div\r\n class=\"flex gap-1\"\r\n [class.flex-col]=\"isVertical()\"\r\n [class.items-center]=\"!isVertical()\"\r\n [class.items-stretch]=\"isVertical()\"\r\n>\r\n @if (showStartArrow()) {\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n class=\"shrink-0\"\r\n [attr.aria-label]=\"effectiveScrollStartLabel()\"\r\n (click)=\"scroller()?.scrollByDir(-1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">{{\r\n isVertical() ? 'keyboard_arrow_up' : 'chevron_left'\r\n }}</span>\r\n </button>\r\n }\r\n\r\n <div mfTabScroller [orientation]=\"orientation()\">\r\n <div
|
|
320
|
-
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], scrollStartLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStartLabel", required: false }] }], scrollEndLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollEndLabel", required: false }] }], scroller: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TabScroller), { isSignal: true }] }], rowEl: [{ type: i0.ViewChild, args: ['row', { isSignal: true }] }],
|
|
398
|
+
], host: { class: 'block min-w-0', '[class.shrink-0]': 'isVertical()' }, template: "<div\r\n class=\"flex gap-1\"\r\n [class.flex-col]=\"isVertical()\"\r\n [class.items-center]=\"!isVertical()\"\r\n [class.items-stretch]=\"isVertical()\"\r\n>\r\n @if (showStartArrow()) {\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n class=\"shrink-0\"\r\n [attr.aria-label]=\"effectiveScrollStartLabel()\"\r\n (click)=\"scroller()?.scrollByDir(-1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">{{\r\n isVertical() ? 'keyboard_arrow_up' : 'chevron_left'\r\n }}</span>\r\n </button>\r\n }\r\n\r\n <div mfTabScroller [orientation]=\"orientation()\" class=\"grow\">\r\n <div\r\n #row\r\n [class]=\"listClasses()\"\r\n (pointerover)=\"onPointerOver($event)\"\r\n (pointerleave)=\"onPointerLeave()\"\r\n >\r\n <!-- G\u00F6stergeler i\u00E7erikten \u00D6NCE: `relative` sekmeler onlar\u0131n \u00FCst\u00FCne boyan\u0131r. -->\r\n @if (drawsHover()) {\r\n <span\r\n mfSlidingIndicator\r\n data-tab-hover\r\n [axis]=\"axis()\"\r\n [target]=\"hoveredTab()\"\r\n [class]=\"hoverClasses()\"\r\n ></span>\r\n }\r\n @if (variant() !== 'card') {\r\n <span\r\n mfSlidingIndicator\r\n data-tab-indicator\r\n [axis]=\"axis()\"\r\n [track]=\"ariaTabList.selectedTab()\"\r\n [class]=\"indicatorClasses()\"\r\n ></span>\r\n }\r\n <ng-content />\r\n </div>\r\n </div>\r\n\r\n @if (showEndArrow()) {\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n class=\"shrink-0\"\r\n [attr.aria-label]=\"effectiveScrollEndLabel()\"\r\n (click)=\"scroller()?.scrollByDir(1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">{{\r\n isVertical() ? 'keyboard_arrow_down' : 'chevron_right'\r\n }}</span>\r\n </button>\r\n }\r\n</div>\r\n" }]
|
|
399
|
+
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], stretch: [{ type: i0.Input, args: [{ isSignal: true, alias: "stretch", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], hoverHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverHighlight", required: false }] }], scrollStartLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStartLabel", required: false }] }], scrollEndLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollEndLabel", required: false }] }], scroller: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TabScroller), { isSignal: true }] }], rowEl: [{ type: i0.ViewChild, args: ['row', { isSignal: true }] }], tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => Tab$1), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
321
400
|
|
|
322
401
|
/**
|
|
323
|
-
* `<button mfTab value="genel">Genel</button>`
|
|
324
|
-
* konur. ARIA/klavye/seçim davranışı `@angular/aria/tabs`'ın `Tab`
|
|
325
|
-
* pattern'inden `hostDirectives` ile geliyor (bkz. `tabs.ts` üstündeki not);
|
|
326
|
-
* bu directive sadece görsel katmanı ekliyor. `value`/`disabled`/`id`
|
|
327
|
-
* girdileri `hostDirectives`'in `inputs` listesiyle dışarı açıldı — tüketici
|
|
328
|
-
* doğrudan `[value]`/`[disabled]` bağlar, `ngTab` attribute'unu YAZMAZ.
|
|
402
|
+
* `<button mfTab value="genel"><span mfIcon [size]="16">tune</span>Genel <span mfTabCount>3</span></button>`
|
|
329
403
|
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
404
|
+
* ARIA/klavye/seçim `@angular/aria/tabs`'ın `Tab`'ından `hostDirectives` ile
|
|
405
|
+
* gelir; `value`/`disabled`/`id` doğrudan bağlanır (`ngTab` YAZILMAZ). Görünüm
|
|
406
|
+
* (varyant, boyut, yön, stretch) ebeveyn `mf-tab-list`'ten `inject()` ile
|
|
407
|
+
* okunur — sekme kendi görünüm girdisini TAŞIMAZ, tek kaynak liste.
|
|
332
408
|
*/
|
|
333
409
|
class Tab {
|
|
334
410
|
ariaTab = inject(Tab$1);
|
|
335
411
|
tabList = inject(TabList, { optional: true });
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
412
|
+
/** `TabCount` seçili tonu için okur. */
|
|
413
|
+
selected = computed(() => this.ariaTab.selected(), /* @ts-ignore */
|
|
414
|
+
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
415
|
+
classes = computed(() => {
|
|
416
|
+
const list = this.tabList;
|
|
417
|
+
const vertical = list?.isVertical() ?? false;
|
|
418
|
+
return cn(tabVariants({
|
|
419
|
+
variant: list?.variant() ?? 'underline',
|
|
420
|
+
size: list?.size() ?? 'md',
|
|
421
|
+
orientation: vertical ? 'vertical' : 'horizontal',
|
|
422
|
+
selected: this.ariaTab.selected(),
|
|
423
|
+
disabled: this.ariaTab.disabled(),
|
|
424
|
+
stretch: !vertical && (list?.stretch() ?? false),
|
|
425
|
+
ownHover: !(list?.drawsHover() ?? false),
|
|
426
|
+
}));
|
|
427
|
+
}, /* @ts-ignore */
|
|
342
428
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
343
429
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Tab, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
344
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: Tab, isStandalone: true, selector: "button[mfTab]", host: { properties: { "attr.type": "'button'", "class": "classes()" } }, hostDirectives: [{ directive: i1.Tab, inputs: ["value", "value", "disabled", "disabled", "id", "id"] }], ngImport: i0 });
|
|
430
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: Tab, isStandalone: true, selector: "button[mfTab]", host: { properties: { "attr.type": "'button'", "class": "classes()" } }, exportAs: ["mfTab"], hostDirectives: [{ directive: i1.Tab, inputs: ["value", "value", "disabled", "disabled", "id", "id"] }], ngImport: i0 });
|
|
345
431
|
}
|
|
346
432
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Tab, decorators: [{
|
|
347
433
|
type: Directive,
|
|
348
434
|
args: [{
|
|
349
435
|
selector: 'button[mfTab]',
|
|
436
|
+
exportAs: 'mfTab',
|
|
350
437
|
hostDirectives: [{ directive: Tab$1, inputs: ['value', 'disabled', 'id'] }],
|
|
351
438
|
host: { '[attr.type]': "'button'", '[class]': 'classes()' },
|
|
352
439
|
}]
|
|
353
440
|
}] });
|
|
354
441
|
|
|
442
|
+
/**
|
|
443
|
+
* `<button mfTab value="inbox">Gelen <span mfTabCount>12</span></button>`
|
|
444
|
+
*
|
|
445
|
+
* Sekme içi sayaç rozeti — seçili sekmede tonlanır (`pills`'te hap zaten ton
|
|
446
|
+
* olduğu için yüzey rengine döner). Görsel bir ektir: ekran okuyucu sayıyı
|
|
447
|
+
* sekme adının parçası olarak okur ("Gelen 12").
|
|
448
|
+
*/
|
|
449
|
+
class TabCount {
|
|
450
|
+
tab = inject(Tab, { optional: true });
|
|
451
|
+
tabList = inject(TabList, { optional: true });
|
|
452
|
+
classes = computed(() => cn(tabCountVariants({
|
|
453
|
+
selected: this.tab?.selected() ?? false,
|
|
454
|
+
variant: this.tabList?.variant() ?? 'underline',
|
|
455
|
+
})), /* @ts-ignore */
|
|
456
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
457
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabCount, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
458
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: TabCount, isStandalone: true, selector: "span[mfTabCount]", host: { properties: { "class": "classes()" } }, exportAs: ["mfTabCount"], ngImport: i0 });
|
|
459
|
+
}
|
|
460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabCount, decorators: [{
|
|
461
|
+
type: Directive,
|
|
462
|
+
args: [{
|
|
463
|
+
selector: 'span[mfTabCount]',
|
|
464
|
+
exportAs: 'mfTabCount',
|
|
465
|
+
host: { '[class]': 'classes()' },
|
|
466
|
+
}]
|
|
467
|
+
}] });
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* ```html
|
|
471
|
+
* <mf-tab-nav ariaLabel="Proje">
|
|
472
|
+
* <a mfTabLink routerLink="overview" routerLinkActive #o="routerLinkActive" [active]="o.isActive">Genel bakış</a>
|
|
473
|
+
* <a mfTabLink routerLink="settings" routerLinkActive #s="routerLinkActive" [active]="s.isActive">Ayarlar</a>
|
|
474
|
+
* </mf-tab-nav>
|
|
475
|
+
* ```
|
|
476
|
+
*
|
|
477
|
+
* Sayfalar arası GEZİNME için sekme görünümü — `mf-tabs` ile aynı varyantlar,
|
|
478
|
+
* boyutlar ve kayan gösterge, ama semantik olarak bir `<nav>` + bağlantılar:
|
|
479
|
+
* `role="tab"`/ok tuşu YOK (gezinen bağlantıda sekme rolü WAI-ARIA'da yanlış
|
|
480
|
+
* desen), etkin bağlantı `aria-current="page"` taşır, klavye doğal Tab/Enter.
|
|
481
|
+
* Kit `@angular/router`'a bağımlı değil — `active`'i tüketici bağlar
|
|
482
|
+
* (`routerLinkActive` ya da kendi durumu). Yalnız yatay; dikey gezinme Sidebar'ın işi.
|
|
483
|
+
*/
|
|
484
|
+
class TabNav {
|
|
485
|
+
variant = input('underline', /* @ts-ignore */
|
|
486
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
487
|
+
size = input('md', /* @ts-ignore */
|
|
488
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
489
|
+
stretch = input(false, { ...(ngDevMode ? { debugName: "stretch" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
490
|
+
align = input('start', /* @ts-ignore */
|
|
491
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
492
|
+
hoverHighlight = input(true, { ...(ngDevMode ? { debugName: "hoverHighlight" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
493
|
+
/** `<nav>` işaret noktasının adı — sayfada birden çok nav varsa zorunlu. */
|
|
494
|
+
ariaLabel = input(/* @ts-ignore */
|
|
495
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
496
|
+
links = contentChildren(forwardRef(() => TabLink), { ...(ngDevMode ? { debugName: "links" } : /* istanbul ignore next */ {}), descendants: true });
|
|
497
|
+
/** Etkin bağlantı değişince göstergeyi yeniden ölçtürür. */
|
|
498
|
+
activeIndex = computed(() => this.links().findIndex((l) => l.active()), /* @ts-ignore */
|
|
499
|
+
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
500
|
+
drawsHover = computed(() => this.hoverHighlight() && (this.variant() === 'underline' || this.variant() === 'pills'), /* @ts-ignore */
|
|
501
|
+
...(ngDevMode ? [{ debugName: "drawsHover" }] : /* istanbul ignore next */ []));
|
|
502
|
+
listClasses = computed(() => cn(tabListVariants({
|
|
503
|
+
variant: this.variant(),
|
|
504
|
+
orientation: 'horizontal',
|
|
505
|
+
align: this.align(),
|
|
506
|
+
fill: this.variant() === 'underline' || this.stretch() || this.align() !== 'start',
|
|
507
|
+
})), /* @ts-ignore */
|
|
508
|
+
...(ngDevMode ? [{ debugName: "listClasses" }] : /* istanbul ignore next */ []));
|
|
509
|
+
indicatorClasses = computed(() => tabIndicatorVariants({ variant: this.variant(), orientation: 'horizontal' }), /* @ts-ignore */
|
|
510
|
+
...(ngDevMode ? [{ debugName: "indicatorClasses" }] : /* istanbul ignore next */ []));
|
|
511
|
+
hoverClasses = computed(() => tabHoverVariants({
|
|
512
|
+
variant: this.variant() === 'pills' ? 'pills' : 'underline',
|
|
513
|
+
orientation: 'horizontal',
|
|
514
|
+
}), /* @ts-ignore */
|
|
515
|
+
...(ngDevMode ? [{ debugName: "hoverClasses" }] : /* istanbul ignore next */ []));
|
|
516
|
+
hoveredLink = signal(null, /* @ts-ignore */
|
|
517
|
+
...(ngDevMode ? [{ debugName: "hoveredLink" }] : /* istanbul ignore next */ []));
|
|
518
|
+
onPointerOver(event) {
|
|
519
|
+
if (!this.drawsHover() || event.pointerType === 'touch')
|
|
520
|
+
return;
|
|
521
|
+
const link = event.target?.closest('a[mfTabLink]');
|
|
522
|
+
if (link)
|
|
523
|
+
this.hoveredLink.set(link);
|
|
524
|
+
}
|
|
525
|
+
onPointerLeave() {
|
|
526
|
+
this.hoveredLink.set(null);
|
|
527
|
+
}
|
|
528
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabNav, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
529
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: TabNav, isStandalone: true, selector: "mf-tab-nav", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, stretch: { classPropertyName: "stretch", publicName: "stretch", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, hoverHighlight: { classPropertyName: "hoverHighlight", publicName: "hoverHighlight", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block min-w-0" }, queries: [{ propertyName: "links", predicate: i0.forwardRef(() => TabLink), descendants: true, isSignal: true }], exportAs: ["mfTabNav"], ngImport: i0, template: "<nav [attr.aria-label]=\"ariaLabel() || null\">\r\n <div mfTabScroller>\r\n <div\r\n [class]=\"listClasses()\"\r\n (pointerover)=\"onPointerOver($event)\"\r\n (pointerleave)=\"onPointerLeave()\"\r\n >\r\n @if (drawsHover()) {\r\n <span\r\n mfSlidingIndicator\r\n data-tab-hover\r\n [target]=\"hoveredLink()\"\r\n [class]=\"hoverClasses()\"\r\n ></span>\r\n }\r\n @if (variant() !== 'card') {\r\n <span\r\n mfSlidingIndicator\r\n data-tab-indicator\r\n target='[aria-current=\"page\"]'\r\n [track]=\"activeIndex()\"\r\n [class]=\"indicatorClasses()\"\r\n ></span>\r\n }\r\n <ng-content />\r\n </div>\r\n </div>\r\n</nav>\r\n", dependencies: [{ kind: "directive", type: SlidingIndicator, selector: "[mfSlidingIndicator]", inputs: ["axis", "target", "track", "container"], exportAs: ["mfSlidingIndicator"] }, { kind: "directive", type: TabScroller, selector: "[mfTabScroller]", inputs: ["orientation"] }] });
|
|
530
|
+
}
|
|
531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabNav, decorators: [{
|
|
532
|
+
type: Component,
|
|
533
|
+
args: [{ selector: 'mf-tab-nav', exportAs: 'mfTabNav', imports: [SlidingIndicator, TabScroller], host: { class: 'block min-w-0' }, template: "<nav [attr.aria-label]=\"ariaLabel() || null\">\r\n <div mfTabScroller>\r\n <div\r\n [class]=\"listClasses()\"\r\n (pointerover)=\"onPointerOver($event)\"\r\n (pointerleave)=\"onPointerLeave()\"\r\n >\r\n @if (drawsHover()) {\r\n <span\r\n mfSlidingIndicator\r\n data-tab-hover\r\n [target]=\"hoveredLink()\"\r\n [class]=\"hoverClasses()\"\r\n ></span>\r\n }\r\n @if (variant() !== 'card') {\r\n <span\r\n mfSlidingIndicator\r\n data-tab-indicator\r\n target='[aria-current=\"page\"]'\r\n [track]=\"activeIndex()\"\r\n [class]=\"indicatorClasses()\"\r\n ></span>\r\n }\r\n <ng-content />\r\n </div>\r\n </div>\r\n</nav>\r\n" }]
|
|
534
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], stretch: [{ type: i0.Input, args: [{ isSignal: true, alias: "stretch", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], hoverHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverHighlight", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], links: [{ type: i0.ContentChildren, args: [forwardRef(() => TabLink), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
535
|
+
/** `a[mfTabLink]` — `mf-tab-nav` içindeki bağlantı; `active` → `aria-current="page"`. */
|
|
536
|
+
class TabLink {
|
|
537
|
+
active = input(false, { ...(ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
538
|
+
nav = inject(TabNav, { optional: true });
|
|
539
|
+
classes = computed(() => {
|
|
540
|
+
const nav = this.nav;
|
|
541
|
+
return cn(tabVariants({
|
|
542
|
+
variant: nav?.variant() ?? 'underline',
|
|
543
|
+
size: nav?.size() ?? 'md',
|
|
544
|
+
orientation: 'horizontal',
|
|
545
|
+
selected: this.active(),
|
|
546
|
+
stretch: nav?.stretch() ?? false,
|
|
547
|
+
ownHover: !(nav?.drawsHover() ?? false),
|
|
548
|
+
}));
|
|
549
|
+
}, /* @ts-ignore */
|
|
550
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
551
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabLink, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
552
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: TabLink, isStandalone: true, selector: "a[mfTabLink]", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-current": "active() ? 'page' : null", "class": "classes()" } }, exportAs: ["mfTabLink"], ngImport: i0 });
|
|
553
|
+
}
|
|
554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabLink, decorators: [{
|
|
555
|
+
type: Directive,
|
|
556
|
+
args: [{
|
|
557
|
+
selector: 'a[mfTabLink]',
|
|
558
|
+
exportAs: 'mfTabLink',
|
|
559
|
+
host: {
|
|
560
|
+
'[attr.aria-current]': "active() ? 'page' : null",
|
|
561
|
+
'[class]': 'classes()',
|
|
562
|
+
},
|
|
563
|
+
}]
|
|
564
|
+
}], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }] } });
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* ```html
|
|
568
|
+
* <mf-tabs>
|
|
569
|
+
* <mf-tab-list [(selectedTab)]="tab" variant="pills" orientation="vertical" class="w-56">
|
|
570
|
+
* <button mfTab value="profile">Profil</button>
|
|
571
|
+
* <button mfTab value="billing">Faturalandırma</button>
|
|
572
|
+
* </mf-tab-list>
|
|
573
|
+
* <mf-tab-panel value="profile"><ng-template ngTabContent>…</ng-template></mf-tab-panel>
|
|
574
|
+
* <mf-tab-panel value="billing"><ng-template ngTabContent>…</ng-template></mf-tab-panel>
|
|
575
|
+
* </mf-tabs>
|
|
576
|
+
* ```
|
|
577
|
+
*
|
|
578
|
+
* `@angular/aria/tabs` kompozisyonu: `Tabs`/`TabList`/`Tab`/`TabPanel` her biri
|
|
579
|
+
* aria'nın aynı adlı yapı taşını `hostDirectives` ile taşır (ARIA rolleri,
|
|
580
|
+
* roving tabindex, ok tuşları, Home/End) — kit yalnız görsel katmanı ekler.
|
|
581
|
+
*
|
|
582
|
+
* **Dikey yerleşim otomatik:** liste `orientation="vertical"` olunca kök yan
|
|
583
|
+
* yana (`flex`) dizilir, paneller kalan alanı doldurur. Yönün tek kaynağı
|
|
584
|
+
* listedir (ARIA `aria-orientation` orada); liste genişliği tüketicinin
|
|
585
|
+
* `class`'ı (ör. `w-56`).
|
|
586
|
+
*/
|
|
587
|
+
class Tabs {
|
|
588
|
+
list = contentChild(TabList, { ...(ngDevMode ? { debugName: "list" } : /* istanbul ignore next */ {}), descendants: true });
|
|
589
|
+
/** `TabPanel` panel genişliği için okur. */
|
|
590
|
+
vertical = computed(() => this.list()?.isVertical() ?? false, /* @ts-ignore */
|
|
591
|
+
...(ngDevMode ? [{ debugName: "vertical" }] : /* istanbul ignore next */ []));
|
|
592
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Tabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
593
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: Tabs, isStandalone: true, selector: "mf-tabs", host: { properties: { "class.flex": "vertical()", "class.items-start": "vertical()", "class.gap-6": "vertical()" }, classAttribute: "block" }, queries: [{ propertyName: "list", first: true, predicate: TabList, descendants: true, isSignal: true }], exportAs: ["mfTabs"], hostDirectives: [{ directive: i1.Tabs }], ngImport: i0, template: '<ng-content />', isInline: true });
|
|
594
|
+
}
|
|
595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Tabs, decorators: [{
|
|
596
|
+
type: Component,
|
|
597
|
+
args: [{
|
|
598
|
+
selector: 'mf-tabs',
|
|
599
|
+
exportAs: 'mfTabs',
|
|
600
|
+
hostDirectives: [Tabs$1],
|
|
601
|
+
host: {
|
|
602
|
+
class: 'block',
|
|
603
|
+
'[class.flex]': 'vertical()',
|
|
604
|
+
'[class.items-start]': 'vertical()',
|
|
605
|
+
'[class.gap-6]': 'vertical()',
|
|
606
|
+
},
|
|
607
|
+
template: '<ng-content />',
|
|
608
|
+
}]
|
|
609
|
+
}], propDecorators: { list: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TabList), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
610
|
+
|
|
355
611
|
/**
|
|
356
612
|
* ```html
|
|
357
613
|
* <mf-tab-panel value="genel">
|
|
@@ -359,37 +615,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
359
615
|
* </mf-tab-panel>
|
|
360
616
|
* ```
|
|
361
617
|
*
|
|
362
|
-
* `ngTabContent` (`@angular/aria/tabs`'ın `TabContent`'i) doğrudan
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
* `DeferredContent` mekanizması, panel aktif olana kadar içeriği hiç
|
|
366
|
-
* oluşturmaz — lazy). `<ng-content />` bilerek TEK satır: panelin kendi
|
|
367
|
-
* `role="tabpanel"`/`tabindex`/`inert` host bağlamaları `hostDirectives`'ten
|
|
368
|
-
* geliyor, ekstra bir sarmalayıcıya gerek yok.
|
|
618
|
+
* `ngTabContent` (`@angular/aria/tabs`'ın `TabContent`'i) doğrudan kullanılır —
|
|
619
|
+
* içerik panel ilk kez etkinleşene kadar oluşturulmaz (lazy). `preserveContent`
|
|
620
|
+
* `hostDirectives` ile yeniden iletilemiyor (NG2017), bu yüzden açık değil.
|
|
369
621
|
*
|
|
370
|
-
* `[class.hidden]` ELLE
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
622
|
+
* - `[class.hidden]` ELLE — aria'nın `inert`'i paneli erişilebilirlik ağacından
|
|
623
|
+
* çıkarır ama GÖRSEL olarak gizlemez (kütüphanenin kendi notu).
|
|
624
|
+
* - **Geçiş:** görünür olan panel `animate-panel-in` ile solarak/hafifçe
|
|
625
|
+
* yükselerek gelir; `display:none → block` animasyonu kendiliğinden yeniden
|
|
626
|
+
* başlatır. `[animate]="false"` kapatır; azaltılmış harekette zaten yok.
|
|
627
|
+
* - Dikey `mf-tabs` içinde kalan genişliği doldurur (`flex-1 min-w-0`).
|
|
375
628
|
*/
|
|
376
629
|
class TabPanel {
|
|
630
|
+
/** Görünür olunca giriş animasyonu. */
|
|
631
|
+
animate = input(true, { ...(ngDevMode ? { debugName: "animate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
377
632
|
ariaTabPanel = inject(TabPanel$1);
|
|
633
|
+
tabs = inject(Tabs, { optional: true });
|
|
634
|
+
inVertical() {
|
|
635
|
+
return this.tabs?.vertical() ?? false;
|
|
636
|
+
}
|
|
378
637
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
379
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
638
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: TabPanel, isStandalone: true, selector: "mf-tab-panel", inputs: { animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.hidden": "!ariaTabPanel.visible()", "class.animate-panel-in": "animate()", "class.flex-1": "inVertical()", "class.min-w-0": "inVertical()" }, classAttribute: "block focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring" }, exportAs: ["mfTabPanel"], hostDirectives: [{ directive: i1.TabPanel, inputs: ["value", "value", "id", "id"] }], ngImport: i0, template: '<ng-content />', isInline: true });
|
|
380
639
|
}
|
|
381
640
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabPanel, decorators: [{
|
|
382
641
|
type: Component,
|
|
383
642
|
args: [{
|
|
384
643
|
selector: 'mf-tab-panel',
|
|
644
|
+
exportAs: 'mfTabPanel',
|
|
385
645
|
hostDirectives: [{ directive: TabPanel$1, inputs: ['value', 'id'] }],
|
|
386
646
|
host: {
|
|
647
|
+
// Host metadata STATİK olmalı (linker import edilmiş sabiti çözemez) — focusRecipe'in literal hâli.
|
|
387
648
|
class: 'block focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring',
|
|
388
649
|
'[class.hidden]': '!ariaTabPanel.visible()',
|
|
650
|
+
'[class.animate-panel-in]': 'animate()',
|
|
651
|
+
'[class.flex-1]': 'inVertical()',
|
|
652
|
+
'[class.min-w-0]': 'inVertical()',
|
|
389
653
|
},
|
|
390
654
|
template: '<ng-content />',
|
|
391
655
|
}]
|
|
392
|
-
}] });
|
|
656
|
+
}], propDecorators: { animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }] } });
|
|
393
657
|
|
|
394
658
|
/**
|
|
395
659
|
* `<mf-tab-strip [items]="items()" [(activeKey)]="active" (close)="onClose($event)" />`
|
|
@@ -458,7 +722,12 @@ class TabStrip {
|
|
|
458
722
|
rowEl = viewChild('row', /* @ts-ignore */
|
|
459
723
|
...(ngDevMode ? [{ debugName: "rowEl" }] : /* istanbul ignore next */ []));
|
|
460
724
|
tabClasses(item) {
|
|
461
|
-
return cn(tabVariants({
|
|
725
|
+
return cn(tabVariants({
|
|
726
|
+
variant: 'card',
|
|
727
|
+
size: 'sm',
|
|
728
|
+
selected: item.key === this.activeKey(),
|
|
729
|
+
disabled: false,
|
|
730
|
+
}), 'pe-1.5');
|
|
462
731
|
}
|
|
463
732
|
tabIndexFor(item) {
|
|
464
733
|
const focused = this.focusedKey() ?? this.activeKey();
|
|
@@ -526,44 +795,16 @@ class TabStrip {
|
|
|
526
795
|
});
|
|
527
796
|
}
|
|
528
797
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabStrip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
529
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: TabStrip, isStandalone: true, selector: "mf-tab-strip", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, activeKey: { classPropertyName: "activeKey", publicName: "activeKey", isSignal: true, isRequired: true, transformFunction: null }, contentId: { classPropertyName: "contentId", publicName: "contentId", isSignal: true, isRequired: false, transformFunction: null }, scrollStartLabel: { classPropertyName: "scrollStartLabel", publicName: "scrollStartLabel", isSignal: true, isRequired: false, transformFunction: null }, scrollEndLabel: { classPropertyName: "scrollEndLabel", publicName: "scrollEndLabel", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeKey: "activeKeyChange", close: "close", itemContextMenu: "itemContextMenu" }, host: { attributes: { "role": "tablist" }, classAttribute: "block" }, viewQueries: [{ propertyName: "scroller", first: true, predicate: TabScroller, descendants: true, isSignal: true }, { propertyName: "rowEl", first: true, predicate: ["row"], descendants: true, isSignal: true }], exportAs: ["mfTabStrip"], ngImport: i0, template: "<div class=\"flex items-center gap-1\">\r\n @if (showStartArrow()) {\r\n <button\r\n type=\"button\"\r\n class=\"shrink-0 appearance-none border-0 bg-transparent p-1 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveScrollStartLabel()\"\r\n (click)=\"scroller()?.scrollByDir(-1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">chevron_left</span>\r\n </button>\r\n }\r\n\r\n <!-- Kayd\u0131rma kapsay\u0131c\u0131s\u0131 odaklanabilir de\u011Fil \u2014 ok tu\u015Fu gezinmesi burada delege; ger\u00E7ek odak roving tabindex ile alt sekmelerde. -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\r\n <div mfTabScroller (keydown)=\"onKeydown($event)\">\r\n <div #row class=\"flex items-center gap-1 py-1\">\r\n @for (item of items(); track item.key) {\r\n <!-- Enter/Space se\u00E7imi \u00FCstteki kapsay\u0131c\u0131n\u0131n (keydown)'\u0131nda y\u00F6netiliyor (roving tabindex deseni). -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\r\n <div\r\n role=\"tab\"\r\n [attr.data-tab-key]=\"item.key\"\r\n [attr.aria-selected]=\"item.key === activeKey()\"\r\n [attr.aria-controls]=\"item.key === activeKey() ? contentId() : null\"\r\n [tabindex]=\"tabIndexFor(item)\"\r\n [class]=\"tabClasses(item)\"\r\n (click)=\"select(item.key)\"\r\n (contextmenu)=\"onContextMenu($event, item)\"\r\n >\r\n @if (item.icon) {\r\n <span mfIcon [size]=\"14\">{{ item.icon }}</span>\r\n }\r\n <span class=\"truncate\">{{ item.label }}</span>\r\n @if (item.closable) {\r\n <button\r\n type=\"button\"\r\n tabindex=\"-1\"\r\n class=\"ms-0.5 inline-flex h-4 w-4 shrink-0 appearance-none items-center justify-center rounded-xs border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:bg-surface-active hover:text-fg\"\r\n [attr.aria-label]=\"effectiveCloseLabel() + ': ' + item.label\"\r\n (click)=\"onCloseClick($event, item.key)\"\r\n >\r\n <span mfIcon [size]=\"13\">close</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (showEndArrow()) {\r\n <button\r\n type=\"button\"\r\n class=\"shrink-0 appearance-none border-0 bg-transparent p-1 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveScrollEndLabel()\"\r\n (click)=\"scroller()?.scrollByDir(1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">chevron_right</span>\r\n </button>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "directive", type: Icon, selector: "span[mfIcon]", inputs: ["size", "filled"] }, { kind: "directive", type: TabScroller, selector: "[mfTabScroller]", inputs: ["orientation"] }] });
|
|
798
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: TabStrip, isStandalone: true, selector: "mf-tab-strip", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, activeKey: { classPropertyName: "activeKey", publicName: "activeKey", isSignal: true, isRequired: true, transformFunction: null }, contentId: { classPropertyName: "contentId", publicName: "contentId", isSignal: true, isRequired: false, transformFunction: null }, scrollStartLabel: { classPropertyName: "scrollStartLabel", publicName: "scrollStartLabel", isSignal: true, isRequired: false, transformFunction: null }, scrollEndLabel: { classPropertyName: "scrollEndLabel", publicName: "scrollEndLabel", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeKey: "activeKeyChange", close: "close", itemContextMenu: "itemContextMenu" }, host: { attributes: { "role": "tablist" }, classAttribute: "block" }, viewQueries: [{ propertyName: "scroller", first: true, predicate: TabScroller, descendants: true, isSignal: true }, { propertyName: "rowEl", first: true, predicate: ["row"], descendants: true, isSignal: true }], exportAs: ["mfTabStrip"], ngImport: i0, template: "<div class=\"flex items-center gap-1\">\r\n @if (showStartArrow()) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex items-center justify-center shrink-0 appearance-none border-0 bg-transparent p-1 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveScrollStartLabel()\"\r\n (click)=\"scroller()?.scrollByDir(-1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">chevron_left</span>\r\n </button>\r\n }\r\n\r\n <!-- Kayd\u0131rma kapsay\u0131c\u0131s\u0131 odaklanabilir de\u011Fil \u2014 ok tu\u015Fu gezinmesi burada delege; ger\u00E7ek odak roving tabindex ile alt sekmelerde. -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\r\n <div mfTabScroller (keydown)=\"onKeydown($event)\">\r\n <div #row class=\"flex items-center gap-1 py-1\">\r\n @for (item of items(); track item.key) {\r\n <!-- Enter/Space se\u00E7imi \u00FCstteki kapsay\u0131c\u0131n\u0131n (keydown)'\u0131nda y\u00F6netiliyor (roving tabindex deseni). -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\r\n <div\r\n role=\"tab\"\r\n [attr.data-tab-key]=\"item.key\"\r\n [attr.aria-selected]=\"item.key === activeKey()\"\r\n [attr.aria-controls]=\"item.key === activeKey() ? contentId() : null\"\r\n [tabindex]=\"tabIndexFor(item)\"\r\n [class]=\"tabClasses(item)\"\r\n (click)=\"select(item.key)\"\r\n (contextmenu)=\"onContextMenu($event, item)\"\r\n >\r\n @if (item.icon) {\r\n <span mfIcon [size]=\"14\">{{ item.icon }}</span>\r\n }\r\n <span class=\"truncate\">{{ item.label }}</span>\r\n @if (item.closable) {\r\n <button\r\n type=\"button\"\r\n tabindex=\"-1\"\r\n class=\"ms-0.5 inline-flex h-4 w-4 shrink-0 appearance-none items-center justify-center rounded-xs border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:bg-surface-active hover:text-fg\"\r\n [attr.aria-label]=\"effectiveCloseLabel() + ': ' + item.label\"\r\n (click)=\"onCloseClick($event, item.key)\"\r\n >\r\n <span mfIcon [size]=\"13\">close</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (showEndArrow()) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex items-center justify-center shrink-0 appearance-none border-0 bg-transparent p-1 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveScrollEndLabel()\"\r\n (click)=\"scroller()?.scrollByDir(1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">chevron_right</span>\r\n </button>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "directive", type: Icon, selector: "span[mfIcon]", inputs: ["size", "filled"] }, { kind: "directive", type: TabScroller, selector: "[mfTabScroller]", inputs: ["orientation"] }] });
|
|
530
799
|
}
|
|
531
800
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: TabStrip, decorators: [{
|
|
532
801
|
type: Component,
|
|
533
|
-
args: [{ selector: 'mf-tab-strip', exportAs: 'mfTabStrip', imports: [Icon, TabScroller], host: { class: 'block', role: 'tablist' }, template: "<div class=\"flex items-center gap-1\">\r\n @if (showStartArrow()) {\r\n <button\r\n type=\"button\"\r\n class=\"shrink-0 appearance-none border-0 bg-transparent p-1 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveScrollStartLabel()\"\r\n (click)=\"scroller()?.scrollByDir(-1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">chevron_left</span>\r\n </button>\r\n }\r\n\r\n <!-- Kayd\u0131rma kapsay\u0131c\u0131s\u0131 odaklanabilir de\u011Fil \u2014 ok tu\u015Fu gezinmesi burada delege; ger\u00E7ek odak roving tabindex ile alt sekmelerde. -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\r\n <div mfTabScroller (keydown)=\"onKeydown($event)\">\r\n <div #row class=\"flex items-center gap-1 py-1\">\r\n @for (item of items(); track item.key) {\r\n <!-- Enter/Space se\u00E7imi \u00FCstteki kapsay\u0131c\u0131n\u0131n (keydown)'\u0131nda y\u00F6netiliyor (roving tabindex deseni). -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\r\n <div\r\n role=\"tab\"\r\n [attr.data-tab-key]=\"item.key\"\r\n [attr.aria-selected]=\"item.key === activeKey()\"\r\n [attr.aria-controls]=\"item.key === activeKey() ? contentId() : null\"\r\n [tabindex]=\"tabIndexFor(item)\"\r\n [class]=\"tabClasses(item)\"\r\n (click)=\"select(item.key)\"\r\n (contextmenu)=\"onContextMenu($event, item)\"\r\n >\r\n @if (item.icon) {\r\n <span mfIcon [size]=\"14\">{{ item.icon }}</span>\r\n }\r\n <span class=\"truncate\">{{ item.label }}</span>\r\n @if (item.closable) {\r\n <button\r\n type=\"button\"\r\n tabindex=\"-1\"\r\n class=\"ms-0.5 inline-flex h-4 w-4 shrink-0 appearance-none items-center justify-center rounded-xs border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:bg-surface-active hover:text-fg\"\r\n [attr.aria-label]=\"effectiveCloseLabel() + ': ' + item.label\"\r\n (click)=\"onCloseClick($event, item.key)\"\r\n >\r\n <span mfIcon [size]=\"13\">close</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (showEndArrow()) {\r\n <button\r\n type=\"button\"\r\n class=\"shrink-0 appearance-none border-0 bg-transparent p-1 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveScrollEndLabel()\"\r\n (click)=\"scroller()?.scrollByDir(1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">chevron_right</span>\r\n </button>\r\n }\r\n</div>\r\n" }]
|
|
802
|
+
args: [{ selector: 'mf-tab-strip', exportAs: 'mfTabStrip', imports: [Icon, TabScroller], host: { class: 'block', role: 'tablist' }, template: "<div class=\"flex items-center gap-1\">\r\n @if (showStartArrow()) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex items-center justify-center shrink-0 appearance-none border-0 bg-transparent p-1 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveScrollStartLabel()\"\r\n (click)=\"scroller()?.scrollByDir(-1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">chevron_left</span>\r\n </button>\r\n }\r\n\r\n <!-- Kayd\u0131rma kapsay\u0131c\u0131s\u0131 odaklanabilir de\u011Fil \u2014 ok tu\u015Fu gezinmesi burada delege; ger\u00E7ek odak roving tabindex ile alt sekmelerde. -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\r\n <div mfTabScroller (keydown)=\"onKeydown($event)\">\r\n <div #row class=\"flex items-center gap-1 py-1\">\r\n @for (item of items(); track item.key) {\r\n <!-- Enter/Space se\u00E7imi \u00FCstteki kapsay\u0131c\u0131n\u0131n (keydown)'\u0131nda y\u00F6netiliyor (roving tabindex deseni). -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\r\n <div\r\n role=\"tab\"\r\n [attr.data-tab-key]=\"item.key\"\r\n [attr.aria-selected]=\"item.key === activeKey()\"\r\n [attr.aria-controls]=\"item.key === activeKey() ? contentId() : null\"\r\n [tabindex]=\"tabIndexFor(item)\"\r\n [class]=\"tabClasses(item)\"\r\n (click)=\"select(item.key)\"\r\n (contextmenu)=\"onContextMenu($event, item)\"\r\n >\r\n @if (item.icon) {\r\n <span mfIcon [size]=\"14\">{{ item.icon }}</span>\r\n }\r\n <span class=\"truncate\">{{ item.label }}</span>\r\n @if (item.closable) {\r\n <button\r\n type=\"button\"\r\n tabindex=\"-1\"\r\n class=\"ms-0.5 inline-flex h-4 w-4 shrink-0 appearance-none items-center justify-center rounded-xs border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:bg-surface-active hover:text-fg\"\r\n [attr.aria-label]=\"effectiveCloseLabel() + ': ' + item.label\"\r\n (click)=\"onCloseClick($event, item.key)\"\r\n >\r\n <span mfIcon [size]=\"13\">close</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (showEndArrow()) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex items-center justify-center shrink-0 appearance-none border-0 bg-transparent p-1 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveScrollEndLabel()\"\r\n (click)=\"scroller()?.scrollByDir(1)\"\r\n >\r\n <span mfIcon [size]=\"16\" class=\"rtl:-scale-x-100\">chevron_right</span>\r\n </button>\r\n }\r\n</div>\r\n" }]
|
|
534
803
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], activeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeKey", required: true }] }, { type: i0.Output, args: ["activeKeyChange"] }], contentId: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentId", required: false }] }], scrollStartLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStartLabel", required: false }] }], scrollEndLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollEndLabel", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], itemContextMenu: [{ type: i0.Output, args: ["itemContextMenu"] }], scroller: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TabScroller), { isSignal: true }] }], rowEl: [{ type: i0.ViewChild, args: ['row', { isSignal: true }] }] } });
|
|
535
804
|
|
|
536
|
-
/**
|
|
537
|
-
* `<mf-tabs><mf-tab-list>...</mf-tab-list><mf-tab-panel>...</mf-tab-panel></mf-tabs>`
|
|
538
|
-
*
|
|
539
|
-
* Salt bir kapsayıcı — tüm ARIA/klavye/state mantığı `@angular/aria/tabs`'ın
|
|
540
|
-
* `Tabs` pattern'inden `hostDirectives` ile ödünç alınıyor (bkz.
|
|
541
|
-
* projects/ui-kit/README.md "a11y checklist": "mümkün olduğunca `@angular/aria`...
|
|
542
|
-
* elle ARIA yazmak son çare"). `hostDirectives`, ana bileşenin (`mf-tabs`)
|
|
543
|
-
* host elemanına `Tabs`'ın DI sağlayıcısını (`TABS` token) ekliyor — alttaki
|
|
544
|
-
* `mf-tab-list`/`mf-tab-panel` bunu `inject()` ile bulup kendini
|
|
545
|
-
* kaydediyor, template'te `ngTabs` attribute'unu ELLE yazmaya gerek yok
|
|
546
|
-
* (`hostDirectives`'te selector yok sayılır, bkz. Angular directive
|
|
547
|
-
* composition API).
|
|
548
|
-
*/
|
|
549
|
-
class Tabs {
|
|
550
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Tabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
551
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: Tabs, isStandalone: true, selector: "mf-tabs", host: { classAttribute: "block" }, exportAs: ["mfTabs"], hostDirectives: [{ directive: i1.Tabs }], ngImport: i0, template: '<ng-content />', isInline: true });
|
|
552
|
-
}
|
|
553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Tabs, decorators: [{
|
|
554
|
-
type: Component,
|
|
555
|
-
args: [{
|
|
556
|
-
selector: 'mf-tabs',
|
|
557
|
-
exportAs: 'mfTabs',
|
|
558
|
-
hostDirectives: [Tabs$1],
|
|
559
|
-
host: { class: 'block' },
|
|
560
|
-
template: '<ng-content />',
|
|
561
|
-
}]
|
|
562
|
-
}] });
|
|
563
|
-
|
|
564
805
|
/**
|
|
565
806
|
* Generated bundle index. Do not edit.
|
|
566
807
|
*/
|
|
567
808
|
|
|
568
|
-
export { Tab, TabList, TabPanel, TabScroller, TabStrip, Tabs, tabListVariants, tabVariants };
|
|
809
|
+
export { Tab, TabCount, TabLink, TabList, TabNav, TabPanel, TabScroller, TabStrip, Tabs, tabCountVariants, tabHoverVariants, tabIndicatorVariants, tabListVariants, tabVariants };
|
|
569
810
|
//# sourceMappingURL=mesgflow-ui-kit-tabs.mjs.map
|