tamga-ui 0.10.1 → 0.12.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 CHANGED
@@ -5,6 +5,100 @@ 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.12.0
9
+
10
+ > The detail page's title is the page title; the alert has a page-level look.
11
+
12
+ ### Added
13
+
14
+ - **`Alert` `look="banner"`** · the page-level status box at the top of an object's page
15
+ ("the store is down", "running", "in maintenance"): the card's 1.5px strong edge and
16
+ 4px hard shadow, a 44px tile with the `md` glyph, a display-face title (`--text-display-sm`,
17
+ extrabold), body copy at `--text-body`, 18/20px padding. The action and the dismiss sit on
18
+ the tile's centre. At 390px the action drops under the text (the text column keeps at least
19
+ 9rem) instead of squeezing the title into a five-letter column. `inline` stays the default and is unchanged: without `look` the markup
20
+ and the CSS are what they were. Shown in six tones on the docs page.
21
+
22
+ ### Changed
23
+
24
+ - **`DetailTemplate` draws its title as `PageBand` does**: an `h1` in the display face
25
+ (`--text-display-sm`, extrabold), the breadcrumb 6px above, the subtitle 6px below at body
26
+ size in the soft ink. It was an `h2` at `--text-title` semibold with a small faint subtitle,
27
+ so a list page's title was big and bold and an object's name small and thin; a detail page
28
+ had no `h1` at all. This enlarges every detail title in every product using the template,
29
+ on purpose: they all carried the same inconsistency. A long title (a hostname) breaks
30
+ inside the box at 390px.
31
+
32
+ ## 0.11.0
33
+
34
+ > Group controls carry their own error line; the breadcrumb is a label line.
35
+
36
+ ### Added
37
+
38
+ - **`RadioGroup` and `Checkbox` take `description`, `error` and `errorPrefix`.** The line
39
+ under the options (or under the box and its label) is the same drawing as `Field`'s: one
40
+ inner component, no copies. The root `role="radiogroup"` element (or the checkbox button)
41
+ gets `aria-describedby` pointing at the line and `aria-invalid="true"` while there is an
42
+ error; the description is hidden while the error shows. `errorPrefix` is an invisible word
43
+ before the error ("Error:") that only screen readers hear; the caller writes it, the kit
44
+ does not translate. `Field` takes `errorPrefix` too. Reason: neither control can sit inside
45
+ `Field`, and products were copying its error line by hand.
46
+ - **`RadioGroup` `showLabel`** draws `label` as a visible heading above the options, in
47
+ `Field`'s label size, weight and 8px gap, wired with `aria-labelledby`. Off by default.
48
+ - **`Select` passes `aria-describedby` and `aria-invalid` to its trigger**, so `Field`'s error
49
+ actually reaches it; an invalid trigger wears the same critical edge, wash and offset as an
50
+ invalid input. Both attributes used to be swallowed.
51
+ - **`AvatarStack` `names` accepts `{ name, src }`** for a person with a photo, beside plain
52
+ names.
53
+
54
+ ### Changed
55
+
56
+ - **Calendar's "today" is no longer an empty frame.** It competed with the selected day's
57
+ fill. Following Primer's date picker (primer/react #1582), today is a bold accent-coloured
58
+ number with a 2px accent bar under it; when today is the selected day the bar turns to the
59
+ fill's ink. A disabled today carries no mark.
60
+ - **`Select` lists are at most 256px tall and scroll** (Primer's Overlay "small"); on open the
61
+ list itself is scrolled so the selected option sits in its middle. Only the list moves, not
62
+ the page. A 24-hour list used to run to the bottom of the page.
63
+ - **Calendar hover no longer washes out the selected day**; the fill stays under the pointer.
64
+ - **The calendar box aligns to the trigger's right edge when it would overflow** its clipping
65
+ container or the window (`data-align="end"`); inside a drawer half of it used to be cut off.
66
+ - **`AvatarStack` is one layer.** The overlap is an eighth of the size, not a quarter (a
67
+ quarter hid half a face); the separating ring takes the tile's own corner radius (a smaller
68
+ radius read as a second layer behind the tile); tiles in a stack carry no base; the "+N"
69
+ tile is the same shell as its neighbours, with no base of its own. A photo `Avatar` sits on
70
+ the shell colour, not the accent: the accent is the ground for initials, and behind a
71
+ picture it only leaked through the transparent corners.
72
+ - **`Breadcrumb` is a label line.** The trail is in the table header's voice (uppercase
73
+ caption, letter-spaced, faint; ink on hover), stops are separated by a 5px square, and the
74
+ current page is ink at body size with no box. The chip-and-box version competed with the
75
+ page title in a panel. Markup is unchanged apart from the separator (a span instead of a
76
+ caret glyph).
77
+
78
+ ### Fixed
79
+
80
+ - **`Alert` tile, action and dismiss sit on the title's first line**, whatever the row
81
+ count and with or without a body. They used to sit 4 to 5px below a one-line title, and an
82
+ intermediate fix centred a title-only alert as a block, which put the tile 22px under the
83
+ first line of a three-line title at 390px. Now the box is top-aligned and the title itself
84
+ takes `margin-top: calc((28px - 1lh) / 2)` from its own line height; the `size="sm"` action
85
+ and the dismiss button are pulled up 2px and 1px to the same centre. With a body the tile
86
+ sits 2px lower than the geometric centre: beside a two-line block the eye reads it as
87
+ high. Measured at 1280px and
88
+ 390px, including a title that wraps to three lines (`pnpm olc:uyari`). The title also
89
+ breaks anywhere now: an address with no spaces used to run out of the box.
90
+ - **`Accordion` open card no longer turns its edge black or grows a shadow**; the open
91
+ section is told by the washed head and the caret. In `look="list"` a row is a row again: no
92
+ edge, no corner, no shadow of its own, a single line between neighbours. The card rules had
93
+ leaked into the list and the rows looked like touching cards. The body has 14px above as
94
+ well as below; it used to sit flush under the washed head.
95
+ - **`RadioGroup` card is a step shorter**: vertical padding 16px to 12px (horizontal stays 16),
96
+ a one-line card goes from 54px to 46px.
97
+ - **The success tile's glyph read as black**: the positive tone's mark ink was the inverse
98
+ navy. A new token, `--color-resolved-mark-ink` (#f0f7f2, a pale mint lighter than the green
99
+ it sits on, 3.2:1 on the mark, the same in both themes), carries the glyph; the mark colour
100
+ and the filled check-circle glyph are unchanged.
101
+
8
102
  ## 0.10.1
9
103
 
10
104
  > The field label is the input's size.
@@ -60,7 +60,14 @@ export declare function Avatar({ name, size, src, bare, look, letters, status, .
60
60
  * Gerekçe: docs/gerekce/05-yuzey-ve-kabuk.md
61
61
  */
62
62
  export declare function AvatarStack({ names, extra, size, surface, ...rest }: {
63
- names: string[];
63
+ /**
64
+ * The people: a name, or `{ name, src }` for one with a photo. TR: Kişiler: bir ad, ya da
65
+ * fotoğrafı olan için `{ name, src }`.
66
+ */
67
+ names: readonly (string | {
68
+ name: string;
69
+ src?: string;
70
+ })[];
64
71
  extra?: number;
65
72
  size?: number;
66
73
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/components/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAWtC,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,IAAS,EACT,GAAG,EACH,IAAY,EACZ,IAAc,EACd,OAAW,EACX,MAAM,EACN,GAAG,IAAI,EACR,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAChB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BA0EA;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,IAAS,EACT,OAA8B,EAC9B,GAAG,IAAI,EACR,EAAE;IACD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAuCA"}
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/components/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAWtC,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,IAAS,EACT,GAAG,EACH,IAAY,EACZ,IAAc,EACd,OAAW,EACX,MAAM,EACN,GAAG,IAAI,EACR,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAChB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAEA;AAwGD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,IAAS,EACT,OAA8B,EAC9B,GAAG,IAAI,EACR,EAAE;IACD;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAmCA"}
@@ -12,12 +12,20 @@ function initials(name, count) {
12
12
  }
13
13
  /** Square, monochrome. Identity is text — color is reserved for health. */
14
14
  export function Avatar({ name, size = 32, src, bare = false, look = "solid", letters = 2, status, ...rest }) {
15
- /* KÖŞE ÖLÇÜYLE BÜYÜYOR (4 · 5 · 7 · 8): 24 pikselde 8'lik bir köşe kareyi
16
- daire yapıyor, 56'da 4'lük bir köşe onu keskin bırakıyor. */
17
- const kose = size <= 28 ? "var(--radius-chip)" : size <= 36 ? "calc(var(--radius) - 1px)" : size <= 44 ? "var(--radius-btn)" : "var(--radius-card)";
15
+ return _jsx(Karo, { name: name, size: size, src: src, bare: bare, look: look, letters: letters, status: status, taban: true, ...rest });
16
+ }
17
+ /* KÖŞE ÖLÇÜYLE BÜYÜYOR (4 · 5 · 7 · 8): 24 pikselde 8'lik bir köşe kareyi
18
+ daire yapıyor, 56'da 4'lük bir köşe onu keskin bırakıyor. */
19
+ function koseOf(size) {
20
+ return size <= 28 ? "var(--radius-chip)" : size <= 36 ? "calc(var(--radius) - 1px)" : size <= 44 ? "var(--radius-btn)" : "var(--radius-card)";
21
+ }
22
+ /* Karonun kendisi. `taban` yığında kapalı: üst üste binen karolarda her
23
+ karonun kendi tabanı yığını katmanlı gösteriyordu. */
24
+ function Karo({ name, size = 32, src, bare = false, look = "solid", letters = 2, status, taban: tabanli, ...rest }) {
25
+ const kose = koseOf(size);
18
26
  /* TABAN YALNIZ BÜYÜKLERDE: 24 piksellik bir karo bir satırın içinde duruyor
19
27
  ve orada bir taban, satırı kalabalıklaştırıyor. */
20
- const taban = size >= 56 ? "4px 4px 0 var(--color-edge-strong)" : size >= 40 ? "3px 3px 0 var(--color-edge-strong)" : undefined;
28
+ const taban = !tabanli ? undefined : size >= 56 ? "4px 4px 0 var(--color-edge-strong)" : size >= 40 ? "3px 3px 0 var(--color-edge-strong)" : undefined;
21
29
  const box = {
22
30
  width: size,
23
31
  height: size,
@@ -32,7 +40,7 @@ export function Avatar({ name, size = 32, src, bare = false, look = "solid", let
32
40
  if (status) {
33
41
  const t = toneOf(status);
34
42
  const mark = Math.max(8, Math.round(size * 0.3));
35
- return (_jsxs("span", { ...dataProps(rest), className: "relative inline-flex shrink-0", children: [_jsx(Avatar, { name: name, size: size, src: src, bare: bare, look: look, letters: letters }), _jsx("span", { className: "absolute rounded-[var(--radius-mark)]", style: {
43
+ return (_jsxs("span", { ...dataProps(rest), className: "relative inline-flex shrink-0", children: [_jsx(Karo, { name: name, size: size, src: src, bare: bare, look: look, letters: letters, taban: tabanli }), _jsx("span", { className: "absolute rounded-[var(--radius-mark)]", style: {
36
44
  right: -mark / 3,
37
45
  bottom: -mark / 3,
38
46
  width: mark,
@@ -61,19 +69,15 @@ export function Avatar({ name, size = 32, src, bare = false, look = "solid", let
61
69
  * Gerekçe: docs/gerekce/05-yuzey-ve-kabuk.md
62
70
  */
63
71
  export function AvatarStack({ names, extra, size = 24, surface = "var(--color-shell)", ...rest }) {
64
- const overlap = Math.round(size / 4);
65
- const ring = { boxShadow: `0 0 0 2px ${surface}` };
72
+ /* ÖRTÜŞME SEKİZDE BİR: dörtte bir, yüzün yarısını kapatıyordu. Halka
73
+ karonun kendi köşesini alıyor; küçük köşeli bir halka karonun arkasında
74
+ ikinci bir katman gibi görünüyordu. */
75
+ const overlap = Math.round(size / 8);
76
+ const ring = { boxShadow: `0 0 0 2px ${surface}`, borderRadius: koseOf(size) };
66
77
  /* Karoların kendi baş harfleri `aria-hidden` — üst üste binmiş harfler ekran
67
78
  okuyucuda anlamsız bir dizi olurdu. Adlar bir kez, düz metin olarak
68
79
  veriliyor: "Berika Sultan, Deniz Kara ve 7 kişi daha". */
69
- const spoken = [...names, extra ? `+${extra}` : null].filter(Boolean).join(", ");
70
- return (_jsxs("div", { ...dataProps(rest), className: "flex items-center", role: "img", "aria-label": spoken, children: [names.map((n, i) => (_jsx("span", { className: "rounded-[var(--radius-mark)]", style: { marginLeft: i === 0 ? 0 : -overlap, ...ring }, children: _jsx(Avatar, { name: n, size: size, letters: 1 }) }, n + i))), extra ? (_jsxs("span", { className: "inline-flex items-center justify-center rounded-[var(--radius-mark)] border-[1.5px] border-edge-strong bg-shell font-mono text-caption font-bold text-ink", style: {
71
- width: size,
72
- height: size,
73
- marginLeft: -overlap,
74
- /* Taban komşularıyla AYNI renkte: avatar karoları `--color-edge-strong`
75
- ile yükseliyor, özet karosu soluk bir gölgeyle onların arasında
76
- başka bir malzemeden yapılmış gibi duruyordu. */
77
- boxShadow: `0 0 0 2px ${surface}, 3px 3px 0 var(--color-edge-strong)`,
78
- }, children: ["+", extra] })) : null] }));
80
+ const kisiler = names.map((n) => (typeof n === "string" ? { name: n } : n));
81
+ const spoken = [...kisiler.map((k) => k.name), extra ? `+${extra}` : null].filter(Boolean).join(", ");
82
+ return (_jsxs("div", { ...dataProps(rest), className: "flex items-center", role: "img", "aria-label": spoken, children: [kisiler.map((k, i) => (_jsx("span", { className: "inline-flex", style: { marginLeft: i === 0 ? 0 : -overlap, ...ring }, children: _jsx(Karo, { name: k.name, src: k.src, size: size, letters: 1, taban: false }) }, k.name + i))), extra ? (_jsxs("span", { className: "inline-flex items-center justify-center border-[1.5px] border-edge-strong bg-shell font-mono text-caption font-bold text-ink", style: { width: size, height: size, marginLeft: -overlap, ...ring }, children: ["+", extra] })) : null] }));
79
83
  }
@@ -1,5 +1,6 @@
1
- import type { ReactNode } from "react";
2
- export declare function Checkbox({ label, checked, indeterminate, onChange, disabled, className, compact, ...rest }: {
1
+ import { type ReactNode } from "react";
2
+ import { type NoteProps } from "./field-note.js";
3
+ export declare function Checkbox({ label, checked, indeterminate, onChange, description, error, errorPrefix, disabled, className, compact, ...rest }: NoteProps & {
3
4
  /**
4
5
  * The visible label. The kit does not translate; the caller passes ready text. TR: Görünen
5
6
  * etiket. Kit çeviri yapmaz; hazır metni çağıran geçer.
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAavC,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,OAAO,EACP,aAAqB,EACrB,QA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MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BA4CA"}
@@ -1,7 +1,9 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useId } from "react";
3
4
  import { cn } from "../lib/cn.js";
4
5
  import { dataProps } from "../lib/data-props.js";
6
+ import { FieldNote, noteId } from "./field-note.js";
5
7
  import { Icon } from "./icon.js";
6
8
  import { Check, Minus } from "./icons.js";
7
9
  /* ---------------------------------------------------------------- *
@@ -11,6 +13,11 @@ import { Check, Minus } from "./icons.js";
11
13
  * seçildi" demiyor, "bu değer açık" diyor. Mini butonun 1px kenarını ve 1px
12
14
  * offsetini taşır, böylece kontrol ailesinin bir üyesi gibi okunur.
13
15
  * ---------------------------------------------------------------- */
14
- export function Checkbox({ label, checked, indeterminate = false, onChange, disabled = false, className, compact = false, ...rest }) {
15
- return (_jsxs("button", { ...dataProps(rest), type: "button", role: "checkbox", "aria-checked": indeterminate ? "mixed" : checked, "aria-disabled": disabled || undefined, disabled: disabled, onClick: () => !disabled && onChange?.(!checked), className: cn("flex items-center gap-2 text-left text-body", disabled && "text-ink-faint", className), children: [_jsx("span", { className: cn("tamga-check", compact && "tamga-check-sm"), "data-checked": (checked || indeterminate) && !disabled, "data-off": disabled || undefined, children: indeterminate ? (_jsx(Icon, { icon: Minus, size: "xs", weight: "bold" })) : checked ? (_jsx(Icon, { icon: Check, size: "xs", weight: "bold" })) : null }), label] }));
16
+ export function Checkbox({ label, checked, indeterminate = false, onChange, description, error, errorPrefix, disabled = false, className, compact = false, ...rest }) {
17
+ const kok = useId();
18
+ const notId = noteId(kok, error, description);
19
+ /* NOT DÜĞMENİN İÇİNDE, ETİKETİN ALTINDA: iki sütunlu ızgara notu etiketin
20
+ sütununa oturtuyor, girinti kutunun boyunu kendiliğinden izliyor. Ad
21
+ `aria-labelledby` ile yalnız etiketten, not `aria-describedby` ile ayrı. */
22
+ return (_jsxs("button", { ...dataProps(rest), type: "button", role: "checkbox", "aria-checked": indeterminate ? "mixed" : checked, "aria-disabled": disabled || undefined, "aria-labelledby": notId ? `${kok}-label` : undefined, "aria-describedby": notId, "aria-invalid": error ? true : undefined, disabled: disabled, onClick: () => !disabled && onChange?.(!checked), className: cn(notId ? "grid grid-cols-[auto_1fr] items-center gap-x-2 gap-y-1.5" : "flex items-center gap-2", "text-left text-body", disabled && "text-ink-faint", className), children: [_jsx("span", { className: cn("tamga-check", compact && "tamga-check-sm"), "data-checked": (checked || indeterminate) && !disabled, "data-off": disabled || undefined, children: indeterminate ? (_jsx(Icon, { icon: Minus, size: "xs", weight: "bold" })) : checked ? (_jsx(Icon, { icon: Check, size: "xs", weight: "bold" })) : null }), notId ? _jsx("span", { id: `${kok}-label`, children: label }) : label, notId ? (_jsx(FieldNote, { as: "span", className: "tamga-check-not col-start-2", id: notId, error: error, description: description, errorPrefix: errorPrefix })) : null] }));
16
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../src/components/date-picker.tsx"],"names":[],"mappings":"AAWA;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,EAAE,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAIzD,2EAA2E;AAC3E,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAI/E,eAAO,MAAM,eAAe,QAAO,MAA0D,CAAC;AAmC9F;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,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,GAAG,OAAO,CAAC;CAChC,+BAgKA"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useCallback, useEffect, useMemo, useRef, useState } from "react";
3
+ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
4
4
  import { useDismiss } from "./a11y.js";
5
5
  import { cn } from "../lib/cn.js";
6
6
  import { dataProps } from "../lib/data-props.js";
@@ -8,6 +8,26 @@ import { uyar } from "../lib/uyar.js";
8
8
  import { Icon } from "./icon.js";
9
9
  import { Select } from "./primitives.js";
10
10
  import { CaretLeft, CaretRight, CalendarPlus, Close } from "./icons.js";
11
+ /* ── Dilim: duvar saati ↔ an. Hepsi Intl üzerinden; tarayıcının dilimi hiç okunmuyor. ── */
12
+ /* TAKVİM KUTUSU · tetiğin altında, solundan başlar; kırpan kabın (çekmece,
13
+ kaydırılan panel) ya da pencerenin sağından taşıyorsa tetiğin sağına hizalanır.
14
+ Çekmecede sağdan taşıp yarısı görünmüyordu. */
15
+ function TakvimKutusu({ children }) {
16
+ const kutu = useRef(null);
17
+ const [hiza, setHiza] = useState("start");
18
+ useLayoutEffect(() => {
19
+ const el = kutu.current;
20
+ if (!el)
21
+ return;
22
+ let kap = el.parentElement;
23
+ while (kap && kap !== document.body && getComputedStyle(kap).overflowX === "visible")
24
+ kap = kap.parentElement;
25
+ const sag = kap && kap !== document.body ? kap.getBoundingClientRect().right : window.innerWidth;
26
+ const b = el.getBoundingClientRect();
27
+ setHiza(b.right > sag - 8 && b.left - (b.right - sag) >= 0 ? "end" : "start");
28
+ }, []);
29
+ return (_jsx("div", { ref: kutu, "data-align": hiza, className: "tamga-overlay tamga-takvim-kutu absolute z-30 mt-2 p-3", onClick: (e) => e.stopPropagation(), children: children }));
30
+ }
11
31
  const p2 = (n) => String(n).padStart(2, "0");
12
32
  export const varsayilanDilim = () => Intl.DateTimeFormat().resolvedOptions().timeZone;
13
33
  const duvarBicim = new Map();
@@ -275,7 +295,7 @@ export function DatePicker({ id, "aria-label": ariaLabel, locale, timeZone, valu
275
295
  const shown = value
276
296
  ? new Intl.DateTimeFormat(locale, { dateStyle: "medium", timeZone: "UTC" }).format(new Date(`${value}T00:00:00Z`))
277
297
  : "";
278
- return (_jsxs("div", { ref: kutu, ...dataProps(rest), className: cn("relative", className), children: [_jsx(Alan, { id: id, ariaLabel: ariaLabel, shown: shown, placeholder: placeholder, disabled: disabled, invalid: invalid, open: open, hasValue: Boolean(value), labels: labels, onToggle: () => setOpen((v) => !v), onClear: () => onChange?.(undefined) }), open ? (_jsx("div", { className: "tamga-overlay absolute z-30 mt-2 p-3", onClick: (e) => e.stopPropagation(), children: _jsx(Calendar, { locale: locale, timeZone: timeZone, value: value, min: min, max: max, labels: labels, onSelect: (d) => { onChange?.(d); setOpen(false); } }) })) : null] }));
298
+ return (_jsxs("div", { ref: kutu, ...dataProps(rest), className: cn("relative", className), children: [_jsx(Alan, { id: id, ariaLabel: ariaLabel, shown: shown, placeholder: placeholder, disabled: disabled, invalid: invalid, open: open, hasValue: Boolean(value), labels: labels, onToggle: () => setOpen((v) => !v), onClear: () => onChange?.(undefined) }), open ? (_jsx(TakvimKutusu, { children: _jsx(Calendar, { locale: locale, timeZone: timeZone, value: value, min: min, max: max, labels: labels, onSelect: (d) => { onChange?.(d); setOpen(false); } }) })) : null] }));
279
299
  }
280
300
  /**
281
301
  * Tarih + saat. AYRI BİR BİLEŞEN, `DatePicker`a bir prop değil: dönen değerin
@@ -384,7 +404,7 @@ export function DateTimePicker({ id, "aria-label": ariaLabel, locale, timeZone,
384
404
  }, [locale, onIki, labels.am, labels.pm]);
385
405
  const saatEtiketi = (h) => (donem ? String(h % 12 === 0 ? 12 : h % 12) : p2(h));
386
406
  const shown = an ? new Intl.DateTimeFormat(locale, { dateStyle: "medium", timeStyle: "short", timeZone: tz }).format(an) : "";
387
- return (_jsxs("div", { ref: kutu, ...dataProps(rest), className: cn("relative", className), children: [_jsx(Alan, { id: id, ariaLabel: ariaLabel, shown: shown, placeholder: placeholder, disabled: disabled, invalid: invalid, open: open, hasValue: Boolean(value), labels: labels, onToggle: () => setOpen((v) => !v), onClear: () => onChange?.(undefined) }), open ? (_jsxs("div", { className: "tamga-overlay absolute z-30 mt-2 p-3", onClick: (e) => e.stopPropagation(), children: [_jsx(Calendar, { locale: locale, timeZone: tz, value: gun, min: minGun, max: maxGun, labels: labels,
407
+ return (_jsxs("div", { ref: kutu, ...dataProps(rest), className: cn("relative", className), children: [_jsx(Alan, { id: id, ariaLabel: ariaLabel, shown: shown, placeholder: placeholder, disabled: disabled, invalid: invalid, open: open, hasValue: Boolean(value), labels: labels, onToggle: () => setOpen((v) => !v), onClear: () => onChange?.(undefined) }), open ? (_jsxs(TakvimKutusu, { children: [_jsx(Calendar, { locale: locale, timeZone: tz, value: gun, min: minGun, max: maxGun, labels: labels,
388
408
  /* Gün seçilince takvim AÇIK KALIYOR: saat daha seçilecek. */
389
409
  onSelect: (d) => yay(d, saat, dakika) }), _jsxs("div", { className: "mt-3 flex items-center gap-2 border-t border-line pt-3", children: [_jsx(Select, { "aria-label": labels.hour, placeholder: labels.hour, disabled: !g, value: String(saat), onChange: (v) => yay(g, Number(v), dakika), options: (donem ? saatler.filter((h) => (saat < 12 ? h < 12 : h >= 12)) : saatler).map((h) => ({ value: String(h), label: saatEtiketi(h) })) }), _jsx(Select, { "aria-label": labels.minute, placeholder: labels.minute, disabled: !g, value: String(dakika), onChange: (v) => yay(g, saat, Number(v)), options: dakikalar.map((m) => ({ value: String(m), label: p2(m) })) }), donem ? (_jsx(Select, { "aria-label": labels.period, placeholder: labels.period, disabled: !g, value: saat < 12 ? "am" : "pm", onChange: (v) => yay(g, v === "am" ? saat % 12 : (saat % 12) + 12, dakika), options: [{ value: "am", label: donem.am }, { value: "pm", label: donem.pm }] })) : null] })] })) : null] }));
390
410
  }
@@ -35,5 +35,5 @@ export function Collapsible({ title, defaultOpen = false, open, onOpenChange, ic
35
35
  * Gerekiyorsa çağıran kendi durumunu tutar.
36
36
  */
37
37
  export function Accordion({ look = "cards", className, children, ...rest }) {
38
- return (_jsx("div", { ...dataProps(rest), className: cn(look === "cards" ? "tamga-accordion-cards" : "tamga-surface overflow-hidden", className), children: children }));
38
+ return (_jsx("div", { ...dataProps(rest), className: cn(look === "cards" ? "tamga-accordion-cards" : "tamga-surface tamga-accordion-list overflow-hidden", className), children: children }));
39
39
  }
@@ -0,0 +1,32 @@
1
+ export declare function FieldNote({ id, error, description, errorPrefix, className, as: Tag, ...rest }: {
2
+ id?: string;
3
+ error?: string;
4
+ description?: string;
5
+ errorPrefix?: string;
6
+ className?: string;
7
+ /** `span` when the line sits inside a button, where a paragraph is not allowed. TR: Satır bir düğmenin içindeyse `span`; orada paragraf olmaz. */
8
+ as?: "p" | "span";
9
+ /** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
10
+ [k: `data-${string}`]: unknown;
11
+ }): import("react").JSX.Element | null;
12
+ /** The id the note takes, or nothing when there is no note. TR: Notun alacağı kimlik; not yoksa yok. */
13
+ export declare function noteId(kok: string, error?: string, description?: string): string | undefined;
14
+ /** The JSDoc shared by the three carriers. TR: Üç taşıyıcının ortak prop açıklaması. */
15
+ export type NoteProps = {
16
+ /** The quiet line under the control. TR: Kontrolün altındaki sessiz satır. */
17
+ description?: string;
18
+ /**
19
+ * The error line: critical colour, a warning glyph, wired to the control with
20
+ * `aria-describedby` and `aria-invalid`. While it shows, `description` is hidden. TR: Hata
21
+ * satırı: kritik renk, uyarı glifi, kontrole `aria-describedby` ve `aria-invalid` ile bağlı.
22
+ * Göründüğü sürece `description` gizlenir.
23
+ */
24
+ error?: string;
25
+ /**
26
+ * An invisible word before the error, for screen readers: "Error:". The caller writes it in
27
+ * its own language; the kit does not translate. TR: Hatanın önünde, yalnız ekran okuyucunun
28
+ * duyduğu bir sözcük: "Hata:". Çağıran kendi dilinde yazıyor; kit çeviri yapmaz.
29
+ */
30
+ errorPrefix?: string;
31
+ };
32
+ //# sourceMappingURL=field-note.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-note.d.ts","sourceRoot":"","sources":["../../src/components/field-note.tsx"],"names":[],"mappings":"AASA,wBAAgB,SAAS,CAAC,EACxB,EAAE,EACF,KAAK,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,EAAE,EAAE,GAAS,EACb,GAAG,IAAI,EACR,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kJAAkJ;IAClJ,EAAE,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC;IAClB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,sCAkBA;AAED,wGAAwG;AACxG,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,sBAEvE;AAED,wFAAwF;AACxF,MAAM,MAAM,SAAS,GAAG;IACtB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { dataProps } from "../lib/data-props.js";
3
+ import { Icon } from "./icon.js";
4
+ import { Warning } from "./icons.js";
5
+ import { toneOf } from "./tone.js";
6
+ /* TEK HATA SATIRI · Field, RadioGroup ve Checkbox aynı çizimi kullanıyor.
7
+ Kopya yazılmıyor: ürünler Field'ın satırını elle kopyalıyordu ve üçü
8
+ birbirinden ayrışıyordu. Önek (errorPrefix) görünmez, ekran okuyucuya
9
+ "Hata: …" dedirtiyor; sözcüğü çağıran veriyor, kit çeviri yapmaz. */
10
+ export function FieldNote({ id, error, description, errorPrefix, className, as: Tag = "p", ...rest }) {
11
+ if (error) {
12
+ return (_jsxs(Tag, { ...dataProps(rest), id: id, className: ["tamga-field-hata", className].filter(Boolean).join(" "), style: { color: toneOf("danger").fg }, children: [_jsx(Icon, { icon: Warning, size: "xs", weight: "fill" }), errorPrefix ? _jsxs("span", { className: "sr-only", children: [errorPrefix, " "] }) : null, error] }));
13
+ }
14
+ if (description) {
15
+ return (_jsx(Tag, { ...dataProps(rest), id: id, className: ["block text-small text-ink-faint", className].filter(Boolean).join(" "), children: description }));
16
+ }
17
+ return null;
18
+ }
19
+ /** The id the note takes, or nothing when there is no note. TR: Notun alacağı kimlik; not yoksa yok. */
20
+ export function noteId(kok, error, description) {
21
+ return error ? `${kok}-error` : description ? `${kok}-description` : undefined;
22
+ }
@@ -1,5 +1,6 @@
1
1
  import type { Tone } from "./tone.js";
2
2
  import type { IconGlyph } from "./icons.js";
3
+ import { type NoteProps } from "./field-note.js";
3
4
  export { Spinner } from "./spinner.js";
4
5
  export declare function Separator({ vertical, look, label, ...rest }: {
5
6
  vertical?: boolean;
@@ -55,8 +56,17 @@ export declare function Beacon({ live, label, look, state, edged, severity, ...r
55
56
  /** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
56
57
  [k: `data-${string}`]: unknown;
57
58
  }): import("react").JSX.Element;
58
- export declare function Alert({ state, title, icon, children, action, onDismiss, dismissLabel, ...rest }: {
59
+ export declare function Alert({ state, look, title, icon, children, action, onDismiss, dismissLabel, ...rest }: {
59
60
  state?: Tone;
61
+ /**
62
+ * `inline` (default) the quiet box inside a page. `banner` the page-level status box at the
63
+ * top of an object's page ("the store is down", "running", "in maintenance"): the card's
64
+ * strong edge and hard shadow, a 44px tile, a display-face title, body copy at body size.
65
+ * TR: `inline` (varsayılan) sayfanın içindeki sessiz kutu. `banner` bir nesnenin sayfasının
66
+ * en üstündeki sayfa düzeyinde durum kutusu ("mağaza erişilemiyor", "çalışıyor", "bakımda"):
67
+ * kartın koyu kenarı ve sert gölgesi, 44px karo, gösterim yüzüyle başlık, gövde boyunda metin.
68
+ */
69
+ look?: "inline" | "banner";
60
70
  title: string;
61
71
  /**
62
72
  * Called when the reader dismisses it. Given, a close control appears at the end of the row.
@@ -92,10 +102,8 @@ export declare function Breadcrumb({ items, label, ...rest }: {
92
102
  /** `data-*` hooks pass through. TR: `data-*` kancaları geçiyor. */
93
103
  [k: `data-${string}`]: unknown;
94
104
  }): import("react").JSX.Element;
95
- export declare function Field({ label, description, error, required, note, info, count, children, htmlFor, ...rest }: {
105
+ export declare function Field({ label, description, error, errorPrefix, required, note, info, count, children, htmlFor, ...rest }: NoteProps & {
96
106
  label: string;
97
- description?: string;
98
- error?: string;
99
107
  /**
100
108
  * Draws the red asterisk beside the label. A glyph rather than a word, because the word is a
101
109
  * translation and the kit makes none. TR: Etiketin yanına kırmızı yıldızı çiziyor. Sözcük
@@ -133,7 +141,7 @@ export declare function Field({ label, description, error, required, note, info,
133
141
  [k: `data-${string}`]: unknown;
134
142
  }): import("react").JSX.Element;
135
143
  /** 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, disabled, "aria-label": ariaLabel, title, className, ...rest }: {
144
+ export declare function Select({ options, icon, set, value, onChange, placeholder, loading, loadingRows, disabled, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, title, className, ...rest }: {
137
145
  /**
138
146
  * Plain strings, or options that carry a tone. TR: Düz dizgiler, ya da ton
139
147
  * taşıyan seçenekler.
@@ -217,6 +225,14 @@ export declare function Select({ options, icon, set, value, onChange, placeholde
217
225
  * hiçbir şey duymuyordu.
218
226
  */
219
227
  "aria-label"?: string;
228
+ /**
229
+ * What `Field` wires for its error or description; both land on the trigger button. They
230
+ * used to be swallowed, so a field's error never reached the select. TR: `Field`in hata ya da
231
+ * açıklama için bağladıkları; ikisi de tetik düğmesine iniyor. Eskiden yutuluyordu, alanın
232
+ * hatası seçiciye hiç ulaşmıyordu.
233
+ */
234
+ "aria-describedby"?: string;
235
+ "aria-invalid"?: boolean;
220
236
  /** Locks the trigger; the list cannot open. TR: Tetiği kilitler; liste açılmaz. */
221
237
  disabled?: boolean;
222
238
  /** The trigger's tooltip: the full text when the shown value is clipped. TR: Tetiğin ipucu: görünen değer kesildiğinde tam metin. */
@@ -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,YAAY,CAAC;AAY5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC,wBAAgB,SAAS,CAAC,EACxB,QAAgB,EAChB,IAAc,EACd,KAAK,EACL,GAAG,IAAI,EACR,EAAE;IACD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACrC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAoBA;AAED,yFAAyF;AACzF,wBAAgB,MAAM,CAAC,EACrB,IAAW,EACX,KAAK,EACL,IAAc,EACd,KAAiB,EACjB,KAAa,EACb,QAAa,EACb,GAAG,IAAI,EACR,EAAE;IACD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC;IACb;;;;;;OAMG;IACH,KAA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AAC;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,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qIAAqI;IACrI,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;6DACyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAyHA;AAED,2EAA2E;AAC3E,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,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"}
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,Y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AAO,CAAC;IACnB,qIAAqI;IACrI,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;6DACyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAgIA;AAED,2EAA2E;AAC3E,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,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"}
@@ -12,6 +12,7 @@ import { dataProps } from "../lib/data-props.js";
12
12
  import { useFocusTrap, useListKeys } from "./a11y.js";
13
13
  import { useLiveClaim } from "./live-scope.js";
14
14
  import { Button, MiniButton } from "./button.js";
15
+ import { FieldNote, noteId } from "./field-note.js";
15
16
  export { Spinner } from "./spinner.js";
16
17
  /* ------------------------------------------------------------------ *
17
18
  * Small primitives. Each one is the design language applied, not a new
@@ -50,24 +51,24 @@ const TON_GLIFI = {
50
51
  elevated: Warning,
51
52
  danger: Failure,
52
53
  };
53
- export function Alert({ state = "caution", title, icon, children, action, onDismiss, dismissLabel, ...rest }) {
54
+ export function Alert({ state = "caution", look = "inline", title, icon, children, action, onDismiss, dismissLabel, ...rest }) {
54
55
  const h = toneOf(state);
55
- return (_jsxs("div", { ...dataProps(rest), className: "tamga-alert", style: state === "neutral" ? undefined : { background: h.bg }, role: "status", children: [_jsx("span", { "aria-hidden": true, className: "tamga-alert-tile", style: { background: h.mark, color: h.markInk }, children: _jsx(Icon, { icon: icon ?? TON_GLIFI[state], size: "sm", weight: "fill" }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "text-body font-medium text-ink", children: title }), children ? (_jsx("div", { className: "mt-1 text-small leading-relaxed text-ink-soft", children: children })) : null] }), action ? _jsx("div", { className: "shrink-0", children: action }) : null, onDismiss ? (_jsx("button", { type: "button", className: "tamga-icon-btn tamga-icon-btn-sm tamga-icon-btn-ghost shrink-0", "aria-label": dismissLabel, onClick: onDismiss, children: _jsx(Icon, { icon: Close, size: "xs" }) })) : null] }));
56
+ return (_jsxs("div", { ...dataProps(rest), className: "tamga-alert", "data-look": look === "banner" ? "banner" : undefined, "data-body": children ? "true" : undefined, style: state === "neutral" ? undefined : { background: h.bg }, role: "status", children: [_jsx("span", { "aria-hidden": true, className: "tamga-alert-tile", style: { background: h.mark, color: h.markInk }, children: _jsx(Icon, { icon: icon ?? TON_GLIFI[state], size: look === "banner" ? "md" : "sm", weight: "fill" }) }), _jsxs("div", { className: "tamga-alert-metin", children: [_jsx("p", { className: "tamga-alert-baslik text-ink", children: title }), children ? (_jsx("div", { className: "tamga-alert-govde mt-1 leading-relaxed text-ink-soft", children: children })) : null] }), action ? _jsx("div", { className: "tamga-alert-eylem", children: action }) : null, onDismiss ? (_jsx("button", { type: "button", className: "tamga-icon-btn tamga-icon-btn-sm tamga-icon-btn-ghost tamga-alert-kapat", "aria-label": dismissLabel, onClick: onDismiss, children: _jsx(Icon, { icon: Close, size: "xs" }) })) : null] }));
56
57
  }
57
58
  export function Breadcrumb({ items, label, ...rest }) {
58
59
  return (_jsx("nav", { ...dataProps(rest), "aria-label": label, children: _jsx("ol", { className: "tamga-crumb", children: items.map((item, i) => {
59
60
  const last = i === items.length - 1;
60
- return (_jsxs("li", { className: "flex items-center gap-2", children: [last ? (_jsx("span", { "aria-current": "page", className: "tamga-crumb-son", children: item.label })) : (_jsx("a", { href: item.href ?? "#", className: "tamga-crumb-link", children: item.label })), last ? null : (_jsx(Icon, { icon: CaretRight, size: "xs", weight: "bold", className: "text-ink-faint" }))] }, item.label));
61
+ return (_jsxs("li", { className: "flex items-center gap-2.5", children: [last ? (_jsx("span", { "aria-current": "page", className: "tamga-crumb-son", children: item.label })) : (_jsx("a", { href: item.href ?? "#", className: "tamga-crumb-link", children: item.label })), last ? null : _jsx("span", { "aria-hidden": true, className: "tamga-crumb-ayrac" })] }, item.label));
61
62
  }) }) }));
62
63
  }
63
- export function Field({ label, description, error, required = false, note, info, count, children, htmlFor, ...rest }) {
64
+ export function Field({ label, description, error, errorPrefix, required = false, note, info, count, children, htmlFor, ...rest }) {
64
65
  /* THE NOTE UNDER THE FIELD IS WIRED TO THE CONTROL: `description` and `error`
65
66
  get ids and an `aria-describedby`. Done here rather than left to the caller,
66
67
  because 94 call sites in one product alone had not done it. A single element
67
68
  child is cloned; an existing `aria-describedby` is kept and this one appended.
68
69
  Gerekçe: docs/09-testler-ve-degismezler.md */
69
70
  const kok = useId();
70
- const notId = error ? `${kok}-error` : description ? `${kok}-description` : undefined;
71
+ const notId = noteId(kok, error, description);
71
72
  const kontrol = notId && isValidElement(children)
72
73
  ? cloneElement(children, {
73
74
  "aria-describedby": [children.props["aria-describedby"], notId]
@@ -76,10 +77,10 @@ export function Field({ label, description, error, required = false, note, info,
76
77
  "aria-invalid": error ? true : children.props["aria-invalid"],
77
78
  })
78
79
  : children;
79
- return (_jsxs("div", { ...dataProps(rest), className: "flex flex-col gap-1.5", children: [_jsxs("span", { className: "mb-0.5 flex items-baseline gap-2", children: [_jsxs("label", { htmlFor: htmlFor, className: "text-body 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
+ return (_jsxs("div", { ...dataProps(rest), className: "flex flex-col gap-1.5", children: [_jsxs("span", { className: "mb-0.5 flex items-baseline gap-2", children: [_jsxs("label", { htmlFor: htmlFor, className: "text-body 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, _jsx(FieldNote, { id: notId, error: error, description: description, errorPrefix: errorPrefix })] }));
80
81
  }
81
82
  /** 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, disabled = false, "aria-label": ariaLabel, title, className, ...rest }) {
83
+ export function Select({ options, icon, set, value, onChange, placeholder, loading = false, loadingRows = 4, disabled = false, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, title, className, ...rest }) {
83
84
  const [open, setOpen] = useState(false);
84
85
  const [inner, setInner] = useState(value ?? "");
85
86
  const box = useRef(null);
@@ -95,6 +96,12 @@ export function Select({ options, icon, set, value, onChange, placeholder, loadi
95
96
  useEffect(() => {
96
97
  if (!open)
97
98
  return;
99
+ /* Seçili satır listenin ortasına; YALNIZ liste kaydırılıyor. `scrollIntoView`
100
+ sayfayı da kaydırıyordu ve takvim ekranın üstüne fırlıyordu. */
101
+ const l = list.current;
102
+ const secili = l?.querySelector('[data-selected="true"]');
103
+ if (l && secili)
104
+ l.scrollTop = secili.offsetTop - (l.clientHeight - secili.offsetHeight) / 2;
98
105
  const away = (e) => {
99
106
  if (box.current && !box.current.contains(e.target))
100
107
  setOpen(false);
@@ -102,7 +109,7 @@ export function Select({ options, icon, set, value, onChange, placeholder, loadi
102
109
  document.addEventListener("mousedown", away);
103
110
  return () => document.removeEventListener("mousedown", away);
104
111
  }, [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, title: title, 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) => {
112
+ 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, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid || undefined, title: title, 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 tamga-select-liste absolute left-0 top-[var(--overlay-below)] z-40 flex w-full flex-col gap-0.5", "aria-busy": loading || undefined, children: [loading && _jsx(SkeletonOptions, { rows: loadingRows }), !loading && options.map((ham) => {
106
113
  const nesne = typeof ham === "string" ? { value: ham } : ham;
107
114
  const { value: o, label: etiket, tone: ton, hint: ipucu, ...kanca } = nesne;
108
115
  return (_createElement("button", { ...kanca, key: o, role: "option", "aria-selected": o === current, "data-tamga-option": true, className: "tamga-option", "data-selected": o === current, onClick: () => {
@@ -1,5 +1,6 @@
1
- import type { ReactNode } from "react";
2
- export declare function RadioGroup<T extends string>({ options, value, onChange, label, look, disabled, className, ...rest }: {
1
+ import { type ReactNode } from "react";
2
+ import { type NoteProps } from "./field-note.js";
3
+ export declare function RadioGroup<T extends string>({ options, value, onChange, label, showLabel, description, error, errorPrefix, look, disabled, className, ...rest }: NoteProps & {
3
4
  /**
4
5
  * The choices. Anything beyond `value` and `label` lands on that option's button, so a choice can
5
6
  * carry the hook a test or a style needs. TR: Seçenekler. `value` ve `label` dışındaki her şey o
@@ -17,6 +18,15 @@ export declare function RadioGroup<T extends string>({ options, value, onChange,
17
18
  * adı: "hangi seçeneklerden biri" sorusunun cevabı.
18
19
  */
19
20
  label: string;
21
+ /**
22
+ * Draws `label` above the options as a visible heading, in `Field`'s label size and weight,
23
+ * 8px above the first option, wired with `aria-labelledby`. Off by default: the group used to
24
+ * carry its name only for screen readers, and that stays the default. TR: `label`ı
25
+ * seçeneklerin üstüne görünür bir başlık olarak çiziyor; `Field` etiketiyle aynı boy ve
26
+ * kalınlık, ilk seçenekten 8px yukarıda, `aria-labelledby` ile bağlı. Varsayılan kapalı: grup
27
+ * adını yalnız ekran okuyucuya taşıyordu, varsayılan bu kalıyor.
28
+ */
29
+ showLabel?: boolean;
20
30
  /**
21
31
  * The shell each option is drawn in. TR: Her seçeneğin çizildiği kabuk.
22
32
  *
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvC,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,EAC3C,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAa,EACb,QAAgB,EAChB,SAAS,EACT,GAAG,IAAI,EACR,EAAE;IACD;;;;;OAKG;IACH,OAAO,EAAE,SAAS,CAAC;QAAE,KAAK,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC/E,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAkDA"}
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQpE,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,EAC3C,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAiB,EACjB,WAAW,EACX,KAAK,EACL,WAAW,EACX,IAAa,EACb,QAAgB,EAChB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,SAAS,GAAG;IACb;;;;;OAKG;IACH,OAAO,EAAE,SAAS,CAAC;QAAE,KAAK,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC/E,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAsEA"}
@@ -1,23 +1,34 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useId } from "react";
3
4
  import { cn } from "../lib/cn.js";
4
5
  import { dataProps } from "../lib/data-props.js";
6
+ import { FieldNote, noteId } from "./field-note.js";
5
7
  /* ---------------------------------------------------------------- *
6
8
  * RadioGroup — akranlar arasından TEK seçim.
7
9
  *
8
10
  * Grubun kendisi `role="radiogroup"`, satırlar `role="radio"`. İkisi birden
9
11
  * olmadan ekran okuyucu "üç ayrı düğme" duyurur, "üç seçenekten biri" değil.
10
12
  * ---------------------------------------------------------------- */
11
- export function RadioGroup({ options, value, onChange, label, look = "list", disabled = false, className, ...rest }) {
12
- return (_jsx("div", { ...dataProps(rest), role: "radiogroup", "aria-label": label, "data-look": look,
13
- /* KARTLAR SÜTUN, ızgara DEĞİL · bir süre `sm:grid-cols-3` basılıydı ve
14
- kabın kararını bileşen veriyordu: üç fiyatlı kargo seçeneği yan yana
15
- dizildiğinde ikinci satırları hizasız kalıyor, alt alta okunuyorlar.
16
- Izgara isteyen çağıran `className` ile söylüyor. */
17
- className: cn(look === "chip" ? "flex flex-wrap gap-2" : "flex flex-col gap-2.5", className), children: options.map(({ value: v, label: etiket, ...rest }) => (_jsxs("button", { type: "button", ...rest, role: "radio", "aria-checked": value === v, "aria-disabled": disabled || undefined, onClick: () => !disabled && onChange?.(v),
18
- /* ÜSTTEN HİZALI VE TAM GENİŞLİK, ikisi de iki satırlık bir seçenek yüzünden:
19
- `items-center` işareti iki satırın ortasına kaçırıyor (işaret ilk satıra ait),
20
- içerik kadar genişlik de seçenekleri tırtıklı bir sütun yapıyor.
21
- Gerekçe: docs/gerekce/01-form-ve-girdi.md */
22
- className: cn("text-body", look === "list" && "flex w-full items-start gap-2 text-left", look === "chip" && "tamga-choice-chip", look === "card" && "tamga-choice-card", disabled && "text-ink-faint"), children: [_jsx("span", { className: cn("tamga-radio", look !== "chip" && "tamga-choice-mark"), "data-checked": value === v && !disabled, "data-off": disabled || undefined }), _jsx("span", { className: "min-w-0 flex-1", children: etiket })] }, v))) }));
13
+ export function RadioGroup({ options, value, onChange, label, showLabel = false, description, error, errorPrefix, look = "list", disabled = false, className, ...rest }) {
14
+ const kok = useId();
15
+ const notId = noteId(kok, error, description);
16
+ const baslikId = showLabel ? `${kok}-label` : undefined;
17
+ /* KARTLAR SÜTUN, ızgara DEĞİL · bir süre `sm:grid-cols-3` basılıydı ve
18
+ kabın kararını bileşen veriyordu: üç fiyatlı kargo seçeneği yan yana
19
+ dizildiğinde ikinci satırları hizasız kalıyor, alt alta okunuyorlar.
20
+ Izgara isteyen çağıran `className` ile söylüyor. */
21
+ const kabuk = cn(look === "chip" ? "flex flex-wrap gap-2" : "flex flex-col gap-2.5", className);
22
+ const secenekler = options.map(({ value: v, label: etiket, ...rest }) => (_jsxs("button", { type: "button", ...rest, role: "radio", "aria-checked": value === v, "aria-disabled": disabled || undefined, onClick: () => !disabled && onChange?.(v),
23
+ /* ÜSTTEN HİZALI VE TAM GENİŞLİK, ikisi de iki satırlık bir seçenek yüzünden:
24
+ `items-center` işareti iki satırın ortasına kaçırıyor (işaret ilk satıra ait),
25
+ içerik kadar genişlik de seçenekleri tırtıklı bir sütun yapıyor.
26
+ Gerekçe: docs/gerekce/01-form-ve-girdi.md */
27
+ className: cn("text-body", look === "list" && "flex w-full items-start gap-2 text-left", look === "chip" && "tamga-choice-chip", look === "card" && "tamga-choice-card", disabled && "text-ink-faint"), children: [_jsx("span", { className: cn("tamga-radio", look !== "chip" && "tamga-choice-mark"), "data-checked": value === v && !disabled, "data-off": disabled || undefined }), _jsx("span", { className: "min-w-0 flex-1", children: etiket })] }, v)));
28
+ /* BAŞLIK VE NOT GRUBUN İÇİNDE, fieldset/legend gibi: kök her zaman
29
+ `role="radiogroup"`, kanca ve `data-look` hep aynı elemanda. Yalnız başlık
30
+ ya da not varken seçenekler bir iç kaba iniyor ve ritim Field'ınki olur:
31
+ etiket 8px üstte (gap 6 + mb 2), not 6px altta. */
32
+ const sarili = showLabel || Boolean(notId);
33
+ return (_jsxs("div", { ...dataProps(rest), role: "radiogroup", "aria-label": showLabel ? undefined : label, "aria-labelledby": baslikId, "aria-describedby": notId, "aria-invalid": error ? true : undefined, "data-look": look, className: sarili ? "flex flex-col gap-1.5" : kabuk, children: [showLabel ? (_jsx("span", { className: "mb-0.5 flex items-baseline gap-2", children: _jsx("span", { id: baslikId, className: "text-body font-bold text-ink", children: label }) })) : null, sarili ? _jsx("div", { className: kabuk, children: secenekler }) : secenekler, _jsx(FieldNote, { id: notId, error: error, description: description, errorPrefix: errorPrefix })] }));
23
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tone.d.ts","sourceRoot":"","sources":["../../src/components/tone.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,0BAA0B;AAC1B,MAAM,MAAM,SAAS,GAAG;IACtB,gDAAgD;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;IACX;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;GAMG;AACH;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEvF,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,SAAS,CA2CzC,CAAC;AAEF,wBAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,CAE5C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAajD,CAAC;AAEF,wBAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAE1E;AAED,0EAA0E;AAC1E,eAAO,MAAM,OAAO;IAClB,IAAI;IACJ,OAAO;IACP,KAAK;IACL,SAAS;IACT,IAAI;IACJ,IAAI;IACJ,UAAU;IACV,KAAK;IACL,IAAI;IACJ,KAAK;CACN,CAAC;AAEF,kCAAkC;AAClC,eAAO,MAAM,MAAM;IACjB,EAAE;IACF,EAAE;IACF,GAAG;CACJ,CAAC;AAEF;;;;;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AED,0EAA0E;AAC1E,eAAO,MAAM,OAAO;IAClB,IAAI;IACJ,OAAO;IACP,KAAK;IACL,SAAS;IACT,IAAI;IACJ,IAAI;IACJ,UAAU;IACV,KAAK;IACL,IAAI;IACJ,KAAK;CACN,CAAC;AAEF,kCAAkC;AAClC,eAAO,MAAM,MAAM;IACjB,EAAE;IACF,EAAE;IACF,GAAG;CACJ,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,YACvB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,CACd,CAAC;AAEX,sDAAsD;AACtD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,YACxB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,CACf,CAAC;AAEX,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3C"}
@@ -7,7 +7,8 @@ export const tones = {
7
7
  positive: {
8
8
  fg: "var(--color-resolved)",
9
9
  mark: "var(--color-resolved-mark)",
10
- markInk: "var(--color-inverse)",
10
+ /* Yeşilden açık, soluk nane: yeşil karo üstünde lacivert siyah okunuyordu. */
11
+ markInk: "var(--color-resolved-mark-ink)",
11
12
  bg: "var(--color-resolved-bg)",
12
13
  inverse: "var(--color-resolved-inverse)",
13
14
  },
package/dist/fonts.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! tamga-ui 0.10.1 · MIT · https://tamga.org.tr */
1
+ /*! tamga-ui 0.12.0 · MIT · https://tamga.org.tr */
2
2
  @font-face {
3
3
  font-family: "Red Hat Display";
4
4
  font-style: normal;
package/dist/kit.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! tamga-ui 0.10.1 · MIT · https://tamga.org.tr */
1
+ /*! tamga-ui 0.12.0 · MIT · https://tamga.org.tr */
2
2
  :root {
3
3
 
4
4
  --overlay-gap: 8px;
@@ -87,6 +87,7 @@
87
87
  --color-resolved-bg: #1b3325;
88
88
 
89
89
  --color-resolved-mark: #3e9a5c;
90
+ --color-resolved-mark-ink: #f0f7f2;
90
91
 
91
92
  --color-info: #9db6f0;
92
93
 
@@ -1874,6 +1875,16 @@
1874
1875
  border-top: 1px solid var(--color-line);
1875
1876
  }
1876
1877
 
1878
+ .tamga-accordion-list > .tamga-collapsible {
1879
+ border: 0;
1880
+ border-radius: 0;
1881
+ background: transparent;
1882
+ box-shadow: none;
1883
+ }
1884
+ .tamga-accordion-list > .tamga-collapsible + .tamga-collapsible {
1885
+ border-top: 1px solid var(--color-line);
1886
+ }
1887
+
1877
1888
  .tamga-collapsible-head:hover {
1878
1889
  background: var(--color-hover);
1879
1890
  }
@@ -1897,11 +1908,6 @@
1897
1908
  border-top: 1.5px solid var(--color-edge);
1898
1909
  }
1899
1910
 
1900
- .tamga-accordion-cards > .tamga-collapsible[data-open] {
1901
- border-color: var(--color-edge-strong);
1902
- box-shadow: 3px 3px 0 var(--color-edge-strong);
1903
- }
1904
-
1905
1911
  .tamga-accordion-cards > .tamga-collapsible[data-open] .tamga-collapsible-head {
1906
1912
  background: var(--color-hover);
1907
1913
  }
@@ -1911,7 +1917,7 @@
1911
1917
  }
1912
1918
 
1913
1919
  .tamga-accordion-cards .tamga-collapsible-body {
1914
- padding: 0 14px 14px;
1920
+ padding: 14px;
1915
1921
  }
1916
1922
 
1917
1923
  .tamga-accordion-cards .tamga-collapsible-body[data-indent] {
@@ -1927,11 +1933,6 @@
1927
1933
  border-color var(--duration-press) var(--ease-standard);
1928
1934
  }
1929
1935
 
1930
- .tamga-collapsible[data-open] {
1931
- border-color: var(--color-edge-strong);
1932
- box-shadow: 3px 3px 0 var(--color-edge-strong);
1933
- }
1934
-
1935
1936
  .tamga-collapsible-head {
1936
1937
  display: flex;
1937
1938
  width: 100%;
@@ -1950,14 +1951,14 @@
1950
1951
  }
1951
1952
 
1952
1953
  .tamga-collapsible-body {
1953
- padding: 0 14px 14px;
1954
+ padding: 14px;
1954
1955
  font-size: var(--text-body);
1955
1956
  line-height: 1.55;
1956
1957
  color: var(--color-ink-soft);
1957
1958
  }
1958
1959
 
1959
1960
  .tamga-collapsible-note {
1960
- padding: 0 14px 12px;
1961
+ padding: 12px 14px 0;
1961
1962
  font-size: var(--text-small);
1962
1963
  line-height: 1.5;
1963
1964
  color: var(--color-ink-faint);
@@ -1991,6 +1992,10 @@
1991
1992
  color: var(--color-accent-soft-ink);
1992
1993
  }
1993
1994
 
1995
+ img.tamga-avatar {
1996
+ background: var(--color-shell);
1997
+ }
1998
+
1994
1999
  .tamga-empty-plain {
1995
2000
  display: flex;
1996
2001
  flex-direction: column;
@@ -2362,6 +2367,24 @@
2362
2367
  box-shadow: 3px 3px 0 var(--color-critical);
2363
2368
  }
2364
2369
 
2370
+ .tamga-select[aria-invalid="true"], .tamga-select[aria-invalid="true"]:hover:not(:disabled) {
2371
+ border-color: var(--color-critical);
2372
+ background: var(--color-critical-bg);
2373
+ box-shadow: 3px 3px 0 var(--color-critical);
2374
+ }
2375
+
2376
+ .tamga-field-hata {
2377
+ align-items: center;
2378
+ display: flex;
2379
+ font-size: var(--text-small);
2380
+ font-weight: var(--weight-label);
2381
+ gap: 6px;
2382
+ }
2383
+
2384
+ .tamga-check-not {
2385
+ font-weight: var(--weight-body);
2386
+ }
2387
+
2365
2388
  .tamga-input:focus {
2366
2389
  border-color: var(--color-edge-strong);
2367
2390
  box-shadow: 3px 3px 0 var(--color-accent-soft);
@@ -2819,7 +2842,8 @@
2819
2842
  width: 100%;
2820
2843
  min-width: 0;
2821
2844
  text-align: left;
2822
- padding: 16px;
2845
+
2846
+ padding: 12px 16px;
2823
2847
  border-radius: var(--radius-card);
2824
2848
  border: 1px solid var(--color-edge);
2825
2849
  background: var(--color-shell);
@@ -3013,7 +3037,6 @@
3013
3037
 
3014
3038
  .tamga-gun {
3015
3039
  align-items: center;
3016
- border: 1.5px solid transparent;
3017
3040
  border-radius: var(--radius-ctl);
3018
3041
  color: var(--color-ink);
3019
3042
  cursor: pointer;
@@ -3024,16 +3047,39 @@
3024
3047
  justify-content: center;
3025
3048
  width: 36px;
3026
3049
  }
3027
- .tamga-gun:hover:not(:disabled) {
3050
+
3051
+ .tamga-gun:hover:not(:disabled):not([data-selected="true"]) {
3028
3052
  background: var(--color-hover);
3029
3053
  }
3030
3054
 
3055
+ .tamga-takvim-kutu[data-align="end"] {
3056
+ left: auto;
3057
+ right: 0;
3058
+ }
3059
+
3031
3060
  .tamga-gun:disabled {
3032
3061
  color: var(--color-ink-faint);
3033
3062
  cursor: not-allowed;
3034
3063
  }
3035
- .tamga-gun[data-today] {
3036
- border-color: var(--color-edge-strong);
3064
+
3065
+ .tamga-gun[data-today]:not(:disabled) {
3066
+ color: var(--color-accent-line);
3067
+ font-weight: var(--weight-strong);
3068
+ position: relative;
3069
+ }
3070
+ .tamga-gun[data-today]:not(:disabled)::after {
3071
+ background: var(--color-accent);
3072
+ border-radius: 1px;
3073
+ bottom: 5px;
3074
+ content: "";
3075
+ height: 2px;
3076
+ left: 50%;
3077
+ margin-left: -8px;
3078
+ position: absolute;
3079
+ width: 16px;
3080
+ }
3081
+ .tamga-gun[data-today][data-selected="true"]::after {
3082
+ background: var(--color-accent-ink);
3037
3083
  }
3038
3084
  .tamga-gun[data-active="true"] {
3039
3085
  background: var(--color-accent-bg);
@@ -3048,29 +3094,34 @@
3048
3094
  align-items: center;
3049
3095
  display: flex;
3050
3096
  flex-wrap: wrap;
3051
- font-size: var(--text-body);
3052
- font-weight: var(--weight-label);
3053
- gap: 8px;
3097
+ gap: 10px;
3054
3098
  list-style: none;
3055
3099
  margin: 0;
3056
3100
  padding: 0;
3057
3101
  }
3058
3102
  .tamga-crumb-link {
3059
- border-radius: var(--radius-chip);
3060
3103
  color: var(--color-ink-faint);
3061
- padding: 2px 4px;
3104
+ font-size: var(--text-caption);
3105
+ font-weight: var(--weight-strong);
3106
+ letter-spacing: 0.06em;
3062
3107
  text-decoration: none;
3108
+ text-transform: uppercase;
3063
3109
  }
3064
3110
  .tamga-crumb-link:hover {
3065
3111
  color: var(--color-ink);
3066
- text-decoration: underline;
3112
+ }
3113
+ .tamga-crumb-ayrac {
3114
+ background: var(--color-edge-strong);
3115
+ border-radius: 1px;
3116
+ flex: none;
3117
+ height: 5px;
3118
+ opacity: 0.5;
3119
+ width: 5px;
3067
3120
  }
3068
3121
  .tamga-crumb-son {
3069
- background: var(--color-hover);
3070
- border: 1px solid var(--color-edge);
3071
- border-radius: var(--radius-chip);
3072
3122
  color: var(--color-ink);
3073
- padding: 2px 8px;
3123
+ font-size: var(--text-body);
3124
+ font-weight: var(--weight-strong);
3074
3125
  }
3075
3126
 
3076
3127
  .tamga-pie-kare {
@@ -3479,6 +3530,11 @@
3479
3530
  padding: 5px;
3480
3531
  }
3481
3532
 
3533
+ .tamga-select-liste {
3534
+ max-height: 256px;
3535
+ overflow-y: auto;
3536
+ }
3537
+
3482
3538
  .tamga-select-panel {
3483
3539
  position: relative;
3484
3540
  display: inline-flex;
@@ -3619,6 +3675,73 @@
3619
3675
  border: 1px solid var(--color-edge-strong);
3620
3676
  border-radius: calc(var(--radius) - 1px);
3621
3677
  }
3678
+ .tamga-alert-eylem,
3679
+ .tamga-alert-kapat {
3680
+ flex: none;
3681
+ }
3682
+
3683
+ .tamga-alert-baslik {
3684
+ font-size: var(--text-body);
3685
+ font-weight: var(--weight-body);
3686
+ margin-top: calc((28px - 1lh) / 2);
3687
+ overflow-wrap: anywhere;
3688
+ }
3689
+ .tamga-alert-govde {
3690
+ font-size: var(--text-small);
3691
+ }
3692
+ .tamga-alert-metin {
3693
+ flex: 1;
3694
+ min-width: 0;
3695
+ }
3696
+
3697
+ .tamga-alert[data-body] > .tamga-alert-tile {
3698
+ margin-top: 2px;
3699
+ }
3700
+ .tamga-alert-eylem {
3701
+ margin-top: -2px;
3702
+ }
3703
+ .tamga-alert-kapat {
3704
+ margin-top: -1px;
3705
+ }
3706
+
3707
+ .tamga-alert[data-look="banner"] {
3708
+ border: 1.5px solid var(--color-edge-strong);
3709
+ border-radius: var(--radius-card);
3710
+ box-shadow: 4px 4px 0 var(--color-edge-strong);
3711
+ flex-wrap: wrap;
3712
+ gap: 16px;
3713
+ padding: 18px 20px;
3714
+ }
3715
+
3716
+ .tamga-alert[data-look="banner"] > .tamga-alert-metin {
3717
+ flex: 1 1 9rem;
3718
+ min-width: 9rem;
3719
+ }
3720
+ .tamga-alert[data-look="banner"] > .tamga-alert-metin + .tamga-alert-eylem,
3721
+ .tamga-alert[data-look="banner"] > .tamga-alert-metin + .tamga-alert-kapat {
3722
+ margin-left: auto;
3723
+ }
3724
+ .tamga-alert[data-look="banner"] > .tamga-alert-tile {
3725
+ border-radius: var(--radius-btn);
3726
+ height: 44px;
3727
+ width: 44px;
3728
+ }
3729
+ .tamga-alert[data-look="banner"] .tamga-alert-baslik {
3730
+ font-family: var(--font-display);
3731
+ font-size: var(--text-display-sm);
3732
+ font-weight: var(--weight-display);
3733
+ line-height: 1.2;
3734
+ margin-top: calc((44px - 1lh) / 2);
3735
+ }
3736
+ .tamga-alert[data-look="banner"] .tamga-alert-govde {
3737
+ font-size: var(--text-body);
3738
+ }
3739
+ .tamga-alert[data-look="banner"] > .tamga-alert-eylem {
3740
+ margin-top: 6px;
3741
+ }
3742
+ .tamga-alert[data-look="banner"] > .tamga-alert-kapat {
3743
+ margin-top: 7px;
3744
+ }
3622
3745
 
3623
3746
  .tamga-count-dot {
3624
3747
  display: block;
@@ -1 +1 @@
1
- {"version":3,"file":"detail-template.d.ts","sourceRoot":"","sources":["../../src/patterns/detail-template.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GA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breadcrumb } from "../components/primitives.js";
4
4
  import { SkeletonPanel } from "../components/skeleton.js";
5
5
  import { Busy, ErrorSlot, PlainLink, } from "./shared.js";
6
6
  export function DetailTemplate({ breadcrumb, title, subtitle, actions, tabs, activeTab, state = "ready", error, linkComponent: Link = PlainLink, labels, children, }) {
7
- return (_jsxs("div", { className: "flex min-h-0 flex-col", "data-detail-state": state, children: [_jsxs("div", { className: "tamga-gutter flex flex-wrap items-start gap-4 pt-4", children: [_jsxs("div", { className: "min-w-0", children: [_jsx(Breadcrumb, { label: labels.breadcrumb, items: breadcrumb }), _jsx("h2", { className: "mt-2 text-title font-semibold text-ink", children: title }), subtitle ? _jsx("p", { className: "text-small text-ink-faint", children: subtitle }) : null] }), actions ? _jsx("div", { className: "ml-auto flex flex-wrap items-center gap-2", children: actions }) : null] }), tabs && tabs.length > 0 ? (_jsx("nav", { "aria-label": labels.tabs, className: "tamga-gutter mt-4 flex gap-6 border-b border-line", children: tabs.map((tab) => {
7
+ return (_jsxs("div", { className: "flex min-h-0 flex-col", "data-detail-state": state, children: [_jsxs("div", { className: "tamga-gutter flex flex-wrap items-start gap-4 pt-4", children: [_jsxs("div", { className: "min-w-0 flex-1 basis-65", children: [_jsx("div", { className: "mb-1.5", children: _jsx(Breadcrumb, { label: labels.breadcrumb, items: breadcrumb }) }), _jsx("h1", { className: "font-display text-display-sm leading-tight font-extrabold break-words 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] }), tabs && tabs.length > 0 ? (_jsx("nav", { "aria-label": labels.tabs, className: "tamga-gutter mt-4 flex gap-6 border-b border-line", children: tabs.map((tab) => {
8
8
  const current = tab.key === activeTab;
9
9
  return (_jsx(Link, { href: tab.href, className: "tamga-tab", "data-active": current, "data-tab": tab.key, "aria-current": current ? "page" : undefined, children: tab.label }, tab.key));
10
10
  }) })) : null, _jsxs("div", { className: "tamga-gutter min-h-0 flex-1 py-6", children: [state === "loading" ? (_jsx(Busy, { label: labels.loading, children: _jsx(SkeletonPanel, {}) })) : null, state === "error" ? _jsx(ErrorSlot, { error: error, labels: labels }) : null, state === "ready" ? children : null] })] }));
package/dist/styles.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! tamga-ui 0.10.1 · MIT · https://tamga.org.tr */
1
+ /*! tamga-ui 0.12.0 · MIT · https://tamga.org.tr */
2
2
  @import "./fonts.css";
3
3
  @import "./theme.css";
4
4
  @import "./kit.css";
package/dist/theme.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! tamga-ui 0.10.1 · MIT · https://tamga.org.tr */
1
+ /*! tamga-ui 0.12.0 · MIT · https://tamga.org.tr */
2
2
  @custom-variant dark (&:is(.dark *));
3
3
 
4
4
  @theme static {
@@ -202,6 +202,8 @@
202
202
 
203
203
  --color-resolved-mark: #3e9a5c;
204
204
 
205
+ --color-resolved-mark-ink: #f0f7f2;
206
+
205
207
  --color-info: #2447a8;
206
208
 
207
209
  --color-info-bg: #e0e8f8;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamga-ui",
3
- "version": "0.10.1",
3
+ "version": "0.12.0",
4
4
  "description": "Mantıksal's shared interface library: tokens, physics and components.",
5
5
  "license": "MIT",
6
6
  "type": "module",