tamga-ui 0.5.1 → 0.5.2
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 +32 -0
- package/dist/components/checkbox.js +1 -1
- package/dist/fonts.css +1 -1
- package/dist/kit.css +3 -9
- package/dist/lib/palette.d.ts.map +1 -1
- package/dist/lib/palette.js +13 -11
- package/dist/styles.css +1 -1
- package/dist/theme.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,38 @@ Versions follow [semver](https://semver.org/). Through `0.x`, breaking changes m
|
|
|
5
5
|
|
|
6
6
|
> 🇹🇷 Türkçe için [tamga.org.tr/tr](https://tamga.org.tr/tr).
|
|
7
7
|
|
|
8
|
+
## 0.5.2
|
|
9
|
+
|
|
10
|
+
> A light palette takes the brand's hue, and two things a pointer could feel: a checkbox
|
|
11
|
+
> that flickered under hover and a two-line label that centred itself.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **`Checkbox` no longer centres a two-line label.** It renders a `<button>`, and a browser centres
|
|
16
|
+
button text; every other choice surface in the kit already neutralises that (`RadioGroup`'s list
|
|
17
|
+
look, `.tamga-choice-card`), this one did not. A one-word label never showed it; a label with a
|
|
18
|
+
description under it did.
|
|
19
|
+
|
|
20
|
+
## Unreleased
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **A light palette now carries the brand's hue.** `makePalette` fixed every light surface at hue
|
|
25
|
+
90 — `page`, `shell`, `rail`, `hover`, `sunk`, `line`, `div` were the same warm paper whatever the
|
|
26
|
+
brand, while the dark half breathed in the brand's hue. Only the HUE moves: the lightness steps
|
|
27
|
+
and the chroma ceiling are untouched, so the contrast that makes a panel comfortable to read is
|
|
28
|
+
the same number it was (measured: ink over page stays above 15). The warm-brand guard still holds
|
|
29
|
+
a red or orange brand at the paper hue, because a surface pulled toward those reads as dirty
|
|
30
|
+
rather than tinted.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- **A hovered checkbox no longer flickers.** The box lifts a pixel on hover, and the hover target
|
|
35
|
+
was the box itself: a pointer resting on its lower or right edge lost the box as it moved, the
|
|
36
|
+
hover ended, the box came back, the hover started again — a loop that does not stop, because the
|
|
37
|
+
pointer never moved. Hover now belongs to the wrapping control, which does not move. The label
|
|
38
|
+
lights the box too, which is where a checkbox's hit area always was.
|
|
39
|
+
|
|
8
40
|
## 0.5.1
|
|
9
41
|
|
|
10
42
|
> Three corrections the 0.5.0 port left behind: a menu that stole the page's scroll, and the
|
|
@@ -12,5 +12,5 @@ import { Check, Minus } from "./icons.js";
|
|
|
12
12
|
* offsetini taşır, böylece kontrol ailesinin bir üyesi gibi okunur.
|
|
13
13
|
* ---------------------------------------------------------------- */
|
|
14
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-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] }));
|
|
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
16
|
}
|
package/dist/fonts.css
CHANGED
package/dist/kit.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tamga-ui 0.5.
|
|
1
|
+
/*! tamga-ui 0.5.2 · MIT · https://tamga.org.tr */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
--overlay-gap: 8px;
|
|
@@ -2355,7 +2355,6 @@
|
|
|
2355
2355
|
border-radius: var(--radius-chip);
|
|
2356
2356
|
box-shadow: none;
|
|
2357
2357
|
}
|
|
2358
|
-
.tamga-check-sm:hover,
|
|
2359
2358
|
.tamga-check-sm[data-checked="true"] {
|
|
2360
2359
|
transform: none;
|
|
2361
2360
|
box-shadow: none;
|
|
@@ -2375,13 +2374,8 @@
|
|
|
2375
2374
|
cursor: default;
|
|
2376
2375
|
}
|
|
2377
2376
|
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
transform: none;
|
|
2381
|
-
box-shadow: none;
|
|
2382
|
-
}
|
|
2383
|
-
|
|
2384
|
-
.tamga-check:hover, .tamga-radio:hover {
|
|
2377
|
+
:where(button, label):hover
|
|
2378
|
+
:is(.tamga-check, .tamga-radio):not([data-off]):not(.tamga-check-sm) {
|
|
2385
2379
|
border-color: var(--color-accent-line);
|
|
2386
2380
|
transform: translate(-1px, -1px);
|
|
2387
2381
|
box-shadow: 3px 3px 0 var(--color-accent-line);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/lib/palette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAA0B,QAAQ,EAAc,MAAM,YAAY,CAAC;AAEpG;;;;;;;;GAQG;AAEH,qFAAqF;AACrF,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,CAA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B,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,WAAW,EAAE,CA8BxD;AAoBD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAI9D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAMpD;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/lib/palette.js
CHANGED
|
@@ -14,13 +14,13 @@ import { lightness, deltaL, isHex, hexToOklch, oklchToHex, contrast } from "./co
|
|
|
14
14
|
const REFERANS_MARKA = { l: 0.49, c: 0.2158, h: 264.4 };
|
|
15
15
|
const BASAMAK = {
|
|
16
16
|
light: {
|
|
17
|
-
page: { l: 0.961, c: 0.0083, k: "
|
|
18
|
-
shell: { l: 0.997, c: 0.0041, k: "
|
|
19
|
-
rail: { l: 0.925, c: 0.0112, k: "
|
|
20
|
-
hover: { l: 0.970, c: 0.0082, k: "
|
|
21
|
-
sunk: { l: 0.898, c: 0.0142, k: "
|
|
22
|
-
line: { l: 0.861, c: 0.0156, k: "
|
|
23
|
-
div: { l: 0.904, c: 0.0129, k: "
|
|
17
|
+
page: { l: 0.961, c: 0.0083, k: "kisitli" },
|
|
18
|
+
shell: { l: 0.997, c: 0.0041, k: "kisitli" },
|
|
19
|
+
rail: { l: 0.925, c: 0.0112, k: "kisitli" },
|
|
20
|
+
hover: { l: 0.970, c: 0.0082, k: "kisitli" },
|
|
21
|
+
sunk: { l: 0.898, c: 0.0142, k: "kisitli" },
|
|
22
|
+
line: { l: 0.861, c: 0.0156, k: "kisitli" },
|
|
23
|
+
div: { l: 0.904, c: 0.0129, k: "kisitli" },
|
|
24
24
|
edge: { l: 0.834, c: 0.0154, k: "kisitli" },
|
|
25
25
|
edgeHover: { l: 0.677, c: 0.0340, k: "kisitli" },
|
|
26
26
|
edgeStrong: { l: 0.241, c: 0.0635, k: "tam" },
|
|
@@ -30,7 +30,7 @@ const BASAMAK = {
|
|
|
30
30
|
inkFaint: { l: 0.460, c: 0.0476, k: "kisitli" },
|
|
31
31
|
navIdle: { l: 0.241, c: 0.0635, k: "tam" },
|
|
32
32
|
navHover: { l: 0.241, c: 0.0635, k: "tam" },
|
|
33
|
-
navHoverBg: { l: 0.997, c: 0.0041, k: "
|
|
33
|
+
navHoverBg: { l: 0.997, c: 0.0041, k: "kisitli" },
|
|
34
34
|
},
|
|
35
35
|
dark: {
|
|
36
36
|
page: { l: 0.218, c: 0.0385, k: "kisitli" },
|
|
@@ -60,11 +60,13 @@ const BASAMAK = {
|
|
|
60
60
|
navHoverBg: { l: 0.257, c: 0.0473, k: "kisitli" },
|
|
61
61
|
},
|
|
62
62
|
};
|
|
63
|
-
/**
|
|
63
|
+
/** Sıcak markada kâğıdın kaçtığı ton. */
|
|
64
64
|
const KAGIT_TONU = 78;
|
|
65
|
+
/* AÇIK YÜZEYLER DE MARKADAN TON ALIYOR. Kâğıtlar `h: 90`da sabitti: seçilen renk ne olursa
|
|
66
|
+
olsun ray, zemin ve kartlar aynı sıcak griydi, oysa koyu tema markanın tonunda nefes
|
|
67
|
+
alıyordu. Değişen yalnız TON · parlaklık ve doyum tavanı aynı kaldığı için kontrast ve
|
|
68
|
+
göz konforu yerinde duruyor (ölçüldü: mürekkep/zemin 15.5+). */
|
|
65
69
|
function notrUret(b, marka, koyu) {
|
|
66
|
-
if (b.k === "sabit")
|
|
67
|
-
return oklchToHex({ l: b.l, c: b.c, h: 90 });
|
|
68
70
|
const oran = Math.max(0.12, Math.min(1.4, marka.c / REFERANS_MARKA.c));
|
|
69
71
|
const tavan = koyu ? 0.02 : 0.022;
|
|
70
72
|
let c = b.k === "tam" ? b.c * oran : Math.min(b.c * oran, tavan);
|
package/dist/styles.css
CHANGED
package/dist/theme.css
CHANGED