tamga-ui 0.5.3 → 0.5.5
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/CHANGELOG.md +43 -0
- package/dist/blocks/filter-bar.d.ts.map +1 -1
- package/dist/blocks/filter-bar.js +1 -1
- package/dist/components/display.d.ts.map +1 -1
- package/dist/components/display.js +1 -1
- package/dist/components/layout.js +1 -1
- package/dist/fonts.css +1 -1
- package/dist/kit.css +4 -4
- package/dist/patterns/app-shell.d.ts +24 -2
- package/dist/patterns/app-shell.d.ts.map +1 -1
- package/dist/patterns/app-shell.js +6 -4
- package/dist/styles.css +1 -1
- package/dist/theme.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,49 @@ Versions follow [semver](https://semver.org/). Through `0.x`, breaking changes m
|
|
|
5
5
|
|
|
6
6
|
> 🇹🇷 Türkçe için [tamga.org.tr/tr](https://tamga.org.tr/tr).
|
|
7
7
|
|
|
8
|
+
## 0.5.5
|
|
9
|
+
|
|
10
|
+
> A page title finds its size, a shell can be driven by state instead of addresses, and the
|
|
11
|
+
> current rail row stands on the brand.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`AppShell` entries can carry an action instead of an address.** `NavEntry.href` was required and
|
|
16
|
+
the active row was found by comparing paths, which is right for a web panel and wrong for a
|
|
17
|
+
desktop app, where a screen is state and there is no URL. An entry may now give `onSelect`, and
|
|
18
|
+
`activePath` is then matched against its `key`. One of the two is required; nothing changes for an
|
|
19
|
+
entry that has a path.
|
|
20
|
+
|
|
21
|
+
- **`AppShell.mainClassName`** — a state class on the content surface, for something the shell
|
|
22
|
+
cannot know: a window-wide drop target marking its edge, say. Layout stays the kit's; without it
|
|
23
|
+
a product had to draw the whole shell by hand to reach that one edge.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **A page title is 24px, not 40px.** `PageBand` drew its heading at `--text-display-lg`, which is
|
|
28
|
+
the reference design's own size for a marketing-width page. In a dense panel — a table under the
|
|
29
|
+
title, a filter bar above it — it took the room the data needed and read as a banner rather than a
|
|
30
|
+
heading. The scale now reads 16 section · 18 dialog · 24 page · 30 KPI, and the two token comments
|
|
31
|
+
that still called 18px "page titles" and 30px "KPI numbers only" were corrected with it.
|
|
32
|
+
|
|
33
|
+
## 0.5.4
|
|
34
|
+
|
|
35
|
+
> An empty filter drawer no longer advertises itself, and a tile's icon reads as a glyph.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- **`Kpi` draws its tile icon bold, not duotone.** The kit's default weight paints a second
|
|
40
|
+
translucent layer, which is the cheapest brand lever on a large surface and a muddy glyph inside a
|
|
41
|
+
40px bordered tile: the tile is already its own box, so the icon has nothing to gain from a second
|
|
42
|
+
layer. Six tiles in a row now read as six glyphs rather than six smudges.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- **`FilterBar` drew the "all filters" button with nothing behind it.** The drawer button rendered
|
|
47
|
+
whether or not `drawer` carried a field, so a screen whose filters all fit on the top row still
|
|
48
|
+
offered a button that opened an empty sheet — and the person who opened it assumed the filter they
|
|
49
|
+
wanted had been removed. No groups, no button.
|
|
50
|
+
|
|
8
51
|
## 0.5.3
|
|
9
52
|
|
|
10
53
|
> A page title can carry its own marks.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-bar.d.ts","sourceRoot":"","sources":["../../src/blocks/filter-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAIlD;;;;;;GAMG;AAEH,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,C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AM,EACN,YAAiB,EACjB,SAAe,EACf,aAAa,EACb,KAAK,EACL,MAAgB,EAChB,MAAM,GACP,EAAE,cAAc,+BAsPhB"}
|
|
@@ -75,7 +75,7 @@ export function FilterBar({ values, onChange, top, drawer, optionSource = {}, se
|
|
|
75
75
|
return labels.search;
|
|
76
76
|
return key === fileSearchKey ? (labels.fileSearch?.label ?? key) : key;
|
|
77
77
|
};
|
|
78
|
-
return (_jsxs("div", { className: "tamga-card tamga-card-open flex flex-col gap-3.5 p-4", children: [_jsxs("div", { className: "tamga-filter-row", children: [_jsxs("label", { className: "flex min-w-0 shrink grow-[2] basis-75 flex-col gap-1.5", children: [_jsx("span", { className: "text-small font-bold text-ink-faint", children: labels.search }), _jsxs("span", { className: "relative flex items-center", children: [_jsx(Icon, { icon: Search, size: "xs", "aria-hidden": true, className: "pointer-events-none absolute left-2.5 text-ink-faint" }), _jsx(Input, { type: "search", full: true, leading: true, placeholder: labels.search, value: values[searchKey] ?? "", onChange: (e) => write(searchKey, e.target.value) })] })] }), top.map((field) => (_jsxs(Fragment, { children: [field.break ? _jsx("span", { "aria-hidden": true, className: "h-0 basis-full" }) : null, _jsxs("div", { className: `flex min-w-0 shrink grow flex-col gap-1.5 ${field.kind === "dateRange" ? "basis-80" : "basis-40 tamga-filter-cap"}`, children: [_jsx("span", { className: "text-small font-bold text-ink-faint", children: field.label }), _jsx(FieldControl, { field: field, values: values, write: write, optionSource: optionSource, locale: locale, labels: labels })] })] }, field.key))), _jsxs(Button, { className: "ml-auto", onClick: () => setDrawerOpen(true), children: [_jsx(Icon, { icon: Customize, size: "xs" }), labels.allFilters, hiddenActive > 0 && (_jsx("span", { className: "tamga-count ml-1 tabular-nums", children: hiddenActive }))] }), extra] }), active.length > 0 && (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [active.map(([key, value]) => (_jsxs("span", { className: "tamga-token", children: [_jsxs("span", { className: "font-normal text-ink-faint", children: [labelFor(key), ":"] }), value, _jsx("button", { type: "button", className: "tamga-token-x", "aria-label": labels.remove(labelFor(key)), onClick: () => write(key, ""), children: _jsx(Icon, { icon: Close, size: "xs" }) })] }, key))), _jsx(Button, { variant: "link", size: "sm", onClick: () => onChange({}), children: labels.clearAll })] })), _jsx(Sheet, { open: drawerOpen, onClose: () => setDrawerOpen(false), title: labels.allFilters, closeLabel: labels.calendar.clear, footer: _jsxs(_Fragment, { children: [_jsx(Button, { type: "button", onClick: () => onChange({}), children: labels.clear }), _jsx(Button, { type: "submit", form: formId, variant: "primary", children: labels.apply })] }), children: _jsxs("form", { id: formId, onSubmit: (e) => {
|
|
78
|
+
return (_jsxs("div", { className: "tamga-card tamga-card-open flex flex-col gap-3.5 p-4", children: [_jsxs("div", { className: "tamga-filter-row", children: [_jsxs("label", { className: "flex min-w-0 shrink grow-[2] basis-75 flex-col gap-1.5", children: [_jsx("span", { className: "text-small font-bold text-ink-faint", children: labels.search }), _jsxs("span", { className: "relative flex items-center", children: [_jsx(Icon, { icon: Search, size: "xs", "aria-hidden": true, className: "pointer-events-none absolute left-2.5 text-ink-faint" }), _jsx(Input, { type: "search", full: true, leading: true, placeholder: labels.search, value: values[searchKey] ?? "", onChange: (e) => write(searchKey, e.target.value) })] })] }), top.map((field) => (_jsxs(Fragment, { children: [field.break ? _jsx("span", { "aria-hidden": true, className: "h-0 basis-full" }) : null, _jsxs("div", { className: `flex min-w-0 shrink grow flex-col gap-1.5 ${field.kind === "dateRange" ? "basis-80" : "basis-40 tamga-filter-cap"}`, children: [_jsx("span", { className: "text-small font-bold text-ink-faint", children: field.label }), _jsx(FieldControl, { field: field, values: values, write: write, optionSource: optionSource, locale: locale, labels: labels })] })] }, field.key))), drawer.length > 0 && (_jsxs(Button, { className: "ml-auto", onClick: () => setDrawerOpen(true), children: [_jsx(Icon, { icon: Customize, size: "xs" }), labels.allFilters, hiddenActive > 0 && (_jsx("span", { className: "tamga-count ml-1 tabular-nums", children: hiddenActive }))] })), extra] }), active.length > 0 && (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [active.map(([key, value]) => (_jsxs("span", { className: "tamga-token", children: [_jsxs("span", { className: "font-normal text-ink-faint", children: [labelFor(key), ":"] }), value, _jsx("button", { type: "button", className: "tamga-token-x", "aria-label": labels.remove(labelFor(key)), onClick: () => write(key, ""), children: _jsx(Icon, { icon: Close, size: "xs" }) })] }, key))), _jsx(Button, { variant: "link", size: "sm", onClick: () => onChange({}), children: labels.clearAll })] })), _jsx(Sheet, { open: drawerOpen, onClose: () => setDrawerOpen(false), title: labels.allFilters, closeLabel: labels.calendar.clear, footer: _jsxs(_Fragment, { children: [_jsx(Button, { type: "button", onClick: () => onChange({}), children: labels.clear }), _jsx(Button, { type: "submit", form: formId, variant: "primary", children: labels.apply })] }), children: _jsxs("form", { id: formId, onSubmit: (e) => {
|
|
79
79
|
e.preventDefault();
|
|
80
80
|
setDrawerOpen(false);
|
|
81
81
|
}, className: "flex flex-col", children: [drawer.map((group) => (_jsxs("div", { className: "flex flex-col gap-3.5 border-b border-dashed border-line py-4.5 last:border-b-0", children: [_jsx("p", { className: "text-caption font-extrabold uppercase tracking-label text-ink-faint", children: group.title }), _jsx("div", { className: "grid gap-3 sm:grid-cols-[repeat(2,minmax(0,1fr))]", children: group.fields.map((field) => (_jsxs("div", { className: `flex flex-col gap-1.5 ${field.kind === "dateRange" ? "sm:col-span-2" : ""}`, children: [_jsx("span", { className: "text-small text-ink-soft", children: field.label }), _jsx(FieldControl, { field: field, values: values, write: write, optionSource: optionSource, locale: locale, labels: labels })] }, field.key))) })] }, group.title))), fileSearchKey && labels.fileSearch && (_jsxs("div", { children: [_jsx("p", { className: "mb-3 text-micro font-semibold uppercase tracking-wide text-ink-faint", children: labels.fileSearch.title }), _jsx("p", { className: "mb-3 text-small leading-relaxed text-ink-soft", children: labels.fileSearch.help }), values[fileSearchKey] ? (_jsxs("span", { className: "flex items-center gap-2", children: [_jsx("span", { className: "truncate text-small text-ink", children: values[fileSearchKey] }), _jsx(Button, { type: "button", size: "sm", onClick: () => write(fileSearchKey, ""), children: labels.fileSearch.remove })] })) : (_jsxs("label", { className: `${buttonVariants({})} cursor-pointer`, children: [_jsx(Icon, { icon: Upload, size: "xs" }), labels.fileSearch.choose, _jsx("input", { type: "file", accept: ".xlsx,.xls,.csv", className: "sr-only", onChange: (e) => write(fileSearchKey, e.target.files?.[0]?.name ?? "") })] }))] }))] }) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/components/display.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,KAAK,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAA4B,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAEzE,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAK9C;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,MAAe,EACf,KAAa,EACb,SAAS,EACT,GAAG,IAAI,EACR,EAAE;IACD,KAAK,EAAE,SAAS,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IACjG;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAuCA;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,EAClB,KAAK,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,KAAK,EACL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K,EACL,OAAO,EACP,SAAS,EACT,GAAG,IAAI,EACR,EAAE;IACD;;;;;OAKG;IACH,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IACvB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAyCA;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,MAAqC,EACrC,QAAc,EACd,SAAS,EACT,GAAG,IAAI,EACR,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAsCA"}
|
|
@@ -36,7 +36,7 @@ export function Kpi({ label, value, unit, icon, note, delta, better = "up", char
|
|
|
36
36
|
? "positive"
|
|
37
37
|
: "danger";
|
|
38
38
|
const c = toneOf(tone);
|
|
39
|
-
const karo = icon ? (_jsx("span", { ...dataProps(rest), className: "tamga-kpi-tile", style: iconTone ? { background: toneOf(iconTone).bg, color: toneOf(iconTone).fg } : undefined, "aria-hidden": true, children: _jsx(Icon, { icon: icon, size: look === "detail" ? "sm" : "base" }) })) : null;
|
|
39
|
+
const karo = icon ? (_jsx("span", { ...dataProps(rest), className: "tamga-kpi-tile", style: iconTone ? { background: toneOf(iconTone).bg, color: toneOf(iconTone).fg } : undefined, "aria-hidden": true, children: _jsx(Icon, { icon: icon, size: look === "detail" ? "sm" : "base", weight: "bold" }) })) : null;
|
|
40
40
|
/* DEĞER MONO DEĞİL DISPLAY YÜZÜNDE, ve ağırlığı en üst basamakta. Mono, bir
|
|
41
41
|
SÜTUNDA okunan sayılar için: orada rakam genişliğinin eşit olması hizayı
|
|
42
42
|
kuruyor. Bir KPI karosunda sütun yok, tek bir sayı var ve işi okunmak
|
|
@@ -78,7 +78,7 @@ export function CellActions({ className, children, align = "end", ...props
|
|
|
78
78
|
* Doküman: /docs/page-band
|
|
79
79
|
*/
|
|
80
80
|
export function PageBand({ eyebrow, title, subtitle, actions, className, ...rest }) {
|
|
81
|
-
return (_jsxs("div", { ...dataProps(rest), className: cn("flex flex-wrap items-end gap-4", className), children: [_jsxs("div", { className: "min-w-0 flex-1 basis-65", children: [eyebrow ? (_jsx("p", { className: "mb-1.5 text-small font-semibold text-ink-faint", children: eyebrow })) : null, _jsx("h1", { className: "flex flex-wrap items-center gap-x-3 gap-y-1.5 font-display text-display-
|
|
81
|
+
return (_jsxs("div", { ...dataProps(rest), className: cn("flex flex-wrap items-end gap-4", className), children: [_jsxs("div", { className: "min-w-0 flex-1 basis-65", children: [eyebrow ? (_jsx("p", { className: "mb-1.5 text-small font-semibold text-ink-faint", children: eyebrow })) : null, _jsx("h1", { className: "flex flex-wrap items-center gap-x-3 gap-y-1.5 font-display text-display-sm leading-tight font-extrabold text-ink", children: title }), subtitle ? _jsx("p", { className: "mt-1.5 text-body text-ink-soft", children: subtitle }) : null] }), actions ? _jsx("div", { className: "ml-auto flex flex-wrap items-center gap-2", children: actions }) : null] }));
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Gezinen bağlantı. `Button variant="link"` DEĞİL: o bir `<button>`, yani orta
|
package/dist/fonts.css
CHANGED
package/dist/kit.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tamga-ui 0.5.
|
|
1
|
+
/*! tamga-ui 0.5.5 · MIT · https://tamga.org.tr */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
--overlay-gap: 8px;
|
|
@@ -440,9 +440,9 @@
|
|
|
440
440
|
|
|
441
441
|
.tamga-rail-link[data-active="true"] {
|
|
442
442
|
background: var(--color-shell);
|
|
443
|
-
border-color: var(--color-
|
|
443
|
+
border-color: var(--color-accent-shadow);
|
|
444
444
|
transform: translate(-1px, -1px);
|
|
445
|
-
box-shadow: 3px 3px 0 var(--color-
|
|
445
|
+
box-shadow: 3px 3px 0 var(--color-accent-shadow);
|
|
446
446
|
}
|
|
447
447
|
|
|
448
448
|
.tamga-rail-link[data-active="true"] svg {
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
|
|
452
452
|
.tamga-rail-link[data-active="true"]:active {
|
|
453
453
|
transform: translate(2px, 2px);
|
|
454
|
-
box-shadow: 0 0 0 var(--color-
|
|
454
|
+
box-shadow: 0 0 0 var(--color-accent-shadow);
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
.tamga-btn:not(:disabled):active,
|
|
@@ -8,8 +8,23 @@ import { type LinkComponent } from "./shared.js";
|
|
|
8
8
|
* yönlendiriciyi tanımaz. Gerekçe: docs/adr/0004-sablon-katmani.md
|
|
9
9
|
*/
|
|
10
10
|
export type NavEntry = {
|
|
11
|
+
/**
|
|
12
|
+
* The entry's identity. With `onSelect` it is also what `activePath` is compared against.
|
|
13
|
+
* TR: Girişin kimliği. `onSelect` ile birlikte `activePath`in karşılaştırıldığı değer de bu.
|
|
14
|
+
*/
|
|
11
15
|
key: string;
|
|
12
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Where the entry goes. A desktop app has no addresses: it gives `onSelect` instead, and one of
|
|
18
|
+
* the two is required.
|
|
19
|
+
* TR: Girişin gittiği yer. Masaüstü uygulamasının adresi yok; onun yerine `onSelect` veriyor ve
|
|
20
|
+
* ikisinden biri zorunlu.
|
|
21
|
+
*/
|
|
22
|
+
href?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Runs instead of navigating. For a shell whose screens are state, not addresses.
|
|
25
|
+
* TR: Gezinmenin yerine koşuyor · ekranları adres değil durum olan bir kabuk için.
|
|
26
|
+
*/
|
|
27
|
+
onSelect?: () => void;
|
|
13
28
|
/** The translated label. In the tooltip on a narrow rail, on the row itself on a wide one. TR: Çevrilmiş etiket. Dar rayda ipucunda, geniş rayda satırın kendisinde. */
|
|
14
29
|
label: string;
|
|
15
30
|
icon: ComponentProps<typeof Icon>["icon"];
|
|
@@ -56,6 +71,13 @@ export type AppShellProps = {
|
|
|
56
71
|
topbar?: ReactNode;
|
|
57
72
|
/** A control at the foot of the rail: an expand/collapse button, say. TR: Rayın dibine giren kontrol: genişlet/daralt düğmesi gibi. */
|
|
58
73
|
railFooter?: ReactNode;
|
|
74
|
+
/**
|
|
75
|
+
* A state class on the content surface, for something the shell cannot know: a window-wide drop
|
|
76
|
+
* target marking its edge, say. Layout stays the kit's.
|
|
77
|
+
* TR: İçerik yüzeyine binen durum sınıfı · kabuğun bilemeyeceği bir şey için: pencere genelinde
|
|
78
|
+
* bir bırakma hedefinin kenarını işaretlemesi gibi. Düzen kitte kalıyor.
|
|
79
|
+
*/
|
|
80
|
+
mainClassName?: string;
|
|
59
81
|
linkComponent?: LinkComponent;
|
|
60
82
|
labels: {
|
|
61
83
|
home: string;
|
|
@@ -63,5 +85,5 @@ export type AppShellProps = {
|
|
|
63
85
|
};
|
|
64
86
|
children: ReactNode;
|
|
65
87
|
};
|
|
66
|
-
export declare function AppShell({ brand, nav, activePath, rail, topbar, railFooter, linkComponent: Link, labels, children, }: AppShellProps): import("react").JSX.Element;
|
|
88
|
+
export declare function AppShell({ brand, nav, activePath, rail, topbar, railFooter, mainClassName, linkComponent: Link, labels, children, }: AppShellProps): import("react").JSX.Element;
|
|
67
89
|
//# sourceMappingURL=app-shell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../src/patterns/app-shell.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM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C;AAEF,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,GAAG,EACH,UAAU,EACV,IAAe,EACf,MAAM,EACN,UAAU,EACV,aAAa,EACb,aAAa,EAAE,IAAgB,EAC/B,MAAM,EACN,QAAQ,GACT,EAAE,aAAa,+BAsHf"}
|
|
@@ -3,16 +3,18 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import { Fragment } from "react";
|
|
4
4
|
import { Icon } from "../components/icon.js";
|
|
5
5
|
import { RailLink } from "../components/rail-link.js";
|
|
6
|
+
import { cn } from "../lib/cn.js";
|
|
6
7
|
import { PlainLink } from "./shared.js";
|
|
7
|
-
export function AppShell({ brand, nav, activePath, rail = "narrow", topbar, railFooter, linkComponent: Link = PlainLink, labels, children, }) {
|
|
8
|
+
export function AppShell({ brand, nav, activePath, rail = "narrow", topbar, railFooter, mainClassName, linkComponent: Link = PlainLink, labels, children, }) {
|
|
8
9
|
/* Bir giriş kendi alt ağacına sahip, ve EN UZUN EŞLEŞEN KAZANIR: kökün `/`
|
|
9
10
|
olmadığı bir panelde kök giriş altındaki her rotayı yutuyordu.
|
|
10
11
|
Gerekçe: docs/gerekce/08-blok-ve-sablon.md */
|
|
11
12
|
const kapsiyor = (href) => activePath === href || activePath.startsWith(`${href}/`);
|
|
12
|
-
const enOzel = nav.reduce((kazanan, entry) => kapsiyor(entry.href) && (kazanan === null || entry.href.length > kazanan.length)
|
|
13
|
+
const enOzel = nav.reduce((kazanan, entry) => entry.href && kapsiyor(entry.href) && (kazanan === null || entry.href.length > kazanan.length)
|
|
13
14
|
? entry.href
|
|
14
15
|
: kazanan, null);
|
|
15
|
-
|
|
16
|
+
/* ADRESİ OLMAYAN GİRİŞ ANAHTARIYLA EŞLEŞİYOR: masaüstü kabuğunda ekran bir durum, yol değil. */
|
|
17
|
+
const isCurrent = (entry) => entry.href ? entry.href === enOzel : entry.key === activePath;
|
|
16
18
|
const wide = rail === "wide";
|
|
17
|
-
return (_jsxs("div", { className: "flex h-dvh w-full overflow-hidden bg-rail text-ink-soft", children: [_jsxs("aside", { className: `flex shrink-0 flex-col gap-2 bg-rail py-4 ${wide ? "w-60 px-3" : "w-20 items-center px-1"}`, "data-rail": rail, children: [brand ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-label": labels.home, className: `mb-2 flex h-10 shrink-0 items-center text-ink ${wide ? "px-2" : "w-10 justify-center"}`, children: brand }), _jsx("span", { className: `h-0 w-6 border-t border-line ${wide ? "ml-2" : ""}` })] })) : null, _jsx("nav", { "aria-label": labels.primaryNav, className: `tamga-rail-scroll flex w-full flex-1 flex-col gap-2 py-1 ${wide ? "" : "items-center"}`, children: nav.map((entry, i) => (_jsxs(Fragment, { children: [wide && entry.section && entry.section !== nav[i - 1]?.section ? (_jsx("p", { className: `px-2.5 text-caption font-bold uppercase tracking-label text-ink-faint ${i > 0 ? "mt-5 pb-1.5" : "pb-1.5"}`, children: entry.section })) : null, _jsx(RailLink, { href: entry.href, label: entry.label, active: isCurrent(entry
|
|
19
|
+
return (_jsxs("div", { className: "flex h-dvh w-full overflow-hidden bg-rail text-ink-soft", children: [_jsxs("aside", { className: `flex shrink-0 flex-col gap-2 bg-rail py-4 ${wide ? "w-60 px-3" : "w-20 items-center px-1"}`, "data-rail": rail, children: [brand ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-label": labels.home, className: `mb-2 flex h-10 shrink-0 items-center text-ink ${wide ? "px-2" : "w-10 justify-center"}`, children: brand }), _jsx("span", { className: `h-0 w-6 border-t border-line ${wide ? "ml-2" : ""}` })] })) : null, _jsx("nav", { "aria-label": labels.primaryNav, className: `tamga-rail-scroll flex w-full flex-1 flex-col gap-2 py-1 ${wide ? "" : "items-center"}`, children: nav.map((entry, i) => (_jsxs(Fragment, { children: [wide && entry.section && entry.section !== nav[i - 1]?.section ? (_jsx("p", { className: `px-2.5 text-caption font-bold uppercase tracking-label text-ink-faint ${i > 0 ? "mt-5 pb-1.5" : "pb-1.5"}`, children: entry.section })) : null, _jsx(RailLink, { href: entry.href, onClick: entry.onSelect, label: entry.label, active: isCurrent(entry), showLabel: wide, linkComponent: Link, "data-nav": entry.key, children: _jsx(Icon, { icon: entry.icon, size: "md", weight: isCurrent(entry) ? "fill" : "regular" }) })] }, entry.key))) }), railFooter ? _jsx("div", { className: "shrink-0", children: railFooter }) : null] }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("header", { className: "tamga-gutter flex items-center gap-4 bg-band py-4", children: topbar }), _jsx("div", { className: "min-h-0 flex-1 overflow-hidden pr-4 pb-4", children: _jsx("main", { className: cn("tamga-surface tamga-app-main relative h-full min-h-0 overflow-y-auto", mainClassName), children: children }) })] })] }));
|
|
18
20
|
}
|
package/dist/styles.css
CHANGED
package/dist/theme.css
CHANGED