tamga-ui 0.5.9 → 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/CHANGELOG.md +156 -0
- package/dist/blocks/danger-zone.d.ts +54 -0
- package/dist/blocks/danger-zone.d.ts.map +1 -0
- package/dist/blocks/danger-zone.js +18 -0
- package/dist/blocks/index.d.ts +1 -0
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/blocks/index.js +1 -0
- package/dist/components/appearance.d.ts +91 -5
- package/dist/components/appearance.d.ts.map +1 -1
- package/dist/components/appearance.js +164 -18
- package/dist/components/button.d.ts +2 -1
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/chrome.d.ts +10 -1
- package/dist/components/chrome.d.ts.map +1 -1
- package/dist/components/chrome.js +2 -2
- package/dist/components/date-picker.d.ts +142 -4
- package/dist/components/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker.js +331 -40
- package/dist/components/disclosure.d.ts +37 -2
- package/dist/components/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure.js +13 -3
- package/dist/components/display.d.ts +35 -6
- package/dist/components/display.d.ts.map +1 -1
- package/dist/components/display.js +21 -7
- package/dist/components/input.d.ts +2 -1
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/primitives.d.ts +3 -1
- package/dist/components/primitives.d.ts.map +1 -1
- package/dist/components/primitives.js +2 -2
- package/dist/fonts.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/kit.css +178 -3
- package/dist/lib/image.d.ts +2 -0
- package/dist/lib/image.d.ts.map +1 -1
- package/dist/lib/image.js +1 -1
- package/dist/lib/uyar.d.ts +2 -0
- package/dist/lib/uyar.d.ts.map +1 -0
- package/dist/lib/uyar.js +10 -0
- package/dist/patterns/app-shell.d.ts +20 -1
- package/dist/patterns/app-shell.d.ts.map +1 -1
- package/dist/patterns/app-shell.js +37 -3
- package/dist/styles.css +1 -1
- package/dist/theme.css +8 -1
- package/package.json +10 -12
|
@@ -105,13 +105,20 @@ export function Code({ children, filename, labels, className, ...rest }) {
|
|
|
105
105
|
export function Kbd({ children, inline = false, className, }) {
|
|
106
106
|
return _jsx("kbd", { className: cn("tamga-kbd", inline && "tamga-kbd-inline", className), children: children });
|
|
107
107
|
}
|
|
108
|
+
/** Yalnız hex: üç, dört, altı ya da sekiz basamak. Kullanıcı verisi style'a başka biçimde giremez. */
|
|
109
|
+
const HEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
108
110
|
/**
|
|
109
|
-
*
|
|
110
|
-
* `
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
111
|
+
* Kullanıcının kendi rengi için küçük işaret · Yasa 3'ün yazılı istisnası
|
|
112
|
+
* (bkz. `Tag swatch`). Tek başına dışa açık: tıklanabilir bir öneri satırı
|
|
113
|
+
* işareti bir `Button`un içine koyar, `Tag`i değil · kutu içinde kutu olmaz.
|
|
114
|
+
* Geçersiz renk (hex değil) HİÇ çizilmez: style'a kullanıcı verisi yalnız
|
|
115
|
+
* doğrulanmış bir hex olarak girer.
|
|
114
116
|
*/
|
|
117
|
+
export function ColorMark({ color, className, ...rest }) {
|
|
118
|
+
if (!HEX.test(color))
|
|
119
|
+
return null;
|
|
120
|
+
return _jsx("span", { ...dataProps(rest), "aria-hidden": "true", className: cn("tamga-mark tamga-color-mark", className), style: { backgroundColor: color } });
|
|
121
|
+
}
|
|
115
122
|
/**
|
|
116
123
|
* Etiket rozeti · bir özelliğin durumu: BETA, YENİ, PRO.
|
|
117
124
|
*
|
|
@@ -122,9 +129,16 @@ export function Kbd({ children, inline = false, className, }) {
|
|
|
122
129
|
*
|
|
123
130
|
* Gerekçe: docs/gerekce/06-isaret-ve-ton.md
|
|
124
131
|
*/
|
|
125
|
-
export function Tag({ children, look = "outline", className, ...rest }) {
|
|
126
|
-
return (
|
|
132
|
+
export function Tag({ children, look = "outline", swatch, className, ...rest }) {
|
|
133
|
+
return (_jsxs("span", { ...dataProps(rest), className: cn("tamga-tag", look === "dashed" && "tamga-tag-dashed", look === "solid" && "tamga-tag-solid", look === "outline" && "tamga-tag-outline", className), children: [swatch ? _jsx(ColorMark, { color: swatch }) : null, children] }));
|
|
127
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Sayaç rozeti: bir ikonun köşesindeki SAYI (`StatusChip` bir DURUM taşır).
|
|
137
|
+
* `max` üstünde "+" ile kesiliyor, yoksa dört hane kutuyu şişirip altındaki
|
|
138
|
+
* ikonu eziyor. Sıfır gösterilmiyor.
|
|
139
|
+
*
|
|
140
|
+
* Doküman: /docs/badge
|
|
141
|
+
*/
|
|
128
142
|
export function Badge({ count, max = 99, tone = "danger", dot = false, label, className, children, ...rest }) {
|
|
129
143
|
if (!dot && (count ?? 0) <= 0)
|
|
130
144
|
return _jsx(_Fragment, { children: children });
|
|
@@ -26,7 +26,8 @@ export type InputProps = Omit<React.ComponentProps<"input">, "size"> & VariantPr
|
|
|
26
26
|
/**
|
|
27
27
|
* There is an icon absolutely positioned over the left of this field, so reserve room for it.
|
|
28
28
|
* Opt-in on purpose: the padding used to be unconditional and every plain field opened with a
|
|
29
|
-
* 40px hole where nothing was.
|
|
29
|
+
* 40px hole where nothing was. TR: Alanın solunda mutlak konumlu bir ikon var, ona yer ayır.
|
|
30
|
+
* Bilerek isteğe bağlı: dolgu koşulsuzdu ve her düz alan 40 px'lik boş bir delikle açılıyordu.
|
|
30
31
|
*/
|
|
31
32
|
leading?: boolean;
|
|
32
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AA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,EAAE;IACD,mFAAmF;IACnF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,oEAAoE;IACpE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAgBA"}
|
|
@@ -133,7 +133,7 @@ export declare function Field({ label, description, error, required, note, info,
|
|
|
133
133
|
[k: `data-${string}`]: unknown;
|
|
134
134
|
}): import("react").JSX.Element;
|
|
135
135
|
/** A plain select: the same overlay as the searchable one, without the search. */
|
|
136
|
-
export declare function Select({ options, icon, set, value, onChange, placeholder, loading, loadingRows, "aria-label": ariaLabel, className, ...rest }: {
|
|
136
|
+
export declare function Select({ options, icon, set, value, onChange, placeholder, loading, loadingRows, disabled, "aria-label": ariaLabel, className, ...rest }: {
|
|
137
137
|
/**
|
|
138
138
|
* Plain strings, or options that carry a tone. TR: Düz dizgiler, ya da ton
|
|
139
139
|
* taşıyan seçenekler.
|
|
@@ -217,6 +217,8 @@ export declare function Select({ options, icon, set, value, onChange, placeholde
|
|
|
217
217
|
* hiçbir şey duymuyordu.
|
|
218
218
|
*/
|
|
219
219
|
"aria-label"?: string;
|
|
220
|
+
/** Locks the trigger; the list cannot open. TR: Tetiği kilitler; liste açılmaz. */
|
|
221
|
+
disabled?: boolean;
|
|
220
222
|
/** Genişlik ve konum çağıranın. Varsayılan `w-56`; `w-full` verildiğinde
|
|
221
223
|
* tailwind-merge onu ezer, yani kontrol kabına uyar. */
|
|
222
224
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/components/primitives.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAA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AC;CAChC,+BA+DA;AAED,kFAAkF;AAClF,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,IAAI,EACJ,GAAG,EACH,KAAK,EACL,QAAQ,EACR,WAAW,EACX,OAAe,EACf,WAAe,EACf,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,GAAG,IAAI,EACR,EAAE;IACD;;;;;;;;;;;;OAYG;IACH,OAAO,EAAE,SAAS,CACd,MAAM,GACN,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,IAAI,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAC5F,EAAE,CAAC;IACJ;;;;;OAKG;IACH;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;;;OAcG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;6DACyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/components/primitives.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EA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Q,EACR,MAAM,EACN,OAAe,EACf,UAAU,EACV,IAAY,EACZ,GAAG,IAAI,EACR,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACvB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,sCAoEA"}
|
|
@@ -79,7 +79,7 @@ export function Field({ label, description, error, required = false, note, info,
|
|
|
79
79
|
return (_jsxs("div", { ...dataProps(rest), className: "flex flex-col gap-1.5", children: [_jsxs("span", { className: "flex items-baseline gap-2", children: [_jsxs("label", { htmlFor: htmlFor, className: "text-small font-bold text-ink", children: [label, required ? (_jsx("span", { "aria-hidden": true, className: "ml-1", style: { color: toneOf("danger").fg }, children: "*" })) : null] }), info ? _jsx("span", { className: "flex items-center text-ink-faint", children: info }) : null, _jsx("span", { className: "flex-1" }), note ? _jsx("span", { className: "text-caption text-ink-faint", children: note }) : null] }), kontrol, count ? (_jsxs("span", { className: "self-end font-mono text-small font-bold tabular-nums", style: count.value > count.max ? { color: toneOf("danger").fg } : { color: "var(--color-ink-faint)" }, children: [count.value, " / ", count.max] })) : null, error ? (_jsxs("p", { id: notId, className: "flex items-center gap-1.5 text-small font-medium", style: { color: toneOf("danger").fg }, children: [_jsx(Icon, { icon: Warning, size: "xs", weight: "fill" }), error] })) : description ? (_jsx("p", { id: notId, className: "text-small text-ink-faint", children: description })) : null] }));
|
|
80
80
|
}
|
|
81
81
|
/** A plain select: the same overlay as the searchable one, without the search. */
|
|
82
|
-
export function Select({ options, icon, set, value, onChange, placeholder, loading = false, loadingRows = 4, "aria-label": ariaLabel, className, ...rest }) {
|
|
82
|
+
export function Select({ options, icon, set, value, onChange, placeholder, loading = false, loadingRows = 4, disabled = false, "aria-label": ariaLabel, className, ...rest }) {
|
|
83
83
|
const [open, setOpen] = useState(false);
|
|
84
84
|
const [inner, setInner] = useState(value ?? "");
|
|
85
85
|
const box = useRef(null);
|
|
@@ -102,7 +102,7 @@ export function Select({ options, icon, set, value, onChange, placeholder, loadi
|
|
|
102
102
|
document.addEventListener("mousedown", away);
|
|
103
103
|
return () => document.removeEventListener("mousedown", away);
|
|
104
104
|
}, [open]);
|
|
105
|
-
return (_jsxs("div", { ...dataProps(rest), ref: box, className: cn("relative w-56", className), children: [_jsxs("button", { type: "button", className: "tamga-select justify-between", "data-set": (set ?? Boolean(current)) ? "true" : undefined, "aria-haspopup": "listbox", "aria-expanded": open, "aria-label": ariaLabel, onClick: () => setOpen((o) => !o), children: [icon ? _jsx(Icon, { icon: icon, size: "sm", className: "shrink-0 text-ink-faint" }) : null, _jsx("span", { className: cn("min-w-0 flex-1 truncate", current ? "" : "text-ink-faint"), children: gorunen || placeholder }), _jsx(Icon, { icon: CaretRight, size: "xs", className: "shrink-0 rotate-90" })] }), open && (_jsxs("div", { ref: list, role: "listbox", className: "tamga-overlay tamga-menu absolute left-0 top-[var(--overlay-below)] z-40 flex w-full flex-col gap-0.5 overflow-hidden", "aria-busy": loading || undefined, children: [loading && _jsx(SkeletonOptions, { rows: loadingRows }), !loading && options.map((ham) => {
|
|
105
|
+
return (_jsxs("div", { ...dataProps(rest), ref: box, className: cn("relative w-56", className), children: [_jsxs("button", { type: "button", className: "tamga-select justify-between", "data-set": (set ?? Boolean(current)) ? "true" : undefined, "aria-haspopup": "listbox", "aria-expanded": open, "aria-label": ariaLabel, disabled: disabled || undefined, onClick: () => setOpen((o) => !o), children: [icon ? _jsx(Icon, { icon: icon, size: "sm", className: "shrink-0 text-ink-faint" }) : null, _jsx("span", { className: cn("min-w-0 flex-1 truncate", current ? "" : "text-ink-faint"), children: gorunen || placeholder }), _jsx(Icon, { icon: CaretRight, size: "xs", className: "shrink-0 rotate-90" })] }), open && (_jsxs("div", { ref: list, role: "listbox", className: "tamga-overlay tamga-menu absolute left-0 top-[var(--overlay-below)] z-40 flex w-full flex-col gap-0.5 overflow-hidden", "aria-busy": loading || undefined, children: [loading && _jsx(SkeletonOptions, { rows: loadingRows }), !loading && options.map((ham) => {
|
|
106
106
|
const nesne = typeof ham === "string" ? { value: ham } : ham;
|
|
107
107
|
const { value: o, label: etiket, tone: ton, hint: ipucu, ...kanca } = nesne;
|
|
108
108
|
return (_createElement("button", { ...kanca, key: o, role: "option", "aria-selected": o === current, "data-tamga-option": true, className: "tamga-option", "data-selected": o === current, onClick: () => {
|
package/dist/fonts.css
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export { TimelineStrip } from "./components/timeline-strip.js";
|
|
|
25
25
|
export { NumberInput } from "./components/number-input.js";
|
|
26
26
|
export { Combobox, type ComboOption } from "./components/combobox.js";
|
|
27
27
|
export { FileUpload, type UploadItem } from "./components/file-upload.js";
|
|
28
|
-
export { DatePicker, Calendar, type DateISO, type DateRange } from "./components/date-picker.js";
|
|
28
|
+
export { DatePicker, Calendar, type DateISO, type DateRange, DateTimePicker, type DateTimeISO } from "./components/date-picker.js";
|
|
29
29
|
export { Avatar, AvatarStack } from "./components/avatar.js";
|
|
30
30
|
export { StatusChip, Delta, Dot } from "./components/badge.js";
|
|
31
31
|
export { SaysBubble, type SaysFrom } from "./components/says-bubble.js";
|
|
@@ -50,7 +50,7 @@ export { prepareImage, cropSquare, IMAGE_ACCEPT, type ImageError } from "./lib/i
|
|
|
50
50
|
export { RailLink } from "./components/rail-link.js";
|
|
51
51
|
export { Slider } from "./components/slider.js";
|
|
52
52
|
export { Accordion, Collapsible } from "./components/disclosure.js";
|
|
53
|
-
export { Descriptions, Kpi, KpiGrid, Rise, Code, Kbd, Badge, Tag, Steps, type Step } from "./components/display.js";
|
|
53
|
+
export { Descriptions, Kpi, KpiGrid, Rise, Code, Kbd, Badge, Tag, Steps, type Step, ColorMark } from "./components/display.js";
|
|
54
54
|
export { PasswordInput, SecretField, TagsInput, MultiSelect, ScheduleInput, } from "./components/advanced-input.js";
|
|
55
55
|
export { LineChart, type Series } from "./components/chart.js";
|
|
56
56
|
export { PieChart, type PieSlice } from "./components/pie.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,EACL,MAAM,EACN,SAAS,EACT,MAAM,EACN,OAAO,EACP,MAAM,GACP,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGjE,OAAO,EACL,MAAM,EACN,cAAc,EACd,KAAK,WAAW,EAChB,UAAU,EACV,kBAAkB,EAClB,UAAU,GACX,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGxH,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,QAAQ,E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,OAAO,EAAE,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ export { TimelineStrip } from "./components/timeline-strip.js";
|
|
|
31
31
|
export { NumberInput } from "./components/number-input.js";
|
|
32
32
|
export { Combobox } from "./components/combobox.js";
|
|
33
33
|
export { FileUpload } from "./components/file-upload.js";
|
|
34
|
-
export { DatePicker, Calendar } from "./components/date-picker.js";
|
|
34
|
+
export { DatePicker, Calendar, DateTimePicker } from "./components/date-picker.js";
|
|
35
35
|
/* --- display ----------------------------------------------------------- */
|
|
36
36
|
export { Avatar, AvatarStack } from "./components/avatar.js";
|
|
37
37
|
export { StatusChip, Delta, Dot } from "./components/badge.js";
|
|
@@ -65,7 +65,7 @@ export { Slider } from "./components/slider.js";
|
|
|
65
65
|
/* --- açılır bölümler --------------------------------------------------- */
|
|
66
66
|
export { Accordion, Collapsible } from "./components/disclosure.js";
|
|
67
67
|
/* --- okunacak şeyler --------------------------------------------------- */
|
|
68
|
-
export { Descriptions, Kpi, KpiGrid, Rise, Code, Kbd, Badge, Tag, Steps } from "./components/display.js";
|
|
68
|
+
export { Descriptions, Kpi, KpiGrid, Rise, Code, Kbd, Badge, Tag, Steps, ColorMark } from "./components/display.js";
|
|
69
69
|
/* --- gelişmiş girdiler ------------------------------------------------- */
|
|
70
70
|
export { PasswordInput, SecretField, TagsInput, MultiSelect, ScheduleInput, } from "./components/advanced-input.js";
|
|
71
71
|
/* --- grafik ve günlük -------------------------------------------------- */
|
package/dist/kit.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tamga-ui 0.
|
|
1
|
+
/*! tamga-ui 0.7.0 · MIT · https://tamga.org.tr */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
--overlay-gap: 8px;
|
|
@@ -27,6 +27,13 @@
|
|
|
27
27
|
|
|
28
28
|
.dark {
|
|
29
29
|
|
|
30
|
+
--color-logo-ground-light: #fffefb;
|
|
31
|
+
--color-logo-edge-light: #0a1f3d;
|
|
32
|
+
--color-logo-ink-light: #1e4fd8;
|
|
33
|
+
--color-logo-ground-dark: #16233a;
|
|
34
|
+
--color-logo-edge-dark: #6b7f9f;
|
|
35
|
+
--color-logo-ink-dark: #709dfd;
|
|
36
|
+
|
|
30
37
|
color-scheme: dark;
|
|
31
38
|
|
|
32
39
|
--color-page: #101a2c;
|
|
@@ -380,6 +387,69 @@
|
|
|
380
387
|
display: none;
|
|
381
388
|
}
|
|
382
389
|
|
|
390
|
+
.tamga-rail-section {
|
|
391
|
+
align-items: center;
|
|
392
|
+
background: transparent;
|
|
393
|
+
border: 0;
|
|
394
|
+
border-radius: var(--radius-ctl);
|
|
395
|
+
color: var(--color-ink-faint);
|
|
396
|
+
cursor: pointer;
|
|
397
|
+
display: flex;
|
|
398
|
+
font: inherit;
|
|
399
|
+
font-size: var(--text-caption);
|
|
400
|
+
font-weight: 700;
|
|
401
|
+
gap: 6px;
|
|
402
|
+
letter-spacing: var(--tracking-label);
|
|
403
|
+
padding: 4px 10px;
|
|
404
|
+
text-align: left;
|
|
405
|
+
text-transform: uppercase;
|
|
406
|
+
transition: background var(--duration-press) var(--ease-standard), color var(--duration-press) var(--ease-standard);
|
|
407
|
+
width: 100%;
|
|
408
|
+
}
|
|
409
|
+
.tamga-rail-section:hover {
|
|
410
|
+
background: var(--color-hover);
|
|
411
|
+
color: var(--color-ink);
|
|
412
|
+
}
|
|
413
|
+
.tamga-rail-section[data-locked="true"] {
|
|
414
|
+
cursor: default;
|
|
415
|
+
}
|
|
416
|
+
.tamga-rail-section[data-locked="true"]:hover {
|
|
417
|
+
background: transparent;
|
|
418
|
+
color: var(--color-ink-faint);
|
|
419
|
+
}
|
|
420
|
+
.tamga-rail-section-caret {
|
|
421
|
+
margin-left: auto;
|
|
422
|
+
transition: transform var(--duration-press) var(--ease-standard), opacity var(--duration-press) var(--ease-standard);
|
|
423
|
+
}
|
|
424
|
+
.tamga-rail-section[aria-expanded="false"] .tamga-rail-section-caret {
|
|
425
|
+
transform: rotate(-90deg);
|
|
426
|
+
}
|
|
427
|
+
.tamga-rail-section[data-locked="true"] .tamga-rail-section-caret {
|
|
428
|
+
opacity: 0.35;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.tamga-rail-group-body {
|
|
432
|
+
display: grid;
|
|
433
|
+
grid-template-rows: 1fr;
|
|
434
|
+
transition: grid-template-rows var(--duration-press) var(--ease-standard);
|
|
435
|
+
}
|
|
436
|
+
.tamga-rail-group-body > div {
|
|
437
|
+
display: flex;
|
|
438
|
+
flex-direction: column;
|
|
439
|
+
gap: 8px;
|
|
440
|
+
min-height: 0;
|
|
441
|
+
overflow: hidden;
|
|
442
|
+
}
|
|
443
|
+
.tamga-rail-group-body[data-open="false"] {
|
|
444
|
+
grid-template-rows: 0fr;
|
|
445
|
+
}
|
|
446
|
+
@media (prefers-reduced-motion: reduce) {
|
|
447
|
+
.tamga-rail-group-body,
|
|
448
|
+
.tamga-rail-section-caret {
|
|
449
|
+
transition: none;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
383
453
|
.tamga-rail-link {
|
|
384
454
|
position: relative;
|
|
385
455
|
display: flex;
|
|
@@ -1200,10 +1270,18 @@
|
|
|
1200
1270
|
transition: transform var(--duration-press) var(--ease-standard), box-shadow var(--duration-press) var(--ease-standard),
|
|
1201
1271
|
border-color var(--duration-press) var(--ease-standard);
|
|
1202
1272
|
}
|
|
1203
|
-
.tamga-select:hover {
|
|
1273
|
+
.tamga-select:hover:not(:disabled) {
|
|
1204
1274
|
border-color: var(--color-edge-strong);
|
|
1205
1275
|
}
|
|
1206
1276
|
|
|
1277
|
+
.tamga-select:disabled {
|
|
1278
|
+
background: var(--color-sunk);
|
|
1279
|
+
border-style: dashed;
|
|
1280
|
+
border-color: var(--color-edge);
|
|
1281
|
+
color: var(--color-ink-faint);
|
|
1282
|
+
cursor: default;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1207
1285
|
.tamga-select[data-set="true"] {
|
|
1208
1286
|
border-color: var(--color-edge-strong);
|
|
1209
1287
|
}
|
|
@@ -1478,6 +1556,25 @@
|
|
|
1478
1556
|
color: var(--color-ink-soft);
|
|
1479
1557
|
}
|
|
1480
1558
|
|
|
1559
|
+
.tamga-collapsible-note {
|
|
1560
|
+
padding: 0 14px 12px;
|
|
1561
|
+
font-size: var(--text-small);
|
|
1562
|
+
line-height: 1.5;
|
|
1563
|
+
color: var(--color-ink-faint);
|
|
1564
|
+
}
|
|
1565
|
+
.tamga-collapsible-note[data-indent] {
|
|
1566
|
+
padding-left: 44px;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
.tamga-collapsible-caret {
|
|
1570
|
+
transition: transform var(--duration-press) var(--ease-standard);
|
|
1571
|
+
}
|
|
1572
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1573
|
+
.tamga-collapsible-caret {
|
|
1574
|
+
transition: none;
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1481
1578
|
.tamga-collapsible-body[data-indent] {
|
|
1482
1579
|
padding-left: 44px;
|
|
1483
1580
|
}
|
|
@@ -1606,6 +1703,8 @@
|
|
|
1606
1703
|
.tamga-tag {
|
|
1607
1704
|
display: inline-flex;
|
|
1608
1705
|
align-items: center;
|
|
1706
|
+
|
|
1707
|
+
gap: 6px;
|
|
1609
1708
|
border-radius: var(--radius-mark);
|
|
1610
1709
|
padding: 1px 6px;
|
|
1611
1710
|
font-size: var(--text-caption);
|
|
@@ -1630,6 +1729,16 @@
|
|
|
1630
1729
|
color: var(--color-ink-faint);
|
|
1631
1730
|
}
|
|
1632
1731
|
|
|
1732
|
+
.tamga-color-mark {
|
|
1733
|
+
display: inline-block;
|
|
1734
|
+
flex-shrink: 0;
|
|
1735
|
+
box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-ink) 60%, transparent);
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
.tamga-tag-solid .tamga-color-mark {
|
|
1739
|
+
box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-page) 60%, transparent);
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1633
1742
|
.tamga-desc-split {
|
|
1634
1743
|
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
1635
1744
|
column-gap: 32px;
|
|
@@ -2510,9 +2619,14 @@
|
|
|
2510
2619
|
justify-content: center;
|
|
2511
2620
|
width: 36px;
|
|
2512
2621
|
}
|
|
2513
|
-
.tamga-gun:hover {
|
|
2622
|
+
.tamga-gun:hover:not(:disabled) {
|
|
2514
2623
|
background: var(--color-hover);
|
|
2515
2624
|
}
|
|
2625
|
+
|
|
2626
|
+
.tamga-gun:disabled {
|
|
2627
|
+
color: var(--color-ink-faint);
|
|
2628
|
+
cursor: not-allowed;
|
|
2629
|
+
}
|
|
2516
2630
|
.tamga-gun[data-today] {
|
|
2517
2631
|
border-color: var(--color-edge-strong);
|
|
2518
2632
|
}
|
|
@@ -2974,6 +3088,48 @@
|
|
|
2974
3088
|
background: var(--color-accent-bg);
|
|
2975
3089
|
}
|
|
2976
3090
|
|
|
3091
|
+
.tamga-danger-zone {
|
|
3092
|
+
border: 1.5px solid var(--color-critical);
|
|
3093
|
+
border-radius: var(--radius-card);
|
|
3094
|
+
background: var(--color-shell);
|
|
3095
|
+
}
|
|
3096
|
+
.tamga-danger-zone-head {
|
|
3097
|
+
display: flex;
|
|
3098
|
+
align-items: flex-start;
|
|
3099
|
+
gap: 12px;
|
|
3100
|
+
padding: 16px 18px 14px;
|
|
3101
|
+
border-bottom: 1px solid var(--color-line);
|
|
3102
|
+
}
|
|
3103
|
+
.tamga-danger-zone-tile {
|
|
3104
|
+
display: grid;
|
|
3105
|
+
place-items: center;
|
|
3106
|
+
flex: none;
|
|
3107
|
+
width: 28px;
|
|
3108
|
+
height: 28px;
|
|
3109
|
+
border: 1px solid var(--color-critical);
|
|
3110
|
+
border-radius: calc(var(--radius) - 1px);
|
|
3111
|
+
background: var(--color-critical-bg);
|
|
3112
|
+
color: var(--color-critical);
|
|
3113
|
+
}
|
|
3114
|
+
.tamga-danger-zone-list {
|
|
3115
|
+
margin: 0;
|
|
3116
|
+
padding: 0;
|
|
3117
|
+
list-style: none;
|
|
3118
|
+
}
|
|
3119
|
+
.tamga-danger-zone-row {
|
|
3120
|
+
padding: 14px 18px;
|
|
3121
|
+
}
|
|
3122
|
+
.tamga-danger-zone-row + .tamga-danger-zone-row {
|
|
3123
|
+
border-top: 1px solid var(--color-line);
|
|
3124
|
+
}
|
|
3125
|
+
|
|
3126
|
+
.tamga-danger-zone-reason {
|
|
3127
|
+
margin-top: 6px;
|
|
3128
|
+
font-size: var(--text-small);
|
|
3129
|
+
font-weight: var(--weight-strong);
|
|
3130
|
+
color: var(--color-critical);
|
|
3131
|
+
}
|
|
3132
|
+
|
|
2977
3133
|
.tamga-alert {
|
|
2978
3134
|
display: flex;
|
|
2979
3135
|
gap: 12px;
|
|
@@ -3514,6 +3670,12 @@
|
|
|
3514
3670
|
border-style: dashed;
|
|
3515
3671
|
}
|
|
3516
3672
|
|
|
3673
|
+
.tamga-swatch-none {
|
|
3674
|
+
border-style: dashed;
|
|
3675
|
+
background: var(--color-shell);
|
|
3676
|
+
color: var(--color-ink);
|
|
3677
|
+
}
|
|
3678
|
+
|
|
3517
3679
|
.tamga-color-input {
|
|
3518
3680
|
position: absolute;
|
|
3519
3681
|
inset: 0;
|
|
@@ -3989,6 +4151,19 @@
|
|
|
3989
4151
|
border: 1.5px solid var(--color-edge-strong);
|
|
3990
4152
|
border-radius: var(--radius-btn);
|
|
3991
4153
|
background: var(--color-shell);
|
|
4154
|
+
|
|
4155
|
+
color: var(--color-accent);
|
|
4156
|
+
}
|
|
4157
|
+
|
|
4158
|
+
.tamga-logo-tile[data-surface="light"] {
|
|
4159
|
+
background: var(--color-logo-ground-light);
|
|
4160
|
+
border-color: var(--color-logo-edge-light);
|
|
4161
|
+
color: var(--color-logo-ink-light);
|
|
4162
|
+
}
|
|
4163
|
+
.tamga-logo-tile[data-surface="dark"] {
|
|
4164
|
+
background: var(--color-logo-ground-dark);
|
|
4165
|
+
border-color: var(--color-logo-edge-dark);
|
|
4166
|
+
color: var(--color-logo-ink-dark);
|
|
3992
4167
|
}
|
|
3993
4168
|
.tamga-logo-tile-sm {
|
|
3994
4169
|
width: 40px;
|
package/dist/lib/image.d.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* Gerekçe: docs/gerekce/09-kitaplik.md
|
|
7
7
|
*/
|
|
8
8
|
export type ImageError = "type" | "size" | "unreadable";
|
|
9
|
+
/** Raw file limit, before resizing. Over 8 MB is not a logo, it is an accident. */
|
|
10
|
+
export declare const RAW_LIMIT: number;
|
|
9
11
|
export declare const IMAGE_ACCEPT = "image/png,image/jpeg,image/svg+xml,image/webp";
|
|
10
12
|
/**
|
|
11
13
|
* Resizes so the longest side is `maxEdge` pixels and returns a data URI.
|
package/dist/lib/image.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/lib/image.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/lib/image.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;AAExD,mFAAmF;AACnF,eAAO,MAAM,SAAS,QAAkB,CAAC;AAEzC,eAAO,MAAM,YAAY,kDAAkD,CAAC;AAE5E;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAoB/E;AAED;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAC5C,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAcjB"}
|
package/dist/lib/image.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Gerekçe: docs/gerekce/09-kitaplik.md
|
|
7
7
|
*/
|
|
8
8
|
/** Raw file limit, before resizing. Over 8 MB is not a logo, it is an accident. */
|
|
9
|
-
const RAW_LIMIT = 8 * 1024 * 1024;
|
|
9
|
+
export const RAW_LIMIT = 8 * 1024 * 1024;
|
|
10
10
|
export const IMAGE_ACCEPT = "image/png,image/jpeg,image/svg+xml,image/webp";
|
|
11
11
|
/**
|
|
12
12
|
* Resizes so the longest side is `maxEdge` pixels and returns a data URI.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uyar.d.ts","sourceRoot":"","sources":["../../src/lib/uyar.ts"],"names":[],"mappings":"AAWA,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,QAOjC"}
|
package/dist/lib/uyar.js
ADDED
|
@@ -79,11 +79,30 @@ export type AppShellProps = {
|
|
|
79
79
|
*/
|
|
80
80
|
mainClassName?: string;
|
|
81
81
|
linkComponent?: LinkComponent;
|
|
82
|
+
/**
|
|
83
|
+
* Section headers fold. On, each header in the wide rail is a button that hides its entries; the
|
|
84
|
+
* open page's section never folds, and a route landing inside a folded section finds it open.
|
|
85
|
+
* Off, headers are plain labels, the pre-0.6 rail. TR: Bölüm başlıkları katlanır. Açıkken geniş
|
|
86
|
+
* raydaki her başlık girişlerini gizleyen bir düğme; açık sayfanın bölümü hiç katlanmaz, kapalı
|
|
87
|
+
* bir bölüme düşen rota onu açık bulur. Kapalıyken başlıklar düz etiket, 0.6 öncesi ray.
|
|
88
|
+
*/
|
|
89
|
+
collapsibleSections?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* The folded sections, by name. Given, the shell is controlled: a click only reports through
|
|
92
|
+
* `onSectionToggle`, and the product decides. Absent, the shell keeps the state itself and forgets
|
|
93
|
+
* it on reload · where a preference lives (browser, account, device) is the product's call.
|
|
94
|
+
* TR: Kapalı bölümler, adıyla. Verilirse kabuk kontrollü: tık yalnız `onSectionToggle` ile haber
|
|
95
|
+
* verir, kararı ürün verir. Verilmezse kabuk durumu kendi tutar ve yenilemede unutur · tercihin
|
|
96
|
+
* nerede yaşadığı (tarayıcı, hesap, cihaz) ürünün kararı.
|
|
97
|
+
*/
|
|
98
|
+
collapsedSections?: readonly string[];
|
|
99
|
+
/** Fires with the section name and whether it is now open. TR: Bölüm adı ve artık açık olup olmadığıyla ateşlenir. */
|
|
100
|
+
onSectionToggle?: (section: string, open: boolean) => void;
|
|
82
101
|
labels: {
|
|
83
102
|
home: string;
|
|
84
103
|
primaryNav: string;
|
|
85
104
|
};
|
|
86
105
|
children: ReactNode;
|
|
87
106
|
};
|
|
88
|
-
export declare function AppShell({ brand, nav, activePath, rail, topbar, railFooter, mainClassName, linkComponent: Link, labels, children, }: AppShellProps): import("react").JSX.Element;
|
|
107
|
+
export declare function AppShell({ brand, nav, activePath, rail, topbar, railFooter, mainClassName, linkComponent: Link, collapsibleSections, collapsedSections, onSectionToggle, labels, children, }: AppShellProps): import("react").JSX.Element;
|
|
89
108
|
//# 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,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","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AI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3D,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,GAAG,EACH,UAAU,EACV,IAAe,EACf,MAAM,EACN,UAAU,EACV,aAAa,EACb,aAAa,EAAE,IAAgB,EAC/B,mBAA0B,EAC1B,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,QAAQ,GACT,EAAE,aAAa,+BA+Kf"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Fragment } from "react";
|
|
3
|
+
import { Fragment, useId, useState } from "react";
|
|
4
4
|
import { Icon } from "../components/icon.js";
|
|
5
|
+
import { CaretDown } from "../components/icons.js";
|
|
5
6
|
import { RailLink } from "../components/rail-link.js";
|
|
6
7
|
import { cn } from "../lib/cn.js";
|
|
7
8
|
import { PlainLink } from "./shared.js";
|
|
8
|
-
export function AppShell({ brand, nav, activePath, rail = "narrow", topbar, railFooter, mainClassName, linkComponent: Link = PlainLink, labels, children, }) {
|
|
9
|
+
export function AppShell({ brand, nav, activePath, rail = "narrow", topbar, railFooter, mainClassName, linkComponent: Link = PlainLink, collapsibleSections = true, collapsedSections, onSectionToggle, labels, children, }) {
|
|
9
10
|
/* Bir giriş kendi alt ağacına sahip, ve EN UZUN EŞLEŞEN KAZANIR: kökün `/`
|
|
10
11
|
olmadığı bir panelde kök giriş altındaki her rotayı yutuyordu.
|
|
11
12
|
Gerekçe: docs/gerekce/08-blok-ve-sablon.md */
|
|
@@ -16,5 +17,38 @@ export function AppShell({ brand, nav, activePath, rail = "narrow", topbar, rail
|
|
|
16
17
|
/* ADRESİ OLMAYAN GİRİŞ ANAHTARIYLA EŞLEŞİYOR: masaüstü kabuğunda ekran bir durum, yol değil. */
|
|
17
18
|
const isCurrent = (entry) => entry.href ? entry.href === enOzel : entry.key === activePath;
|
|
18
19
|
const wide = rail === "wide";
|
|
19
|
-
|
|
20
|
+
/* KATLAMA. Kapalı liste ya üründen gelir (kontrollü) ya da burada tutulur.
|
|
21
|
+
AÇIK SAYFANIN BÖLÜMÜ HEP AÇIK: "neredeyim" raydan okunmalı · kapalı bir
|
|
22
|
+
bölüme yönlendirmeyle düşen kullanıcı da onu açık bulur, listeyi
|
|
23
|
+
değiştirmeden. Dar rayda başlık yok, dolayısıyla katlanacak şey de yok. */
|
|
24
|
+
const [icKapali, setIcKapali] = useState([]);
|
|
25
|
+
const kapali = collapsedSections ?? icKapali;
|
|
26
|
+
const aktifBolum = nav.find(isCurrent)?.section;
|
|
27
|
+
const acikMi = (bolum) => !wide || !collapsibleSections || bolum === aktifBolum || !kapali.includes(bolum);
|
|
28
|
+
const degistir = (bolum) => {
|
|
29
|
+
if (bolum === aktifBolum)
|
|
30
|
+
return;
|
|
31
|
+
const sonraki = !acikMi(bolum);
|
|
32
|
+
onSectionToggle?.(bolum, sonraki);
|
|
33
|
+
if (collapsedSections === undefined) {
|
|
34
|
+
setIcKapali((k) => (sonraki ? k.filter((x) => x !== bolum) : [...k, bolum]));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
/* Ardışık girişler bölüm adına göre kümeleniyor; adı olmayanlar kendi
|
|
38
|
+
kümesinde, başlıksız. Veri düz kalıyor (bkz. `section`), küme çizim için. */
|
|
39
|
+
const gruplar = [];
|
|
40
|
+
for (const entry of nav) {
|
|
41
|
+
const son = gruplar[gruplar.length - 1];
|
|
42
|
+
if (son && son.bolum === entry.section)
|
|
43
|
+
son.girisler.push(entry);
|
|
44
|
+
else
|
|
45
|
+
gruplar.push({ bolum: entry.section, girisler: [entry] });
|
|
46
|
+
}
|
|
47
|
+
const kimlik = useId();
|
|
48
|
+
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: gruplar.map((grup, gi) => {
|
|
49
|
+
const id = `${kimlik}-${gi}`;
|
|
50
|
+
const acik = grup.bolum ? acikMi(grup.bolum) : true;
|
|
51
|
+
const kilitli = grup.bolum !== undefined && grup.bolum === aktifBolum;
|
|
52
|
+
return (_jsxs(Fragment, { children: [grup.bolum ? (wide ? (collapsibleSections ? (_jsxs("button", { type: "button", className: cn("tamga-rail-section", gi > 0 && "mt-3"), "aria-expanded": acik, "aria-controls": id, "aria-disabled": kilitli || undefined, "data-locked": kilitli || undefined, onClick: () => degistir(grup.bolum), children: [grup.bolum, _jsx(Icon, { icon: CaretDown, size: "xs", weight: "bold", className: "tamga-rail-section-caret" })] })) : (_jsx("p", { className: `px-2.5 text-caption font-bold uppercase tracking-label text-ink-faint ${gi > 0 ? "mt-5 pb-1.5" : "pb-1.5"}`, children: grup.bolum }))) : gi > 0 ? (_jsx("span", { className: "my-1.5 h-0 w-6 shrink-0 border-t border-line", "aria-hidden": true })) : null) : null, _jsx("div", { id: id, className: "tamga-rail-group-body", "data-open": acik, inert: !acik, children: _jsx("div", { className: wide ? undefined : "items-center", children: grup.girisler.map((entry) => (_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))) }) })] }, grup.bolum ?? `_${gi}`));
|
|
53
|
+
}) }), 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 }) })] })] }));
|
|
20
54
|
}
|
package/dist/styles.css
CHANGED
package/dist/theme.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tamga-ui 0.
|
|
1
|
+
/*! tamga-ui 0.7.0 · MIT · https://tamga.org.tr */
|
|
2
2
|
@custom-variant dark (&:is(.dark *));
|
|
3
3
|
|
|
4
4
|
@theme static {
|
|
@@ -243,6 +243,13 @@
|
|
|
243
243
|
|
|
244
244
|
--color-edge-strong: #0a1f3d;
|
|
245
245
|
|
|
246
|
+
--color-logo-ground-light: #fffefb;
|
|
247
|
+
--color-logo-edge-light: #0a1f3d;
|
|
248
|
+
--color-logo-ink-light: #1e4fd8;
|
|
249
|
+
--color-logo-ground-dark: #16233a;
|
|
250
|
+
--color-logo-edge-dark: #6b7f9f;
|
|
251
|
+
--color-logo-ink-dark: #709dfd;
|
|
252
|
+
|
|
246
253
|
--color-tick: #bdb8ae;
|
|
247
254
|
|
|
248
255
|
--color-chart-1: #887c4f;
|