tamga-ui 0.5.7 → 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 CHANGED
@@ -5,6 +5,47 @@ 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
+
8
49
  ## 0.5.7
9
50
 
10
51
  > A multi select can be used in Safari.
package/dist/fonts.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! tamga-ui 0.5.7 · MIT · https://tamga.org.tr */
1
+ /*! tamga-ui 0.5.8 · 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.5.7 · MIT · https://tamga.org.tr */
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: 52px;
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":[],"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,GA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E,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-section tamga-gutter flex flex-wrap items-center gap-2 py-3", "data-filters": true, children: filters })) : null, _jsxs("div", { className: "tamga-gutter min-h-0 flex-1 py-6", 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] })] }));
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
@@ -1,4 +1,4 @@
1
- /*! tamga-ui 0.5.7 · MIT · https://tamga.org.tr */
1
+ /*! tamga-ui 0.5.8 · 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.5.7 · MIT · https://tamga.org.tr */
1
+ /*! tamga-ui 0.5.8 · MIT · https://tamga.org.tr */
2
2
  @custom-variant dark (&:is(.dark *));
3
3
 
4
4
  @theme static {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamga-ui",
3
- "version": "0.5.7",
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",