@flowselections/floriday-klanten-module 1.0.87 → 1.0.90
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/dist-lib/components/fs-ui/ColumnsMenu.d.ts +14 -0
- package/dist-lib/components/fs-ui/ColumnsMenu.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/ColumnsMenu.js +31 -0
- package/dist-lib/components/fs-ui/DataTable.d.ts +32 -5
- package/dist-lib/components/fs-ui/DataTable.d.ts.map +1 -1
- package/dist-lib/components/fs-ui/DataTable.js +22 -6
- package/dist-lib/components/fs-ui/FilterChips.d.ts +10 -1
- package/dist-lib/components/fs-ui/FilterChips.d.ts.map +1 -1
- package/dist-lib/components/fs-ui/FilterChips.js +7 -3
- package/dist-lib/components/fs-ui/FiltersPanel.d.ts +14 -0
- package/dist-lib/components/fs-ui/FiltersPanel.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/FiltersPanel.js +9 -0
- package/dist-lib/components/fs-ui/InlineAlert.d.ts +3 -4
- package/dist-lib/components/fs-ui/InlineAlert.d.ts.map +1 -1
- package/dist-lib/components/fs-ui/InlineAlert.js +10 -16
- package/dist-lib/components/fs-ui/KpiRow.d.ts +1 -1
- package/dist-lib/components/fs-ui/KpiRow.d.ts.map +1 -1
- package/dist-lib/components/fs-ui/KpiRow.js +2 -2
- package/dist-lib/components/fs-ui/NoticeBar.d.ts +18 -0
- package/dist-lib/components/fs-ui/NoticeBar.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/NoticeBar.js +37 -0
- package/dist-lib/components/fs-ui/PageHeader.d.ts +13 -3
- package/dist-lib/components/fs-ui/PageHeader.d.ts.map +1 -1
- package/dist-lib/components/fs-ui/PageHeader.js +9 -3
- package/dist-lib/components/fs-ui/PillTabs.d.ts +5 -3
- package/dist-lib/components/fs-ui/PillTabs.d.ts.map +1 -1
- package/dist-lib/components/fs-ui/PillTabs.js +26 -9
- package/dist-lib/components/fs-ui/RowMenu.d.ts +13 -0
- package/dist-lib/components/fs-ui/RowMenu.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/RowMenu.js +9 -0
- package/dist-lib/components/fs-ui/SearchInput.d.ts +2 -2
- package/dist-lib/components/fs-ui/SearchInput.d.ts.map +1 -1
- package/dist-lib/components/fs-ui/SearchInput.js +11 -7
- package/dist-lib/components/fs-ui/Toolbar.d.ts +11 -2
- package/dist-lib/components/fs-ui/Toolbar.d.ts.map +1 -1
- package/dist-lib/components/fs-ui/Toolbar.js +12 -3
- package/dist-lib/components/fs-ui/UpdatedAt.d.ts +5 -2
- package/dist-lib/components/fs-ui/UpdatedAt.d.ts.map +1 -1
- package/dist-lib/components/fs-ui/UpdatedAt.js +7 -3
- package/dist-lib/components/fs-ui/index.d.ts +7 -3
- package/dist-lib/components/fs-ui/index.d.ts.map +1 -1
- package/dist-lib/components/fs-ui/index.js +7 -3
- package/dist-lib/components/fs-ui/shortcuts.d.ts.map +1 -1
- package/dist-lib/components/fs-ui/shortcuts.js +7 -8
- package/dist-lib/components/klanten/BackLink.js +1 -1
- package/dist-lib/components/klanten/BewerkKlant.d.ts.map +1 -1
- package/dist-lib/components/klanten/BewerkKlant.js +3 -2
- package/dist-lib/components/klanten/ExternalCacheBanner.d.ts.map +1 -1
- package/dist-lib/components/klanten/ExternalCacheBanner.js +2 -2
- package/dist-lib/components/klanten/GroupedKlantDetail.d.ts.map +1 -1
- package/dist-lib/components/klanten/GroupedKlantDetail.js +5 -4
- package/dist-lib/components/klanten/ImportKlanten.d.ts.map +1 -1
- package/dist-lib/components/klanten/ImportKlanten.js +6 -2
- package/dist-lib/components/klanten/KlantDetail.d.ts.map +1 -1
- package/dist-lib/components/klanten/KlantDetail.js +16 -4
- package/dist-lib/components/klanten/KlantDetailLayout.d.ts.map +1 -1
- package/dist-lib/components/klanten/KlantDetailLayout.js +5 -2
- package/dist-lib/components/klanten/KlantFormulier.d.ts.map +1 -1
- package/dist-lib/components/klanten/KlantFormulier.js +48 -40
- package/dist-lib/components/klanten/KlantenOverzicht.d.ts.map +1 -1
- package/dist-lib/components/klanten/KlantenOverzicht.js +103 -96
- package/dist-lib/components/klanten/NetwerkPagina.d.ts.map +1 -1
- package/dist-lib/components/klanten/NetwerkPagina.js +5 -4
- package/dist-lib/components/klanten/NieuweKlant.d.ts.map +1 -1
- package/dist-lib/components/klanten/NieuweKlant.js +2 -1
- package/dist-lib/components/klanten/OvernemenTwinfieldKlant.d.ts.map +1 -1
- package/dist-lib/components/klanten/OvernemenTwinfieldKlant.js +3 -2
- package/dist-lib/components/klanten/pricegroups/PriceGroupFormPage.d.ts.map +1 -1
- package/dist-lib/components/klanten/pricegroups/PriceGroupFormPage.js +4 -3
- package/dist-lib/components/klanten/pricegroups/PriceGroupsPage.d.ts.map +1 -1
- package/dist-lib/components/klanten/pricegroups/PriceGroupsPage.js +8 -3
- package/dist-lib/lib/format-date.d.ts +2 -2
- package/dist-lib/lib/format-date.d.ts.map +1 -1
- package/dist-lib/lib/format-date.js +15 -7
- package/dist-lib/lib/labels.d.ts +36 -0
- package/dist-lib/lib/labels.d.ts.map +1 -0
- package/dist-lib/lib/labels.js +49 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ColumnOption {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
locked?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Knop "Kolommen" zoals Verkooporders: aan/uit per kolom, keuze blijft bewaard op dit apparaat. */
|
|
7
|
+
export declare function ColumnsMenu({ columns, hidden, onChange, }: {
|
|
8
|
+
columns: ColumnOption[];
|
|
9
|
+
hidden: string[];
|
|
10
|
+
onChange: (hidden: string[]) => void;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/** Verborgen kolommen per lijst, bewaard in de browser (na laden, geen verschil bij eerste weergave). */
|
|
13
|
+
export declare function useHiddenColumns(storageKey: string): readonly [string[], (next: string[]) => void];
|
|
14
|
+
//# sourceMappingURL=ColumnsMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/ColumnsMenu.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAAG,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE;AAE9E,oGAAoG;AACpG,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,MAAM,EACN,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACtC,+BAoCA;AAED,yGAAyG;AACzG,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,8BAQ3B,MAAM,EAAE,WAK/B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { Columns3 } from "lucide-react";
|
|
4
|
+
import { Button, Popover, PopoverContent, PopoverTrigger } from "@flowselections/core";
|
|
5
|
+
/** Knop "Kolommen" zoals Verkooporders: aan/uit per kolom, keuze blijft bewaard op dit apparaat. */
|
|
6
|
+
export function ColumnsMenu({ columns, hidden, onChange, }) {
|
|
7
|
+
return (_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { variant: "outline", size: "sm", className: "hidden h-9 px-3 md:inline-flex", "aria-label": "Kolommen", children: [_jsx(Columns3, { className: "mr-2 h-4 w-4" }), " Kolommen"] }) }), _jsxs(PopoverContent, { align: "end", className: "w-56 p-1", children: [_jsx("ul", { children: columns.map((c) => {
|
|
8
|
+
const on = !hidden.includes(c.key);
|
|
9
|
+
return (_jsx("li", { children: _jsxs("label", { className: `flex h-9 items-center gap-2 rounded-md px-2 text-sm ${c.locked ? "text-muted-foreground" : "cursor-pointer hover:bg-accent"}`, children: [_jsx("input", { type: "checkbox", className: "h-4 w-4 accent-[hsl(var(--primary))]", checked: on, disabled: c.locked, onChange: () => onChange(on ? [...hidden, c.key] : hidden.filter((k) => k !== c.key)) }), c.label] }) }, c.key));
|
|
10
|
+
}) }), hidden.length > 0 && (_jsx("button", { type: "button", className: "mt-1 h-8 w-full rounded-md text-left px-2 text-xs text-muted-foreground hover:bg-accent", onClick: () => onChange([]), children: "Alle kolommen tonen" }))] })] }));
|
|
11
|
+
}
|
|
12
|
+
/** Verborgen kolommen per lijst, bewaard in de browser (na laden, geen verschil bij eerste weergave). */
|
|
13
|
+
export function useHiddenColumns(storageKey) {
|
|
14
|
+
const [hidden, setHidden] = useState([]);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
try {
|
|
17
|
+
const raw = window.localStorage.getItem(storageKey);
|
|
18
|
+
if (raw)
|
|
19
|
+
setHidden(JSON.parse(raw));
|
|
20
|
+
}
|
|
21
|
+
catch { /* negeren */ }
|
|
22
|
+
}, [storageKey]);
|
|
23
|
+
const update = (next) => {
|
|
24
|
+
setHidden(next);
|
|
25
|
+
try {
|
|
26
|
+
window.localStorage.setItem(storageKey, JSON.stringify(next));
|
|
27
|
+
}
|
|
28
|
+
catch { /* negeren */ }
|
|
29
|
+
};
|
|
30
|
+
return [hidden, update];
|
|
31
|
+
}
|
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
/** Horizontale celruimte; kop en cel gebruiken exact dezelfde waarde (0 px verschil). */
|
|
3
|
+
export declare const CELL_X = "px-3";
|
|
2
4
|
/**
|
|
3
|
-
* Tabelvlak
|
|
4
|
-
* 900 px
|
|
5
|
-
*
|
|
5
|
+
* Tabelvlak exact als Verkooporders: eigen table-fixed met colgroup in px,
|
|
6
|
+
* minimaal 900 px, kop 40 px/11 px hoofdletters, sticky. Onder 768 px wordt
|
|
7
|
+
* `mobile` (kaarten) getoond in plaats van de tabel.
|
|
6
8
|
*/
|
|
7
|
-
export declare function DataTable({ children, mobile,
|
|
9
|
+
export declare function DataTable({ cols, head, children, mobile, topSlot, }: {
|
|
10
|
+
cols: readonly number[];
|
|
11
|
+
head: ReactNode;
|
|
8
12
|
children: ReactNode;
|
|
9
13
|
mobile?: ReactNode;
|
|
10
|
-
|
|
14
|
+
topSlot?: ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** Kopcel; sorteerpijl alleen bij de kolom waarop gesorteerd wordt. */
|
|
17
|
+
export declare function Th({ children, sort, onSort, }: {
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
sort?: "asc" | "desc" | null;
|
|
20
|
+
onSort?: () => void;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
/** Cel met hooguit twee regels: 14 px en 12 px grijs; afkappen met volledige tekst als title. */
|
|
23
|
+
export declare function Td({ line1, line2, children, className }: {
|
|
24
|
+
line1?: ReactNode;
|
|
25
|
+
line2?: ReactNode;
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
}): import("react").JSX.Element;
|
|
29
|
+
/** Paginering exact als Verkooporders: "1–25 van 120", Per pagina, pijlen met "1 / 5". */
|
|
30
|
+
export declare function Pagination({ page, pageSize, total, onPage, onPageSize, sizes, loading, }: {
|
|
31
|
+
page: number;
|
|
32
|
+
pageSize: number;
|
|
33
|
+
total: number;
|
|
34
|
+
onPage: (p: number) => void;
|
|
35
|
+
onPageSize: (n: number) => void;
|
|
36
|
+
sizes?: number[];
|
|
37
|
+
loading?: boolean;
|
|
11
38
|
}): import("react").JSX.Element;
|
|
12
39
|
//# sourceMappingURL=DataTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,yFAAyF;AACzF,eAAO,MAAM,MAAM,SAAS,CAAC;AAE7B;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,OAAO,GACR,EAAE;IACD,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,+BAgBA;AAED,uEAAuE;AACvE,wBAAgB,EAAE,CAAC,EACjB,QAAQ,EACR,IAAI,EACJ,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,+BAWA;AAED,iGAAiG;AACjG,wBAAgB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAc,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAWhJ;AAED,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,MAAM,EACN,UAAU,EACV,KAAqB,EACrB,OAAO,GACR,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,+BA6BA"}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { ArrowDown, ArrowUp, ChevronLeft, ChevronRight } from "lucide-react";
|
|
3
|
+
import { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@flowselections/core";
|
|
4
|
+
/** Horizontale celruimte; kop en cel gebruiken exact dezelfde waarde (0 px verschil). */
|
|
5
|
+
export const CELL_X = "px-3";
|
|
3
6
|
/**
|
|
4
|
-
* Tabelvlak
|
|
5
|
-
* 900 px
|
|
6
|
-
*
|
|
7
|
+
* Tabelvlak exact als Verkooporders: eigen table-fixed met colgroup in px,
|
|
8
|
+
* minimaal 900 px, kop 40 px/11 px hoofdletters, sticky. Onder 768 px wordt
|
|
9
|
+
* `mobile` (kaarten) getoond in plaats van de tabel.
|
|
7
10
|
*/
|
|
8
|
-
export function DataTable({ children, mobile,
|
|
9
|
-
return (_jsxs(
|
|
11
|
+
export function DataTable({ cols, head, children, mobile, topSlot, }) {
|
|
12
|
+
return (_jsxs("div", { className: "w-full min-w-0 overflow-clip rounded-xl border border-border bg-card shadow-sm", children: [topSlot, mobile && _jsx("div", { className: "md:hidden", children: mobile }), _jsx("div", { className: (mobile ? "hidden md:block " : "") + "max-h-[calc(100dvh-7rem)] overflow-auto xl:max-h-none xl:overflow-visible", children: _jsxs("table", { className: "w-full min-w-[900px] table-fixed caption-bottom text-sm [&_thead_th]:h-10 [&_thead_th]:text-[11px] [&_thead_th]:font-semibold [&_thead_th]:uppercase [&_thead_th]:tracking-wide [&_thead_th]:text-muted-foreground [&_thead_th]:sticky [&_thead_th]:top-0 [&_thead_th]:z-10 [&_thead_th]:bg-card [&_thead_th]:text-left [&_thead_th]:align-middle [&_thead_th]:font-sans [&_tbody_tr]:transition-colors", children: [_jsx("colgroup", { children: cols.map((w, i) => _jsx("col", { style: { width: `${w}px` } }, i)) }), _jsx("thead", { className: "[&_tr]:border-b [&_tr]:border-border", children: head }), _jsx("tbody", { className: "[&_tr:last-child]:border-0", children: children })] }) })] }));
|
|
13
|
+
}
|
|
14
|
+
/** Kopcel; sorteerpijl alleen bij de kolom waarop gesorteerd wordt. */
|
|
15
|
+
export function Th({ children, sort, onSort, }) {
|
|
16
|
+
return (_jsx("th", { className: `${CELL_X} truncate`, "aria-sort": sort === "asc" ? "ascending" : sort === "desc" ? "descending" : undefined, children: onSort ? (_jsxs("button", { type: "button", onClick: onSort, className: "inline-flex max-w-full items-center gap-1 uppercase hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm", children: [_jsx("span", { className: "truncate", children: children }), sort === "asc" ? _jsx(ArrowUp, { className: "h-3 w-3 shrink-0", "aria-hidden": true }) : sort === "desc" ? _jsx(ArrowDown, { className: "h-3 w-3 shrink-0", "aria-hidden": true }) : null] })) : children }));
|
|
17
|
+
}
|
|
18
|
+
/** Cel met hooguit twee regels: 14 px en 12 px grijs; afkappen met volledige tekst als title. */
|
|
19
|
+
export function Td({ line1, line2, children, className = "" }) {
|
|
20
|
+
return (_jsx("td", { className: `${CELL_X} py-0 align-middle ${className}`, children: children ?? (_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "truncate text-sm", title: typeof line1 === "string" ? line1 : undefined, children: line1 ?? _jsx("span", { className: "text-muted-foreground", children: "\u2014" }) }), line2 ? _jsx("div", { className: "truncate text-xs text-muted-foreground", title: typeof line2 === "string" ? line2 : undefined, children: line2 }) : null] })) }));
|
|
21
|
+
}
|
|
22
|
+
/** Paginering exact als Verkooporders: "1–25 van 120", Per pagina, pijlen met "1 / 5". */
|
|
23
|
+
export function Pagination({ page, pageSize, total, onPage, onPageSize, sizes = [25, 50, 100], loading, }) {
|
|
24
|
+
const totalPages = Math.max(1, Math.ceil(total / pageSize));
|
|
25
|
+
return (_jsxs("nav", { "aria-label": "Paginering", className: "shrink-0 flex flex-wrap items-center justify-between gap-3 text-sm text-muted-foreground", children: [_jsx("div", { className: "tabular-nums", children: loading ? "Laden…" : total === 0 ? "Geen resultaten" : `${(page - 1) * pageSize + 1}–${Math.min(page * pageSize, total)} van ${total}` }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsxs("div", { className: "hidden items-center gap-2 sm:flex", children: [_jsx("span", { children: "Per pagina" }), _jsxs(Select, { value: String(pageSize), onValueChange: (v) => onPageSize(Number(v)), children: [_jsx(SelectTrigger, { className: "h-8 w-20", "aria-label": "Resultaten per pagina", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: sizes.map((n) => _jsx(SelectItem, { value: String(n), children: n }, n)) })] })] }), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Button, { variant: "outline", size: "icon", className: "h-10 w-10 sm:h-8 sm:w-8", onClick: () => onPage(Math.max(1, page - 1)), disabled: page <= 1, "aria-label": "Vorige pagina", children: _jsx(ChevronLeft, { className: "h-4 w-4" }) }), _jsxs("div", { className: "px-2 text-foreground tabular-nums", "aria-current": "page", children: [page, " / ", totalPages] }), _jsx(Button, { variant: "outline", size: "icon", className: "h-10 w-10 sm:h-8 sm:w-8", onClick: () => onPage(Math.min(totalPages, page + 1)), disabled: page >= totalPages, "aria-label": "Volgende pagina", children: _jsx(ChevronRight, { className: "h-4 w-4" }) })] })] })] }));
|
|
10
26
|
}
|
|
@@ -3,8 +3,17 @@ export interface FilterChip {
|
|
|
3
3
|
key: string;
|
|
4
4
|
label: ReactNode;
|
|
5
5
|
clear: () => void;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
ariaLabel?: string;
|
|
6
8
|
}
|
|
7
|
-
/**
|
|
9
|
+
/** Eén chip exact als FilterChip in Verkooporders. */
|
|
10
|
+
export declare function FilterChipButton({ label, onClear, icon, ariaLabel }: {
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
onClear: () => void;
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** Actieve filters als chips op dezelfde regel als de werkbalk, plus "Alles wissen". */
|
|
8
17
|
export declare function FilterChips({ chips, onClearAll }: {
|
|
9
18
|
chips: FilterChip[];
|
|
10
19
|
onClearAll?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterChips.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/FilterChips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,UAAU;IAAG,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,IAAI,CAAA;CAAE;
|
|
1
|
+
{"version":3,"file":"FilterChips.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/FilterChips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,UAAU;IAAG,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE;AAEtH,sDAAsD;AACtD,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAapJ;AAED,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,sCAclG"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { X } from "lucide-react";
|
|
3
|
-
/**
|
|
3
|
+
/** Eén chip exact als FilterChip in Verkooporders. */
|
|
4
|
+
export function FilterChipButton({ label, onClear, icon, ariaLabel }) {
|
|
5
|
+
return (_jsxs("button", { type: "button", onClick: onClear, "aria-label": ariaLabel ?? (typeof label === "string" ? `Filter ${label} wissen` : "Filter wissen"), className: "inline-flex h-8 items-center gap-1.5 rounded-full border border-border bg-muted px-3 text-xs font-medium text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [icon, label, _jsx(X, { className: "h-3.5 w-3.5", "aria-hidden": true })] }));
|
|
6
|
+
}
|
|
7
|
+
/** Actieve filters als chips op dezelfde regel als de werkbalk, plus "Alles wissen". */
|
|
4
8
|
export function FilterChips({ chips, onClearAll }) {
|
|
5
9
|
if (chips.length === 0)
|
|
6
10
|
return null;
|
|
7
|
-
return (_jsxs(
|
|
11
|
+
return (_jsxs(_Fragment, { children: [chips.map((c) => (_jsx(FilterChipButton, { label: c.label, icon: c.icon, ariaLabel: c.ariaLabel, onClear: c.clear }, c.key))), onClearAll && chips.length > 1 && (_jsx("button", { type: "button", onClick: onClearAll, className: "h-8 px-2 text-xs font-medium text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded", children: "Alles wissen" }))] }));
|
|
8
12
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** Zijpaneel met alle extra filters (rechts; op mobiel schermbreed). */
|
|
3
|
+
export declare function FiltersPanel({ open, onOpenChange, children, onClearAll, resultLabel, }: {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (o: boolean) => void;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
onClearAll?: () => void;
|
|
8
|
+
resultLabel?: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export declare function FilterField({ label, children }: {
|
|
11
|
+
label: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=FiltersPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FiltersPanel.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/FiltersPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,+BAgBA;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAOtF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@flowselections/core";
|
|
3
|
+
/** Zijpaneel met alle extra filters (rechts; op mobiel schermbreed). */
|
|
4
|
+
export function FiltersPanel({ open, onOpenChange, children, onClearAll, resultLabel, }) {
|
|
5
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "left-auto right-0 top-0 flex h-[100dvh] max-h-[100dvh] w-full max-w-full translate-x-0 translate-y-0 flex-col gap-0 rounded-none border-l border-border p-0 sm:max-w-sm data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right", children: [_jsxs(DialogHeader, { className: "border-b border-border px-5 py-4 text-left", children: [_jsx(DialogTitle, { children: "Filters" }), _jsx(DialogDescription, { className: "sr-only", children: "Kies extra filters voor de lijst." })] }), _jsx("div", { className: "flex-1 space-y-5 overflow-y-auto px-5 py-4", children: children }), _jsxs("div", { className: "flex items-center justify-between gap-2 border-t border-border px-5 py-3", children: [onClearAll ? _jsx(Button, { variant: "ghost", size: "sm", onClick: onClearAll, children: "Alles wissen" }) : _jsx("span", {}), _jsx(Button, { size: "sm", onClick: () => onOpenChange(false), children: resultLabel ?? "Toon resultaten" })] })] }) }));
|
|
6
|
+
}
|
|
7
|
+
export function FilterField({ label, children }) {
|
|
8
|
+
return (_jsxs("div", { className: "space-y-1.5", children: [_jsx("div", { className: "text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: label }), children] }));
|
|
9
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* actie rechts.
|
|
5
|
-
* `details` is alleen bedoeld voor beheerders (ingeklapt blok "Details").
|
|
3
|
+
* Losse melding in dezelfde vorm als NoticeBar: één regel, tik om de uitleg
|
|
4
|
+
* te tonen, actie rechts. `details` alleen voor beheerders (ingeklapt "Details").
|
|
6
5
|
*/
|
|
7
6
|
export declare function InlineAlert({ tone, title, children, action, details, }: {
|
|
8
7
|
tone?: "warning" | "destructive" | "info";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineAlert.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/InlineAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"InlineAlert.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/InlineAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAgB,EAChB,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,GACR,EAAE;IACD,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,MAAM,CAAC;IAC1C,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,+BAWA"}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { AlertCircle, AlertTriangle, ChevronDown, Info } from "lucide-react";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { NoticeBar } from "./NoticeBar.js";
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
6
|
-
* actie rechts.
|
|
7
|
-
* `details` is alleen bedoeld voor beheerders (ingeklapt blok "Details").
|
|
4
|
+
* Losse melding in dezelfde vorm als NoticeBar: één regel, tik om de uitleg
|
|
5
|
+
* te tonen, actie rechts. `details` alleen voor beheerders (ingeklapt "Details").
|
|
8
6
|
*/
|
|
9
7
|
export function InlineAlert({ tone = "warning", title, children, action, details, }) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}[tone];
|
|
17
|
-
const Icon = tone === "destructive" ? AlertCircle : tone === "warning" ? AlertTriangle : Info;
|
|
18
|
-
const iconCls = tone === "destructive" ? "text-destructive" : tone === "warning" ? "text-warning" : "text-muted-foreground";
|
|
19
|
-
return (_jsxs("div", { role: tone === "destructive" ? "alert" : "status", className: `rounded-lg border px-4 py-3 text-sm ${cls}`, children: [_jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [_jsx(Icon, { className: `h-5 w-5 shrink-0 ${iconCls}`, "aria-hidden": true }), _jsxs("button", { type: "button", onClick: () => setOpen((o) => !o), className: "min-w-0 flex-1 text-left md:pointer-events-none", "aria-expanded": open, children: [_jsx("span", { className: "font-medium", children: title }), children && (_jsxs("span", { className: `text-muted-foreground ${open ? "block" : "hidden md:inline"}`, children: [" ", children] })), children && _jsx(ChevronDown, { className: `ml-1 inline h-3.5 w-3.5 md:hidden ${open ? "rotate-180" : ""}`, "aria-hidden": true })] }), action] }), details && (_jsxs("div", { className: "mt-2 pl-8", children: [_jsx("button", { type: "button", className: "text-xs text-muted-foreground underline", onClick: () => setShowDetails((s) => !s), children: "Details" }), showDetails && _jsx("div", { className: "mt-1 break-words text-xs text-muted-foreground", children: details })] }))] }));
|
|
8
|
+
return (_jsx(NoticeBar, { items: [{
|
|
9
|
+
tone,
|
|
10
|
+
text: _jsxs(_Fragment, { children: [_jsx("span", { className: "font-medium", children: title }), children ? _jsxs("span", { className: "text-muted-foreground", children: [" ", children] }) : null] }),
|
|
11
|
+
action,
|
|
12
|
+
details,
|
|
13
|
+
}] }));
|
|
20
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
/** Rij KPI-tegels
|
|
2
|
+
/** Rij van 4 KPI-tegels; op mobiel veegbaar met de eerste tegel binnen de 16 px marge. */
|
|
3
3
|
export declare function KpiRow({ children }: {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KpiRow.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/KpiRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,
|
|
1
|
+
{"version":3,"file":"KpiRow.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/KpiRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,0FAA0F;AAC1F,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAM3D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/** Rij KPI-tegels
|
|
2
|
+
/** Rij van 4 KPI-tegels; op mobiel veegbaar met de eerste tegel binnen de 16 px marge. */
|
|
3
3
|
export function KpiRow({ children }) {
|
|
4
|
-
return (_jsx("div", { className: "-mx-4 flex snap-x snap-mandatory gap-3 overflow-x-auto px-4 [scrollbar-width:none] sm:mx-0 sm:grid sm:grid-cols-2 sm:overflow-visible sm:px-0 lg:grid-cols-4 [&::-webkit-scrollbar]:hidden [&>*]:w-[78%] [&>*]:shrink-0 [&>*]:snap-start sm:[&>*]:w-auto", children: children }));
|
|
4
|
+
return (_jsx("div", { className: "-mx-4 flex snap-x snap-mandatory scroll-px-4 gap-3 overflow-x-auto px-4 [scrollbar-width:none] sm:mx-0 sm:grid sm:grid-cols-2 sm:overflow-visible sm:px-0 lg:grid-cols-4 [&::-webkit-scrollbar]:hidden [&>*]:w-[78%] [&>*]:shrink-0 [&>*]:snap-start sm:[&>*]:w-auto", children: children }));
|
|
5
5
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type NoticeTone = "warning" | "destructive" | "info";
|
|
3
|
+
export interface NoticeItem {
|
|
4
|
+
tone?: NoticeTone;
|
|
5
|
+
text: ReactNode;
|
|
6
|
+
action?: ReactNode;
|
|
7
|
+
/** Alleen voor beheerders: ingeklapt blok "Details". */
|
|
8
|
+
details?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Meldingen exact als NoticeBar in Verkooporders: één regel per melding,
|
|
12
|
+
* hooguit 2 zichtbaar, de rest als "+ n meldingen" (uitklappen). Lege items
|
|
13
|
+
* (null/false) worden overgeslagen, zodat er nooit een leeg vlak staat.
|
|
14
|
+
*/
|
|
15
|
+
export declare function NoticeBar({ items }: {
|
|
16
|
+
items: Array<NoticeItem | ReactNode | null | false | undefined>;
|
|
17
|
+
}): import("react").JSX.Element | null;
|
|
18
|
+
//# sourceMappingURL=NoticeBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NoticeBar.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/NoticeBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,CAAC;AAC5D,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,wDAAwD;IACxD,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AASD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,SAAS,GAAG,IAAI,GAAG,KAAK,GAAG,SAAS,CAAC,CAAA;CAAE,sCA4BvG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { AlertCircle, AlertTriangle, ChevronDown, Info } from "lucide-react";
|
|
4
|
+
const TONE_CLS = {
|
|
5
|
+
destructive: "text-destructive",
|
|
6
|
+
warning: "text-warning",
|
|
7
|
+
info: "text-muted-foreground",
|
|
8
|
+
};
|
|
9
|
+
const TONE_ICON = { destructive: AlertCircle, warning: AlertTriangle, info: Info };
|
|
10
|
+
/**
|
|
11
|
+
* Meldingen exact als NoticeBar in Verkooporders: één regel per melding,
|
|
12
|
+
* hooguit 2 zichtbaar, de rest als "+ n meldingen" (uitklappen). Lege items
|
|
13
|
+
* (null/false) worden overgeslagen, zodat er nooit een leeg vlak staat.
|
|
14
|
+
*/
|
|
15
|
+
export function NoticeBar({ items }) {
|
|
16
|
+
const [open, setOpen] = useState(false);
|
|
17
|
+
const list = items
|
|
18
|
+
.filter((it) => it !== null && it !== false && it !== undefined)
|
|
19
|
+
.map((it) => (isNoticeItem(it) ? it : { text: it }));
|
|
20
|
+
if (list.length === 0)
|
|
21
|
+
return null;
|
|
22
|
+
const visible = open ? list : list.slice(0, 2);
|
|
23
|
+
const rest = list.length - 2;
|
|
24
|
+
const worst = list.some((i) => i.tone === "destructive") ? "destructive" : list.some((i) => (i.tone ?? "warning") === "warning") ? "warning" : "info";
|
|
25
|
+
const frame = worst === "destructive" ? "border-destructive/30 bg-destructive/5" : worst === "warning" ? "border-warning/30 bg-warning-soft" : "border-border bg-muted/50";
|
|
26
|
+
return (_jsxs("div", { role: worst === "destructive" ? "alert" : "status", className: `shrink-0 rounded-lg border text-sm text-foreground ${frame}`, children: [_jsx("ul", { className: "divide-y divide-border/60", children: visible.map((it, i) => _jsx(NoticeRow, { item: it }, i)) }), rest > 0 && (_jsxs("button", { type: "button", "aria-expanded": open, onClick: () => setOpen((o) => !o), className: "flex w-full items-center gap-2 rounded-b-lg border-t border-border/60 px-3 py-2 pl-9 text-left font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [open ? "Minder tonen" : `+ ${rest} ${rest === 1 ? "melding" : "meldingen"}`, _jsx(ChevronDown, { className: "ml-auto h-4 w-4 shrink-0 transition-transform duration-150 motion-reduce:transition-none " + (open ? "rotate-180" : ""), "aria-hidden": true })] }))] }));
|
|
27
|
+
}
|
|
28
|
+
function NoticeRow({ item }) {
|
|
29
|
+
const [expanded, setExpanded] = useState(false);
|
|
30
|
+
const [showDetails, setShowDetails] = useState(false);
|
|
31
|
+
const tone = item.tone ?? "warning";
|
|
32
|
+
const Icon = TONE_ICON[tone];
|
|
33
|
+
return (_jsxs("li", { className: "px-3 py-2", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx(Icon, { className: `h-4 w-4 shrink-0 ${TONE_CLS[tone]}`, "aria-hidden": true }), _jsx("button", { type: "button", onClick: () => setExpanded((e) => !e), "aria-expanded": expanded, className: `min-w-0 flex-1 text-left ${expanded ? "whitespace-normal" : "truncate"}`, children: item.text }), item.details && (_jsx("button", { type: "button", className: "shrink-0 text-xs text-muted-foreground underline", onClick: () => setShowDetails((s) => !s), children: "Details" })), item.action && _jsx("div", { className: "shrink-0", children: item.action })] }), showDetails && item.details && _jsx("div", { className: "mt-1 break-words pl-6 text-xs text-muted-foreground", children: item.details })] }));
|
|
34
|
+
}
|
|
35
|
+
function isNoticeItem(v) {
|
|
36
|
+
return typeof v === "object" && v !== null && "text" in v && !("$$typeof" in v);
|
|
37
|
+
}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Paginakop exact als Verkooporders: h1 + alleen "Bijgewerkt hh:mm" eronder
|
|
4
|
+
* (extra uitleg in de infoballon `updatedTip`). Rechts: periode, secundaire
|
|
5
|
+
* knoppen en één primaire knop. Op mobiel gaat de periode naar een eigen regel.
|
|
6
|
+
*/
|
|
7
|
+
export declare function PageHeader({ title, updatedAt, updatedTip, stale, period, actions, back, info, }: {
|
|
8
|
+
/** Uitleg bij de pagina, in een infoballon naast de titel. */
|
|
9
|
+
info?: ReactNode;
|
|
4
10
|
title: ReactNode;
|
|
5
11
|
updatedAt?: Date | string | null;
|
|
6
|
-
|
|
12
|
+
updatedTip?: ReactNode;
|
|
13
|
+
stale?: boolean;
|
|
14
|
+
period?: ReactNode;
|
|
7
15
|
actions?: ReactNode;
|
|
8
16
|
back?: ReactNode;
|
|
17
|
+
/** @deprecated beschrijvingsregels staan niet meer onder de titel. */
|
|
18
|
+
subtitle?: ReactNode;
|
|
9
19
|
}): import("react").JSX.Element;
|
|
10
20
|
//# sourceMappingURL=PageHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,SAAS,EACT,UAAU,EACV,KAAK,EACL,MAAM,EACN,OAAO,EACP,IAAI,EACJ,IAAI,GACL,EAAE;IACD,8DAA8D;IAC9D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,+BA6BA"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Info } from "lucide-react";
|
|
2
3
|
import { UpdatedAt } from "./UpdatedAt.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { HoverTip } from "./HoverTip.js";
|
|
5
|
+
/**
|
|
6
|
+
* Paginakop exact als Verkooporders: h1 + alleen "Bijgewerkt hh:mm" eronder
|
|
7
|
+
* (extra uitleg in de infoballon `updatedTip`). Rechts: periode, secundaire
|
|
8
|
+
* knoppen en één primaire knop. Op mobiel gaat de periode naar een eigen regel.
|
|
9
|
+
*/
|
|
10
|
+
export function PageHeader({ title, updatedAt, updatedTip, stale, period, actions, back, info, }) {
|
|
11
|
+
return (_jsxs("header", { className: "shrink-0 flex flex-col gap-2", children: [back, _jsxs("div", { className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-3 sm:flex sm:flex-wrap sm:justify-between", children: [_jsx("div", { className: "flex min-w-0 items-center gap-3", children: _jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [_jsx("h1", { className: "truncate text-xl font-bold leading-tight sm:text-2xl tracking-tight text-foreground", children: title }), info && (_jsx(HoverTip, { label: "Uitleg", content: _jsx("div", { className: "max-w-xs text-sm", children: info }), className: "h-5 w-5 shrink-0 text-muted-foreground", children: _jsx(Info, { className: "h-4 w-4" }) }))] }), _jsx("p", { className: "flex flex-wrap items-center gap-x-2 text-xs text-muted-foreground", "aria-live": "polite", children: updatedAt ? _jsx(UpdatedAt, { at: updatedAt, stale: stale, tip: updatedTip }) : null })] }) }), (period || actions) && (_jsxs("div", { className: "contents sm:flex sm:flex-wrap sm:items-center sm:gap-2", children: [period && _jsx("div", { className: "order-last col-span-2 sm:order-none sm:col-span-1", children: period }), actions && _jsx("div", { className: "flex items-center gap-2", children: actions })] }))] })] }));
|
|
6
12
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
export interface PillTabItem<T extends string> {
|
|
3
3
|
value: T;
|
|
4
4
|
label: string;
|
|
5
5
|
icon?: ReactNode;
|
|
6
6
|
count?: number | null;
|
|
7
|
+
hint?: string;
|
|
7
8
|
}
|
|
8
|
-
/** Tabbladen als
|
|
9
|
-
export declare function PillTabs<T extends string>({ value, onChange, items, }: {
|
|
9
|
+
/** Tabbladen exact als StatusTabs in Verkooporders: één regel, scrollt met vervaging. */
|
|
10
|
+
export declare function PillTabs<T extends string>({ value, onChange, items, label, }: {
|
|
10
11
|
value: T;
|
|
11
12
|
onChange: (v: T) => void;
|
|
12
13
|
items: PillTabItem<T>[];
|
|
14
|
+
label?: string;
|
|
13
15
|
}): import("react").JSX.Element;
|
|
14
16
|
//# sourceMappingURL=PillTabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PillTabs.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/PillTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"PillTabs.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/PillTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhE,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM;IAC3C,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,EACzC,KAAK,EACL,QAAQ,EACR,KAAK,EACL,KAAkB,GACnB,EAAE;IACD,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,+BAwDA"}
|
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { useLayoutEffect, useRef } from "react";
|
|
3
|
+
/** Tabbladen exact als StatusTabs in Verkooporders: één regel, scrollt met vervaging. */
|
|
4
|
+
export function PillTabs({ value, onChange, items, label = "Weergave", }) {
|
|
5
|
+
const listRef = useRef(null);
|
|
6
|
+
useLayoutEffect(() => {
|
|
7
|
+
const measure = () => {
|
|
8
|
+
const list = listRef.current;
|
|
9
|
+
const el = list?.querySelector(`[data-tab="${value}"]`);
|
|
10
|
+
if (el && list && (el.offsetLeft < list.scrollLeft || el.offsetLeft + el.offsetWidth > list.scrollLeft + list.clientWidth)) {
|
|
11
|
+
list.scrollLeft = el.offsetLeft - 8;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
measure();
|
|
15
|
+
window.addEventListener("resize", measure);
|
|
16
|
+
return () => window.removeEventListener("resize", measure);
|
|
17
|
+
}, [value, items]);
|
|
18
|
+
return (_jsx("div", { className: "shrink-0", children: _jsx("div", { ref: listRef, role: "tablist", "aria-label": label, className: "relative -mx-4 flex items-center gap-2 overflow-x-auto px-4 pb-1 [scrollbar-width:none] [mask-image:linear-gradient(to_right,black_85%,transparent)] [&::-webkit-scrollbar]:hidden sm:mx-0 sm:px-0 sm:[mask-image:none]", children: items.map((t) => {
|
|
19
|
+
const active = value === t.value;
|
|
20
|
+
return (_jsxs("button", { "data-tab": t.value, type: "button", role: "tab", "aria-selected": active, onClick: () => onChange(t.value), title: t.hint, style: { transitionProperty: "color, background-color, border-color", transitionDuration: "150ms", transitionTimingFunction: "ease-out" }, className: "relative flex h-9 items-center gap-2 whitespace-nowrap rounded-lg border px-3 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0 " +
|
|
21
|
+
(active
|
|
22
|
+
? "border-primary/30 bg-primary/10 font-semibold text-foreground"
|
|
23
|
+
: t.count === 0
|
|
24
|
+
? "border-border bg-card text-muted-foreground/70 hover:text-foreground"
|
|
25
|
+
: "border-border bg-card text-foreground/80 hover:bg-muted hover:text-foreground"), children: [t.icon, _jsx("span", { children: t.label }), t.count !== undefined && (_jsx("span", { className: "inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-[11px] font-semibold tabular-nums " +
|
|
26
|
+
(active ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"), children: t.count ?? "–" }))] }, t.value));
|
|
27
|
+
}) }) }));
|
|
11
28
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface RowMenuItem {
|
|
2
|
+
label: string;
|
|
3
|
+
onSelect: () => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
destructive?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Rijmenu exact als RowMenu in Verkooporders. */
|
|
9
|
+
export declare function RowMenu({ label, items }: {
|
|
10
|
+
label: string;
|
|
11
|
+
items: RowMenuItem[];
|
|
12
|
+
}): import("react").JSX.Element | null;
|
|
13
|
+
//# sourceMappingURL=RowMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RowMenu.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/RowMenu.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE;AAE/H,kDAAkD;AAClD,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,WAAW,EAAE,CAAA;CAAE,sCA0BhF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MoreVertical } from "lucide-react";
|
|
3
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@flowselections/core";
|
|
4
|
+
/** Rijmenu exact als RowMenu in Verkooporders. */
|
|
5
|
+
export function RowMenu({ label, items }) {
|
|
6
|
+
if (items.length === 0)
|
|
7
|
+
return null;
|
|
8
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { "aria-label": label, onClick: (e) => e.stopPropagation(), className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: _jsx(MoreVertical, { className: "h-4 w-4" }) }), _jsx(DropdownMenuContent, { align: "end", onClick: (e) => e.stopPropagation(), children: items.map((it) => (_jsx(DropdownMenuItem, { disabled: it.disabled, title: it.title, className: it.destructive ? "text-destructive focus:text-destructive" : undefined, onClick: () => !it.disabled && it.onSelect(), children: it.label }, it.label))) })] }));
|
|
9
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/** Zoekveld:
|
|
1
|
+
/** Zoekveld exact als Verkooporders: h-9 (mobiel h-10), sm:w-80, breder bij focus. */
|
|
2
2
|
export declare const SearchInput: import("react").ForwardRefExoticComponent<{
|
|
3
3
|
value: string;
|
|
4
4
|
onChange: (v: string) => void;
|
|
5
5
|
onClear: () => void;
|
|
6
6
|
placeholder: string;
|
|
7
|
-
label
|
|
7
|
+
label?: string;
|
|
8
8
|
className?: string;
|
|
9
9
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
10
|
//# sourceMappingURL=SearchInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/SearchInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/SearchInput.tsx"],"names":[],"mappings":"AAGA,sFAAsF;AACtF,eAAO,MAAM,WAAW;WAEb,MAAM;cAAY,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;aAAW,MAAM,IAAI;iBAAe,MAAM;YAAU,MAAM;gBAAc,MAAM;oDAoD5H,CAAC"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Search, X } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
/** Zoekveld exact als Verkooporders: h-9 (mobiel h-10), sm:w-80, breder bij focus. */
|
|
5
|
+
export const SearchInput = forwardRef(function SearchInput({ value, onChange, onClear, placeholder, label = "Zoeken", className = "" }, ref) {
|
|
6
|
+
return (_jsxs("div", { className: "group relative flex h-10 sm:h-9 w-full items-center overflow-hidden rounded-md border border-border bg-card " +
|
|
7
|
+
"transition-[box-shadow,border-color,width] duration-[180ms] ease-out motion-reduce:transition-none " +
|
|
8
|
+
"focus-within:border-primary focus-within:ring-[3px] focus-within:ring-ring/20 sm:w-80 sm:focus-within:w-[400px] " +
|
|
9
|
+
className, children: [_jsx(Search, { className: "ml-3 h-4 w-4 shrink-0 text-muted-foreground transition-colors duration-[120ms] group-focus-within:text-primary", "aria-hidden": true }), _jsx("input", { ref: ref, type: "search", placeholder: placeholder, "aria-label": label, value: value, maxLength: 100, autoComplete: "off", spellCheck: false, onChange: (e) => onChange(e.target.value), onKeyDown: (e) => {
|
|
10
|
+
if (e.key === "Escape" && value) {
|
|
11
|
+
e.preventDefault();
|
|
9
12
|
onClear();
|
|
10
|
-
e.target.blur();
|
|
11
13
|
}
|
|
12
|
-
}, className: "h-
|
|
14
|
+
}, className: "h-full min-w-0 flex-1 appearance-none border-0 bg-transparent px-2 text-base sm:text-sm text-foreground outline-none ring-0 shadow-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:hidden" }), _jsxs("span", { className: "relative mr-1.5 flex h-7 w-7 shrink-0 items-center justify-center", children: [_jsx("kbd", { className: "pointer-events-none absolute hidden rounded border border-border px-1.5 font-mono text-[11px] leading-5 text-muted-foreground transition-opacity duration-[120ms] md:inline " +
|
|
15
|
+
(value ? "opacity-0" : "opacity-100 group-focus-within:opacity-0"), "aria-hidden": true, children: "/" }), _jsx("button", { type: "button", onClick: onClear, tabIndex: value ? 0 : -1, "aria-label": "Zoekopdracht wissen", className: "absolute inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground transition-[opacity,transform,background-color] duration-[120ms] ease-out hover:bg-muted hover:text-foreground " +
|
|
16
|
+
(value ? "scale-100 opacity-100" : "pointer-events-none scale-90 opacity-0"), children: _jsx(X, { className: "h-4 w-4" }) })] })] }));
|
|
13
17
|
});
|