tamga-ui 0.1.1 → 0.2.1
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 +128 -0
- package/README.md +83 -91
- package/dist/blocks/count-row.d.ts +3 -3
- package/dist/blocks/count-row.d.ts.map +1 -1
- package/dist/blocks/filter-bar.d.ts +13 -13
- package/dist/blocks/filter-bar.d.ts.map +1 -1
- package/dist/blocks/save-bar.d.ts +3 -3
- package/dist/blocks/save-bar.d.ts.map +1 -1
- package/dist/components/appearance.d.ts +78 -0
- package/dist/components/appearance.d.ts.map +1 -0
- package/dist/components/appearance.js +73 -0
- package/dist/components/chrome.d.ts +54 -3
- package/dist/components/chrome.d.ts.map +1 -1
- package/dist/components/chrome.js +43 -2
- package/dist/components/primitives.d.ts +32 -2
- package/dist/components/primitives.d.ts.map +1 -1
- package/dist/components/primitives.js +11 -4
- package/dist/components/rail-link.d.ts +15 -2
- package/dist/components/rail-link.d.ts.map +1 -1
- package/dist/components/rail-link.js +11 -9
- package/dist/components/square-picker.d.ts +41 -0
- package/dist/components/square-picker.d.ts.map +1 -0
- package/dist/components/square-picker.js +90 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/kit.css +257 -4
- package/dist/lib/color.d.ts +31 -11
- package/dist/lib/color.d.ts.map +1 -1
- package/dist/lib/color.js +40 -18
- package/dist/lib/image.d.ts +46 -0
- package/dist/lib/image.d.ts.map +1 -0
- package/dist/lib/image.js +95 -0
- package/dist/lib/palette.d.ts +38 -19
- package/dist/lib/palette.d.ts.map +1 -1
- package/dist/lib/palette.js +45 -33
- package/dist/patterns/app-shell.d.ts +22 -6
- package/dist/patterns/app-shell.d.ts.map +1 -1
- package/dist/patterns/app-shell.js +4 -5
- package/dist/patterns/appearance-template.d.ts +105 -0
- package/dist/patterns/appearance-template.d.ts.map +1 -0
- package/dist/patterns/appearance-template.js +23 -0
- package/dist/patterns/auth-template.d.ts +9 -6
- package/dist/patterns/auth-template.d.ts.map +1 -1
- package/dist/patterns/detail-template.d.ts +5 -5
- package/dist/patterns/detail-template.d.ts.map +1 -1
- package/dist/patterns/index.d.ts +2 -1
- package/dist/patterns/index.d.ts.map +1 -1
- package/dist/patterns/index.js +6 -1
- package/dist/patterns/list-template.d.ts +6 -6
- package/dist/patterns/list-template.d.ts.map +1 -1
- package/dist/patterns/overview-template.d.ts +3 -3
- package/dist/patterns/overview-template.d.ts.map +1 -1
- package/dist/patterns/public-template.d.ts +3 -3
- package/dist/patterns/public-template.d.ts.map +1 -1
- package/dist/patterns/settings-template.d.ts +15 -4
- package/dist/patterns/settings-template.d.ts.map +1 -1
- package/dist/patterns/settings-template.js +2 -2
- package/dist/patterns/shared.d.ts +3 -3
- package/dist/patterns/shared.d.ts.map +1 -1
- package/dist/patterns/wizard-template.d.ts +1 -1
- package/dist/patterns/wizard-template.d.ts.map +1 -1
- package/dist/patterns/wizard-template.js +2 -9
- package/package.json +3 -2
|
@@ -9,18 +9,18 @@ import { type ErrorLabels, type TemplateError } from "./shared.js";
|
|
|
9
9
|
export type ListState = "ready" | "loading" | "empty" | "error";
|
|
10
10
|
export type ListTemplateProps = {
|
|
11
11
|
title: string;
|
|
12
|
-
/** Başlığın altındaki satır: sayı, kapsam, tazelik. Çağıran çevirmiş olarak veriyor. */
|
|
12
|
+
/** The line under the title: a count, a scope, a freshness. The caller supplies it translated. TR: Başlığın altındaki satır: sayı, kapsam, tazelik. Çağıran çevirmiş olarak veriyor. */
|
|
13
13
|
subtitle?: string;
|
|
14
|
-
/** Bu listenin birincil eylemleri. Şeridin sağında. */
|
|
14
|
+
/** This list's primary actions. On the right of the bar. TR: Bu listenin birincil eylemleri. Şeridin sağında. */
|
|
15
15
|
actions?: ReactNode;
|
|
16
|
-
/** Filtre satırı: arama, kırılımlar, aralıklar. Şeridin altında, içeriğin üstünde. */
|
|
16
|
+
/** The filter row: search, breakdowns, ranges. Below the bar, above the content. TR: Filtre satırı: arama, kırılımlar, aralıklar. Şeridin altında, içeriğin üstünde. */
|
|
17
17
|
filters?: ReactNode;
|
|
18
18
|
state?: ListState;
|
|
19
|
-
/** Yüklenirken tutulacak satır sayısı: gerçekten kaç kayıt geliyorsa o. */
|
|
19
|
+
/** How many rows to hold while loading: however many records are actually coming. TR: Yüklenirken tutulacak satır sayısı: gerçekten kaç kayıt geliyorsa o. */
|
|
20
20
|
loadingRows?: number;
|
|
21
|
-
/** İskeletin sütun genişlikleri, yerini tuttuğu tablonun şekline uysun diye. */
|
|
21
|
+
/** The skeleton's column widths, so it holds the shape of the table it stands in for. TR: İskeletin sütun genişlikleri, yerini tuttuğu tablonun şekline uysun diye. */
|
|
22
22
|
loadingColumns?: string[];
|
|
23
|
-
/** `state === "empty"` iken görünen. Ekrana özel, o yüzden ekran yazıyor. */
|
|
23
|
+
/** What shows when `state === "empty"`. Screen-specific, so the screen writes it. TR: `state === "empty"` iken görünen. Ekrana özel, o yüzden ekran yazıyor. */
|
|
24
24
|
empty?: ReactNode;
|
|
25
25
|
error?: TemplateError;
|
|
26
26
|
labels: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-template.d.ts","sourceRoot":"","sources":["../../src/patterns/list-template.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEpF;;;;;GAKG;AAEH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAEhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"list-template.d.ts","sourceRoot":"","sources":["../../src/patterns/list-template.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEpF;;;;;GAKG;AAEH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAEhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,wLAAwL;IACxL,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iHAAiH;IACjH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,wKAAwK;IACxK,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,8JAA8J;IAC9J,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uKAAuK;IACvK,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B,gKAAgK;IAChK,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,WAAW,CAAC;IAE1C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,KAAe,EACf,WAAgB,EAChB,cAAc,EACd,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,GACT,EAAE,iBAAiB,+BA2BnB"}
|
|
@@ -10,13 +10,13 @@ export type OverviewTemplateProps = {
|
|
|
10
10
|
title: string;
|
|
11
11
|
subtitle?: string;
|
|
12
12
|
actions?: ReactNode;
|
|
13
|
-
/** Ekrandaki en önemli tek şey. Bir tane, asla iki. */
|
|
13
|
+
/** The single most important thing on the screen. One, never two. TR: Ekrandaki en önemli tek şey. Bir tane, asla iki. */
|
|
14
14
|
hero?: ReactNode;
|
|
15
|
-
/** Destekleyen kartlar. Düzeni şablon veriyor ki iki özet ekranı ayrışamasın. */
|
|
15
|
+
/** The supporting cards. The template supplies the layout so two overview screens cannot drift apart. TR: Destekleyen kartlar. Düzeni şablon veriyor ki iki özet ekranı ayrışamasın. */
|
|
16
16
|
children?: ReactNode;
|
|
17
17
|
state?: OverviewState;
|
|
18
18
|
error?: TemplateError;
|
|
19
|
-
/** Izgaranın kaç kart tutacağı, yükleme hâli doğru şekli ayırsın diye. */
|
|
19
|
+
/** How many cards the grid holds, so the loading state reserves the right shape. TR: Izgaranın kaç kart tutacağı, yükleme hâli doğru şekli ayırsın diye. */
|
|
20
20
|
loadingCards?: number;
|
|
21
21
|
labels: {
|
|
22
22
|
loading: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview-template.d.ts","sourceRoot":"","sources":["../../src/patterns/overview-template.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEpF;;;;GAIG;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB,
|
|
1
|
+
{"version":3,"file":"overview-template.d.ts","sourceRoot":"","sources":["../../src/patterns/overview-template.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEpF;;;;GAIG;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB,0HAA0H;IAC1H,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,wLAAwL;IACxL,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,4JAA4J;IAC5J,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,WAAW,CAAC;CAC3C,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,KAAe,EACf,KAAK,EACL,YAAgB,EAChB,MAAM,GACP,EAAE,qBAAqB,+BAoCvB"}
|
|
@@ -9,13 +9,13 @@ import { type ErrorLabels, type TemplateError } from "./shared.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export type PublicState = "ready" | "loading" | "error";
|
|
11
11
|
export type PublicTemplateProps = {
|
|
12
|
-
/** Sahibin işareti. Verilmezse hiçbir şey çizilmiyor; varsayılanı ürün koyar. */
|
|
12
|
+
/** The owner's mark. With none, nothing is drawn; the product supplies the default. TR: Sahibin işareti. Verilmezse hiçbir şey çizilmiyor; varsayılanı ürün koyar. */
|
|
13
13
|
brand?: ReactNode;
|
|
14
14
|
title: string;
|
|
15
15
|
subtitle?: string;
|
|
16
|
-
/** Başlığın sağı: abone ol kontrolü, dönem seçici, bir doğrulama damgası. */
|
|
16
|
+
/** The right of the title: a subscribe control, a period picker, a verification stamp. TR: Başlığın sağı: abone ol kontrolü, dönem seçici, bir doğrulama damgası. */
|
|
17
17
|
headerAside?: ReactNode;
|
|
18
|
-
/** Alttaki satır. Beyaz etiketli sayfada sahibin; ne yazacağı bir plan sorusu. */
|
|
18
|
+
/** The bottom line. On a white-labelled page it belongs to the owner; what it says is a plan question. TR: Alttaki satır. Beyaz etiketli sayfada sahibin; ne yazacağı bir plan sorusu. */
|
|
19
19
|
footer?: ReactNode;
|
|
20
20
|
state?: PublicState;
|
|
21
21
|
error?: TemplateError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-template.d.ts","sourceRoot":"","sources":["../../src/patterns/public-template.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEpF;;;;;;GAMG;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAExD,MAAM,MAAM,mBAAmB,GAAG;IAChC,
|
|
1
|
+
{"version":3,"file":"public-template.d.ts","sourceRoot":"","sources":["../../src/patterns/public-template.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEpF;;;;;;GAMG;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAExD,MAAM,MAAM,mBAAmB,GAAG;IAChC,sKAAsK;IACtK,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qKAAqK;IACrK,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,0LAA0L;IAC1L,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,WAAW,CAAC;IAC1C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,KAAe,EACf,KAAK,EACL,MAAM,EACN,QAAQ,GACT,EAAE,mBAAmB,+BAiCrB"}
|
|
@@ -17,11 +17,11 @@ export type SettingsSection = {
|
|
|
17
17
|
};
|
|
18
18
|
export type SettingsTemplateProps = {
|
|
19
19
|
sections: readonly SettingsSection[];
|
|
20
|
-
/** Şu an açık bölüm, `key` ile. */
|
|
20
|
+
/** The section currently open, by `key`. TR: Şu an açık bölüm, `key` ile. */
|
|
21
21
|
activeSection: string;
|
|
22
22
|
title: string;
|
|
23
23
|
subtitle?: string;
|
|
24
|
-
/** Bölüm düzeyindeki eylemler; genelde tek bir "Kaydet". */
|
|
24
|
+
/** Section-level actions; usually a single "Save". TR: Bölüm düzeyindeki eylemler; genelde tek bir "Kaydet". */
|
|
25
25
|
actions?: ReactNode;
|
|
26
26
|
state?: SettingsState;
|
|
27
27
|
error?: TemplateError;
|
|
@@ -40,10 +40,21 @@ export declare function SettingsTemplate({ sections, activeSection, title, subti
|
|
|
40
40
|
* Bir değer üst bir düzeyden miras alınıyorsa, bunu bilmeden değiştirmek üç
|
|
41
41
|
* ekran açıp "bu alan neden böyle yazıyor" diye aramak demek.
|
|
42
42
|
*/
|
|
43
|
-
export declare function SettingsPanel({ title, description, inheritedFrom, children, }: {
|
|
43
|
+
export declare function SettingsPanel({ title, description, inheritedFrom, accent, children, }: {
|
|
44
44
|
title: string;
|
|
45
45
|
description?: string;
|
|
46
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* A brand-coloured edge down the left of the panel. TR: Panelin sol kenarında marka renginde
|
|
48
|
+
* bir şerit.
|
|
49
|
+
*
|
|
50
|
+
* For screens whose SUBJECT is the brand: on an appearance screen the blocks have to separate
|
|
51
|
+
* from one another, and the thing that separates them should be the colour itself. Elsewhere
|
|
52
|
+
* it would be decoration. TR: Konusu MARKANIN KENDİSİ olan ekranlar için: bir görünüm
|
|
53
|
+
* ekranında bloklar birbirinden ayrılmalı ve ayıran şey rengin kendisi olmalı. Başka yerde
|
|
54
|
+
* süs olurdu.
|
|
55
|
+
*/
|
|
56
|
+
accent?: boolean;
|
|
57
|
+
/** Like "inherited from the workspace": a full sentence written by the caller. TR: "çalışma alanından geliyor" gibi, çağıran tarafından yazılmış tam cümle. */
|
|
47
58
|
inheritedFrom?: string;
|
|
48
59
|
children: ReactNode;
|
|
49
60
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-template.d.ts","sourceRoot":"","sources":["../../src/patterns/settings-template.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1D,kCAAkC;AAClC,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;AAE/D,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,aAAa,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IACrC,
|
|
1
|
+
{"version":3,"file":"settings-template.d.ts","sourceRoot":"","sources":["../../src/patterns/settings-template.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1D,kCAAkC;AAClC,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;AAE/D,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,aAAa,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IACrC,6EAA6E;IAC7E,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gHAAgH;IAChH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;KACtC,GAAG,WAAW,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,aAAa,EACb,KAAK,EACL,QAAQ,EACR,OAAO,EACP,KAAe,EACf,KAAK,EACL,aAAa,EAAE,IAAgB,EAC/B,MAAM,EACN,QAAQ,GACT,EAAE,qBAAqB,+BAsDvB;AA0BD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,WAAW,EACX,aAAa,EACb,MAAc,EACd,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+JAA+J;IAC/J,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BA6BA"}
|
|
@@ -28,6 +28,6 @@ function ScopeMark({ scope, label }) {
|
|
|
28
28
|
* Bir değer üst bir düzeyden miras alınıyorsa, bunu bilmeden değiştirmek üç
|
|
29
29
|
* ekran açıp "bu alan neden böyle yazıyor" diye aramak demek.
|
|
30
30
|
*/
|
|
31
|
-
export function SettingsPanel({ title, description, inheritedFrom, children, }) {
|
|
32
|
-
return (_jsxs("section", { className:
|
|
31
|
+
export function SettingsPanel({ title, description, inheritedFrom, accent = false, children, }) {
|
|
32
|
+
return (_jsxs("section", { className: `tamga-card tamga-card-open tamga-gutter py-4${accent ? " tamga-settings-panel-accent" : ""}`, "data-panel": title, children: [_jsxs("div", { className: "flex flex-wrap items-baseline gap-2", children: [_jsx("h3", { className: "text-subhead font-semibold text-ink", children: title }), inheritedFrom ? (_jsx("span", { className: "text-caption text-ink-faint", "data-inherited-from": true, children: inheritedFrom })) : null] }), description ? (_jsx("p", { className: "mt-1 text-small leading-relaxed text-ink-soft", children: description })) : null, _jsx("div", { className: "mt-4", children: children })] }));
|
|
33
33
|
}
|
|
@@ -14,11 +14,11 @@ export { PlainLink, type LinkComponent } from "../components/link.js";
|
|
|
14
14
|
* çünkü teknik satırın biçimi (`code · request_id`) tek bir karar.
|
|
15
15
|
*/
|
|
16
16
|
export type TemplateError = {
|
|
17
|
-
/** Zarfın makine tarafından okunan `code`u: kararlı, çevrilmez, desteğin dallandığı şey. */
|
|
17
|
+
/** The envelope's machine-read `code`: stable, never translated, the thing support branches on. TR: Zarfın makine tarafından okunan `code`u: kararlı, çevrilmez, desteğin dallandığı şey. */
|
|
18
18
|
code?: string;
|
|
19
|
-
/** `meta.request_id`; sunucu günlüğüne giden tek iplik. */
|
|
19
|
+
/** `meta.request_id`; the one thread that leads to the server log. TR: `meta.request_id`; sunucu günlüğüne giden tek iplik. */
|
|
20
20
|
requestId?: string;
|
|
21
|
-
/** Yalnız çağıran gerçekten yeniden deneyebiliyorsa; yoksa düğme hiç çizilmiyor. */
|
|
21
|
+
/** Only when the caller really can retry; without it the button is not drawn at all. TR: Yalnız çağıran gerçekten yeniden deneyebiliyorsa; yoksa düğme hiç çizilmiyor. */
|
|
22
22
|
onRetry?: () => void;
|
|
23
23
|
};
|
|
24
24
|
export type ErrorLabels = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/patterns/shared.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;;;;GAQG;AAKH,OAAO,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/patterns/shared.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;;;;GAQG;AAKH,OAAO,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,6LAA6L;IAC7L,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+HAA+H;IAC/H,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0KAA0K;IAC1K,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAErE;AAED,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,+BAU1F;AAED,8DAA8D;AAC9D,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAQ/E"}
|
|
@@ -8,7 +8,7 @@ import { type ErrorLabels, type TemplateError } from "./shared.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export type WizardStep = {
|
|
10
10
|
key: string;
|
|
11
|
-
/** Çevrilmiş etiket. */
|
|
11
|
+
/** The translated label. TR: Çevrilmiş etiket. */
|
|
12
12
|
label: string;
|
|
13
13
|
};
|
|
14
14
|
export type WizardState = "ready" | "error";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wizard-template.d.ts","sourceRoot":"","sources":["../../src/patterns/wizard-template.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"wizard-template.d.ts","sourceRoot":"","sources":["../../src/patterns/wizard-template.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAa,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAE9E;;;;;GAKG;AAEH,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,UAAU,EACV,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,KAAe,EACf,KAAK,EACL,MAAM,EACN,QAAQ,GACT,EAAE,mBAAmB,+BA4CrB"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { Check } from "../components/icons.js";
|
|
3
|
+
import { Steps } from "../components/display.js";
|
|
5
4
|
import { ErrorSlot } from "./shared.js";
|
|
6
5
|
export function WizardTemplate({ steps, activeStep, title, subtitle, back, next, state = "ready", error, labels, children, }) {
|
|
7
6
|
const activeIndex = steps.findIndex((s) => s.key === activeStep);
|
|
8
|
-
return (_jsxs("div", { className: "flex min-h-0 flex-col", "data-wizard-state": state, children: [_jsx("
|
|
9
|
-
const current = step.key === activeStep;
|
|
10
|
-
/* "Bitti" konumsal, çağıranın taşıması gereken bir bayrak değil: açık
|
|
11
|
-
adımdan öncekilerin hepsinden geçilmiş. Tek kaynak, kayma yok. */
|
|
12
|
-
const done = activeIndex >= 0 && i < activeIndex;
|
|
13
|
-
return (_jsxs("li", { "data-step": step.key, "data-current": current, "data-done": done, "aria-current": current ? "step" : undefined, className: `flex items-center gap-2 text-small ${current ? "font-medium text-ink" : done ? "text-ink-soft" : "text-ink-faint"}`, children: [_jsx("span", { className: "inline-flex w-5 shrink-0 justify-center font-mono text-caption tabular-nums", children: done ? (_jsx(Icon, { icon: Check, size: "xs", weight: "bold" })) : (String(i + 1).padStart(2, "0")) }), step.label] }, step.key));
|
|
14
|
-
}) }), _jsx("div", { className: "tamga-gutter min-h-0 flex-1 py-6", children: _jsxs("div", { className: "max-w-[var(--measure)]", children: [_jsx("h2", { className: "text-title font-semibold text-ink", children: title }), subtitle ? _jsx("p", { className: "mt-1 text-small text-ink-faint", children: subtitle }) : null, _jsx("div", { className: "mt-6", children: state === "error" ? _jsx(ErrorSlot, { error: error, labels: labels }) : children })] }) }), back || next ? (_jsxs("div", { className: "tamga-section tamga-gutter flex items-center gap-2 py-4", children: [back, _jsx("div", { className: "ml-auto flex items-center gap-2", children: next })] })) : null, _jsx("span", { className: "sr-only", "aria-live": "polite", children: activeIndex >= 0 ? `${activeIndex + 1} / ${steps.length}` : "" })] }));
|
|
7
|
+
return (_jsxs("div", { className: "flex min-h-0 flex-col", "data-wizard-state": state, children: [_jsx("div", { className: "tamga-section tamga-gutter py-4", children: _jsx(Steps, { steps: steps.map((s) => s.label), current: activeIndex < 0 ? 0 : activeIndex }) }), _jsx("div", { className: "tamga-gutter min-h-0 flex-1 py-6", children: _jsxs("div", { className: "max-w-[var(--measure)]", children: [_jsx("h2", { className: "text-title font-semibold text-ink", children: title }), subtitle ? _jsx("p", { className: "mt-1 text-small text-ink-faint", children: subtitle }) : null, _jsx("div", { className: "mt-6", children: state === "error" ? _jsx(ErrorSlot, { error: error, labels: labels }) : children })] }) }), back || next ? (_jsxs("div", { className: "tamga-section tamga-gutter sticky bottom-0 z-10 flex items-center gap-2 bg-shell py-4", children: [back, _jsx("div", { className: "ml-auto flex items-center gap-2", children: next })] })) : null, _jsx("span", { className: "sr-only", "aria-live": "polite", children: activeIndex >= 0 ? `${activeIndex + 1} / ${steps.length}` : "" })] }));
|
|
15
8
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamga-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Mantıksal's shared interface library: tokens, physics and components.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
12
|
"README.md",
|
|
13
|
+
"CHANGELOG.md",
|
|
13
14
|
"LICENSE"
|
|
14
15
|
],
|
|
15
16
|
"exports": {
|