tamga-ui 0.8.0 → 0.9.0
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 +58 -0
- package/dist/blocks/filter-bar.d.ts +40 -1
- package/dist/blocks/filter-bar.d.ts.map +1 -1
- package/dist/blocks/filter-bar.js +23 -11
- package/dist/components/primitives.d.ts +3 -1
- package/dist/components/primitives.d.ts.map +1 -1
- package/dist/components/primitives.js +2 -2
- package/dist/components/select-panel.d.ts +8 -1
- package/dist/components/select-panel.d.ts.map +1 -1
- package/dist/components/select-panel.js +3 -3
- package/dist/fonts.css +1 -1
- package/dist/kit.css +265 -18
- package/dist/styles.css +1 -1
- package/dist/theme.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,64 @@ 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.9.0
|
|
9
|
+
|
|
10
|
+
> An equal grid for the filter row, and a box-shaped panel for the searchable field. Both opt-in; a bar that gives neither renders as before, locked by test.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`FilterBar` `grid`** (`look="fields"`) · a CSS grid decided by the bar's own width, not the
|
|
15
|
+
screen's. Wide: one line, a fixed 16rem search box and equal columns for the top fields,
|
|
16
|
+
chosen when every field can have about 9rem (the threshold per field count is written as
|
|
17
|
+
`@container` rules for 1 to 8 fields, a date range counting as two; a drawer button or
|
|
18
|
+
`extra` adds a tail column). Narrower: two equal lines, the search spanning two columns,
|
|
19
|
+
`ceil((fields + 2) / 2)` columns. Below the narrow threshold the 0.8.1 behaviour. No field
|
|
20
|
+
grows past the others any more (six fields had one stretching alone to 320px on the second
|
|
21
|
+
line). A long value is clipped in its box and kept whole in `title`; `Select` gains a
|
|
22
|
+
`title` prop for it.
|
|
23
|
+
- **`FilterBar` `searchableAs="panel"`** · a `searchable` field is drawn as a `SelectPanel` in
|
|
24
|
+
the new `look="field"`: a box-shaped button the size and edge of the inputs beside it,
|
|
25
|
+
showing the value or `labels.all` with a caret; the panel is titled `panelTitle ?? label`,
|
|
26
|
+
starts with a search box (`searchPlaceholder ?? labels.searchIn(label) ?? label`) and
|
|
27
|
+
`labels.all` as the first option; keyboard as in `SelectPanel`. The default, `combobox`, is
|
|
28
|
+
today's text box. Applies on top, in the drawer and in the narrow sheet.
|
|
29
|
+
- **`SelectPanel` `look="field"`** · the trigger as a form box (`.tamga-select`), full width,
|
|
30
|
+
`title` carrying the whole value when set; the same caret glyph and text colour as `Select`
|
|
31
|
+
(an empty "All" reads as a value, not a faint placeholder), the same strong edge when set.
|
|
32
|
+
- **`FilterBar` `look="fields"` on a narrow bar** · the sheet is titled
|
|
33
|
+
`labels.filter ?? labels.allFilters` in both layouts; the search box's visible label stays for
|
|
34
|
+
screen readers only; the search box keeps at least 7.5rem and the "Filter · N" button drops
|
|
35
|
+
under it when the bar is too narrow for both; an applied chip is one line, a long value
|
|
36
|
+
clipped with its whole text in `title`.
|
|
37
|
+
|
|
38
|
+
## 0.8.1
|
|
39
|
+
|
|
40
|
+
> Five things the chip layout showed on a real page.
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- **`FilterBar` `look="chips"`** · the search box's visible label is gone (it stays for screen
|
|
45
|
+
readers), the box is the chips' size and sits on their line, centred with them. "Clear all"
|
|
46
|
+
is a plain link at the end of the chip row, on the same line. A set chip is one object: the
|
|
47
|
+
edge and shadow belong to the chip, the trigger inside and the remove square carry none, the
|
|
48
|
+
remove stays a separate button named `labels.remove(label)`. In the narrow-screen sheet the
|
|
49
|
+
panels show only the value; the field's name is already above each. On a narrow screen the
|
|
50
|
+
scrolling row of set chips and "Clear all" stay inside the card. All of it in kit classes;
|
|
51
|
+
`pnpm olc:filtre` measures each point at 1280 and 390.
|
|
52
|
+
- **The narrow layout keys off the bar's own width, not the screen's.** With the app's sidebar
|
|
53
|
+
open on a phone the card is 210px wide while the viewport is 390; a viewport media query
|
|
54
|
+
could not see that, so the fixed search box and the "Filter · N" button overflowed the card.
|
|
55
|
+
`.tamga-filter-bar` is now an inline-size container and the narrow/wide rules are
|
|
56
|
+
`@container` queries; every flex ancestor down to the chip has `min-width: 0`, the search
|
|
57
|
+
shrinks (`flex: 1 1 0`), the button never does (`flex-shrink: 0`), the set-chip row scrolls
|
|
58
|
+
inside the card, and the chips in it never shrink (`flex-shrink: 0`, one line of text): with
|
|
59
|
+
three filters set they were squashed to 24px and the row did not scroll. `pnpm olc:filtre`
|
|
60
|
+
also measures a 210px card on a 1280px screen, with three set chips. Applies to
|
|
61
|
+
`look="fields"` too.
|
|
62
|
+
- **A chip panel's search box showed the bar's own search text** ("Search by name or
|
|
63
|
+
address" inside the Tags panel). It now reads the field's `searchPlaceholder`, else
|
|
64
|
+
`labels.searchIn(label)`, else the field's label.
|
|
65
|
+
|
|
8
66
|
## 0.8.0
|
|
9
67
|
|
|
10
68
|
> A choice panel opened from a button, and a filter bar made of chips.
|
|
@@ -59,6 +59,13 @@ export type FilterField = {
|
|
|
59
59
|
* the label. TR: Yalnız `look="chips"`: çipin panelinin başlığı, "Müşteri seçin"; yoksa ad.
|
|
60
60
|
*/
|
|
61
61
|
panelTitle?: string;
|
|
62
|
+
/**
|
|
63
|
+
* `look="chips"`, `searchable` only: the panel's search box text, "Search tags". Absent,
|
|
64
|
+
* `labels.searchIn(label)`, else the label itself; never the bar's own search text. TR: Yalnız
|
|
65
|
+
* `look="chips"` ve `searchable`: panelin arama kutusunun metni, "Etiket ara". Yoksa
|
|
66
|
+
* `labels.searchIn(label)`, o da yoksa alanın adı; asla çubuğun kendi arama metni.
|
|
67
|
+
*/
|
|
68
|
+
searchPlaceholder?: string;
|
|
62
69
|
/**
|
|
63
70
|
* A glyph before the value, naming what this filter is about. TR: Değerin
|
|
64
71
|
* önünde, bu filtrenin neyle ilgili olduğunu söyleyen glif.
|
|
@@ -115,6 +122,12 @@ export type FilterBarLabels = {
|
|
|
115
122
|
open: (label: string) => string;
|
|
116
123
|
/** Like "Remove the <filter> filter". TR: "<filtre> filtresini kaldır". */
|
|
117
124
|
remove: (label: string) => string;
|
|
125
|
+
/**
|
|
126
|
+
* Like "Search in <field>"; the chip panel's search box when the field gives no
|
|
127
|
+
* `searchPlaceholder`. TR: "<alan> içinde ara" gibi; alan `searchPlaceholder` vermezse çip
|
|
128
|
+
* panelinin arama kutusu.
|
|
129
|
+
*/
|
|
130
|
+
searchIn?: (label: string) => string;
|
|
118
131
|
rangeStart: string;
|
|
119
132
|
rangeEnd: string;
|
|
120
133
|
calendar: {
|
|
@@ -190,7 +203,33 @@ export type FilterBarProps = {
|
|
|
190
203
|
* uygulanan-filtreler satırı yok: çip özetin kendisi. Metin ve tarih aralığı kutu kalır.
|
|
191
204
|
*/
|
|
192
205
|
look?: "fields" | "chips";
|
|
206
|
+
/**
|
|
207
|
+
* `fields` only. Off (default), the flex row of today: a field that does not fit drops to the
|
|
208
|
+
* next line and stretches. On, a grid decided by the bar's own width: one line with a fixed
|
|
209
|
+
* 16rem search and equal columns when every field can have ~9rem, else two equal lines with
|
|
210
|
+
* the search spanning two columns (columns = ceil((fields + 2) / 2)); below the narrow
|
|
211
|
+
* threshold the 0.8.1 behaviour. No field ever grows past the others. A long value is
|
|
212
|
+
* clipped in its box and kept whole in `title`. TR: Yalnız `fields`. Kapalıyken (varsayılan)
|
|
213
|
+
* bugünkü esnek satır: sığmayan alan alt satıra düşüp uzuyor. Açıkken kabın genişliğine göre
|
|
214
|
+
* bir ızgara: her alana ~9rem düşüyorsa sabit 16rem arama + eşit sütunlu tek satır, yoksa
|
|
215
|
+
* aramanın iki sütun kapladığı eşit iki satır (sütun = ceil((alan + 2) / 2)); dar eşiğin
|
|
216
|
+
* altında 0.8.1 davranışı. Hiçbir alan öbürlerinden uzamıyor. Uzun değer kutuda kesilir, tamamı
|
|
217
|
+
* `title`da.
|
|
218
|
+
*/
|
|
219
|
+
grid?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* What a `searchable` field is drawn as. `combobox` (default) the text box with a magnifier.
|
|
222
|
+
* `panel` a `SelectPanel` in the `field` look: an ordinary box-shaped button that shows the
|
|
223
|
+
* value or `labels.all`, a panel titled `panelTitle ?? label` with a search box
|
|
224
|
+
* (`searchPlaceholder ?? labels.searchIn(label) ?? label`) and `labels.all` first; on top, in
|
|
225
|
+
* the drawer and in the narrow sheet alike. TR: `searchable` alanın çizimi. `combobox`
|
|
226
|
+
* (varsayılan) büyüteçli metin kutusu. `panel` `field` görünümünde bir `SelectPanel`: değeri ya
|
|
227
|
+
* da `labels.all`ı gösteren kutu biçimli sıradan bir düğme, başlığı `panelTitle ?? label`,
|
|
228
|
+
* arama kutulu (`searchPlaceholder ?? labels.searchIn(label) ?? label`), ilk seçeneği
|
|
229
|
+
* `labels.all`; üstte, çekmecede ve dar ekran panelinde aynı.
|
|
230
|
+
*/
|
|
231
|
+
searchableAs?: "combobox" | "panel";
|
|
193
232
|
labels: FilterBarLabels;
|
|
194
233
|
};
|
|
195
|
-
export declare function FilterBar({ values, onChange, top, drawer, optionSource, searchKey, fileSearchKey, onFile, fileAccept, extra, locale, look, labels, }: FilterBarProps): import("react").JSX.Element;
|
|
234
|
+
export declare function FilterBar({ values, onChange, top, drawer, optionSource, searchKey, fileSearchKey, onFile, fileAccept, extra, locale, look, grid, searchableAs, labels, }: FilterBarProps): import("react").JSX.Element;
|
|
196
235
|
//# sourceMappingURL=filter-bar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-bar.d.ts","sourceRoot":"","sources":["../../src/blocks/filter-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAA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M,CAAC;IACpB,+IAA+I;IAC/I,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,wGAAwG;IACxG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACpC,MAAM,EAAE,eAAe,CAAC;CACzB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,QAAQ,EACR,GAAG,EACH,MAAM,EACN,YAAiB,EACjB,SAAe,EACf,aAAa,EACb,MAAM,EACN,UAAU,EACV,KAAK,EACL,MAAgB,EAChB,IAAe,EACf,IAAY,EACZ,YAAyB,EACzB,MAAM,GACP,EAAE,cAAc,+BA6UhB"}
|
|
@@ -14,11 +14,14 @@ import { SelectPanel } from "../components/select-panel.js";
|
|
|
14
14
|
ayrı parametre giderken burada tekrar ayrıştırmak demekti. */
|
|
15
15
|
export const rangeStart = (key) => `${key}Start`;
|
|
16
16
|
export const rangeEnd = (key) => `${key}End`;
|
|
17
|
-
function FieldControl({ field, values, write, optionSource, locale, labels, panel = false, }) {
|
|
17
|
+
function FieldControl({ field, values, write, optionSource, locale, labels, panel = false, kutuPanel = false, baslik = false, }) {
|
|
18
18
|
const options = secenekler(field, optionSource);
|
|
19
19
|
if (panel && (field.kind === "select" || field.kind === "searchable" || field.kind === "multi")) {
|
|
20
20
|
return _jsx(PanelAlani, { field: field, values: values, write: write, optionSource: optionSource, labels: labels });
|
|
21
21
|
}
|
|
22
|
+
if (kutuPanel && field.kind === "searchable") {
|
|
23
|
+
return _jsx(PanelAlani, { field: field, values: values, write: write, optionSource: optionSource, labels: labels, kutu: true });
|
|
24
|
+
}
|
|
22
25
|
/* HER KONTROLÜN ADI VAR: alanın adı bir <span>, kontrole bağlı değil; ekran
|
|
23
26
|
okuyucu beş kutuyu da "Tümü" diye okuyordu. */
|
|
24
27
|
if (field.kind === "dateRange") {
|
|
@@ -39,7 +42,8 @@ function FieldControl({ field, values, write, optionSource, locale, labels, pane
|
|
|
39
42
|
return (_jsx(Combobox, { className: "w-full", "aria-label": field.label, options: options, value: values[field.key] || undefined, onChange: (v) => write(field.key, v ?? ""), placeholder: labels.all, labels: { empty: labels.noMatch, clear: labels.clear, open: labels.open(field.label) } }));
|
|
40
43
|
}
|
|
41
44
|
if (field.kind === "select") {
|
|
42
|
-
|
|
45
|
+
const gorunen = values[field.key] ? secenekler(field, optionSource).find((o) => o.value === values[field.key])?.label ?? values[field.key] : undefined;
|
|
46
|
+
return (_jsx(Select, { className: "w-full", "aria-label": field.label, title: baslik ? gorunen : undefined, icon: field.icon, options: [
|
|
43
47
|
labels.all,
|
|
44
48
|
...options.map((o) => ({ value: o.value, label: o.label, tone: field.tones?.[o.value] })),
|
|
45
49
|
],
|
|
@@ -57,17 +61,20 @@ function FieldControl({ field, values, write, optionSource, locale, labels, pane
|
|
|
57
61
|
* `SelectPanel`, ilk seçeneği "Tümü" (geri dönüş yolu gidiş yoluyla aynı yerde).
|
|
58
62
|
* Çipte boşken kenarlı küçük, doluyken yumuşak ve oksuz; ✕ ayrı düğme.
|
|
59
63
|
*/
|
|
60
|
-
function PanelAlani({ field, values, write, optionSource, labels, cip = false, }) {
|
|
64
|
+
function PanelAlani({ field, values, write, optionSource, labels, cip = false, kutu = false, }) {
|
|
61
65
|
const options = secenekler(field, optionSource).map((o) => ({ ...o, tone: field.tones?.[o.value] }));
|
|
62
66
|
const ortak = {
|
|
63
67
|
title: field.panelTitle ?? field.label,
|
|
64
68
|
"aria-label": field.label,
|
|
65
|
-
|
|
69
|
+
/* Çipte ad önek ("Durum:"); çekmece panelinde ad zaten üstte, önek yok. */
|
|
70
|
+
prefix: cip ? `${field.label}:` : undefined,
|
|
66
71
|
placeholder: labels.all,
|
|
67
72
|
searchable: field.kind === "searchable",
|
|
68
|
-
|
|
73
|
+
/* Panelin araması kendi metnini taşır; çubuğun arama metni ("Ad ya da adres ara") değil. */
|
|
74
|
+
labels: { noMatch: labels.noMatch, search: field.searchPlaceholder ?? labels.searchIn?.(field.label) ?? field.label, clear: labels.clear },
|
|
69
75
|
size: cip ? "sm" : "base",
|
|
70
|
-
|
|
76
|
+
look: kutu ? "field" : "button",
|
|
77
|
+
className: cip || kutu ? undefined : "tamga-select-panel-tam",
|
|
71
78
|
};
|
|
72
79
|
if (field.kind === "multi") {
|
|
73
80
|
const selected = (values[field.key] ?? "").split(",").filter(Boolean);
|
|
@@ -82,8 +89,13 @@ function secenekler(field, optionSource) {
|
|
|
82
89
|
const ham = field.options?.length ? field.options : (optionSource[field.key] ?? []);
|
|
83
90
|
return ham.map((o) => (typeof o === "string" ? { value: o, label: o } : o));
|
|
84
91
|
}
|
|
85
|
-
export function FilterBar({ values, onChange, top, drawer, optionSource = {}, searchKey = "q", fileSearchKey, onFile, fileAccept, extra, locale = "en-GB", look = "fields", labels, }) {
|
|
92
|
+
export function FilterBar({ values, onChange, top, drawer, optionSource = {}, searchKey = "q", fileSearchKey, onFile, fileAccept, extra, locale = "en-GB", look = "fields", grid = false, searchableAs = "combobox", labels, }) {
|
|
86
93
|
const cipler = look === "chips";
|
|
94
|
+
const panelli = searchableAs === "panel";
|
|
95
|
+
/* Izgara: tarih aralığı iki birim; iki satırlık düzende sütun = ceil((birim + 2) / 2);
|
|
96
|
+
çekmece düğmesi ya da ek kontrol varsa sondaki "kuyruk" sütunu. */
|
|
97
|
+
const birim = top.reduce((n, f) => n + (f.kind === "dateRange" ? 2 : 1), 0);
|
|
98
|
+
const sutun = Math.ceil((birim + 2) / 2);
|
|
87
99
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
88
100
|
const formId = useId();
|
|
89
101
|
const active = Object.entries(values).filter(([, v]) => v);
|
|
@@ -124,13 +136,13 @@ export function FilterBar({ values, onChange, top, drawer, optionSource = {}, se
|
|
|
124
136
|
const adlar = new Map(secenekler(field, optionSource).map((o) => [o.value, o.label]));
|
|
125
137
|
return value.split(",").map((v) => adlar.get(v) ?? v).join(field.kind === "multi" ? ", " : ",");
|
|
126
138
|
};
|
|
127
|
-
const ustAlanlar = (sinif) => top.map((field) => (_jsxs("div", { className: `tamga-filter-alan ${field.kind === "dateRange" ? "sm:col-span-2" : ""}`, children: [_jsx("span", { className: sinif, children: field.label }), _jsx(FieldControl, { field: field, values: values, write: write, optionSource: optionSource, locale: locale, labels: labels, panel: cipler })] }, field.key)));
|
|
128
|
-
const aramaKutusu = (_jsxs("span", { className: "relative flex items-center", children: [_jsx(Icon, { icon: Search, size: "xs", "aria-hidden": true, className: "pointer-events-none absolute left-2.5 text-ink-faint" }), _jsx(Input, { type: "search", full: true, leading: true, placeholder: labels.search, value: values[searchKey] ?? "", onChange: (e) => write(searchKey, e.target.value) })] }));
|
|
139
|
+
const ustAlanlar = (sinif) => top.map((field) => (_jsxs("div", { className: `tamga-filter-alan ${field.kind === "dateRange" ? "sm:col-span-2" : ""}`, children: [_jsx("span", { className: sinif, children: field.label }), _jsx(FieldControl, { field: field, values: values, write: write, optionSource: optionSource, locale: locale, labels: labels, panel: cipler, kutuPanel: panelli })] }, field.key)));
|
|
140
|
+
const aramaKutusu = (_jsxs("span", { className: "relative flex items-center", children: [_jsx(Icon, { icon: Search, size: "xs", "aria-hidden": true, className: "pointer-events-none absolute left-2.5 text-ink-faint" }), _jsx(Input, { type: "search", full: true, leading: true, size: cipler ? "sm" : "md", placeholder: labels.search, value: values[searchKey] ?? "", onChange: (e) => write(searchKey, e.target.value) })] }));
|
|
129
141
|
const cekmeceDugmesi = (drawer.length > 0 || top.length > 0) && (_jsxs(Button, { className: drawer.length > 0 ? "ml-auto" : "tamga-filter-dar ml-auto", onClick: () => setDrawerOpen(true), children: [_jsx(Icon, { icon: Customize, size: "xs" }), _jsxs("span", { className: "tamga-filter-genis", children: [labels.allFilters, hiddenActive > 0 && _jsx("span", { className: "tamga-count ml-1 tabular-nums", children: hiddenActive })] }), _jsx("span", { className: "tamga-filter-dar", children: darMetin })] }));
|
|
130
|
-
return (_jsxs("div", { className: "tamga-card tamga-card-open tamga-filter-bar", children: [cipler ? (_jsxs("div", { className: "tamga-filter-cips", children: [_jsxs("label", { className: "tamga-filter-ara-sabit", children: [_jsx("span", { className: "
|
|
142
|
+
return (_jsxs("div", { className: "tamga-card tamga-card-open tamga-filter-bar", children: [cipler ? (_jsxs("div", { className: "tamga-filter-cips", children: [_jsxs("label", { className: "tamga-filter-ara-sabit", children: [_jsx("span", { className: "tamga-filter-ara-etiket", children: labels.search }), aramaKutusu] }), _jsxs("span", { className: "tamga-filter-cip-sira", children: [top.map((field) => field.kind === "select" || field.kind === "searchable" || field.kind === "multi" ? (_jsxs("span", { className: "tamga-filter-cip", "data-set": values[field.key] ? "true" : undefined, children: [_jsx(PanelAlani, { field: field, values: values, write: write, optionSource: optionSource, labels: labels, cip: true }), values[field.key] ? (_jsx("button", { type: "button", className: "tamga-filter-cip-x", "aria-label": labels.remove(field.label), onClick: () => write(field.key, ""), children: _jsx(Icon, { icon: Close, size: "xs" }) })) : null] }, field.key)) : (_jsxs("div", { className: "tamga-filter-genis tamga-filter-alan", "data-range": field.kind === "dateRange" || undefined, children: [_jsx("span", { className: "text-small font-bold text-ink-faint", children: field.label }), _jsx(FieldControl, { field: field, values: values, write: write, optionSource: optionSource, locale: locale, labels: labels })] }, field.key))), darAktif > 0 ? (_jsx("button", { type: "button", className: "tamga-link tamga-filter-cip-temizle", onClick: () => onChange({}), children: labels.clearAll })) : null] }), cekmeceDugmesi, extra] })) : (_jsxs("div", { className: grid ? "tamga-filter-row tamga-filter-izgara" : "tamga-filter-row", "data-alan": grid ? birim : undefined, "data-kuyruk": grid && (drawer.length > 0 || extra) ? "true" : undefined, style: grid ? { "--filter-sutun": sutun } : undefined, children: [_jsxs("label", { className: "tamga-filter-ara", children: [_jsx("span", { className: "tamga-filter-ara-ad text-small font-bold text-ink-faint", children: labels.search }), aramaKutusu] }), top.map((field) => (_jsxs(Fragment, { children: [field.break ? _jsx("span", { "aria-hidden": true, className: "tamga-filter-genis tamga-filter-kir" }) : null, _jsxs("div", { className: `tamga-filter-genis tamga-filter-alan ${field.kind === "dateRange" ? "" : "tamga-filter-cap"}`, "data-range": field.kind === "dateRange" || undefined, children: [_jsx("span", { className: "text-small font-bold text-ink-faint", children: field.label }), _jsx(FieldControl, { field: field, values: values, write: write, optionSource: optionSource, locale: locale, labels: labels, kutuPanel: panelli, baslik: grid })] })] }, field.key))), cekmeceDugmesi, extra] })), !cipler && active.length > 0 && (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [active.map(([key, value]) => (_jsxs("span", { className: "tamga-token", children: [_jsxs("span", { className: "font-normal text-ink-faint", children: [labelFor(key), ":"] }), _jsx("span", { className: "tamga-token-deger", title: valueText(key, value), children: valueText(key, value) }), _jsx("button", { type: "button", className: "tamga-token-x", "aria-label": labels.remove(labelFor(key)), onClick: () => write(key, ""), children: _jsx(Icon, { icon: Close, size: "xs" }) })] }, key))), _jsx(Button, { variant: "link", size: "sm", onClick: () => onChange({}), children: labels.clearAll })] })), _jsx(Sheet, { open: drawerOpen, onClose: () => setDrawerOpen(false), title: labels.filter ?? labels.allFilters, closeLabel: labels.calendar.clear, footer: _jsxs(_Fragment, { children: [_jsx(Button, { type: "button", onClick: () => onChange({}), children: labels.clear }), _jsx(Button, { type: "submit", form: formId, variant: "primary", children: labels.apply })] }), children: _jsxs("form", { id: formId, onSubmit: (e) => {
|
|
131
143
|
e.preventDefault();
|
|
132
144
|
setDrawerOpen(false);
|
|
133
|
-
}, className: "flex flex-col", children: [top.length > 0 && (_jsx("div", { className: "tamga-filter-dar tamga-filter-grup border-b border-dashed border-line py-4.5 last:border-b-0", children: _jsx("div", { className: "grid gap-3 sm:grid-cols-[repeat(2,minmax(0,1fr))]", children: ustAlanlar("text-small text-ink-soft") }) })), drawer.map((group) => (_jsxs("div", { className: "flex flex-col gap-3.5 border-b border-dashed border-line py-4.5 last:border-b-0", children: [_jsx("p", { className: "text-caption font-extrabold uppercase tracking-label text-ink-faint", children: group.title }), _jsx("div", { className: "grid gap-3 sm:grid-cols-[repeat(2,minmax(0,1fr))]", children: group.fields.map((field) => (_jsxs("div", { className: `flex flex-col gap-1.5 ${field.kind === "dateRange" ? "sm:col-span-2" : ""}`, children: [_jsx("span", { className: "text-small text-ink-soft", children: field.label }), _jsx(FieldControl, { field: field, values: values, write: write, optionSource: optionSource, locale: locale, labels: labels, panel: cipler })] }, field.key))) })] }, group.title))), fileSearchKey && labels.fileSearch && (_jsxs("div", { children: [_jsx("p", { className: "mb-3 text-micro font-semibold uppercase tracking-wide text-ink-faint", children: labels.fileSearch.title }), _jsx("p", { className: "mb-3 text-small leading-relaxed text-ink-soft", children: labels.fileSearch.help }), values[fileSearchKey] ? (_jsxs("span", { className: "flex items-center gap-2", children: [_jsx("span", { className: "truncate text-small text-ink", children: values[fileSearchKey] }), _jsx(Button, { type: "button", size: "sm", onClick: () => {
|
|
145
|
+
}, className: "flex flex-col", children: [top.length > 0 && (_jsx("div", { className: "tamga-filter-dar tamga-filter-grup border-b border-dashed border-line py-4.5 last:border-b-0", children: _jsx("div", { className: "grid gap-3 sm:grid-cols-[repeat(2,minmax(0,1fr))]", children: ustAlanlar("text-small text-ink-soft") }) })), drawer.map((group) => (_jsxs("div", { className: "flex flex-col gap-3.5 border-b border-dashed border-line py-4.5 last:border-b-0", children: [_jsx("p", { className: "text-caption font-extrabold uppercase tracking-label text-ink-faint", children: group.title }), _jsx("div", { className: "grid gap-3 sm:grid-cols-[repeat(2,minmax(0,1fr))]", children: group.fields.map((field) => (_jsxs("div", { className: `flex flex-col gap-1.5 ${field.kind === "dateRange" ? "sm:col-span-2" : ""}`, children: [_jsx("span", { className: "text-small text-ink-soft", children: field.label }), _jsx(FieldControl, { field: field, values: values, write: write, optionSource: optionSource, locale: locale, labels: labels, panel: cipler, kutuPanel: panelli })] }, field.key))) })] }, group.title))), fileSearchKey && labels.fileSearch && (_jsxs("div", { children: [_jsx("p", { className: "mb-3 text-micro font-semibold uppercase tracking-wide text-ink-faint", children: labels.fileSearch.title }), _jsx("p", { className: "mb-3 text-small leading-relaxed text-ink-soft", children: labels.fileSearch.help }), values[fileSearchKey] ? (_jsxs("span", { className: "flex items-center gap-2", children: [_jsx("span", { className: "truncate text-small text-ink", children: values[fileSearchKey] }), _jsx(Button, { type: "button", size: "sm", onClick: () => {
|
|
134
146
|
write(fileSearchKey, "");
|
|
135
147
|
onFile?.(null);
|
|
136
148
|
}, children: labels.fileSearch.remove })] })) : (_jsxs("label", { className: `${buttonVariants({})} cursor-pointer`, children: [_jsx(Icon, { icon: Upload, size: "xs" }), labels.fileSearch.choose, _jsx("input", { type: "file", accept: fileAccept, className: "sr-only", onChange: (e) => {
|
|
@@ -133,7 +133,7 @@ export declare function Field({ label, description, error, required, note, info,
|
|
|
133
133
|
[k: `data-${string}`]: unknown;
|
|
134
134
|
}): import("react").JSX.Element;
|
|
135
135
|
/** A plain select: the same overlay as the searchable one, without the search. */
|
|
136
|
-
export declare function Select({ options, icon, set, value, onChange, placeholder, loading, loadingRows, disabled, "aria-label": ariaLabel, className, ...rest }: {
|
|
136
|
+
export declare function Select({ options, icon, set, value, onChange, placeholder, loading, loadingRows, disabled, "aria-label": ariaLabel, title, className, ...rest }: {
|
|
137
137
|
/**
|
|
138
138
|
* Plain strings, or options that carry a tone. TR: Düz dizgiler, ya da ton
|
|
139
139
|
* taşıyan seçenekler.
|
|
@@ -219,6 +219,8 @@ export declare function Select({ options, icon, set, value, onChange, placeholde
|
|
|
219
219
|
"aria-label"?: string;
|
|
220
220
|
/** Locks the trigger; the list cannot open. TR: Tetiği kilitler; liste açılmaz. */
|
|
221
221
|
disabled?: boolean;
|
|
222
|
+
/** The trigger's tooltip: the full text when the shown value is clipped. TR: Tetiğin ipucu: görünen değer kesildiğinde tam metin. */
|
|
223
|
+
title?: string;
|
|
222
224
|
/** Genişlik ve konum çağıranın. Varsayılan `w-56`; `w-full` verildiğinde
|
|
223
225
|
* tailwind-merge onu ezer, yani kontrol kabına uyar. */
|
|
224
226
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/components/primitives.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAY5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC,wBAAgB,SAAS,CAAC,EACxB,QAAgB,EAChB,IAAc,EACd,KAAK,EACL,GAAG,IAAI,EACR,EAAE;IACD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACrC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAoBA;AAED,yFAAyF;AACzF,wBAAgB,MAAM,CAAC,EACrB,IAAW,EACX,KAAK,EACL,IAAc,EACd,KAAiB,EACjB,KAAa,EACb,QAAa,EACb,GAAG,IAAI,EACR,EAAE;IACD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC;IACb;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAiBA;AAcD,w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,EAAE,MAAM,CAAC;IACtB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;6DACyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/components/primitives.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAY5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC,wBAAgB,SAAS,CAAC,EACxB,QAAgB,EAChB,IAAc,EACd,KAAK,EACL,GAAG,IAAI,EACR,EAAE;IACD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACrC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAoBA;AAED,yFAAyF;AACzF,wBAAgB,MAAM,CAAC,EACrB,IAAW,EACX,KAAK,EACL,IAAc,EACd,KAAiB,EACjB,KAAa,EACb,QAAa,EACb,GAAG,IAAI,EACR,EAAE;IACD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC;IACb;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mEAAmE;IACnE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;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;;;OAcG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qIAAqI;IACrI,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;6DACyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,+BAyHA;AAED,2EAA2E;AAC3E,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAe,EACf,UAAU,EACV,IAAY,EACZ,GAAG,IAAI,EACR,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACvB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,sCAoEA"}
|
|
@@ -79,7 +79,7 @@ export function Field({ label, description, error, required = false, note, info,
|
|
|
79
79
|
return (_jsxs("div", { ...dataProps(rest), className: "flex flex-col gap-1.5", children: [_jsxs("span", { className: "flex items-baseline gap-2", children: [_jsxs("label", { htmlFor: htmlFor, className: "text-small font-bold text-ink", children: [label, required ? (_jsx("span", { "aria-hidden": true, className: "ml-1", style: { color: toneOf("danger").fg }, children: "*" })) : null] }), info ? _jsx("span", { className: "flex items-center text-ink-faint", children: info }) : null, _jsx("span", { className: "flex-1" }), note ? _jsx("span", { className: "text-caption text-ink-faint", children: note }) : null] }), kontrol, count ? (_jsxs("span", { className: "self-end font-mono text-small font-bold tabular-nums", style: count.value > count.max ? { color: toneOf("danger").fg } : { color: "var(--color-ink-faint)" }, children: [count.value, " / ", count.max] })) : null, error ? (_jsxs("p", { id: notId, className: "flex items-center gap-1.5 text-small font-medium", style: { color: toneOf("danger").fg }, children: [_jsx(Icon, { icon: Warning, size: "xs", weight: "fill" }), error] })) : description ? (_jsx("p", { id: notId, className: "text-small text-ink-faint", children: description })) : null] }));
|
|
80
80
|
}
|
|
81
81
|
/** A plain select: the same overlay as the searchable one, without the search. */
|
|
82
|
-
export function Select({ options, icon, set, value, onChange, placeholder, loading = false, loadingRows = 4, disabled = false, "aria-label": ariaLabel, className, ...rest }) {
|
|
82
|
+
export function Select({ options, icon, set, value, onChange, placeholder, loading = false, loadingRows = 4, disabled = false, "aria-label": ariaLabel, title, className, ...rest }) {
|
|
83
83
|
const [open, setOpen] = useState(false);
|
|
84
84
|
const [inner, setInner] = useState(value ?? "");
|
|
85
85
|
const box = useRef(null);
|
|
@@ -102,7 +102,7 @@ export function Select({ options, icon, set, value, onChange, placeholder, loadi
|
|
|
102
102
|
document.addEventListener("mousedown", away);
|
|
103
103
|
return () => document.removeEventListener("mousedown", away);
|
|
104
104
|
}, [open]);
|
|
105
|
-
return (_jsxs("div", { ...dataProps(rest), ref: box, className: cn("relative w-56", className), children: [_jsxs("button", { type: "button", className: "tamga-select justify-between", "data-set": (set ?? Boolean(current)) ? "true" : undefined, "aria-haspopup": "listbox", "aria-expanded": open, "aria-label": ariaLabel, disabled: disabled || undefined, onClick: () => setOpen((o) => !o), children: [icon ? _jsx(Icon, { icon: icon, size: "sm", className: "shrink-0 text-ink-faint" }) : null, _jsx("span", { className: cn("min-w-0 flex-1 truncate", current ? "" : "text-ink-faint"), children: gorunen || placeholder }), _jsx(Icon, { icon: CaretRight, size: "xs", className: "shrink-0 rotate-90" })] }), open && (_jsxs("div", { ref: list, role: "listbox", className: "tamga-overlay tamga-menu absolute left-0 top-[var(--overlay-below)] z-40 flex w-full flex-col gap-0.5 overflow-hidden", "aria-busy": loading || undefined, children: [loading && _jsx(SkeletonOptions, { rows: loadingRows }), !loading && options.map((ham) => {
|
|
105
|
+
return (_jsxs("div", { ...dataProps(rest), ref: box, className: cn("relative w-56", className), children: [_jsxs("button", { type: "button", className: "tamga-select justify-between", "data-set": (set ?? Boolean(current)) ? "true" : undefined, "aria-haspopup": "listbox", "aria-expanded": open, "aria-label": ariaLabel, title: title, disabled: disabled || undefined, onClick: () => setOpen((o) => !o), children: [icon ? _jsx(Icon, { icon: icon, size: "sm", className: "shrink-0 text-ink-faint" }) : null, _jsx("span", { className: cn("min-w-0 flex-1 truncate", current ? "" : "text-ink-faint"), children: gorunen || placeholder }), _jsx(Icon, { icon: CaretRight, size: "xs", className: "shrink-0 rotate-90" })] }), open && (_jsxs("div", { ref: list, role: "listbox", className: "tamga-overlay tamga-menu absolute left-0 top-[var(--overlay-below)] z-40 flex w-full flex-col gap-0.5 overflow-hidden", "aria-busy": loading || undefined, children: [loading && _jsx(SkeletonOptions, { rows: loadingRows }), !loading && options.map((ham) => {
|
|
106
106
|
const nesne = typeof ham === "string" ? { value: ham } : ham;
|
|
107
107
|
const { value: o, label: etiket, tone: ton, hint: ipucu, ...kanca } = nesne;
|
|
108
108
|
return (_createElement("button", { ...kanca, key: o, role: "option", "aria-selected": o === current, "data-tamga-option": true, className: "tamga-option", "data-selected": o === current, onClick: () => {
|
|
@@ -42,6 +42,13 @@ type Ortak = {
|
|
|
42
42
|
variant?: "secondary" | "soft" | "ghost";
|
|
43
43
|
/** The trigger's size, from `Button`. TR: Tetiğin boyu, `Button`dan. */
|
|
44
44
|
size?: "base" | "sm";
|
|
45
|
+
/**
|
|
46
|
+
* `button` an ordinary button (default). `field` a form box like `Select`: full width,
|
|
47
|
+
* the same height and edge as the inputs beside it, for a labelled filter row. TR: `button`
|
|
48
|
+
* sıradan bir düğme (varsayılan). `field` `Select` gibi bir form kutusu: tam genişlik,
|
|
49
|
+
* yanındaki kutularla aynı boy ve kenar, etiketli bir filtre satırı için.
|
|
50
|
+
*/
|
|
51
|
+
look?: "button" | "field";
|
|
45
52
|
disabled?: boolean;
|
|
46
53
|
labels: {
|
|
47
54
|
/** Shown when the search matches nothing. TR: Arama hiçbir şeyle eşleşmeyince. */
|
|
@@ -64,6 +71,6 @@ export type SelectPanelProps = Ortak & ({
|
|
|
64
71
|
value: readonly string[];
|
|
65
72
|
onChange: (next: string[]) => void;
|
|
66
73
|
});
|
|
67
|
-
export declare function SelectPanel({ options, title, placeholder, "aria-label": ariaLabel, searchable, allLabel, prefix, caret, variant, size, disabled, labels, className, multiple, value, onChange, ...rest }: SelectPanelProps): import("react").JSX.Element;
|
|
74
|
+
export declare function SelectPanel({ options, title, placeholder, "aria-label": ariaLabel, searchable, allLabel, prefix, caret, variant, size, look, disabled, labels, className, multiple, value, onChange, ...rest }: SelectPanelProps): import("react").JSX.Element;
|
|
68
75
|
export {};
|
|
69
76
|
//# sourceMappingURL=select-panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-panel.d.ts","sourceRoot":"","sources":["../../src/components/select-panel.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGtC;;;;;;GAMG;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,qHAAqH;IACrH,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,iHAAiH;IACjH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5B,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACtC,wGAAwG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AO,CAAC;IACnB,MAAM,EAAE;QACN,kFAAkF;QAClF,OAAO,EAAE,MAAM,CAAC;QAChB,4HAA4H;QAC5H,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,kIAAkI;QAClI,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,CAAC,CAAC,EAAE,QAAQ,MAAM,EAAE,GAAG,OAAO,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAClC,CACI;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GAEtE;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CAAE,CACnF,CAAC;AAEJ,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,KAAK,EACL,WAAW,EACX,YAAY,EAAE,SAAS,EACvB,UAAkB,EAClB,QAAQ,EACR,MAAM,EACN,KAAY,EACZ,OAAqB,EACrB,IAAa,EACb,IAAe,EACf,QAAgB,EAChB,MAAM,EACN,SAAS,EACT,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,gBAAgB,+BAmJlB"}
|
|
@@ -7,10 +7,10 @@ import { buttonVariants } from "./button.js";
|
|
|
7
7
|
import { cn } from "../lib/cn.js";
|
|
8
8
|
import { dataProps } from "../lib/data-props.js";
|
|
9
9
|
import { Icon } from "./icon.js";
|
|
10
|
-
import { CaretDown, Check, Search } from "./icons.js";
|
|
10
|
+
import { CaretDown, CaretRight, Check, Search } from "./icons.js";
|
|
11
11
|
import { Input } from "./input.js";
|
|
12
12
|
import { toneOf } from "./tone.js";
|
|
13
|
-
export function SelectPanel({ options, title, placeholder, "aria-label": ariaLabel, searchable = false, allLabel, prefix, caret = true, variant = "secondary", size = "base", disabled = false, labels, className, multiple, value, onChange, ...rest }) {
|
|
13
|
+
export function SelectPanel({ options, title, placeholder, "aria-label": ariaLabel, searchable = false, allLabel, prefix, caret = true, variant = "secondary", size = "base", look = "button", disabled = false, labels, className, multiple, value, onChange, ...rest }) {
|
|
14
14
|
const id = useId();
|
|
15
15
|
const [open, setOpen] = useState(false);
|
|
16
16
|
const [sorgu, setSorgu] = useState("");
|
|
@@ -64,5 +64,5 @@ export function SelectPanel({ options, title, placeholder, "aria-label": ariaLab
|
|
|
64
64
|
o.hint ? _jsx("span", { className: "shrink-0 text-small text-ink-faint", children: o.hint }) : null,
|
|
65
65
|
isaretli ? _jsx(Icon, { icon: Check, size: "xs", weight: "bold", className: "shrink-0 text-[var(--color-accent-line)]" }) : null));
|
|
66
66
|
};
|
|
67
|
-
return (_jsxs("div", { ...dataProps(rest), ref: kutu, className: cn("tamga-select-panel", className), children: [_jsxs("button", { ref: tetik, type: "button", className: cn(buttonVariants({ variant, size }), "tamga-select-panel-tetik"), "aria-haspopup": "listbox", "aria-expanded": open, "aria-controls": open ? `${id}-liste` : undefined, "aria-label": ariaLabel, "data-set": ozet ? "true" : undefined, disabled: disabled || undefined, onClick: () => setOpen((o) => !o), children: [prefix ? _jsx("span", { className: "tamga-select-panel-onek", children: prefix }) : null, _jsx("span", { className: cn("min-w-0 truncate", ozet ? "" : "tamga-select-panel-bos"), children: ozet ?? placeholder }), caret ? _jsx(Icon, { icon: CaretDown, size: "xs", weight: "bold", className: "shrink-0" }) : null] }), open ? (_jsxs("div", { className: "tamga-overlay tamga-menu tamga-select-panel-kutu", children: [_jsx("span", { className: "tamga-menu-baslik", children: title }), searchable ? (_jsxs("span", { className: "tamga-select-panel-arama", children: [_jsx(Icon, { icon: Search, size: "xs", "aria-hidden": true, className: "pointer-events-none absolute left-2.5 text-ink-faint" }), _jsx(Input, { ref: arama, type: "search", full: true, leading: true, size: "sm", "aria-label": labels.search ?? title, placeholder: labels.search ?? title, value: sorgu, onChange: (e) => setSorgu(e.target.value) })] })) : null, _jsxs("div", { ref: liste, id: `${id}-liste`, role: "listbox", "aria-label": title, "aria-multiselectable": multiple || undefined, className: "tamga-select-panel-liste", children: [allLabel && !multiple ? secenek({ value: "", label: allLabel }) : null, gorunen.map(({ value: v, label, tone, hint, ...kanca }) => secenek({ value: v, label, tone, hint }, kanca)), gorunen.length === 0 ? _jsx("span", { className: "tamga-select-panel-yok", children: labels.noMatch }) : null] }), multiple && labels.clear ? (_jsx("span", { className: "tamga-select-panel-alt", children: _jsx("button", { type: "button", className: "tamga-link", onClick: () => onChange([]), children: labels.clear }) })) : null] })) : null] }));
|
|
67
|
+
return (_jsxs("div", { ...dataProps(rest), ref: kutu, className: cn("tamga-select-panel", look === "field" && "tamga-select-panel-alan", className), children: [_jsxs("button", { ref: tetik, type: "button", className: cn(look === "field" ? "tamga-select" : buttonVariants({ variant, size }), "tamga-select-panel-tetik"), title: look === "field" && ozet ? ozet : undefined, "aria-haspopup": "listbox", "aria-expanded": open, "aria-controls": open ? `${id}-liste` : undefined, "aria-label": ariaLabel, "data-set": ozet ? "true" : undefined, disabled: disabled || undefined, onClick: () => setOpen((o) => !o), children: [prefix ? _jsx("span", { className: "tamga-select-panel-onek", children: prefix }) : null, look === "field" ? (_jsx("span", { className: "min-w-0 flex-1 truncate", children: ozet ?? placeholder })) : (_jsx("span", { className: cn("min-w-0 truncate", ozet ? "" : "tamga-select-panel-bos"), children: ozet ?? placeholder })), caret ? (look === "field" ? (_jsx(Icon, { icon: CaretRight, size: "xs", className: "shrink-0 rotate-90" })) : (_jsx(Icon, { icon: CaretDown, size: "xs", weight: "bold", className: "shrink-0" }))) : null] }), open ? (_jsxs("div", { className: "tamga-overlay tamga-menu tamga-select-panel-kutu", children: [_jsx("span", { className: "tamga-menu-baslik", children: title }), searchable ? (_jsxs("span", { className: "tamga-select-panel-arama", children: [_jsx(Icon, { icon: Search, size: "xs", "aria-hidden": true, className: "pointer-events-none absolute left-2.5 text-ink-faint" }), _jsx(Input, { ref: arama, type: "search", full: true, leading: true, size: "sm", "aria-label": labels.search ?? title, placeholder: labels.search ?? title, value: sorgu, onChange: (e) => setSorgu(e.target.value) })] })) : null, _jsxs("div", { ref: liste, id: `${id}-liste`, role: "listbox", "aria-label": title, "aria-multiselectable": multiple || undefined, className: "tamga-select-panel-liste", children: [allLabel && !multiple ? secenek({ value: "", label: allLabel }) : null, gorunen.map(({ value: v, label, tone, hint, ...kanca }) => secenek({ value: v, label, tone, hint }, kanca)), gorunen.length === 0 ? _jsx("span", { className: "tamga-select-panel-yok", children: labels.noMatch }) : null] }), multiple && labels.clear ? (_jsx("span", { className: "tamga-select-panel-alt", children: _jsx("button", { type: "button", className: "tamga-link", onClick: () => onChange([]), children: labels.clear }) })) : null] })) : null] }));
|
|
68
68
|
}
|
package/dist/fonts.css
CHANGED
package/dist/kit.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tamga-ui 0.
|
|
1
|
+
/*! tamga-ui 0.9.0 · MIT · https://tamga.org.tr */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
--overlay-gap: 8px;
|
|
@@ -1106,6 +1106,9 @@
|
|
|
1106
1106
|
flex-direction: column;
|
|
1107
1107
|
gap: 14px;
|
|
1108
1108
|
padding: 16px;
|
|
1109
|
+
|
|
1110
|
+
container-type: inline-size;
|
|
1111
|
+
min-width: 0;
|
|
1109
1112
|
}
|
|
1110
1113
|
|
|
1111
1114
|
[data-filters] > .tamga-filter-bar {
|
|
@@ -1148,46 +1151,103 @@
|
|
|
1148
1151
|
.tamga-filter-cips {
|
|
1149
1152
|
display: flex;
|
|
1150
1153
|
flex-wrap: wrap;
|
|
1151
|
-
align-items:
|
|
1154
|
+
align-items: center;
|
|
1152
1155
|
gap: 8px;
|
|
1156
|
+
min-width: 0;
|
|
1153
1157
|
}
|
|
1154
1158
|
.tamga-filter-ara-sabit {
|
|
1155
1159
|
display: flex;
|
|
1156
1160
|
flex-direction: column;
|
|
1157
|
-
gap: 6px;
|
|
1158
1161
|
min-width: 0;
|
|
1159
1162
|
max-width: 100%;
|
|
1160
1163
|
flex: 0 0 17.5rem;
|
|
1161
1164
|
}
|
|
1165
|
+
|
|
1166
|
+
.tamga-filter-ara-etiket {
|
|
1167
|
+
position: absolute;
|
|
1168
|
+
width: 1px;
|
|
1169
|
+
height: 1px;
|
|
1170
|
+
overflow: hidden;
|
|
1171
|
+
clip: rect(0 0 0 0);
|
|
1172
|
+
white-space: nowrap;
|
|
1173
|
+
}
|
|
1162
1174
|
.tamga-filter-cip-sira {
|
|
1163
1175
|
display: contents;
|
|
1164
1176
|
}
|
|
1177
|
+
|
|
1178
|
+
.tamga-filter-bar .tamga-token {
|
|
1179
|
+
white-space: nowrap;
|
|
1180
|
+
max-width: 100%;
|
|
1181
|
+
}
|
|
1182
|
+
.tamga-token-deger {
|
|
1183
|
+
min-width: 0;
|
|
1184
|
+
overflow: hidden;
|
|
1185
|
+
text-overflow: ellipsis;
|
|
1186
|
+
}
|
|
1187
|
+
.tamga-filter-cip-temizle {
|
|
1188
|
+
white-space: nowrap;
|
|
1189
|
+
font-size: var(--text-small);
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1165
1192
|
.tamga-filter-cip {
|
|
1166
1193
|
display: inline-flex;
|
|
1167
1194
|
align-items: center;
|
|
1168
|
-
|
|
1195
|
+
flex-shrink: 0;
|
|
1169
1196
|
max-width: 100%;
|
|
1197
|
+
white-space: nowrap;
|
|
1170
1198
|
}
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
height: calc(var(--control) - 8px);
|
|
1176
|
-
flex-shrink: 0;
|
|
1199
|
+
|
|
1200
|
+
.tamga-filter-cip[data-set] {
|
|
1201
|
+
gap: 2px;
|
|
1202
|
+
padding-right: 6px;
|
|
1177
1203
|
border: 1.5px solid var(--color-edge-strong);
|
|
1178
1204
|
border-radius: var(--radius-ctl);
|
|
1179
1205
|
background: var(--color-accent-soft);
|
|
1180
1206
|
color: var(--color-accent-soft-ink);
|
|
1181
1207
|
box-shadow: 3px 3px 0 var(--color-edge-strong);
|
|
1208
|
+
}
|
|
1209
|
+
.tamga-filter-cip[data-set] > .tamga-select-panel > .tamga-select-panel-tetik {
|
|
1210
|
+
border: 0;
|
|
1211
|
+
box-shadow: none;
|
|
1212
|
+
background: transparent;
|
|
1213
|
+
padding-right: 4px;
|
|
1214
|
+
}
|
|
1215
|
+
.tamga-filter-cip[data-set] > .tamga-select-panel > .tamga-select-panel-tetik:not(:disabled):hover,
|
|
1216
|
+
.tamga-filter-cip[data-set] > .tamga-select-panel > .tamga-select-panel-tetik:not(:disabled):active {
|
|
1217
|
+
transform: none;
|
|
1218
|
+
box-shadow: none;
|
|
1219
|
+
background: transparent;
|
|
1220
|
+
text-decoration: underline;
|
|
1221
|
+
text-underline-offset: 3px;
|
|
1222
|
+
}
|
|
1223
|
+
.tamga-filter-cip-x {
|
|
1224
|
+
display: grid;
|
|
1225
|
+
place-items: center;
|
|
1226
|
+
width: 18px;
|
|
1227
|
+
height: 18px;
|
|
1228
|
+
flex-shrink: 0;
|
|
1229
|
+
border: 0;
|
|
1230
|
+
border-radius: var(--mark-dot-radius);
|
|
1231
|
+
background: transparent;
|
|
1232
|
+
color: var(--color-accent-soft-ink);
|
|
1233
|
+
box-shadow: none;
|
|
1182
1234
|
cursor: pointer;
|
|
1183
1235
|
}
|
|
1184
1236
|
.tamga-filter-cip-x:hover {
|
|
1185
|
-
|
|
1186
|
-
box-shadow: 4px 4px 0 var(--color-edge-strong);
|
|
1237
|
+
background: var(--color-shell);
|
|
1187
1238
|
}
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1239
|
+
|
|
1240
|
+
.tamga-select-panel-alan {
|
|
1241
|
+
display: flex;
|
|
1242
|
+
width: 100%;
|
|
1243
|
+
}
|
|
1244
|
+
.tamga-select-panel-alan > .tamga-select-panel-tetik {
|
|
1245
|
+
width: 100%;
|
|
1246
|
+
justify-content: space-between;
|
|
1247
|
+
}
|
|
1248
|
+
.tamga-select-panel-alan > .tamga-select-panel-tetik > span:not(.tamga-select-panel-onek) {
|
|
1249
|
+
flex: 1;
|
|
1250
|
+
text-align: start;
|
|
1191
1251
|
}
|
|
1192
1252
|
|
|
1193
1253
|
.tamga-select-panel-tam,
|
|
@@ -1204,16 +1264,32 @@
|
|
|
1204
1264
|
text-align: start;
|
|
1205
1265
|
}
|
|
1206
1266
|
|
|
1207
|
-
@
|
|
1267
|
+
@container (max-width: 39.9375rem) {
|
|
1208
1268
|
.tamga-filter-genis {
|
|
1209
1269
|
display: none;
|
|
1210
1270
|
}
|
|
1271
|
+
|
|
1211
1272
|
.tamga-filter-row > .tamga-filter-ara {
|
|
1212
|
-
flex
|
|
1273
|
+
flex: 1 1 7.5rem;
|
|
1213
1274
|
}
|
|
1214
1275
|
|
|
1215
1276
|
.tamga-filter-cips > .tamga-filter-ara-sabit {
|
|
1216
1277
|
flex: 1 1 0;
|
|
1278
|
+
min-width: 0;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
.tamga-filter-ara-ad {
|
|
1282
|
+
position: absolute;
|
|
1283
|
+
width: 1px;
|
|
1284
|
+
height: 1px;
|
|
1285
|
+
overflow: hidden;
|
|
1286
|
+
clip: rect(0 0 0 0);
|
|
1287
|
+
white-space: nowrap;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
.tamga-filter-cips > .tamga-btn,
|
|
1291
|
+
.tamga-filter-row > .tamga-btn {
|
|
1292
|
+
flex-shrink: 0;
|
|
1217
1293
|
}
|
|
1218
1294
|
.tamga-filter-cips .tamga-filter-cip:not([data-set]) {
|
|
1219
1295
|
display: none;
|
|
@@ -1222,6 +1298,9 @@
|
|
|
1222
1298
|
display: flex;
|
|
1223
1299
|
order: 2;
|
|
1224
1300
|
flex: 1 1 100%;
|
|
1301
|
+
min-width: 0;
|
|
1302
|
+
max-width: 100%;
|
|
1303
|
+
align-items: center;
|
|
1225
1304
|
flex-wrap: nowrap;
|
|
1226
1305
|
gap: 8px;
|
|
1227
1306
|
overflow-x: auto;
|
|
@@ -1230,13 +1309,179 @@
|
|
|
1230
1309
|
.tamga-filter-cip-sira:empty {
|
|
1231
1310
|
display: none;
|
|
1232
1311
|
}
|
|
1312
|
+
.tamga-filter-cip-sira > .tamga-filter-cip,
|
|
1313
|
+
.tamga-filter-cip-sira > .tamga-filter-cip-temizle {
|
|
1314
|
+
flex: 0 0 auto;
|
|
1315
|
+
}
|
|
1233
1316
|
}
|
|
1234
|
-
@
|
|
1317
|
+
@container (min-width: 40rem) {
|
|
1235
1318
|
.tamga-filter-dar {
|
|
1236
1319
|
display: none;
|
|
1237
1320
|
}
|
|
1238
1321
|
}
|
|
1239
1322
|
|
|
1323
|
+
@container (min-width: 40rem) {
|
|
1324
|
+
|
|
1325
|
+
.tamga-filter-row.tamga-filter-izgara {
|
|
1326
|
+
display: grid;
|
|
1327
|
+
align-items: end;
|
|
1328
|
+
grid-template-columns: repeat(var(--filter-sutun), minmax(0, 1fr));
|
|
1329
|
+
}
|
|
1330
|
+
.tamga-filter-row.tamga-filter-izgara[data-kuyruk] {
|
|
1331
|
+
grid-template-columns: repeat(var(--filter-sutun), minmax(0, 1fr)) auto;
|
|
1332
|
+
}
|
|
1333
|
+
.tamga-filter-izgara > .tamga-filter-ara {
|
|
1334
|
+
grid-column: span 2;
|
|
1335
|
+
flex: none;
|
|
1336
|
+
}
|
|
1337
|
+
.tamga-filter-izgara > .tamga-filter-alan {
|
|
1338
|
+
flex: none;
|
|
1339
|
+
}
|
|
1340
|
+
.tamga-filter-izgara > .tamga-filter-alan[data-range] {
|
|
1341
|
+
grid-column: span 2;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
.tamga-filter-row.tamga-filter-izgara > .tamga-filter-cap {
|
|
1345
|
+
max-width: none;
|
|
1346
|
+
}
|
|
1347
|
+
.tamga-filter-izgara > .tamga-filter-kir {
|
|
1348
|
+
display: none;
|
|
1349
|
+
}
|
|
1350
|
+
.tamga-filter-izgara > .tamga-btn {
|
|
1351
|
+
grid-column: -2 / -1;
|
|
1352
|
+
grid-row: 1;
|
|
1353
|
+
justify-self: end;
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
@container (min-width: 424px) {
|
|
1357
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="1"]:not([data-kuyruk]) {
|
|
1358
|
+
grid-template-columns: 16rem repeat(1, minmax(0, 1fr));
|
|
1359
|
+
}
|
|
1360
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="1"]:not([data-kuyruk]) > .tamga-filter-ara {
|
|
1361
|
+
grid-column: auto;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
@container (min-width: 580px) {
|
|
1365
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="1"][data-kuyruk] {
|
|
1366
|
+
grid-template-columns: 16rem repeat(1, minmax(0, 1fr)) auto;
|
|
1367
|
+
}
|
|
1368
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="1"][data-kuyruk] > .tamga-filter-ara {
|
|
1369
|
+
grid-column: auto;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
@container (min-width: 580px) {
|
|
1373
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="2"]:not([data-kuyruk]) {
|
|
1374
|
+
grid-template-columns: 16rem repeat(2, minmax(0, 1fr));
|
|
1375
|
+
}
|
|
1376
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="2"]:not([data-kuyruk]) > .tamga-filter-ara {
|
|
1377
|
+
grid-column: auto;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
@container (min-width: 736px) {
|
|
1381
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="2"][data-kuyruk] {
|
|
1382
|
+
grid-template-columns: 16rem repeat(2, minmax(0, 1fr)) auto;
|
|
1383
|
+
}
|
|
1384
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="2"][data-kuyruk] > .tamga-filter-ara {
|
|
1385
|
+
grid-column: auto;
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
@container (min-width: 736px) {
|
|
1389
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="3"]:not([data-kuyruk]) {
|
|
1390
|
+
grid-template-columns: 16rem repeat(3, minmax(0, 1fr));
|
|
1391
|
+
}
|
|
1392
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="3"]:not([data-kuyruk]) > .tamga-filter-ara {
|
|
1393
|
+
grid-column: auto;
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
@container (min-width: 892px) {
|
|
1397
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="3"][data-kuyruk] {
|
|
1398
|
+
grid-template-columns: 16rem repeat(3, minmax(0, 1fr)) auto;
|
|
1399
|
+
}
|
|
1400
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="3"][data-kuyruk] > .tamga-filter-ara {
|
|
1401
|
+
grid-column: auto;
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
@container (min-width: 892px) {
|
|
1405
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="4"]:not([data-kuyruk]) {
|
|
1406
|
+
grid-template-columns: 16rem repeat(4, minmax(0, 1fr));
|
|
1407
|
+
}
|
|
1408
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="4"]:not([data-kuyruk]) > .tamga-filter-ara {
|
|
1409
|
+
grid-column: auto;
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
@container (min-width: 1048px) {
|
|
1413
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="4"][data-kuyruk] {
|
|
1414
|
+
grid-template-columns: 16rem repeat(4, minmax(0, 1fr)) auto;
|
|
1415
|
+
}
|
|
1416
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="4"][data-kuyruk] > .tamga-filter-ara {
|
|
1417
|
+
grid-column: auto;
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
@container (min-width: 1048px) {
|
|
1421
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="5"]:not([data-kuyruk]) {
|
|
1422
|
+
grid-template-columns: 16rem repeat(5, minmax(0, 1fr));
|
|
1423
|
+
}
|
|
1424
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="5"]:not([data-kuyruk]) > .tamga-filter-ara {
|
|
1425
|
+
grid-column: auto;
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
@container (min-width: 1204px) {
|
|
1429
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="5"][data-kuyruk] {
|
|
1430
|
+
grid-template-columns: 16rem repeat(5, minmax(0, 1fr)) auto;
|
|
1431
|
+
}
|
|
1432
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="5"][data-kuyruk] > .tamga-filter-ara {
|
|
1433
|
+
grid-column: auto;
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
@container (min-width: 1204px) {
|
|
1437
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="6"]:not([data-kuyruk]) {
|
|
1438
|
+
grid-template-columns: 16rem repeat(6, minmax(0, 1fr));
|
|
1439
|
+
}
|
|
1440
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="6"]:not([data-kuyruk]) > .tamga-filter-ara {
|
|
1441
|
+
grid-column: auto;
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
@container (min-width: 1360px) {
|
|
1445
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="6"][data-kuyruk] {
|
|
1446
|
+
grid-template-columns: 16rem repeat(6, minmax(0, 1fr)) auto;
|
|
1447
|
+
}
|
|
1448
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="6"][data-kuyruk] > .tamga-filter-ara {
|
|
1449
|
+
grid-column: auto;
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
@container (min-width: 1360px) {
|
|
1453
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="7"]:not([data-kuyruk]) {
|
|
1454
|
+
grid-template-columns: 16rem repeat(7, minmax(0, 1fr));
|
|
1455
|
+
}
|
|
1456
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="7"]:not([data-kuyruk]) > .tamga-filter-ara {
|
|
1457
|
+
grid-column: auto;
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
@container (min-width: 1516px) {
|
|
1461
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="7"][data-kuyruk] {
|
|
1462
|
+
grid-template-columns: 16rem repeat(7, minmax(0, 1fr)) auto;
|
|
1463
|
+
}
|
|
1464
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="7"][data-kuyruk] > .tamga-filter-ara {
|
|
1465
|
+
grid-column: auto;
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
@container (min-width: 1516px) {
|
|
1469
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="8"]:not([data-kuyruk]) {
|
|
1470
|
+
grid-template-columns: 16rem repeat(8, minmax(0, 1fr));
|
|
1471
|
+
}
|
|
1472
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="8"]:not([data-kuyruk]) > .tamga-filter-ara {
|
|
1473
|
+
grid-column: auto;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
@container (min-width: 1672px) {
|
|
1477
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="8"][data-kuyruk] {
|
|
1478
|
+
grid-template-columns: 16rem repeat(8, minmax(0, 1fr)) auto;
|
|
1479
|
+
}
|
|
1480
|
+
.tamga-filter-row.tamga-filter-izgara[data-alan="8"][data-kuyruk] > .tamga-filter-ara {
|
|
1481
|
+
grid-column: auto;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1240
1485
|
.tamga-filter-row {
|
|
1241
1486
|
--filter-gap: 12px;
|
|
1242
1487
|
display: flex;
|
|
@@ -3226,9 +3471,11 @@
|
|
|
3226
3471
|
.tamga-select-panel {
|
|
3227
3472
|
position: relative;
|
|
3228
3473
|
display: inline-flex;
|
|
3474
|
+
min-width: 0;
|
|
3229
3475
|
max-width: 100%;
|
|
3230
3476
|
}
|
|
3231
3477
|
.tamga-select-panel-tetik {
|
|
3478
|
+
min-width: 0;
|
|
3232
3479
|
max-width: 100%;
|
|
3233
3480
|
}
|
|
3234
3481
|
.tamga-select-panel-onek {
|
package/dist/styles.css
CHANGED
package/dist/theme.css
CHANGED