tamga-ui 0.4.2 → 0.4.4
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 +61 -1
- package/dist/components/overlay.d.ts.map +1 -1
- package/dist/components/overlay.js +9 -3
- package/dist/components/tone.d.ts +7 -2
- package/dist/components/tone.d.ts.map +1 -1
- package/dist/components/tone.js +8 -0
- package/dist/kit.css +24 -1
- package/dist/patterns/app-shell.d.ts.map +1 -1
- package/dist/patterns/app-shell.js +16 -3
- package/dist/styles.css +1 -1
- package/dist/theme.css +5 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,67 @@ 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.4.
|
|
8
|
+
## 0.4.4
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **A fifth tone: `info`.** The scale answered one question — is something wrong — in four ways:
|
|
13
|
+
solved, heading there, broken, or not reporting. A product that only wants to SAY something had
|
|
14
|
+
to choose between a grey that reads as "not reporting" and a green that reads as "solved". Both
|
|
15
|
+
are a lie about the same sentence. `info` is blue because blue is the one hue this palette has
|
|
16
|
+
never attached urgency to, and like the other three it never decorates. It never pulses either:
|
|
17
|
+
"worth knowing" and "look here, now" are not the same sentence, and the pulse stays with the
|
|
18
|
+
second.
|
|
19
|
+
|
|
20
|
+
New tokens: `--color-info` and `--color-info-bg`, in both themes. The dark value leans toward
|
|
21
|
+
cyan rather than the brand's navy, for the same reason the other statuses stay warm there — a
|
|
22
|
+
navy signal sinks into a navy ground.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **`Toast` takes its tone as the surface, not as a mark on its edge.** It was a white box with a
|
|
27
|
+
ten-pixel square in the corner. A toast is on screen for about two seconds, and what gets read in
|
|
28
|
+
that time is the colour of the box, not a square beside the text. The wash was already designed
|
|
29
|
+
for this — `--color-*-bg` is documented as "a tint, not a fill" — so the tone now paints the
|
|
30
|
+
surface and the square stays as the secondary cue. `neutral` is unchanged and stays uncoloured,
|
|
31
|
+
which is its whole job on this scale.
|
|
32
|
+
|
|
33
|
+
The edge and the drop stay neutral on purpose: painting them in the tone as well put a hard frame
|
|
34
|
+
around a soft wash, and the box ended up shouting in the exact way the wash exists to prevent.
|
|
35
|
+
|
|
36
|
+
**This changes how every existing toast looks without any change at the call site.** Nothing to
|
|
37
|
+
migrate; if a product wants the old white box, `tone="neutral"` is it.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- **A toast no longer overflows a container narrower than itself.** Its width was fixed at 320px,
|
|
42
|
+
so a narrow parent got a toast hanging out of it, and a 360px phone got one hanging off the
|
|
43
|
+
screen (320 plus two 24px gutters does not fit). The measurement moved to `ToastViewport`, which
|
|
44
|
+
is the thing that knows how much room there is: the column is 20rem and shrinks by the gutters
|
|
45
|
+
when the screen is narrower.
|
|
46
|
+
|
|
47
|
+
- **The contrast gate now measures a status colour on its own wash.** It only ever checked
|
|
48
|
+
`critical` against the shell, so the pair that a chip, a row and a toast actually put on screen
|
|
49
|
+
was never measured — and a new tone could be added without anything looking. The five pairs are
|
|
50
|
+
gated now, including `silent` on `chart-fill`, which had already failed once and was recorded in
|
|
51
|
+
a comment rather than a gate.
|
|
52
|
+
|
|
53
|
+
## 0.4.3
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
|
|
57
|
+
- **`AppShell` marks the most specific entry, not every entry above it.** The rule was "an entry
|
|
58
|
+
owns its subtree, except `/`, which matches exactly". That holds only when the root really is
|
|
59
|
+
`/`. In a panel mounted under `/panel`, the root entry swallowed every route beneath it: on an
|
|
60
|
+
order's detail page both "Dashboard" and "Orders" showed as current. The wrong answer was the
|
|
61
|
+
sneaky kind, because the right entry was lit too, so nothing looked missing.
|
|
62
|
+
|
|
63
|
+
Which path is the root is the product's knowledge, not the library's, so this did not become a
|
|
64
|
+
new prop. The rule was generalised instead: of the entries containing the path, the longest one
|
|
65
|
+
wins. `/` is now an instance of that rule rather than an exception to it, and the special case is
|
|
66
|
+
gone.
|
|
67
|
+
|
|
68
|
+
|
|
9
69
|
|
|
10
70
|
### Added
|
|
11
71
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/components/overlay.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAuCtC,MAAM,MAAM,QAAQ,GAChB;IACE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GACD;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAErC,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,KAAe,EACf,KAAW,EACX,OAAe,EACf,WAAe,EACf,WAAmB,EACnB,GAAG,IAAI,EACR,EAAE;IACD,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE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E,OAAO,CAAC;IAClB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAsBA"}
|
|
@@ -187,8 +187,14 @@ export function Tooltip({ label, placement = "bottom", children, ...rest }) {
|
|
|
187
187
|
}, children: [label, _jsx("span", { "aria-hidden": true, className: "absolute block", style: { background: "var(--color-ink)", ...arrows[placement] } })] }))] }));
|
|
188
188
|
}
|
|
189
189
|
export function Toast({ tone = "neutral", title, description, action, onDismiss, dismissLabel, ...rest }) {
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
/* NÖTR RENK ALMIYOR, VE BU ÖLÇEĞİN KURALI: renk taşımayarak anlam taşıyan tek
|
|
191
|
+
ton o. Renkli değişkenler tanımsız bırakılıyor, CSS yedeğe düşüyor. */
|
|
192
|
+
const t = tone === "neutral" ? null : toneOf(tone);
|
|
193
|
+
const mark = t ? t.mark : "var(--color-ink)";
|
|
194
|
+
return (_jsxs("div", { ...dataProps(rest), role: "status", className: "tamga-toast flex w-full max-w-80 items-start gap-4 p-4", style: {
|
|
195
|
+
animation: "tamga-toast-in var(--duration-base) var(--ease-standard) both",
|
|
196
|
+
...(t ? { "--toast-wash": t.bg } : null),
|
|
197
|
+
}, children: [_jsx("span", { className: "tamga-toast-mark mt-1 size-2.5 shrink-0", style: { background: mark } }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "text-body font-medium text-ink", children: title }), description ? (_jsx("p", { className: "mt-1 text-small leading-relaxed text-ink-soft", children: description })) : null, action ? _jsx("div", { className: "mt-3", children: action }) : null] }), onDismiss ? (_jsx(MiniButton, { onClick: onDismiss, "aria-label": dismissLabel, children: _jsx(Icon, { icon: Close, size: "xs" }) })) : null] }));
|
|
192
198
|
}
|
|
193
199
|
/**
|
|
194
200
|
* Where toasts land. Top-right is the default: it is the one corner that
|
|
@@ -201,7 +207,7 @@ const corners = {
|
|
|
201
207
|
"bottom-left": "bottom-6 left-6 items-start",
|
|
202
208
|
};
|
|
203
209
|
export function ToastViewport({ position = "top-right", children, ...rest }) {
|
|
204
|
-
return (_jsx("div", { ...dataProps(rest), className: `pointer-events-none fixed z-50 flex flex-col gap-2 ${corners[position]}`, children: _jsx("div", { className: "pointer-events-auto flex flex-col gap-2", children: children }) }));
|
|
210
|
+
return (_jsx("div", { ...dataProps(rest), className: `pointer-events-none fixed z-50 flex flex-col gap-2 ${corners[position]}`, children: _jsx("div", { className: "tamga-toast-stack pointer-events-auto flex flex-col gap-2", children: children }) }));
|
|
205
211
|
}
|
|
206
212
|
/* ---------------------------- dialog --------------------------- */
|
|
207
213
|
/**
|
|
@@ -13,14 +13,19 @@ export type ToneStyle = {
|
|
|
13
13
|
bg: string;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Five roles, and nothing outside them.
|
|
17
17
|
*
|
|
18
18
|
* `neutral` is the one that carries meaning by NOT carrying colour: a grey row
|
|
19
19
|
* says "this is not reporting" on its own. That only works while it stays the
|
|
20
20
|
* single uncoloured state — which is why healthy is green here rather than
|
|
21
21
|
* neutral, a deliberate reversal recorded in the product's design notes.
|
|
22
|
+
*
|
|
23
|
+
* `info` is the newest and it fills a real hole rather than adding a shade:
|
|
24
|
+
* the other four answer "is something wrong", and a product that only wants to
|
|
25
|
+
* SAY something had to pick between a grey that reads as "not reporting" and a
|
|
26
|
+
* green that reads as "solved". Both are a lie about the same sentence.
|
|
22
27
|
*/
|
|
23
|
-
export type Tone = "neutral" | "positive" | "caution" | "danger";
|
|
28
|
+
export type Tone = "neutral" | "positive" | "caution" | "danger" | "info";
|
|
24
29
|
export declare const tones: Record<Tone, ToneStyle>;
|
|
25
30
|
export declare function toneOf(tone: Tone): ToneStyle;
|
|
26
31
|
/**
|
|
@@ -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,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF
|
|
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,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE1E,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,SAAS,CA2BzC,CAAC;AAEF,wBAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,CAE5C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAQjD,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"}
|
package/dist/components/tone.js
CHANGED
|
@@ -20,6 +20,11 @@ export const tones = {
|
|
|
20
20
|
mark: "var(--color-critical)",
|
|
21
21
|
bg: "var(--color-critical-bg)",
|
|
22
22
|
},
|
|
23
|
+
info: {
|
|
24
|
+
fg: "var(--color-info)",
|
|
25
|
+
mark: "var(--color-info)",
|
|
26
|
+
bg: "var(--color-info-bg)",
|
|
27
|
+
},
|
|
23
28
|
neutral: {
|
|
24
29
|
fg: "var(--color-silent)",
|
|
25
30
|
mark: "var(--color-line)",
|
|
@@ -44,6 +49,9 @@ export const TONE_RANK = {
|
|
|
44
49
|
danger: 90,
|
|
45
50
|
caution: null,
|
|
46
51
|
positive: null,
|
|
52
|
+
/* Bir bilgi asla nabız atmıyor: "bilinmesi iyi olur" ile "şimdi buraya bak"
|
|
53
|
+
aynı cümle değil, ve nabzı ikincisi için saklı tutmak bu ölçeğin kuralı. */
|
|
54
|
+
info: null,
|
|
47
55
|
neutral: null,
|
|
48
56
|
};
|
|
49
57
|
export function rankOf(tone, override) {
|
package/dist/kit.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tamga-ui 0.4.
|
|
1
|
+
/*! tamga-ui 0.4.4 · MIT · https://tamga.org.tr */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
--overlay-gap: 8px;
|
|
@@ -70,6 +70,10 @@
|
|
|
70
70
|
--color-resolved: #4fd4ac;
|
|
71
71
|
|
|
72
72
|
--color-resolved-bg: #0f2a22;
|
|
73
|
+
|
|
74
|
+
--color-info: #6fc9e8;
|
|
75
|
+
|
|
76
|
+
--color-info-bg: #0d2733;
|
|
73
77
|
--color-silent: #9494a8;
|
|
74
78
|
--color-tick: #3f4880;
|
|
75
79
|
--color-chart-1: #ada072;
|
|
@@ -848,6 +852,25 @@
|
|
|
848
852
|
text-align: start;
|
|
849
853
|
}
|
|
850
854
|
|
|
855
|
+
.tamga-toast {
|
|
856
|
+
|
|
857
|
+
border: 1px solid var(--color-edge);
|
|
858
|
+
border-radius: var(--radius-card);
|
|
859
|
+
background: var(--toast-wash, var(--color-shell));
|
|
860
|
+
box-shadow: 4px 4px 0 var(--color-edge);
|
|
861
|
+
|
|
862
|
+
text-align: start;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.tamga-toast-stack {
|
|
866
|
+
width: 20rem;
|
|
867
|
+
max-width: calc(100vw - 2 * var(--gutter));
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
.tamga-toast-mark {
|
|
871
|
+
border-radius: 2px;
|
|
872
|
+
}
|
|
873
|
+
|
|
851
874
|
.tamga-overlay-full {
|
|
852
875
|
display: flex;
|
|
853
876
|
height: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../src/patterns/app-shell.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;GAKG;AAEH,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,wKAAwK;IACxK,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;IAC1C;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,wJAAwJ;IACxJ,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,GAAG,EAAE,SAAS,QAAQ,EAAE,CAAC;IACzB,mGAAmG;IACnG,UAAU,EAAE,MAAM,CAAC;IACnB;;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nB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,uIAAuI;IACvI,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,GAAG,EACH,UAAU,EACV,IAAe,EACf,MAAM,EACN,UAAU,EACV,aAAa,EAAE,IAAgB,EAC/B,MAAM,EACN,QAAQ,GACT,EAAE,aAAa,+BA6Gf"}
|
|
@@ -6,9 +6,22 @@ import { RailLink } from "../components/rail-link.js";
|
|
|
6
6
|
import { PlainLink } from "./shared.js";
|
|
7
7
|
export function AppShell({ brand, nav, activePath, rail = "narrow", topbar, railFooter, linkComponent: Link = PlainLink, labels, children, }) {
|
|
8
8
|
/* Bir giriş kendi alt ağacına sahip: `/urunler`, `/urunler/42/fotograflar`
|
|
9
|
-
üzerinde de açık giriştir.
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
üzerinde de açık giriştir.
|
|
10
|
+
|
|
11
|
+
AMA EN UZUN EŞLEŞEN KAZANIR, ve bu bir özel durumu ortadan kaldırdı. Önce
|
|
12
|
+
kural "tam eşleşme yalnız `/` için" diye yazılıydı: kökün `/` olmadığı bir
|
|
13
|
+
panelde (`/panel`) kök giriş altındaki HER rotayı yutuyordu, yani sipariş
|
|
14
|
+
detayında hem "Pano" hem "Siparişler" açık görünüyordu. Ölçüldü.
|
|
15
|
+
|
|
16
|
+
Kökün hangi yol olduğu ürünün bilgisi, kitin değil — o yüzden kite yeni bir
|
|
17
|
+
prop eklemek yerine kural genelleştirildi: yolu kapsayan girişlerden EN
|
|
18
|
+
ÖZELİ açık. `/` de bu kuralın kendiliğinden bir örneği, artık ayrıca
|
|
19
|
+
yazılmıyor. */
|
|
20
|
+
const kapsiyor = (href) => activePath === href || activePath.startsWith(`${href}/`);
|
|
21
|
+
const enOzel = nav.reduce((kazanan, entry) => kapsiyor(entry.href) && (kazanan === null || entry.href.length > kazanan.length)
|
|
22
|
+
? entry.href
|
|
23
|
+
: kazanan, null);
|
|
24
|
+
const isCurrent = (href) => href === enOzel;
|
|
12
25
|
const wide = rail === "wide";
|
|
13
26
|
return (_jsxs("div", { className: "flex h-dvh w-full overflow-hidden bg-shell text-ink-soft", children: [_jsxs("aside", { className: `flex shrink-0 flex-col gap-2 bg-shell py-4 ${wide ? "w-60 px-3" : "w-20 items-center px-1"}`, "data-rail": rail, children: [brand ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-label": labels.home, className: `mb-2 flex h-10 shrink-0 items-center text-ink ${wide ? "px-2" : "w-10 justify-center"}`, children: brand }), _jsx("span", { className: `h-0 w-6 border-t border-line ${wide ? "ml-2" : ""}` })] })) : null, _jsx("nav", { "aria-label": labels.primaryNav, className: `tamga-rail-scroll flex w-full flex-1 flex-col gap-2 py-1 ${wide ? "" : "items-center"}`, children: nav.map((entry, i) => (_jsxs(Fragment, { children: [wide && entry.section && entry.section !== nav[i - 1]?.section ? (_jsx("p", { className: `px-2.5 text-micro font-semibold uppercase tracking-wide text-ink-faint ${i > 0 ? "mt-4 pb-1" : "pb-1"}`, children: entry.section })) : null, _jsx(RailLink, { href: entry.href, label: entry.label, active: isCurrent(entry.href), showLabel: wide, linkComponent: Link, "data-nav": entry.key, children: _jsx(Icon, { icon: entry.icon, size: "base" }) })] }, entry.key))) }), railFooter ? _jsx("div", { className: "shrink-0", children: railFooter }) : null] }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("header", { className: "tamga-gutter flex items-center gap-4 py-4", children: topbar }), _jsx("div", { className: "min-h-0 flex-1 overflow-hidden pr-4 pb-4", children: _jsx("main", { className: "tamga-surface relative h-full min-h-0 overflow-y-auto", children: children }) })] })] }));
|
|
14
27
|
}
|
package/dist/styles.css
CHANGED
package/dist/theme.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tamga-ui 0.4.
|
|
1
|
+
/*! tamga-ui 0.4.4 · MIT · https://tamga.org.tr */
|
|
2
2
|
@custom-variant dark (&:is(.dark *));
|
|
3
3
|
|
|
4
4
|
@theme {
|
|
@@ -409,6 +409,10 @@
|
|
|
409
409
|
|
|
410
410
|
--color-resolved-bg: #e3f3ec;
|
|
411
411
|
|
|
412
|
+
--color-info: #23648f;
|
|
413
|
+
|
|
414
|
+
--color-info-bg: #e2eef6;
|
|
415
|
+
|
|
412
416
|
--color-silent: #696256;
|
|
413
417
|
|
|
414
418
|
--color-tick: #bdb8ae;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamga-ui",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.4",
|
|
4
|
+
"description": "Mant\u0131ksal's shared interface library: tokens, physics and components.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|