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
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Versions follow [semver](https://semver.org/). Through `0.x`, breaking changes may land in a
|
|
4
|
+
**minor** release; each one is listed below under "Breaking", together with how to move across it.
|
|
5
|
+
|
|
6
|
+
> 🇹🇷 Türkçe için [tamga.org.tr/tr](https://tamga.org.tr/tr).
|
|
7
|
+
|
|
8
|
+
## 0.2.1
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`AppearanceTemplate`** (`tamga-ui/patterns`) — the whole appearance screen: logo, mark, brand
|
|
13
|
+
colour, theme and sidebar width. This screen had been built twice, by hand, in two products, and
|
|
14
|
+
the second one came out bare: a hex field instead of swatches, three words instead of three
|
|
15
|
+
pictures, no logo area at all. Handing over the parts and saying "arrange them yourself" is what
|
|
16
|
+
let them drift; that is the job the pattern layer exists for (ADR-0004).
|
|
17
|
+
|
|
18
|
+
It stores NOTHING and applies NOTHING. `value` in, `onChange` and `onSave` out, every word from
|
|
19
|
+
`labels`. Where the preference lives (session, account, browser) is a product decision, and
|
|
20
|
+
turning the chosen colour into tokens stays the product's call too, because the root element is
|
|
21
|
+
its own.
|
|
22
|
+
|
|
23
|
+
- **`ColorSwatches`, `ThemeCards`, `ImageField`** — the parts, for a screen that needs a different
|
|
24
|
+
arrangement. `ThemeCards` draws a miniature of each option rather than naming it; a theme is not
|
|
25
|
+
chosen by a word, it is chosen by seeing the result.
|
|
26
|
+
- **`SquarePicker`** — dragging a square over an uploaded logo to cut a mark out of it. A mark
|
|
27
|
+
cannot be derived automatically, and this is the honest alternative: the human says where it is.
|
|
28
|
+
- **`prepareImage` and `cropSquare`** (`tamga-ui`) — resize and square-crop an uploaded file, with
|
|
29
|
+
no library: a `<canvas>`. The ratio is kept and nothing is cropped silently; SVG passes through
|
|
30
|
+
untouched, because baking a vector into a 512px PNG stops it being sharp.
|
|
31
|
+
- **`SettingsPanel.accent`** — a coloured left edge on a section block.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **Completed steps were darker than everything else on the screen.** `StepStrip` filled them with
|
|
36
|
+
`--color-accent-line`, which is the accent's TEXT variant: it is derived by SEARCHING for 4.5
|
|
37
|
+
contrast against the page, so it is always darker than the face. Every button and badge on the
|
|
38
|
+
same screen used `--color-accent`, and the gap widened with each new brand colour. The ink on top
|
|
39
|
+
was measured against `accent`, never against `accent-line`, so that pairing was never checked at
|
|
40
|
+
all. Filled accent objects now follow the button's contract everywhere: `accent` for the fill,
|
|
41
|
+
`accent-shadow` for the edge, `accent-ink` for the ink.
|
|
42
|
+
|
|
43
|
+
Nothing errored here: the colours were valid and the contrast gates passed. `check-css` now
|
|
44
|
+
refuses `--color-accent-line` as a fill, so this class of mistake cannot pass silently again.
|
|
45
|
+
|
|
46
|
+
## 0.2.0
|
|
47
|
+
|
|
48
|
+
Most of this release came out of gaps found by two people using the kit **from the outside**:
|
|
49
|
+
one rewriting a photo application on top of it, another building an e-commerce panel from scratch.
|
|
50
|
+
|
|
51
|
+
### Breaking
|
|
52
|
+
|
|
53
|
+
- **`ErrorSlot` and `Busy` are no longer exported from `tamga-ui/patterns`.** They were the
|
|
54
|
+
templates' internal machinery; templates already draw their own error and loading states, and
|
|
55
|
+
offering these separately was an invitation to draw the same state two different ways.
|
|
56
|
+
**Migration:** if you want that treatment, use the template (`ListTemplate`, `DetailTemplate`,
|
|
57
|
+
`WizardTemplate`); all three draw the same slot from their `state` and `error` props.
|
|
58
|
+
|
|
59
|
+
- **`Kpi.accent` and `Kpi.attention` were removed.** Both let the tile change itself per screen:
|
|
60
|
+
`accent` drew the data's own colour down the left edge, `attention` painted the number in the
|
|
61
|
+
critical colour. Their only consumer rejected both — the colour was already on the badge in the
|
|
62
|
+
list, and with three of five tiles red none of them led. The tile now looks the same on every
|
|
63
|
+
screen.
|
|
64
|
+
**Migration:** to say a number is bad, use `delta` (a change with a direction and a meaning) or
|
|
65
|
+
the screen the tile opens.
|
|
66
|
+
|
|
67
|
+
### Renamed (the old names still work for one more version)
|
|
68
|
+
|
|
69
|
+
The names in `tamga-ui/palette` and the colour helpers were in Turkish; ADR-0001 says names are
|
|
70
|
+
English, and we wrote that rule. The old names remain as `@deprecated` aliases and **will be
|
|
71
|
+
removed in 0.3.0**.
|
|
72
|
+
|
|
73
|
+
| old | new |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| `gecerliHex` | `isHex` |
|
|
76
|
+
| `hexRgb` · `rgbHex` | `hexToRgb` · `rgbToHex` |
|
|
77
|
+
| `parlaklik` · `oran` · `acikligi` · `dL` | `luminance` · `contrast` · `lightness` · `deltaL` |
|
|
78
|
+
| `hexOklch` · `oklchHex` | `hexToOklch` · `oklchToHex` |
|
|
79
|
+
| `oranaGoreAcikligi` | `lightnessForContrast` |
|
|
80
|
+
| `paletUret` · `paletiOlc` | `makePalette` · `measurePalette` |
|
|
81
|
+
| `paletStili` · `paletCss` | `paletteVars` · `paletteCss` |
|
|
82
|
+
| `Palet` · `PaletCifti` · `Olcum` | `Palette` · `PalettePair` · `Measurement` |
|
|
83
|
+
| `{ ad, tur, deger, esik, gecti }` | `{ name, kind, value, threshold, passed }` |
|
|
84
|
+
|
|
85
|
+
### Added
|
|
86
|
+
|
|
87
|
+
- **`AppShell.rail`** — `narrow` (default) or `wide`. The rail could only ever be narrow before,
|
|
88
|
+
and whoever installed the kit had no way to discover otherwise. On a narrow rail the labels now
|
|
89
|
+
appear in the kit's own `Tooltip` rather than the browser's delayed `title` bubble.
|
|
90
|
+
- **`AppShell.railFooter`** — a control at the foot of the rail, an expand/collapse button say.
|
|
91
|
+
- **`AccountButton`** — the account control at the right end of the top bar. It fits the avatar to
|
|
92
|
+
`--control` (40px), exactly the height of the theme toggle. Two panels had built this by hand.
|
|
93
|
+
- **`Sheet.side`** — `end` (default) for detail, `start` for navigation. The panel slides in from
|
|
94
|
+
the edge it belongs to; with `prefers-reduced-motion` the slide is dropped.
|
|
95
|
+
- **`ThemeToggle variant="select"`** — for when its neighbour is a select box. This variant takes
|
|
96
|
+
STATE words as `labels` (`{ light, dark }`), not action words, and the type enforces it.
|
|
97
|
+
- **`aria-label` on `Select`** — a select standing alone in a toolbar was announced as just
|
|
98
|
+
"button".
|
|
99
|
+
- **`Kpi`** can now be pressed (`href` makes it a link, `onClick`/`pressed` a filter button) and
|
|
100
|
+
takes an icon; **`KpiGrid`** derives its column count from how many children it has.
|
|
101
|
+
- **`paletteVars`** — turns a palette into a map of CSS variables, for applying it to a single box
|
|
102
|
+
or to the root at runtime.
|
|
103
|
+
|
|
104
|
+
### Fixed
|
|
105
|
+
|
|
106
|
+
- The open section in a `SettingsTemplate` menu was never painted: the template writes
|
|
107
|
+
`data-active` while the CSS only had a rule for `data-selected`.
|
|
108
|
+
- `WizardTemplate` drew its own step strip while the `Steps` component drew the same idea
|
|
109
|
+
differently. The strip now lives in one place.
|
|
110
|
+
- `WizardTemplate`'s footer is sticky: on a long step form "Next" slid off the bottom of the
|
|
111
|
+
screen.
|
|
112
|
+
- `.tamga-link` now carries `cursor: pointer`. An `<a>` without `href`, or a `<span>` styled as a
|
|
113
|
+
link, was leaving the cursor at `auto`.
|
|
114
|
+
|
|
115
|
+
### Docs
|
|
116
|
+
|
|
117
|
+
- **The nine patterns and fourteen blocks now have prop tables.** The extractor only looked at
|
|
118
|
+
`components/`, so the kit's highest-level API was invisible on the docs site. 103 → 117
|
|
119
|
+
components, 439 → 612 props.
|
|
120
|
+
- The README said the package was not published yet. Installing is one line: `npm install tamga-ui`.
|
|
121
|
+
|
|
122
|
+
## 0.1.1
|
|
123
|
+
|
|
124
|
+
- The package homepage points at `tamga.org.tr`.
|
|
125
|
+
|
|
126
|
+
## 0.1.0
|
|
127
|
+
|
|
128
|
+
First release.
|
package/README.md
CHANGED
|
@@ -1,54 +1,47 @@
|
|
|
1
1
|
# tamga-ui
|
|
2
2
|
|
|
3
|
-
Mantıksal'
|
|
3
|
+
Mantıksal's shared interface library: tokens, physics and components.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
> 🇹🇷 **Türkçe:** the documentation is bilingual and lives at
|
|
6
|
+
> **[tamga.org.tr/tr](https://tamga.org.tr/tr)**. This file is in English because it is the first
|
|
7
|
+
> page an installer sees on npm, and npm is read from everywhere.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- **Bloklar** `tamga-ui/blocks` — bir bileşenden büyük, bir ekrandan küçük
|
|
11
|
-
- **Şablonlar** `tamga-ui/patterns` — ekranların şekli (liste, detay, ayar, oturum, kabuk)
|
|
9
|
+
Not a framework but a **library**: you build the screens, the kit hands you the parts. The kit
|
|
10
|
+
knows no product's name, vocabulary or identity.
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
- **Components** `tamga-ui`
|
|
13
|
+
- **Icons** `tamga-ui/icons`
|
|
14
|
+
- **Blocks** `tamga-ui/blocks` — larger than a component, smaller than a screen
|
|
15
|
+
- **Patterns** `tamga-ui/patterns` — the shape of a screen (list, detail, settings, auth, shell)
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## Kurulum
|
|
17
|
+
Docs: **[tamga.org.tr](https://tamga.org.tr)** · Changelog: [CHANGELOG.md](./CHANGELOG.md)
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Paket yayınlanmadı. Bugün üç yol var, üçü de çalışıyor:
|
|
19
|
+
---
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
## Install
|
|
24
22
|
|
|
25
23
|
```bash
|
|
26
|
-
|
|
27
|
-
pnpm --filter tamga-ui pack # tamga-ui-0.1.0.tgz üretir
|
|
24
|
+
npm install tamga-ui
|
|
28
25
|
```
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
> **If a machine is reading this:** the package page (`npmjs.com/...`) returns **403** to
|
|
28
|
+
> non-browser requests. That is npm's bot protection, nothing to do with this package. For
|
|
29
|
+
> versions and metadata use the registry: `https://registry.npmjs.org/tamga-ui` (200, plain JSON).
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
npm install ../tamga/packages/ui/tamga-ui-0.1.0.tgz
|
|
34
|
-
```
|
|
31
|
+
### Local development
|
|
35
32
|
|
|
36
|
-
|
|
33
|
+
To link the kit into a consuming project without publishing, while changing the kit itself:
|
|
37
34
|
|
|
38
35
|
```bash
|
|
39
36
|
npm install file:../tamga/packages/ui
|
|
40
37
|
```
|
|
41
38
|
|
|
42
|
-
> **
|
|
43
|
-
>
|
|
44
|
-
>
|
|
45
|
-
|
|
46
|
-
**3 · Git.** npm bir monorepo'nun alt klasörünü doğrudan kuramıyor, o yüzden depoyu klonlayıp
|
|
47
|
-
1 ya da 2'yi kullan.
|
|
48
|
-
|
|
49
|
-
Üçünde de `prepare` betiği `dist/`i kurulum anında üretiyor; ayrıca bir build adımı gerekmiyor.
|
|
39
|
+
> **Careful:** `file:` creates a SYMLINK, and Tailwind v4 does not follow `@source` scanning past
|
|
40
|
+
> a symlink. The result is sneaky: types resolve, imports work, but utility classes are never
|
|
41
|
+
> generated and components come out half-naked. Use this only while developing the kit; a real
|
|
42
|
+
> install is the one line above.
|
|
50
43
|
|
|
51
|
-
###
|
|
44
|
+
### Requirements
|
|
52
45
|
|
|
53
46
|
| | |
|
|
54
47
|
| --- | --- |
|
|
@@ -56,8 +49,8 @@ npm install file:../tamga/packages/ui
|
|
|
56
49
|
| Tailwind | **v4** |
|
|
57
50
|
| Node | 20+ |
|
|
58
51
|
|
|
59
|
-
Tailwind v4
|
|
60
|
-
build
|
|
52
|
+
Tailwind v4 is not a preference but a requirement: components use utility classes and **your**
|
|
53
|
+
build is what generates them.
|
|
61
54
|
|
|
62
55
|
### CSS
|
|
63
56
|
|
|
@@ -68,105 +61,104 @@ build'in üretiyor.
|
|
|
68
61
|
@source "../../node_modules/tamga-ui/dist";
|
|
69
62
|
```
|
|
70
63
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
`../`
|
|
64
|
+
**Do not skip the `@source` line.** Without it Tailwind never scans the classes inside the kit's
|
|
65
|
+
`dist/`, never generates them, and components render **unstyled**. The path is relative to your
|
|
66
|
+
own CSS file, so the number of `../` depends on how deep that file sits.
|
|
74
67
|
|
|
75
|
-
###
|
|
68
|
+
### Usage
|
|
76
69
|
|
|
77
70
|
```tsx
|
|
78
|
-
import { Button,
|
|
71
|
+
import { Button, Icon } from "tamga-ui";
|
|
79
72
|
import { Plus } from "tamga-ui/icons";
|
|
80
73
|
|
|
81
74
|
<Button variant="primary">
|
|
82
75
|
<Icon icon={Plus} size="xs" />
|
|
83
|
-
|
|
76
|
+
New record
|
|
84
77
|
</Button>;
|
|
85
78
|
```
|
|
86
79
|
|
|
87
80
|
---
|
|
88
81
|
|
|
89
|
-
##
|
|
82
|
+
## The setup survey
|
|
90
83
|
|
|
91
|
-
**
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
**This section is for the person or agent installing the kit.** Once installed the project runs,
|
|
85
|
+
but it has NO IDENTITY: a blue accent, a tile with an initial on it, a nameless user. Setup is
|
|
86
|
+
not finished until these seven questions have answers.
|
|
94
87
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
88
|
+
The last column is the important one: **an answer is never only compiled in, it also goes into a
|
|
89
|
+
settings screen.** Everything asked at setup has to still be changeable in the project's third
|
|
90
|
+
month; otherwise, when the customer wants a different colour, the only route left is a developer
|
|
91
|
+
editing a file and shipping a release.
|
|
99
92
|
|
|
100
|
-
| # |
|
|
93
|
+
| # | Ask for | Where it goes | In settings |
|
|
101
94
|
| --- | --- | --- | --- |
|
|
102
|
-
| 1 |
|
|
103
|
-
| 2 | **
|
|
104
|
-
| 3 | Logo (
|
|
105
|
-
| 4 |
|
|
106
|
-
| 5 |
|
|
107
|
-
| 6 |
|
|
108
|
-
| 7 |
|
|
109
|
-
|
|
110
|
-
**2, 3
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
`LogoTile`
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
95
|
+
| 1 | The product's name | Shell, tab title, auth screen | no, it is the product's identity |
|
|
96
|
+
| 2 | **Brand colour (one hex)** | `makePalette()` → tokens (below) | **yes** |
|
|
97
|
+
| 3 | Logo (wide, horizontal) | Auth screen, wide sidebar | **yes** |
|
|
98
|
+
| 4 | Mark (square) | Narrow sidebar, tab icon | **yes** |
|
|
99
|
+
| 5 | Default theme | `light` · `dark` · `system` | **yes** |
|
|
100
|
+
| 6 | Sidebar behaviour | `always narrow` · `always wide` · `user chooses` | **yes** |
|
|
101
|
+
| 7 | Interface language(s) | Every `labels` prop | depends |
|
|
102
|
+
|
|
103
|
+
**2, 3 and 4 are asked separately.** A mark CANNOT be extracted from an uploaded logo: nothing in
|
|
104
|
+
an image file is marked as "the mark", its position is not fixed (left, on top, inside the
|
|
105
|
+
wordmark, or absent altogether), and a wrong crop fails silently. Half a letter then sits in the
|
|
106
|
+
top left of every page and nobody knows it was cropped automatically. Either ask for the mark as
|
|
107
|
+
its own file, let the user drag a square over the logo, or do not ask at all: with no mark,
|
|
108
|
+
`LogoTile` draws a tile from the initial, and that is a working answer.
|
|
109
|
+
|
|
110
|
+
The screen for all this is built with `SettingsTemplate`; the walkthrough is at
|
|
111
|
+
[/docs/new-panel](https://tamga.org.tr/en/docs/new-panel).
|
|
119
112
|
|
|
120
113
|
---
|
|
121
114
|
|
|
122
|
-
##
|
|
115
|
+
## Changing the colours
|
|
123
116
|
|
|
124
|
-
|
|
117
|
+
No component anywhere carries a fixed colour; every one of them reads tokens.
|
|
125
118
|
|
|
126
|
-
###
|
|
119
|
+
### A whole palette from one hex
|
|
127
120
|
|
|
128
|
-
`tamga-ui/palette`
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
121
|
+
`tamga-ui/palette` derives both themes from a single brand colour. Safer than writing three
|
|
122
|
+
tokens by hand, because the generator SEARCHES for contrast: it nudges the face's lightness step
|
|
123
|
+
by step until the ink on top clears the AA threshold. Forty hues across two themes, 880
|
|
124
|
+
measurements that a gate keeps re-running.
|
|
132
125
|
|
|
133
126
|
```ts
|
|
134
|
-
import {
|
|
127
|
+
import { makePalette, paletteCss } from "tamga-ui/palette";
|
|
135
128
|
|
|
136
|
-
const
|
|
137
|
-
document.documentElement.setAttribute("style",
|
|
129
|
+
const pair = makePalette("#e02938"); // { light, dark }
|
|
130
|
+
document.documentElement.setAttribute("style", paletteCss(pair));
|
|
138
131
|
```
|
|
139
132
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
133
|
+
This is the route whenever the colour can change at runtime (a settings screen): the tokens are
|
|
134
|
+
written onto the root element and, because the kit's 87 classes read them, the whole panel turns
|
|
135
|
+
in one line with no CSS recompiled.
|
|
143
136
|
|
|
144
|
-
###
|
|
137
|
+
### Or by hand
|
|
145
138
|
|
|
146
|
-
|
|
147
|
-
kılabilirsin:
|
|
139
|
+
Where the colour is fixed and known at build time, override the tokens directly:
|
|
148
140
|
|
|
149
141
|
```css
|
|
150
142
|
@import "tamga-ui/styles.css";
|
|
151
143
|
|
|
152
144
|
:root {
|
|
153
|
-
--color-accent: #2069c9; /*
|
|
154
|
-
--color-accent-shadow: #12245c; /*
|
|
155
|
-
--color-accent-ink: #fdfcfa; /*
|
|
145
|
+
--color-accent: #2069c9; /* the primary face */
|
|
146
|
+
--color-accent-shadow: #12245c; /* the base under the face */
|
|
147
|
+
--color-accent-ink: #fdfcfa; /* the ink on top of the face */
|
|
156
148
|
}
|
|
157
149
|
```
|
|
158
150
|
|
|
159
|
-
|
|
151
|
+
On this route you verify the contrast yourself: no generator, no gate.
|
|
160
152
|
|
|
161
|
-
|
|
162
|
-
`var(--color-critical)
|
|
163
|
-
|
|
153
|
+
Which is also why **you should not hardcode colours in your own components**. Write `text-ink`,
|
|
154
|
+
`bg-shell`, `var(--color-critical)`. When the palette changes your screens turn with it; every
|
|
155
|
+
hardcoded colour has to be hunted down by hand.
|
|
164
156
|
|
|
165
|
-
|
|
166
|
-
`/docs/
|
|
157
|
+
The full token list is on the docs site (`/docs/tokens`), and the steps for changing a theme are
|
|
158
|
+
on `/docs/theme`.
|
|
167
159
|
|
|
168
160
|
---
|
|
169
161
|
|
|
170
|
-
##
|
|
162
|
+
## Licence
|
|
171
163
|
|
|
172
164
|
MIT — [LICENSE](./LICENSE)
|
|
@@ -12,14 +12,14 @@ import type { ReactNode } from "react";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare function CountRow({ count, unit, aside, pageSize, pageSizeOptions, onPageSize, labels, }: {
|
|
14
14
|
count: number;
|
|
15
|
-
/** "sipariş", "müşteri": sayının yanında ne yazacağı. */
|
|
15
|
+
/** "orders", "customers": what stands beside the number. TR: "sipariş", "müşteri": sayının yanında ne yazacağı. */
|
|
16
16
|
unit: string;
|
|
17
|
-
/** Ekrana özel ikinci okuma. */
|
|
17
|
+
/** A second reading, specific to the screen. TR: Ekrana özel ikinci okuma. */
|
|
18
18
|
aside?: ReactNode;
|
|
19
19
|
pageSize?: number;
|
|
20
20
|
pageSizeOptions?: number[];
|
|
21
21
|
onPageSize?: (n: number) => void;
|
|
22
|
-
/** Sayının biçimi çağıranın: binlik ayıracı dile bağlı. */
|
|
22
|
+
/** The number's format belongs to the caller: the thousands separator depends on the language. TR: Sayının biçimi çağıranın: binlik ayıracı dile bağlı. */
|
|
23
23
|
labels?: {
|
|
24
24
|
format?: (n: number) => string;
|
|
25
25
|
perPage?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"count-row.d.ts","sourceRoot":"","sources":["../../src/blocks/count-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,eAAe,EACf,UAAU,EACV,MAAM,GACP,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"count-row.d.ts","sourceRoot":"","sources":["../../src/blocks/count-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,eAAe,EACf,UAAU,EACV,MAAM,GACP,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,mHAAmH;IACnH,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,2JAA2J;IAC3J,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACjF,+BA0BA"}
|
|
@@ -46,7 +46,7 @@ export type FilterField = {
|
|
|
46
46
|
key: string;
|
|
47
47
|
label: string;
|
|
48
48
|
kind: FilterFieldKind;
|
|
49
|
-
/** Verilmezse `optionSource[key]` kullanılır; ikisi de yoksa liste boş. */
|
|
49
|
+
/** Falls back to `optionSource[key]`; with neither, the list is empty. TR: Verilmezse `optionSource[key]` kullanılır; ikisi de yoksa liste boş. */
|
|
50
50
|
options?: string[];
|
|
51
51
|
};
|
|
52
52
|
export type FilterGroup = {
|
|
@@ -56,10 +56,10 @@ export type FilterGroup = {
|
|
|
56
56
|
export declare const rangeStart: (key: string) => string;
|
|
57
57
|
export declare const rangeEnd: (key: string) => string;
|
|
58
58
|
export type FilterBarLabels = {
|
|
59
|
-
/** Arama kutusunun yer tutucusu. */
|
|
59
|
+
/** The search box's placeholder. TR: Arama kutusunun yer tutucusu. */
|
|
60
60
|
search: string;
|
|
61
61
|
/**
|
|
62
|
-
* "Hepsi" seçeneğinin adı, ve LİSTENİN İÇİNDE bir seçenek olarak duruyor.
|
|
62
|
+
* The name of the "All" option, and it sits INSIDE the list as an option. TR: "Hepsi" seçeneğinin adı, ve LİSTENİN İÇİNDE bir seçenek olarak duruyor.
|
|
63
63
|
*
|
|
64
64
|
* Kullanıcı bir değer seçtikten sonra tekrar hepsini görmek istediğinde,
|
|
65
65
|
* geri dönüş yolunun GİDİŞ YOLUYLA AYNI YERDE olması gerekiyor. Kontrolün
|
|
@@ -72,9 +72,9 @@ export type FilterBarLabels = {
|
|
|
72
72
|
clear: string;
|
|
73
73
|
apply: string;
|
|
74
74
|
noMatch: string;
|
|
75
|
-
/** "<alan> seç" gibi; kontrolü açan düğmenin erişilebilir adı. */
|
|
75
|
+
/** Like "Choose <field>"; the accessible name of the button that opens the control. TR: "<alan> seç" gibi; kontrolü açan düğmenin erişilebilir adı. */
|
|
76
76
|
open: (label: string) => string;
|
|
77
|
-
/** "<filtre> filtresini kaldır". */
|
|
77
|
+
/** Like "Remove the <filter> filter". TR: "<filtre> filtresini kaldır". */
|
|
78
78
|
remove: (label: string) => string;
|
|
79
79
|
rangeStart: string;
|
|
80
80
|
rangeEnd: string;
|
|
@@ -84,7 +84,7 @@ export type FilterBarLabels = {
|
|
|
84
84
|
open: string;
|
|
85
85
|
clear: string;
|
|
86
86
|
};
|
|
87
|
-
/** Dosyayla arama bölümü; `fileSearchKey` verilmezse hiç çizilmiyor. */
|
|
87
|
+
/** The search-by-file section; with no `fileSearchKey` it is not drawn at all. TR: Dosyayla arama bölümü; `fileSearchKey` verilmezse hiç çizilmiyor. */
|
|
88
88
|
fileSearch?: {
|
|
89
89
|
title: string;
|
|
90
90
|
help: ReactNode;
|
|
@@ -96,14 +96,14 @@ export type FilterBarLabels = {
|
|
|
96
96
|
export type FilterBarProps = {
|
|
97
97
|
values: FilterValues;
|
|
98
98
|
onChange: (next: FilterValues) => void;
|
|
99
|
-
/** Üstte duran alanlar. En çok dört tane; gerisi çekmeceye. */
|
|
99
|
+
/** The fields that stay on top. Four at most; the rest go to the drawer. TR: Üstte duran alanlar. En çok dört tane; gerisi çekmeceye. */
|
|
100
100
|
top: readonly FilterField[];
|
|
101
|
-
/** Çekmecedeki gruplar. Düz bir yığın değil, gruplu. */
|
|
101
|
+
/** The groups inside the drawer. Grouped, not a flat pile. TR: Çekmecedeki gruplar. Düz bir yığın değil, gruplu. */
|
|
102
102
|
drawer: readonly FilterGroup[];
|
|
103
|
-
/** Seçim listelerinin kaynağı; sunucudan gelecek. */
|
|
103
|
+
/** Where the option lists come from; this will arrive from the server. TR: Seçim listelerinin kaynağı; sunucudan gelecek. */
|
|
104
104
|
optionSource?: Record<string, string[]>;
|
|
105
105
|
/**
|
|
106
|
-
* ARAMA KUTUSUNUN YAZDIĞI ANAHTAR.
|
|
106
|
+
* THE KEY THE SEARCH BOX WRITES TO. TR: ARAMA KUTUSUNUN YAZDIĞI ANAHTAR.
|
|
107
107
|
*
|
|
108
108
|
* Prop, çünkü sunucunun beklediği ad ürünün kararı: kimi `q` diyor, kimi
|
|
109
109
|
* `ara`, kimi `search`. Blok bir süre `q`yu sabitledi ve ilk tüketicide
|
|
@@ -111,11 +111,11 @@ export type FilterBarProps = {
|
|
|
111
111
|
* ve arama hiçbir şey yapmıyordu. Hata vermeyen bir kırılma en pahalısı.
|
|
112
112
|
*/
|
|
113
113
|
searchKey?: string;
|
|
114
|
-
/** Dosyayla arama bu ekranda varsa anahtarı; yoksa bölüm hiç çizilmiyor. */
|
|
114
|
+
/** The key for search-by-file if this screen has it; without it the section is not drawn. TR: Dosyayla arama bu ekranda varsa anahtarı; yoksa bölüm hiç çizilmiyor. */
|
|
115
115
|
fileSearchKey?: string;
|
|
116
|
-
/** Filtre satırına, "Tüm filtreler"in yanına giren ekrana özel düğme. */
|
|
116
|
+
/** A screen-specific button on the filter row, beside "All filters". TR: Filtre satırına, "Tüm filtreler"in yanına giren ekrana özel düğme. */
|
|
117
117
|
extra?: ReactNode;
|
|
118
|
-
/** `DatePicker`ın takvimi için: "tr-TR", "en-GB". */
|
|
118
|
+
/** For `DatePicker`'s calendar: "tr-TR", "en-GB". TR: `DatePicker`ın takvimi için: "tr-TR", "en-GB". */
|
|
119
119
|
locale?: string;
|
|
120
120
|
labels: FilterBarLabels;
|
|
121
121
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-bar.d.ts","sourceRoot":"","sources":["../../src/blocks/filter-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAWxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAElD,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,eAAe,CAAC;CACzB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,QAAQ,EACR,GAAG,EACH,MAAM,EACN,YAAiB,EACjB,SAAe,EACf,aAAa,EACb,KAAK,EACL,MAAgB,EAChB,MAAM,GACP,EAAE,cAAc,+BA8MhB"}
|
|
@@ -15,12 +15,12 @@ import type { ReactNode } from "react";
|
|
|
15
15
|
* hiçbir şey olmayan bir düğme, olmayan bir düğmeden kötüdür.
|
|
16
16
|
*/
|
|
17
17
|
export declare function SaveBar({ changed, busy, onCancel, extra, labels, }: {
|
|
18
|
-
/** Değişiklik yoksa kaydet kapalı. */
|
|
18
|
+
/** With no change, save is disabled. TR: Değişiklik yoksa kaydet kapalı. */
|
|
19
19
|
changed?: boolean;
|
|
20
|
-
/** Kaydetme sürüyor: iki düğme de kilitli, kaydet spinner gösteriyor. */
|
|
20
|
+
/** Saving is in progress: both buttons are locked and save shows a spinner. TR: Kaydetme sürüyor: iki düğme de kilitli, kaydet spinner gösteriyor. */
|
|
21
21
|
busy?: boolean;
|
|
22
22
|
onCancel?: () => void;
|
|
23
|
-
/** Şeridin sağında duran ekrana özel şey: bir sayaç, bir uyarı satırı. */
|
|
23
|
+
/** Whatever the screen puts on the right of the bar: a counter, a warning line. TR: Şeridin sağında duran ekrana özel şey: bir sayaç, bir uyarı satırı. */
|
|
24
24
|
extra?: ReactNode;
|
|
25
25
|
labels: {
|
|
26
26
|
save: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-bar.d.ts","sourceRoot":"","sources":["../../src/blocks/save-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CAAC,EACtB,OAAc,EACd,IAAY,EACZ,QAAQ,EACR,KAAK,EACL,MAAM,GACP,EAAE;IACD,
|
|
1
|
+
{"version":3,"file":"save-bar.d.ts","sourceRoot":"","sources":["../../src/blocks/save-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CAAC,EACtB,OAAc,EACd,IAAY,EACZ,QAAQ,EACR,KAAK,EACL,MAAM,GACP,EAAE;IACD,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sJAAsJ;IACtJ,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,2JAA2J;IAC3J,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3D,+BAkBA"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type SwatchOption = {
|
|
3
|
+
/** The hex the swatch applies. TR: Kutunun uyguladığı hex. */
|
|
4
|
+
hex: string;
|
|
5
|
+
/** Its name, translated, used as the accessible label. TR: Çevrilmiş adı; erişilebilir ad olarak kullanılıyor. */
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Brand colour chosen from a few squares, or written by hand.
|
|
10
|
+
* TR: Birkaç kareden seçilen ya da elle yazılan marka rengi.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ColorSwatches({ options, value, onChange, customLabel, custom, className, }: {
|
|
13
|
+
options: readonly SwatchOption[];
|
|
14
|
+
value: string;
|
|
15
|
+
onChange: (hex: string) => void;
|
|
16
|
+
/** Accessible name of the "my own colour" control. TR: "Kendi rengim" kontrolünün erişilebilir adı. */
|
|
17
|
+
customLabel: string;
|
|
18
|
+
/** Whether a free colour is offered at all. TR: Serbest rengin hiç sunulup sunulmadığı. */
|
|
19
|
+
custom?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
export type ThemeChoice = "light" | "dark" | "system";
|
|
23
|
+
/**
|
|
24
|
+
* Theme picked from three little pictures of the panel.
|
|
25
|
+
* TR: Panelin üç küçük resminden seçilen tema.
|
|
26
|
+
*
|
|
27
|
+
* "Light · Dark · System" were three words, and a theme is not chosen with
|
|
28
|
+
* words: the person wants to see the result. "System" shows both halves in one
|
|
29
|
+
* frame, which is exactly what it means.
|
|
30
|
+
* TR: "Açık · Koyu · Sistem" üç kelimeydi, ve bir tema kelimeyle seçilmiyor:
|
|
31
|
+
* kullanıcı sonucu görmek istiyor. "Sistem" iki yarımı tek karede gösteriyor,
|
|
32
|
+
* anlamı tam olarak bu.
|
|
33
|
+
*/
|
|
34
|
+
export declare function ThemeCards({ value, onChange, labels, className, }: {
|
|
35
|
+
value: ThemeChoice;
|
|
36
|
+
onChange: (next: ThemeChoice) => void;
|
|
37
|
+
/** The three names and the group's accessible name. TR: Üç ad ve kümenin erişilebilir adı. */
|
|
38
|
+
labels: {
|
|
39
|
+
light: string;
|
|
40
|
+
dark: string;
|
|
41
|
+
system: string;
|
|
42
|
+
group: string;
|
|
43
|
+
};
|
|
44
|
+
className?: string;
|
|
45
|
+
}): import("react").JSX.Element;
|
|
46
|
+
/**
|
|
47
|
+
* One image with a preview, a replace and a remove.
|
|
48
|
+
* TR: Önizlemesi, değiştirmesi ve kaldırması olan tek bir görsel.
|
|
49
|
+
*
|
|
50
|
+
* NOT `FileUpload`: that one is a GALLERY (multi select, reorder arrows, a
|
|
51
|
+
* "cover" badge). Right for product photos, wrong for a single logo, where it
|
|
52
|
+
* offers reorder arrows with nothing to reorder.
|
|
53
|
+
* TR: `FileUpload` DEĞİL: o bir GALERİ (çoklu seçim, sıralama okları, "kapak"
|
|
54
|
+
* rozeti). Ürün fotoğrafları için doğru, tek bir logo için yanlış.
|
|
55
|
+
*/
|
|
56
|
+
export declare function ImageField({ value, onChange, maxEdge, labels, preview, extra, className, }: {
|
|
57
|
+
value: string | null;
|
|
58
|
+
onChange: (next: string | null) => void;
|
|
59
|
+
/** Longest edge of the stored image, in pixels. TR: Saklanan görselin en uzun kenarı, piksel. */
|
|
60
|
+
maxEdge: number;
|
|
61
|
+
labels: {
|
|
62
|
+
/** "Logo", "Mark": used inside the buttons. TR: "Logo", "Amblem": düğmelerin içinde geçiyor. */
|
|
63
|
+
name: string;
|
|
64
|
+
upload: string;
|
|
65
|
+
replace: string;
|
|
66
|
+
remove: string;
|
|
67
|
+
empty: string;
|
|
68
|
+
errorType: string;
|
|
69
|
+
errorSize: string;
|
|
70
|
+
errorUnreadable: string;
|
|
71
|
+
};
|
|
72
|
+
/** The caller draws the preview: a logo is wide, a mark is square. TR: Önizlemeyi çağıran çiziyor: logo geniş, amblem kare. */
|
|
73
|
+
preview: (src: string) => ReactNode;
|
|
74
|
+
/** An extra control beside the buttons. TR: Düğmelerin yanına giren ek kontrol. */
|
|
75
|
+
extra?: ReactNode;
|
|
76
|
+
className?: string;
|
|
77
|
+
}): import("react").JSX.Element;
|
|
78
|
+
//# sourceMappingURL=appearance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appearance.d.ts","sourceRoot":"","sources":["../../src/components/appearance.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAchE,MAAM,MAAM,YAAY,GAAG;IACzB,8DAA8D;IAC9D,GAAG,EAAE,MAAM,CAAC;IACZ,kHAAkH;IAClH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAAW,EACX,MAAa,EACb,SAAS,GACV,EAAE;IACD,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,GAAG,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