tamga-ui 0.5.6 → 0.5.8
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 +62 -0
- package/dist/components/advanced-input.d.ts.map +1 -1
- package/dist/components/advanced-input.js +12 -4
- package/dist/fonts.css +1 -1
- package/dist/kit.css +4 -11
- package/dist/patterns/list-template.d.ts +10 -1
- package/dist/patterns/list-template.d.ts.map +1 -1
- package/dist/patterns/list-template.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/theme.css +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,68 @@ 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.8
|
|
9
|
+
|
|
10
|
+
> A ticked checkbox stays down.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`ListTemplate.footer`** · the strip at the foot of the list surface, for the pagination or a
|
|
15
|
+
total. The rows are flush with the card's edge, so anything passed after them as a child landed
|
|
16
|
+
on that edge with no room; the footer sits inside the card, divided by a line and given its own
|
|
17
|
+
padding, and it is not drawn while the list is empty.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **A rail row is square on a narrow rail.** It was 52 by 40, written so the row would fill the
|
|
22
|
+
column, and a rectangle around a single icon framed the space rather than the icon: the selected
|
|
23
|
+
row read as a wide box with a glyph adrift in it. It is now 40 by 40, centred in the column; a
|
|
24
|
+
wide rail still takes its own width.
|
|
25
|
+
|
|
26
|
+
- **`ListTemplate` puts the filters and the list on surfaces of their own.** They sat on the page
|
|
27
|
+
ground, one bare row above another, and the two read as a single strip: where the list began, and
|
|
28
|
+
which control filtered which, had to be worked out rather than seen. The kit's own list-screen
|
|
29
|
+
example and every panel built from it already used cards, so the template was arguing with its own
|
|
30
|
+
documentation. Both surfaces keep their overflow open, so the filters' dropdowns and the rows'
|
|
31
|
+
menus are not cut at the card's edge.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **Hover undid the selected state of a `Segmented` option too.** The chosen option rests 1px up
|
|
36
|
+
with a 2px shadow; hovering it grew the shadow to 3px and left the object where it was, which is
|
|
37
|
+
the one thing Law 1 forbids: a shadow that grows while nothing rises makes the height a lie. The
|
|
38
|
+
option now ignores the pointer, the way the rail, the pagination and the checkbox already did.
|
|
39
|
+
A new gate (`check:durum-hover`) compares every hover rule against the selected-state rule it
|
|
40
|
+
could outrank, because this same mistake has now been found by eye three times.
|
|
41
|
+
|
|
42
|
+
- **Hover undid the checked state of a `Checkbox` and a `Radio`.** The ticked box is drawn as a key
|
|
43
|
+
that has been pressed home: it sits 2px down and loses its shadow. The hover rule, written to
|
|
44
|
+
invite a click, was more specific than that, so a box ticked under the pointer sprang back up and
|
|
45
|
+
only settled once the pointer left. Someone ticking a row saw nothing happen. The rail already
|
|
46
|
+
carried the same decision in writing, that a current row has no hover of its own; the checkbox
|
|
47
|
+
did not.
|
|
48
|
+
|
|
49
|
+
## 0.5.7
|
|
50
|
+
|
|
51
|
+
> A multi select can be used in Safari.
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- **`MultiSelect` stops growing at three rows.** The box held four chips before collapsing the rest
|
|
56
|
+
into `+N`, which was written to keep it under two rows, and with long labels four chips were
|
|
57
|
+
already three rows: the box grew and pushed the fields under it down the page. It now caps at
|
|
58
|
+
three rows and scrolls, and the magnifier moved out of the scrolling area so it stays put while
|
|
59
|
+
the chips move.
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
|
|
63
|
+
- **`MultiSelect` dropped every click in Safari.** The list closes when focus leaves the box, which
|
|
64
|
+
is right: a list that only watches for outside clicks never sees the person who left with the
|
|
65
|
+
keyboard. Safari, however, does not focus a button when you press it, so the input lost focus,
|
|
66
|
+
the list closed, and the option was removed from the page before its click could finish. Nothing
|
|
67
|
+
was selectable, and only in that browser. Pressing an option, or a chip's remove button, now
|
|
68
|
+
keeps the focus where it was.
|
|
69
|
+
|
|
8
70
|
## 0.5.6
|
|
9
71
|
|
|
10
72
|
> A calendar can be closed, a chosen file reaches the screen that asked for it, and the rail
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanced-input.d.ts","sourceRoot":"","sources":["../../src/components/advanced-input.tsx"],"names":[],"mappings":"AAgBA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,QAAQ,EACR,OAAe,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,GAAG;IAC/C,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzD;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,+BA+CA;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,MAAM,EACN,YAAgB,EAChB,SAAS,EACT,GAAG,IAAI,EACR,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACvF;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAA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M,CAAC;KACf,CAAC;IACF;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BA0DA"}
|
|
@@ -110,8 +110,9 @@ export function TagsInput({ value, onChange, placeholder, labels, max, className
|
|
|
110
110
|
*
|
|
111
111
|
* Gerekçe: docs/gerekce/01-form-ve-girdi.md
|
|
112
112
|
*/
|
|
113
|
-
/* Kutuda yazıyla duran çip sayısı. Dördüncüden sonrası "+N"
|
|
114
|
-
|
|
113
|
+
/* Kutuda yazıyla duran çip sayısı. Dördüncüden sonrası "+N". Tek başına
|
|
114
|
+
YETMİYOR: uzun etiketlerde dört çip de üç satırı aşıyor, o yüzden kutunun
|
|
115
|
+
ayrıca bir tavanı var (aşağıda) ve orada kayıyor. */
|
|
115
116
|
const GORUNEN_CIP = 4;
|
|
116
117
|
export function MultiSelect({ options, value, onChange, placeholder, labels, className, ...rest }) {
|
|
117
118
|
const id = useId();
|
|
@@ -166,13 +167,20 @@ export function MultiSelect({ options, value, onChange, placeholder, labels, cla
|
|
|
166
167
|
onBlur: (e) => {
|
|
167
168
|
if (!box.current?.contains(e.relatedTarget))
|
|
168
169
|
setOpen(false);
|
|
169
|
-
}, children: [_jsxs("span", { className: "tamga-input relative h-auto min-h-10 w-full flex-wrap items-center gap-1.5 py-1.5", "data-leading": "true", style: { display: "flex" }, children: [
|
|
170
|
+
}, children: [_jsx(Icon, { icon: Search, size: "xs", "aria-hidden": true, className: "pointer-events-none absolute left-3 top-3 z-10 text-ink-faint" }), _jsxs("span", { className: "tamga-input relative h-auto max-h-26 min-h-10 w-full flex-wrap items-center gap-1.5 overflow-y-auto py-1.5", "data-leading": "true", style: { display: "flex" }, children: [chosen.slice(0, GORUNEN_CIP).map((o) => (_jsxs("span", { className: "tamga-token", children: [o.label, _jsx("button", { type: "button", "aria-label": labels.remove(o.label),
|
|
171
|
+
/* Aynı sebep: çipi kaldırmak odağı girdiden almamalı. */
|
|
172
|
+
onMouseDown: (e) => e.preventDefault(), onClick: () => toggle(o.value), className: "tamga-token-x", children: _jsx(Icon, { icon: Close, size: "xs" }) })] }, o.value))), chosen.length > GORUNEN_CIP ? (_jsxs("span", { className: "tamga-token", "aria-hidden": true, children: ["+", chosen.length - GORUNEN_CIP] })) : null, _jsx("input", { value: query, placeholder: chosen.length === 0 ? placeholder : undefined, onChange: (e) => {
|
|
170
173
|
setQuery(e.target.value);
|
|
171
174
|
setActive(0);
|
|
172
175
|
setOpen(true);
|
|
173
176
|
}, onKeyDown: tus, onFocus: () => setOpen(true), role: "combobox", "aria-expanded": open, "aria-controls": id, "aria-label": labels.open, className: "min-w-24 flex-1 bg-transparent text-body text-ink outline-none" })] }), open ? (_jsx("div", { id: id, role: "listbox", "aria-multiselectable": true, className: "tamga-overlay tamga-menu absolute z-30 mt-2 max-h-64 w-full overflow-y-auto", children: shown.length === 0 ? (_jsx("p", { className: "px-4 py-3 text-small text-ink-faint", children: labels.empty })) : (shown.map(({ value: v, label: etiket, hint, ...rest }, i) => {
|
|
174
177
|
const on = value.includes(v);
|
|
175
|
-
return (_jsxs("button", { ...rest, type: "button", role: "option", "aria-selected": on, "data-selected": on, "data-active": i === active || undefined, className: "tamga-option w-full", onMouseEnter: () => setActive(i),
|
|
178
|
+
return (_jsxs("button", { ...rest, type: "button", role: "option", "aria-selected": on, "data-selected": on, "data-active": i === active || undefined, className: "tamga-option w-full", onMouseEnter: () => setActive(i),
|
|
179
|
+
/* ODAK GİRDİDE KALIYOR, ve Safari'de bu bir SÜS DEĞİL: Safari
|
|
180
|
+
tıklanan düğmeye odak vermiyor, yani girdi odağı kaybediyor,
|
|
181
|
+
aşağıdaki `onBlur` listeyi kapatıyor ve seçenek tıklama
|
|
182
|
+
gerçekleşmeden DOM'dan siliniyor · seçim hiç olmuyordu. */
|
|
183
|
+
onMouseDown: (e) => e.preventDefault(), onClick: () => toggle(v), children: [_jsx("span", { className: "flex-1 text-left", children: etiket }), hint ? _jsx("span", { className: "font-mono text-caption text-ink-faint", children: hint }) : null, on ? _jsx(Icon, { icon: Check, size: "xs" }) : null] }, v));
|
|
176
184
|
})) })) : null] }));
|
|
177
185
|
}
|
|
178
186
|
/**
|
package/dist/fonts.css
CHANGED
package/dist/kit.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tamga-ui 0.5.
|
|
1
|
+
/*! tamga-ui 0.5.8 · MIT · https://tamga.org.tr */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
--overlay-gap: 8px;
|
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
cursor: pointer;
|
|
388
388
|
height: 40px;
|
|
389
389
|
|
|
390
|
-
width:
|
|
390
|
+
width: 40px;
|
|
391
391
|
flex-shrink: 0;
|
|
392
392
|
align-items: center;
|
|
393
393
|
justify-content: center;
|
|
@@ -2120,7 +2120,7 @@
|
|
|
2120
2120
|
justify-content: center;
|
|
2121
2121
|
}
|
|
2122
2122
|
|
|
2123
|
-
.tamga-segment > button:not(:disabled):hover {
|
|
2123
|
+
.tamga-segment > button:not(:disabled):not([data-active="true"]):hover {
|
|
2124
2124
|
background: var(--color-nav-hover-bg);
|
|
2125
2125
|
color: var(--color-nav-hover);
|
|
2126
2126
|
}
|
|
@@ -2132,13 +2132,6 @@
|
|
|
2132
2132
|
box-shadow: 2px 2px 0 var(--color-edge);
|
|
2133
2133
|
transform: translate(-1px, -1px);
|
|
2134
2134
|
}
|
|
2135
|
-
.tamga-segment > button[data-active="true"]:hover {
|
|
2136
|
-
background: var(--color-shell);
|
|
2137
|
-
color: var(--color-ink);
|
|
2138
|
-
border-color: var(--color-edge);
|
|
2139
|
-
transform: translate(-1px, -1px);
|
|
2140
|
-
box-shadow: 3px 3px 0 var(--color-edge);
|
|
2141
|
-
}
|
|
2142
2135
|
|
|
2143
2136
|
.tamga-segment > button[data-active="true"]:active {
|
|
2144
2137
|
transform: translate(1px, 1px);
|
|
@@ -2377,7 +2370,7 @@
|
|
|
2377
2370
|
}
|
|
2378
2371
|
|
|
2379
2372
|
:where(button, label):hover
|
|
2380
|
-
:is(.tamga-check, .tamga-radio):not([data-off]):not(.tamga-check-sm) {
|
|
2373
|
+
:is(.tamga-check, .tamga-radio):not([data-off]):not(.tamga-check-sm):not([data-checked="true"]) {
|
|
2381
2374
|
border-color: var(--color-accent-line);
|
|
2382
2375
|
transform: translate(-1px, -1px);
|
|
2383
2376
|
box-shadow: 3px 3px 0 var(--color-accent-line);
|
|
@@ -26,7 +26,16 @@ export type ListTemplateProps = {
|
|
|
26
26
|
labels: {
|
|
27
27
|
loading: string;
|
|
28
28
|
} & ErrorLabels;
|
|
29
|
+
/**
|
|
30
|
+
* The strip at the foot of the list surface: the pagination, a total, a bulk action. It sits
|
|
31
|
+
* INSIDE the card, divided by a line and given its own padding, because the rows are flush with
|
|
32
|
+
* the card's edge and anything following them lands on that edge.
|
|
33
|
+
* TR: Liste yüzeyinin dibindeki şerit: sayfalama, bir toplam, toplu bir eylem. Kartın İÇİNDE,
|
|
34
|
+
* bir çizgiyle ayrılmış ve kendi dolgusuyla duruyor · satırlar kartın kenarına dayalı olduğu
|
|
35
|
+
* için ardından gelen her şey o kenara yapışıyor.
|
|
36
|
+
*/
|
|
37
|
+
footer?: ReactNode;
|
|
29
38
|
children?: ReactNode;
|
|
30
39
|
};
|
|
31
|
-
export declare function ListTemplate({ title, subtitle, actions, filters, state, loadingRows, loadingColumns, empty, error, labels, children, }: ListTemplateProps): import("react").JSX.Element;
|
|
40
|
+
export declare function ListTemplate({ title, subtitle, actions, filters, state, loadingRows, loadingColumns, empty, error, labels, footer, children, }: ListTemplateProps): import("react").JSX.Element;
|
|
32
41
|
//# sourceMappingURL=list-template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-template.d.ts","sourceRoot":"","sources":["../../src/patterns/list-template.tsx"],"names":[],"m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,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;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,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,MAAM,EACN,QAAQ,GACT,EAAE,iBAAiB,+BA6CnB"}
|
|
@@ -3,6 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { PageBand } from "../components/layout.js";
|
|
4
4
|
import { SkeletonTable } from "../components/skeleton.js";
|
|
5
5
|
import { Busy, ErrorSlot } from "./shared.js";
|
|
6
|
-
export function ListTemplate({ title, subtitle, actions, filters, state = "ready", loadingRows = 25, loadingColumns, empty, error, labels, children, }) {
|
|
7
|
-
return (_jsxs("div", { className: "flex min-h-0 flex-col", "data-list-state": state, children: [_jsx("div", { className: "tamga-gutter py-4", children: _jsx(PageBand, { title: title, subtitle: subtitle, actions: actions }) }), filters ? (_jsx("div", { className: "tamga-
|
|
6
|
+
export function ListTemplate({ title, subtitle, actions, filters, state = "ready", loadingRows = 25, loadingColumns, empty, error, labels, footer, children, }) {
|
|
7
|
+
return (_jsxs("div", { className: "flex min-h-0 flex-col", "data-list-state": state, children: [_jsx("div", { className: "tamga-gutter py-4", children: _jsx(PageBand, { title: title, subtitle: subtitle, actions: actions }) }), filters ? (_jsx("div", { className: "tamga-gutter pb-4", children: _jsx("div", { className: "tamga-card tamga-card-open flex flex-wrap items-center gap-2 p-4", "data-filters": true, children: filters }) })) : null, _jsx("div", { className: "tamga-gutter min-h-0 flex-1 pb-6", children: _jsxs("div", { className: "tamga-card tamga-card-open", children: [state === "loading" ? (_jsx(Busy, { label: labels.loading, children: _jsx(SkeletonTable, { rows: loadingRows, ...(loadingColumns ? { cols: loadingColumns } : {}) }) })) : null, state === "error" ? _jsx(ErrorSlot, { error: error, labels: labels }) : null, state === "empty" ? empty : null, state === "ready" ? children : null, footer && state === "ready" ? (_jsx("div", { className: "border-t border-line px-4 py-3", children: footer })) : null] }) })] }));
|
|
8
8
|
}
|
package/dist/styles.css
CHANGED
package/dist/theme.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamga-ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "Mant\u0131ksal's shared interface library: tokens, physics and components.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"build": "node build.mjs && tsc",
|
|
50
50
|
"dev": "node watch.mjs",
|
|
51
51
|
"prepare": "node build.mjs && tsc",
|
|
52
|
+
"prepublishOnly": "pnpm -w run verify",
|
|
52
53
|
"typecheck": "tsc --noEmit",
|
|
53
54
|
"test": "vitest run"
|
|
54
55
|
},
|