@geomak/ui 7.0.1 → 7.2.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/dist/index.cjs +729 -349
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +213 -2
- package/dist/index.d.ts +213 -2
- package/dist/index.js +449 -74
- package/dist/index.js.map +1 -1
- package/dist/styles.css +26 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { icons_default as Icon, createIcon } from './chunk-KAFJJO5O.js';
|
|
2
2
|
import { colors_default } from './chunk-I2P4JJDB.js';
|
|
3
3
|
export { colors_default as COLORS, PALETTE as palette, semanticTokens, vars } from './chunk-I2P4JJDB.js';
|
|
4
|
-
import
|
|
4
|
+
import React29, { createContext, useState, useEffect, useMemo, useId, useCallback, useRef, useContext, useSyncExternalStore, useLayoutEffect } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
@@ -16,8 +16,8 @@ import * as ToggleGroup from '@radix-ui/react-toggle-group';
|
|
|
16
16
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
17
17
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
18
18
|
import * as NavigationMenu from '@radix-ui/react-navigation-menu';
|
|
19
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
20
19
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
20
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
21
21
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
22
22
|
|
|
23
23
|
// src/utils/cx.ts
|
|
@@ -555,7 +555,7 @@ var SIZE_CLASSES = {
|
|
|
555
555
|
md: "h-9 px-4 text-sm gap-1.5 rounded-lg",
|
|
556
556
|
lg: "h-11 px-5 text-sm gap-2 rounded-xl"
|
|
557
557
|
};
|
|
558
|
-
var Button =
|
|
558
|
+
var Button = React29.forwardRef(function Button2({
|
|
559
559
|
content,
|
|
560
560
|
variant = "primary",
|
|
561
561
|
size = "md",
|
|
@@ -663,7 +663,7 @@ function MenuButton({
|
|
|
663
663
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
664
664
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
665
665
|
].join(" "),
|
|
666
|
-
children: items.map((item) => /* @__PURE__ */ jsxs(
|
|
666
|
+
children: items.map((item) => /* @__PURE__ */ jsxs(React29.Fragment, { children: [
|
|
667
667
|
item.separatorBefore && /* @__PURE__ */ jsx(DropdownMenu.Separator, { className: "my-1 h-px bg-border" }),
|
|
668
668
|
/* @__PURE__ */ jsxs(
|
|
669
669
|
DropdownMenu.Item,
|
|
@@ -1762,7 +1762,7 @@ function Kbd({
|
|
|
1762
1762
|
style
|
|
1763
1763
|
}) {
|
|
1764
1764
|
if (keys && keys.length > 0) {
|
|
1765
|
-
return /* @__PURE__ */ jsx("span", { className: cx("inline-flex items-center gap-1", className), style, children: keys.map((k, i) => /* @__PURE__ */ jsxs(
|
|
1765
|
+
return /* @__PURE__ */ jsx("span", { className: cx("inline-flex items-center gap-1", className), style, children: keys.map((k, i) => /* @__PURE__ */ jsxs(React29.Fragment, { children: [
|
|
1766
1766
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "text-foreground-muted text-xs select-none", children: separator }),
|
|
1767
1767
|
/* @__PURE__ */ jsx("kbd", { className: [cap, SIZE3[size]].join(" "), children: k })
|
|
1768
1768
|
] }, `${k}-${i}`)) });
|
|
@@ -1854,7 +1854,7 @@ function FlatCarousel({
|
|
|
1854
1854
|
style
|
|
1855
1855
|
}) {
|
|
1856
1856
|
const scrollerRef = useRef(null);
|
|
1857
|
-
const slides =
|
|
1857
|
+
const slides = React29.Children.toArray(children);
|
|
1858
1858
|
const [active, setActive] = useState(0);
|
|
1859
1859
|
const [atStart, setAtStart] = useState(true);
|
|
1860
1860
|
const [atEnd, setAtEnd] = useState(false);
|
|
@@ -1909,7 +1909,7 @@ function RotatingCarousel({
|
|
|
1909
1909
|
className = "",
|
|
1910
1910
|
style
|
|
1911
1911
|
}) {
|
|
1912
|
-
const slides =
|
|
1912
|
+
const slides = React29.Children.toArray(children);
|
|
1913
1913
|
const count = slides.length;
|
|
1914
1914
|
const [active, setActive] = useState(0);
|
|
1915
1915
|
const reduced = useReducedMotion();
|
|
@@ -5131,7 +5131,7 @@ function Wizard({
|
|
|
5131
5131
|
] });
|
|
5132
5132
|
}
|
|
5133
5133
|
var SearchIcon = /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "w-4 h-4", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M10.5 3.75a6.75 6.75 0 100 13.5 6.75 6.75 0 000-13.5zM2.25 10.5a8.25 8.25 0 1114.59 5.28l4.69 4.69a.75.75 0 11-1.06 1.06l-4.69-4.69A8.25 8.25 0 012.25 10.5z", clipRule: "evenodd" }) });
|
|
5134
|
-
var SearchInput =
|
|
5134
|
+
var SearchInput = React29.forwardRef(function SearchInput2({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout = "vertical", size = "md", icon, helperText, className }, ref) {
|
|
5135
5135
|
return /* @__PURE__ */ jsx(Field, { className, label, htmlFor, layout, helperText, children: /* @__PURE__ */ jsxs(
|
|
5136
5136
|
"div",
|
|
5137
5137
|
{
|
|
@@ -5273,22 +5273,78 @@ function createDatasets(rows, perPage) {
|
|
|
5273
5273
|
}
|
|
5274
5274
|
var defaultGetRowKey = (_row, index) => index;
|
|
5275
5275
|
var cellAlign = (align) => align === "left" ? "text-left" : align === "right" ? "text-right" : "text-center";
|
|
5276
|
+
function compareValues(a, b) {
|
|
5277
|
+
if (a == null && b == null) return 0;
|
|
5278
|
+
if (a == null) return -1;
|
|
5279
|
+
if (b == null) return 1;
|
|
5280
|
+
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
5281
|
+
if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();
|
|
5282
|
+
if (typeof a === "boolean" && typeof b === "boolean") return a === b ? 0 : a ? 1 : -1;
|
|
5283
|
+
return String(a).localeCompare(String(b), void 0, { numeric: true, sensitivity: "base" });
|
|
5284
|
+
}
|
|
5285
|
+
function SortGlyph({ direction }) {
|
|
5286
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", "aria-hidden": "true", className: "shrink-0", children: [
|
|
5287
|
+
/* @__PURE__ */ jsx(
|
|
5288
|
+
"path",
|
|
5289
|
+
{
|
|
5290
|
+
d: "M8 11l4-4 4 4",
|
|
5291
|
+
stroke: "currentColor",
|
|
5292
|
+
strokeWidth: 2,
|
|
5293
|
+
strokeLinecap: "round",
|
|
5294
|
+
strokeLinejoin: "round",
|
|
5295
|
+
className: direction === "asc" ? "text-accent" : "text-foreground-muted",
|
|
5296
|
+
opacity: direction === "asc" ? 1 : 0.45
|
|
5297
|
+
}
|
|
5298
|
+
),
|
|
5299
|
+
/* @__PURE__ */ jsx(
|
|
5300
|
+
"path",
|
|
5301
|
+
{
|
|
5302
|
+
d: "M8 13l4 4 4-4",
|
|
5303
|
+
stroke: "currentColor",
|
|
5304
|
+
strokeWidth: 2,
|
|
5305
|
+
strokeLinecap: "round",
|
|
5306
|
+
strokeLinejoin: "round",
|
|
5307
|
+
className: direction === "desc" ? "text-accent" : "text-foreground-muted",
|
|
5308
|
+
opacity: direction === "desc" ? 1 : 0.45
|
|
5309
|
+
}
|
|
5310
|
+
)
|
|
5311
|
+
] });
|
|
5312
|
+
}
|
|
5276
5313
|
function TableHeader({
|
|
5277
5314
|
columns,
|
|
5278
|
-
hasExpand
|
|
5315
|
+
hasExpand,
|
|
5316
|
+
sort,
|
|
5317
|
+
onSort
|
|
5279
5318
|
}) {
|
|
5280
5319
|
return /* @__PURE__ */ jsx("thead", { className: "bg-surface-raised border-b border-border", children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
5281
5320
|
hasExpand && /* @__PURE__ */ jsx("th", { "aria-hidden": "true", className: "w-9" }),
|
|
5282
|
-
columns.map((col) =>
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5321
|
+
columns.map((col) => {
|
|
5322
|
+
const active = sort?.key === col.keyBind;
|
|
5323
|
+
const dir = active ? sort.direction : void 0;
|
|
5324
|
+
const justify = col.align === "left" ? "justify-start" : col.align === "right" ? "justify-end" : "justify-center";
|
|
5325
|
+
return /* @__PURE__ */ jsx(
|
|
5326
|
+
"th",
|
|
5327
|
+
{
|
|
5328
|
+
scope: "col",
|
|
5329
|
+
"aria-sort": col.sortable ? active ? dir === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
5330
|
+
className: `${cellAlign(col.align)} text-sm font-semibold text-foreground py-3 px-3`,
|
|
5331
|
+
style: col.width != null ? { width: col.width } : void 0,
|
|
5332
|
+
children: col.sortable ? /* @__PURE__ */ jsxs(
|
|
5333
|
+
"button",
|
|
5334
|
+
{
|
|
5335
|
+
type: "button",
|
|
5336
|
+
onClick: () => onSort(col),
|
|
5337
|
+
className: `inline-flex items-center gap-1.5 ${justify} w-full select-none rounded transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent ${active ? "text-accent" : "hover:text-accent"}`,
|
|
5338
|
+
children: [
|
|
5339
|
+
/* @__PURE__ */ jsx("span", { children: col.label }),
|
|
5340
|
+
/* @__PURE__ */ jsx(SortGlyph, { direction: dir })
|
|
5341
|
+
]
|
|
5342
|
+
}
|
|
5343
|
+
) : col.label
|
|
5344
|
+
},
|
|
5345
|
+
col.key
|
|
5346
|
+
);
|
|
5347
|
+
})
|
|
5292
5348
|
] }) });
|
|
5293
5349
|
}
|
|
5294
5350
|
var DefaultExpandIcon = /* @__PURE__ */ jsx(
|
|
@@ -5296,24 +5352,66 @@ var DefaultExpandIcon = /* @__PURE__ */ jsx(
|
|
|
5296
5352
|
{
|
|
5297
5353
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5298
5354
|
viewBox: "0 0 24 24",
|
|
5299
|
-
fill: "
|
|
5300
|
-
|
|
5355
|
+
fill: "none",
|
|
5356
|
+
stroke: "currentColor",
|
|
5357
|
+
strokeWidth: 2,
|
|
5358
|
+
className: "w-4 h-4 text-foreground-muted",
|
|
5301
5359
|
"aria-hidden": "true",
|
|
5302
|
-
children: /* @__PURE__ */ jsx(
|
|
5303
|
-
|
|
5360
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" })
|
|
5361
|
+
}
|
|
5362
|
+
);
|
|
5363
|
+
function EditableCell({
|
|
5364
|
+
col,
|
|
5365
|
+
row,
|
|
5366
|
+
rowIndex,
|
|
5367
|
+
onCellEdit
|
|
5368
|
+
}) {
|
|
5369
|
+
const [editing, setEditing] = useState(false);
|
|
5370
|
+
const value = row[col.keyBind];
|
|
5371
|
+
const commit = (next) => {
|
|
5372
|
+
setEditing(false);
|
|
5373
|
+
onCellEdit?.({ row, key: col.keyBind, value: next, rowIndex });
|
|
5374
|
+
};
|
|
5375
|
+
const cancel = () => setEditing(false);
|
|
5376
|
+
if (editing) {
|
|
5377
|
+
if (col.editor) return /* @__PURE__ */ jsx(Fragment, { children: col.editor({ value, row, commit, cancel }) });
|
|
5378
|
+
return /* @__PURE__ */ jsx(
|
|
5379
|
+
"input",
|
|
5304
5380
|
{
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5381
|
+
autoFocus: true,
|
|
5382
|
+
defaultValue: value == null ? "" : String(value),
|
|
5383
|
+
onBlur: (e) => commit(e.target.value),
|
|
5384
|
+
onKeyDown: (e) => {
|
|
5385
|
+
if (e.key === "Enter") {
|
|
5386
|
+
e.preventDefault();
|
|
5387
|
+
commit(e.target.value);
|
|
5388
|
+
} else if (e.key === "Escape") {
|
|
5389
|
+
e.preventDefault();
|
|
5390
|
+
cancel();
|
|
5391
|
+
}
|
|
5392
|
+
},
|
|
5393
|
+
"aria-label": `Edit ${typeof col.label === "string" ? col.label : col.keyBind}`,
|
|
5394
|
+
className: "w-full rounded border border-accent bg-surface px-2 py-1 text-sm text-foreground outline-none"
|
|
5308
5395
|
}
|
|
5309
|
-
)
|
|
5396
|
+
);
|
|
5310
5397
|
}
|
|
5311
|
-
|
|
5398
|
+
return /* @__PURE__ */ jsx(
|
|
5399
|
+
"button",
|
|
5400
|
+
{
|
|
5401
|
+
type: "button",
|
|
5402
|
+
onClick: () => setEditing(true),
|
|
5403
|
+
title: "Click to edit",
|
|
5404
|
+
className: `${cellAlign(col.align)} w-full cursor-text rounded px-1 py-0.5 hover:bg-background focus:outline-none focus-visible:ring-2 focus-visible:ring-accent`,
|
|
5405
|
+
children: col.component ? col.component(value, row) : value
|
|
5406
|
+
}
|
|
5407
|
+
);
|
|
5408
|
+
}
|
|
5312
5409
|
function TableBody({
|
|
5313
5410
|
columns,
|
|
5314
5411
|
rows,
|
|
5315
5412
|
expandRow,
|
|
5316
|
-
getRowKey
|
|
5413
|
+
getRowKey,
|
|
5414
|
+
onCellEdit
|
|
5317
5415
|
}) {
|
|
5318
5416
|
const [expanded, setExpanded] = useState(() => /* @__PURE__ */ new Set());
|
|
5319
5417
|
const reduced = useReducedMotion();
|
|
@@ -5330,7 +5428,7 @@ function TableBody({
|
|
|
5330
5428
|
return /* @__PURE__ */ jsx("tbody", { children: rows.map((row, i) => {
|
|
5331
5429
|
const rowKey = getRowKey(row, i);
|
|
5332
5430
|
const isExpanded = expanded.has(rowKey);
|
|
5333
|
-
return /* @__PURE__ */ jsxs(
|
|
5431
|
+
return /* @__PURE__ */ jsxs(React29.Fragment, { children: [
|
|
5334
5432
|
/* @__PURE__ */ jsxs(
|
|
5335
5433
|
"tr",
|
|
5336
5434
|
{
|
|
@@ -5343,15 +5441,15 @@ function TableBody({
|
|
|
5343
5441
|
onClick: () => toggleRow(rowKey),
|
|
5344
5442
|
"aria-expanded": isExpanded,
|
|
5345
5443
|
"aria-label": isExpanded ? "Collapse row" : "Expand row",
|
|
5346
|
-
className: `w-9 h-9 inline-flex items-center justify-center rounded-md hover:bg-
|
|
5347
|
-
children: expandRow.expandIcon ?? DefaultExpandIcon
|
|
5444
|
+
className: `w-9 h-9 inline-flex items-center justify-center rounded-md hover:bg-background transition-transform duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-accent ${isExpanded && !expandRow.collapseIcon ? "rotate-180" : ""}`,
|
|
5445
|
+
children: isExpanded ? expandRow.collapseIcon ?? expandRow.expandIcon ?? DefaultExpandIcon : expandRow.expandIcon ?? DefaultExpandIcon
|
|
5348
5446
|
}
|
|
5349
5447
|
) }),
|
|
5350
5448
|
columns.map((col) => /* @__PURE__ */ jsx(
|
|
5351
5449
|
"td",
|
|
5352
5450
|
{
|
|
5353
5451
|
className: `${cellAlign(col.align)} text-sm text-foreground py-2 px-3 align-middle`,
|
|
5354
|
-
children: col.component ? col.component(row[col.keyBind], row) : row[col.keyBind]
|
|
5452
|
+
children: col.editable ? /* @__PURE__ */ jsx(EditableCell, { col, row, rowIndex: i, onCellEdit }) : col.component ? col.component(row[col.keyBind], row) : row[col.keyBind]
|
|
5355
5453
|
},
|
|
5356
5454
|
col.key
|
|
5357
5455
|
))
|
|
@@ -5445,6 +5543,10 @@ function Table({
|
|
|
5445
5543
|
pagination = DEFAULT_PAGINATION,
|
|
5446
5544
|
expandRow = DEFAULT_EXPAND,
|
|
5447
5545
|
hasSearch = true,
|
|
5546
|
+
search,
|
|
5547
|
+
defaultSort = null,
|
|
5548
|
+
onSortChange,
|
|
5549
|
+
onCellEdit,
|
|
5448
5550
|
footer = null,
|
|
5449
5551
|
header = null,
|
|
5450
5552
|
loading = false,
|
|
@@ -5458,20 +5560,54 @@ function Table({
|
|
|
5458
5560
|
typeof pagination.perPage === "number" ? pagination.perPage : 15
|
|
5459
5561
|
);
|
|
5460
5562
|
const [activePage, setActivePage] = useState(0);
|
|
5563
|
+
const [sortState, setSortState] = useState(defaultSort);
|
|
5461
5564
|
const isServerSide = !!(pagination.enabled && pagination.serverSide);
|
|
5565
|
+
const handleSort = (col) => {
|
|
5566
|
+
const key = col.keyBind;
|
|
5567
|
+
let next;
|
|
5568
|
+
if (!sortState || sortState.key !== key) next = { key, direction: "asc" };
|
|
5569
|
+
else if (sortState.direction === "asc") next = { key, direction: "desc" };
|
|
5570
|
+
else next = null;
|
|
5571
|
+
setSortState(next);
|
|
5572
|
+
onSortChange?.(next);
|
|
5573
|
+
};
|
|
5574
|
+
const debounceMs = search?.debounceMs ?? 0;
|
|
5575
|
+
const [debouncedTerm, setDebouncedTerm] = useState("");
|
|
5576
|
+
useEffect(() => {
|
|
5577
|
+
if (debounceMs <= 0) {
|
|
5578
|
+
setDebouncedTerm(searchTerm);
|
|
5579
|
+
return;
|
|
5580
|
+
}
|
|
5581
|
+
const t = setTimeout(() => setDebouncedTerm(searchTerm), debounceMs);
|
|
5582
|
+
return () => clearTimeout(t);
|
|
5583
|
+
}, [searchTerm, debounceMs]);
|
|
5584
|
+
const term = debounceMs > 0 ? debouncedTerm : searchTerm;
|
|
5462
5585
|
const filteredRows = useMemo(() => {
|
|
5463
|
-
if (isServerSide || !
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
)
|
|
5470
|
-
|
|
5586
|
+
if (isServerSide || !term) return rows;
|
|
5587
|
+
if (search?.predicate) return rows.filter((row) => search.predicate(row, term));
|
|
5588
|
+
const cs = !!search?.caseSensitive;
|
|
5589
|
+
const needle = cs ? term : term.toLowerCase();
|
|
5590
|
+
const mode = search?.matchMode ?? "contains";
|
|
5591
|
+
const keys = search?.keys;
|
|
5592
|
+
const test = (raw) => {
|
|
5593
|
+
if (raw == null) return false;
|
|
5594
|
+
const s = cs ? String(raw) : String(raw).toLowerCase();
|
|
5595
|
+
return mode === "startsWith" ? s.startsWith(needle) : mode === "equals" ? s === needle : s.includes(needle);
|
|
5596
|
+
};
|
|
5597
|
+
return rows.filter((row) => keys ? keys.some((k) => test(row[k])) : Object.values(row).some(test));
|
|
5598
|
+
}, [rows, term, isServerSide, search?.predicate, search?.caseSensitive, search?.matchMode, search?.keys]);
|
|
5599
|
+
const sortedRows = useMemo(() => {
|
|
5600
|
+
if (isServerSide || !sortState) return filteredRows;
|
|
5601
|
+
const col = columns.find((c) => c.keyBind === sortState.key);
|
|
5602
|
+
const accessor = col?.sortAccessor ?? ((r) => r[sortState.key]);
|
|
5603
|
+
const out = [...filteredRows].sort((a, b) => compareValues(accessor(a), accessor(b)));
|
|
5604
|
+
if (sortState.direction === "desc") out.reverse();
|
|
5605
|
+
return out;
|
|
5606
|
+
}, [filteredRows, sortState, isServerSide, columns]);
|
|
5471
5607
|
const datasets = useMemo(() => {
|
|
5472
5608
|
if (isServerSide) return [rows];
|
|
5473
|
-
return createDatasets(
|
|
5474
|
-
}, [
|
|
5609
|
+
return createDatasets(sortedRows, pagination.enabled ? perPage : null);
|
|
5610
|
+
}, [sortedRows, perPage, pagination.enabled, isServerSide, rows]);
|
|
5475
5611
|
const MAX_PAGE = useMemo(() => {
|
|
5476
5612
|
if (isServerSide && typeof pagination.maxPage === "number") return Math.max(0, pagination.maxPage);
|
|
5477
5613
|
if (isServerSide && typeof pagination.totalCount === "number")
|
|
@@ -5510,32 +5646,36 @@ function Table({
|
|
|
5510
5646
|
}
|
|
5511
5647
|
setActivePage(newPage);
|
|
5512
5648
|
};
|
|
5649
|
+
const pagPos = pagination.position ?? "top";
|
|
5650
|
+
const showTopPager = !!pagination.enabled && (pagPos === "top" || pagPos === "both");
|
|
5651
|
+
const showBottomPager = !!pagination.enabled && (pagPos === "bottom" || pagPos === "both");
|
|
5652
|
+
const pager = /* @__PURE__ */ jsx(
|
|
5653
|
+
Pagination,
|
|
5654
|
+
{
|
|
5655
|
+
activePage,
|
|
5656
|
+
onPageChange: handlePageChange,
|
|
5657
|
+
maxPage: MAX_PAGE,
|
|
5658
|
+
onPerPageChange: onPaginationChange,
|
|
5659
|
+
options: pagination,
|
|
5660
|
+
serverSide: isServerSide
|
|
5661
|
+
}
|
|
5662
|
+
);
|
|
5513
5663
|
return /* @__PURE__ */ jsxs("div", { className: `w-full h-max rounded-lg ${className}`.trim(), style, children: [
|
|
5514
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
5515
|
-
hasSearch
|
|
5664
|
+
(hasSearch || showTopPager) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 mb-2", children: [
|
|
5665
|
+
hasSearch ? /* @__PURE__ */ jsx(
|
|
5516
5666
|
SearchInput_default,
|
|
5517
5667
|
{
|
|
5518
5668
|
ref: searchRef,
|
|
5519
5669
|
value: searchTerm,
|
|
5520
5670
|
onChange: onSearchChange,
|
|
5521
|
-
placeholder: "Search term..."
|
|
5522
|
-
}
|
|
5523
|
-
),
|
|
5524
|
-
pagination.enabled && /* @__PURE__ */ jsx(
|
|
5525
|
-
Pagination,
|
|
5526
|
-
{
|
|
5527
|
-
activePage,
|
|
5528
|
-
onPageChange: handlePageChange,
|
|
5529
|
-
maxPage: MAX_PAGE,
|
|
5530
|
-
onPerPageChange: onPaginationChange,
|
|
5531
|
-
options: pagination,
|
|
5532
|
-
serverSide: isServerSide
|
|
5671
|
+
placeholder: search?.placeholder ?? "Search term..."
|
|
5533
5672
|
}
|
|
5534
|
-
)
|
|
5673
|
+
) : /* @__PURE__ */ jsx("span", {}),
|
|
5674
|
+
showTopPager && pager
|
|
5535
5675
|
] }),
|
|
5536
5676
|
/* @__PURE__ */ jsx("div", { children: header }),
|
|
5537
5677
|
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto rounded-lg", children: /* @__PURE__ */ jsxs("table", { className: "w-full border-collapse", "aria-busy": loading || void 0, children: [
|
|
5538
|
-
/* @__PURE__ */ jsx(TableHeader, { columns, hasExpand: !!expandRow.enabled }),
|
|
5678
|
+
/* @__PURE__ */ jsx(TableHeader, { columns, hasExpand: !!expandRow.enabled, sort: sortState, onSort: handleSort }),
|
|
5539
5679
|
loading ? /* @__PURE__ */ jsx(
|
|
5540
5680
|
TableSkeletonBody,
|
|
5541
5681
|
{
|
|
@@ -5549,10 +5689,12 @@ function Table({
|
|
|
5549
5689
|
columns,
|
|
5550
5690
|
rows: currentPageRows,
|
|
5551
5691
|
expandRow,
|
|
5552
|
-
getRowKey
|
|
5692
|
+
getRowKey,
|
|
5693
|
+
onCellEdit
|
|
5553
5694
|
}
|
|
5554
5695
|
)
|
|
5555
5696
|
] }) }),
|
|
5697
|
+
showBottomPager && /* @__PURE__ */ jsx("div", { className: "mt-2 flex justify-end", children: pager }),
|
|
5556
5698
|
/* @__PURE__ */ jsx("div", { children: footer })
|
|
5557
5699
|
] });
|
|
5558
5700
|
}
|
|
@@ -5573,6 +5715,84 @@ function TableSkeletonBody({
|
|
|
5573
5715
|
i
|
|
5574
5716
|
)) });
|
|
5575
5717
|
}
|
|
5718
|
+
var useIsoLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
5719
|
+
function VirtualList({
|
|
5720
|
+
items,
|
|
5721
|
+
rowHeight,
|
|
5722
|
+
renderItem: renderItem2,
|
|
5723
|
+
height = 400,
|
|
5724
|
+
getKey,
|
|
5725
|
+
overscan = 6,
|
|
5726
|
+
searchable = false,
|
|
5727
|
+
searchKeys,
|
|
5728
|
+
filter,
|
|
5729
|
+
searchPlaceholder = "Search\u2026",
|
|
5730
|
+
emptyState = "No results",
|
|
5731
|
+
"aria-label": ariaLabel = "List",
|
|
5732
|
+
className = "",
|
|
5733
|
+
style
|
|
5734
|
+
}) {
|
|
5735
|
+
const scrollRef = useRef(null);
|
|
5736
|
+
const [scrollTop, setScrollTop] = useState(0);
|
|
5737
|
+
const [viewport, setViewport] = useState(typeof height === "number" ? height : 400);
|
|
5738
|
+
const [term, setTerm] = useState("");
|
|
5739
|
+
useIsoLayoutEffect(() => {
|
|
5740
|
+
const el = scrollRef.current;
|
|
5741
|
+
if (!el) return;
|
|
5742
|
+
const measure = () => setViewport(el.clientHeight);
|
|
5743
|
+
measure();
|
|
5744
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
5745
|
+
const ro = new ResizeObserver(measure);
|
|
5746
|
+
ro.observe(el);
|
|
5747
|
+
return () => ro.disconnect();
|
|
5748
|
+
}, []);
|
|
5749
|
+
const filtered = useMemo(() => {
|
|
5750
|
+
if (!searchable || !term) return items;
|
|
5751
|
+
if (filter) return items.filter((it) => filter(it, term));
|
|
5752
|
+
const needle = term.toLowerCase();
|
|
5753
|
+
return items.filter((it) => {
|
|
5754
|
+
if (searchKeys) return searchKeys.some((k) => String(it[k] ?? "").toLowerCase().includes(needle));
|
|
5755
|
+
return String(it).toLowerCase().includes(needle);
|
|
5756
|
+
});
|
|
5757
|
+
}, [items, searchable, term, filter, searchKeys]);
|
|
5758
|
+
const total = filtered.length * rowHeight;
|
|
5759
|
+
const startIndex = Math.max(0, Math.floor(scrollTop / rowHeight) - overscan);
|
|
5760
|
+
const endIndex = Math.min(filtered.length, Math.ceil((scrollTop + viewport) / rowHeight) + overscan);
|
|
5761
|
+
const offsetY = startIndex * rowHeight;
|
|
5762
|
+
const visible = filtered.slice(startIndex, endIndex);
|
|
5763
|
+
const onSearch = (e) => {
|
|
5764
|
+
setTerm(e.target.value);
|
|
5765
|
+
setScrollTop(0);
|
|
5766
|
+
if (scrollRef.current) scrollRef.current.scrollTop = 0;
|
|
5767
|
+
};
|
|
5768
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("flex w-full flex-col gap-2", className), style, children: [
|
|
5769
|
+
searchable && /* @__PURE__ */ jsx(SearchInput_default, { value: term, onChange: onSearch, placeholder: searchPlaceholder }),
|
|
5770
|
+
/* @__PURE__ */ jsx(
|
|
5771
|
+
"div",
|
|
5772
|
+
{
|
|
5773
|
+
ref: scrollRef,
|
|
5774
|
+
onScroll: (e) => setScrollTop(e.currentTarget.scrollTop),
|
|
5775
|
+
role: "list",
|
|
5776
|
+
"aria-label": ariaLabel,
|
|
5777
|
+
className: "relative overflow-y-auto rounded-lg border border-border bg-surface",
|
|
5778
|
+
style: { height },
|
|
5779
|
+
children: filtered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center p-6 text-sm text-foreground-muted", children: emptyState }) : /* @__PURE__ */ jsx("div", { style: { height: total, position: "relative" }, children: /* @__PURE__ */ jsx("div", { style: { transform: `translateY(${offsetY}px)` }, children: visible.map((item, i) => {
|
|
5780
|
+
const index = startIndex + i;
|
|
5781
|
+
return /* @__PURE__ */ jsx(
|
|
5782
|
+
"div",
|
|
5783
|
+
{
|
|
5784
|
+
role: "listitem",
|
|
5785
|
+
style: { height: rowHeight },
|
|
5786
|
+
className: "box-border",
|
|
5787
|
+
children: renderItem2(item, index)
|
|
5788
|
+
},
|
|
5789
|
+
getKey ? getKey(item, index) : index
|
|
5790
|
+
);
|
|
5791
|
+
}) }) })
|
|
5792
|
+
}
|
|
5793
|
+
)
|
|
5794
|
+
] });
|
|
5795
|
+
}
|
|
5576
5796
|
function ThemeSwitch({ checked, onChange, label = "Toggle dark mode", className = "" }) {
|
|
5577
5797
|
const id = useId();
|
|
5578
5798
|
return /* @__PURE__ */ jsx("label", { htmlFor: id, className: `flex items-center gap-2 cursor-pointer select-none ${className}`.trim(), children: /* @__PURE__ */ jsx(
|
|
@@ -5874,8 +6094,8 @@ function MegaMenuLink({ href, icon, description, active, onClick, children, clas
|
|
|
5874
6094
|
function MegaMenuFeatured({ children, className = "" }) {
|
|
5875
6095
|
return /* @__PURE__ */ jsx("div", { className: cx("min-w-0 rounded-lg bg-surface-raised border border-border p-4 flex flex-col", className), children });
|
|
5876
6096
|
}
|
|
5877
|
-
var elementsOfType = (children, type) =>
|
|
5878
|
-
(c) =>
|
|
6097
|
+
var elementsOfType = (children, type) => React29.Children.toArray(children).filter(
|
|
6098
|
+
(c) => React29.isValidElement(c) && c.type === type
|
|
5879
6099
|
);
|
|
5880
6100
|
var MOBILE_CHEVRON = /* @__PURE__ */ jsx(
|
|
5881
6101
|
"svg",
|
|
@@ -5912,9 +6132,9 @@ function MobileLinkRow({ link, onNavigate }) {
|
|
|
5912
6132
|
);
|
|
5913
6133
|
}
|
|
5914
6134
|
function MobilePanel({ panel, onNavigate }) {
|
|
5915
|
-
const nodes =
|
|
6135
|
+
const nodes = React29.Children.toArray(panel.props.children);
|
|
5916
6136
|
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4 px-2 pb-3 pt-1", children: nodes.map((node, i) => {
|
|
5917
|
-
if (!
|
|
6137
|
+
if (!React29.isValidElement(node)) return null;
|
|
5918
6138
|
const el = node;
|
|
5919
6139
|
if (el.type === MegaMenuSection) {
|
|
5920
6140
|
const { title, children } = el.props;
|
|
@@ -6323,7 +6543,7 @@ function ThemeProvider({
|
|
|
6323
6543
|
className = "",
|
|
6324
6544
|
style
|
|
6325
6545
|
}) {
|
|
6326
|
-
const id =
|
|
6546
|
+
const id = React29.useId().replace(/:/g, "");
|
|
6327
6547
|
const scopeClass = `geo-th-${id}`;
|
|
6328
6548
|
const divRef = useRef(null);
|
|
6329
6549
|
useEffect(() => {
|
|
@@ -6570,6 +6790,161 @@ function Password({
|
|
|
6570
6790
|
}
|
|
6571
6791
|
);
|
|
6572
6792
|
}
|
|
6793
|
+
var defaultPasswordRules = [
|
|
6794
|
+
{ label: "At least 8 characters", test: (p) => p.length >= 8 },
|
|
6795
|
+
{ label: "A lowercase letter", test: (p) => /[a-z]/.test(p) },
|
|
6796
|
+
{ label: "An uppercase letter", test: (p) => /[A-Z]/.test(p) },
|
|
6797
|
+
{ label: "A number", test: (p) => /\d/.test(p) },
|
|
6798
|
+
{ label: "A symbol", test: (p) => /[^A-Za-z0-9]/.test(p) }
|
|
6799
|
+
];
|
|
6800
|
+
var LABELS = ["", "Weak", "Fair", "Good", "Strong"];
|
|
6801
|
+
function scorePassword(password) {
|
|
6802
|
+
if (!password) return { score: 0, label: "" };
|
|
6803
|
+
let s = 0;
|
|
6804
|
+
if (password.length >= 8) s++;
|
|
6805
|
+
if (/[a-z]/.test(password) && /[A-Z]/.test(password)) s++;
|
|
6806
|
+
if (/\d/.test(password)) s++;
|
|
6807
|
+
if (/[^A-Za-z0-9]/.test(password)) s++;
|
|
6808
|
+
if (password.length >= 12) s++;
|
|
6809
|
+
const lowEntropy = /^(.)\1+$/.test(password) || /^(?:0123456789|abcdefghijklmnopqrstuvwxyz|qwertyuiop)/i.test(password);
|
|
6810
|
+
if (lowEntropy) s = Math.min(s, 1);
|
|
6811
|
+
const score = Math.max(1, Math.min(4, s));
|
|
6812
|
+
return { score, label: LABELS[score] };
|
|
6813
|
+
}
|
|
6814
|
+
var BAR_COLOR = {
|
|
6815
|
+
0: "bg-border",
|
|
6816
|
+
1: "bg-status-error",
|
|
6817
|
+
2: "bg-status-warning",
|
|
6818
|
+
3: "bg-accent",
|
|
6819
|
+
4: "bg-status-success"
|
|
6820
|
+
};
|
|
6821
|
+
var TEXT_COLOR = {
|
|
6822
|
+
0: "text-foreground-muted",
|
|
6823
|
+
1: "text-status-error",
|
|
6824
|
+
2: "text-status-warning",
|
|
6825
|
+
3: "text-accent",
|
|
6826
|
+
4: "text-status-success"
|
|
6827
|
+
};
|
|
6828
|
+
var Tick = ({ ok }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", "aria-hidden": "true", className: cx("h-3.5 w-3.5 shrink-0", ok ? "text-status-success" : "text-foreground-muted"), children: ok ? /* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm3.7 6.3a1 1 0 0 0-1.4-1.4L9 10.18 7.7 8.88a1 1 0 0 0-1.4 1.42l2 2a1 1 0 0 0 1.4 0l4-4Z" }) : /* @__PURE__ */ jsx("circle", { cx: "10", cy: "10", r: "2.5", fill: "currentColor" }) });
|
|
6829
|
+
function PasswordStrength({
|
|
6830
|
+
value,
|
|
6831
|
+
scorer = scorePassword,
|
|
6832
|
+
showRequirements = false,
|
|
6833
|
+
rules = defaultPasswordRules,
|
|
6834
|
+
confirmValue,
|
|
6835
|
+
hideMeter = false,
|
|
6836
|
+
className = "",
|
|
6837
|
+
style
|
|
6838
|
+
}) {
|
|
6839
|
+
const { score, label } = useMemo(() => scorer(value), [scorer, value]);
|
|
6840
|
+
const showMatch = confirmValue != null && (value.length > 0 || confirmValue.length > 0);
|
|
6841
|
+
const matches = value.length > 0 && value === confirmValue;
|
|
6842
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("flex flex-col gap-2", className), style, "aria-live": "polite", children: [
|
|
6843
|
+
!hideMeter && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6844
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-1", role: "meter", "aria-valuemin": 0, "aria-valuemax": 4, "aria-valuenow": score, "aria-label": "Password strength", children: [1, 2, 3, 4].map((seg) => /* @__PURE__ */ jsx(
|
|
6845
|
+
"span",
|
|
6846
|
+
{
|
|
6847
|
+
className: cx("h-1.5 flex-1 rounded-full transition-colors duration-200", seg <= score ? BAR_COLOR[score] : "bg-border")
|
|
6848
|
+
},
|
|
6849
|
+
seg
|
|
6850
|
+
)) }),
|
|
6851
|
+
label && /* @__PURE__ */ jsxs("p", { className: "text-xs", children: [
|
|
6852
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground-muted", children: "Strength: " }),
|
|
6853
|
+
/* @__PURE__ */ jsx("span", { className: cx("font-medium", TEXT_COLOR[score]), children: label })
|
|
6854
|
+
] })
|
|
6855
|
+
] }),
|
|
6856
|
+
showRequirements && /* @__PURE__ */ jsx("ul", { className: "mt-0.5 flex flex-col gap-1", children: rules.map((rule, i) => {
|
|
6857
|
+
const ok = rule.test(value);
|
|
6858
|
+
return /* @__PURE__ */ jsxs("li", { className: cx("flex items-center gap-1.5 text-xs", ok ? "text-foreground-secondary" : "text-foreground-muted"), children: [
|
|
6859
|
+
/* @__PURE__ */ jsx(Tick, { ok }),
|
|
6860
|
+
rule.label
|
|
6861
|
+
] }, i);
|
|
6862
|
+
}) }),
|
|
6863
|
+
showMatch && /* @__PURE__ */ jsxs("p", { className: cx("flex items-center gap-1.5 text-xs font-medium", matches ? "text-status-success" : "text-status-error"), children: [
|
|
6864
|
+
/* @__PURE__ */ jsx(Tick, { ok: matches }),
|
|
6865
|
+
matches ? "Passwords match" : "Passwords don\u2019t match"
|
|
6866
|
+
] })
|
|
6867
|
+
] });
|
|
6868
|
+
}
|
|
6869
|
+
var COLS = {
|
|
6870
|
+
1: "grid-cols-1",
|
|
6871
|
+
2: "grid-cols-1 sm:grid-cols-2",
|
|
6872
|
+
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"
|
|
6873
|
+
};
|
|
6874
|
+
var PAD2 = { sm: "p-3", md: "p-4", lg: "p-5" };
|
|
6875
|
+
var TITLE = { sm: "text-sm", md: "text-sm", lg: "text-base" };
|
|
6876
|
+
var CheckMark = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", className: "h-5 w-5 text-accent", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2.25a9.75 9.75 0 1 0 0 19.5 9.75 9.75 0 0 0 0-19.5Zm4.28 7.53a.75.75 0 0 0-1.06-1.06l-4.97 4.97-1.97-1.97a.75.75 0 1 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5.5-5.5Z" }) });
|
|
6877
|
+
function RadioTile({
|
|
6878
|
+
options,
|
|
6879
|
+
value,
|
|
6880
|
+
defaultValue,
|
|
6881
|
+
onChange,
|
|
6882
|
+
name,
|
|
6883
|
+
label,
|
|
6884
|
+
columns = 2,
|
|
6885
|
+
size = "md",
|
|
6886
|
+
disabled,
|
|
6887
|
+
required,
|
|
6888
|
+
helperText,
|
|
6889
|
+
errorMessage,
|
|
6890
|
+
className
|
|
6891
|
+
}) {
|
|
6892
|
+
const groupId = useId();
|
|
6893
|
+
const errorId = useId();
|
|
6894
|
+
const hasError = errorMessage != null;
|
|
6895
|
+
return /* @__PURE__ */ jsx(
|
|
6896
|
+
Field,
|
|
6897
|
+
{
|
|
6898
|
+
className,
|
|
6899
|
+
label,
|
|
6900
|
+
htmlFor: groupId,
|
|
6901
|
+
errorId,
|
|
6902
|
+
errorMessage,
|
|
6903
|
+
required,
|
|
6904
|
+
helperText,
|
|
6905
|
+
children: /* @__PURE__ */ jsx(
|
|
6906
|
+
RadioGroupPrimitive.Root,
|
|
6907
|
+
{
|
|
6908
|
+
id: groupId,
|
|
6909
|
+
name,
|
|
6910
|
+
value,
|
|
6911
|
+
defaultValue,
|
|
6912
|
+
onValueChange: onChange,
|
|
6913
|
+
disabled,
|
|
6914
|
+
required,
|
|
6915
|
+
"aria-invalid": hasError || void 0,
|
|
6916
|
+
"aria-describedby": hasError ? errorId : void 0,
|
|
6917
|
+
className: cx("grid gap-3", COLS[columns]),
|
|
6918
|
+
children: options.map((opt) => /* @__PURE__ */ jsxs(
|
|
6919
|
+
RadioGroupPrimitive.Item,
|
|
6920
|
+
{
|
|
6921
|
+
value: opt.value,
|
|
6922
|
+
disabled: opt.disabled,
|
|
6923
|
+
className: cx(
|
|
6924
|
+
"group relative flex flex-col gap-1 rounded-xl border bg-surface text-left transition-all duration-150",
|
|
6925
|
+
PAD2[size],
|
|
6926
|
+
"border-border hover:border-border-strong",
|
|
6927
|
+
"data-[state=checked]:border-accent data-[state=checked]:ring-1 data-[state=checked]:ring-accent",
|
|
6928
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
6929
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
6930
|
+
),
|
|
6931
|
+
children: [
|
|
6932
|
+
/* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "absolute right-3 top-3", children: CheckMark }),
|
|
6933
|
+
opt.icon != null && /* @__PURE__ */ jsx("span", { className: "mb-1 text-accent [&>svg]:h-6 [&>svg]:w-6", children: opt.icon }),
|
|
6934
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 pr-6", children: [
|
|
6935
|
+
/* @__PURE__ */ jsx("span", { className: cx("font-semibold text-foreground", TITLE[size]), children: opt.label }),
|
|
6936
|
+
opt.badge != null && /* @__PURE__ */ jsx("span", { className: "rounded-full border border-border bg-surface-raised px-2 py-0.5 text-[11px] font-medium text-foreground-secondary", children: opt.badge })
|
|
6937
|
+
] }),
|
|
6938
|
+
opt.description != null && /* @__PURE__ */ jsx("span", { className: "text-xs leading-relaxed text-foreground-secondary", children: opt.description })
|
|
6939
|
+
]
|
|
6940
|
+
},
|
|
6941
|
+
opt.value
|
|
6942
|
+
))
|
|
6943
|
+
}
|
|
6944
|
+
)
|
|
6945
|
+
}
|
|
6946
|
+
);
|
|
6947
|
+
}
|
|
6573
6948
|
function Checkbox({
|
|
6574
6949
|
checked,
|
|
6575
6950
|
value,
|
|
@@ -8465,7 +8840,7 @@ function OtpInput({
|
|
|
8465
8840
|
emit(valid.join(""));
|
|
8466
8841
|
focusBox(valid.length);
|
|
8467
8842
|
};
|
|
8468
|
-
return /* @__PURE__ */ jsx(Field, { className, label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxs(
|
|
8843
|
+
return /* @__PURE__ */ jsx(Field, { className, label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxs(React29.Fragment, { children: [
|
|
8469
8844
|
/* @__PURE__ */ jsx(
|
|
8470
8845
|
"input",
|
|
8471
8846
|
{
|
|
@@ -9189,7 +9564,7 @@ function Jumbotron({
|
|
|
9189
9564
|
}
|
|
9190
9565
|
);
|
|
9191
9566
|
}
|
|
9192
|
-
var
|
|
9567
|
+
var COLS2 = {
|
|
9193
9568
|
2: "sm:grid-cols-2",
|
|
9194
9569
|
3: "sm:grid-cols-2 lg:grid-cols-3",
|
|
9195
9570
|
4: "sm:grid-cols-2 lg:grid-cols-4"
|
|
@@ -9211,7 +9586,7 @@ function FeatureGrid({
|
|
|
9211
9586
|
title != null && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
9212
9587
|
description != null && /* @__PURE__ */ jsx("p", { className: "max-w-2xl text-base leading-relaxed text-foreground-secondary", children: description })
|
|
9213
9588
|
] }),
|
|
9214
|
-
/* @__PURE__ */ jsx("div", { className: ["grid grid-cols-1 gap-6",
|
|
9589
|
+
/* @__PURE__ */ jsx("div", { className: ["grid grid-cols-1 gap-6", COLS2[columns]].join(" "), children: features.map((f, i) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 rounded-xl border border-border bg-surface p-5", children: [
|
|
9215
9590
|
f.icon != null && /* @__PURE__ */ jsx(
|
|
9216
9591
|
"span",
|
|
9217
9592
|
{
|
|
@@ -9268,7 +9643,7 @@ function PricingPlans({ plans, eyebrow, title, description, className = "", styl
|
|
|
9268
9643
|
)) })
|
|
9269
9644
|
] });
|
|
9270
9645
|
}
|
|
9271
|
-
var
|
|
9646
|
+
var COLS3 = {
|
|
9272
9647
|
1: "mx-auto max-w-2xl",
|
|
9273
9648
|
2: "sm:grid-cols-2",
|
|
9274
9649
|
3: "sm:grid-cols-2 lg:grid-cols-3"
|
|
@@ -9285,7 +9660,7 @@ function Testimonials({ testimonials, eyebrow, title, description, columns = 3,
|
|
|
9285
9660
|
title != null && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
9286
9661
|
description != null && /* @__PURE__ */ jsx("p", { className: "max-w-2xl text-base leading-relaxed text-foreground-secondary", children: description })
|
|
9287
9662
|
] }),
|
|
9288
|
-
/* @__PURE__ */ jsx("div", { className: ["grid grid-cols-1 gap-6",
|
|
9663
|
+
/* @__PURE__ */ jsx("div", { className: ["grid grid-cols-1 gap-6", COLS3[columns]].join(" "), children: testimonials.map((tm, i) => /* @__PURE__ */ jsxs("figure", { className: "flex flex-col gap-4 rounded-xl border border-border bg-surface p-6", children: [
|
|
9289
9664
|
tm.rating != null && /* @__PURE__ */ jsx(Stars, { value: tm.rating }),
|
|
9290
9665
|
/* @__PURE__ */ jsxs("blockquote", { className: "flex-1 text-sm leading-relaxed text-foreground", children: [
|
|
9291
9666
|
"\u201C",
|
|
@@ -9489,7 +9864,7 @@ function Parallax({
|
|
|
9489
9864
|
}
|
|
9490
9865
|
);
|
|
9491
9866
|
}
|
|
9492
|
-
var
|
|
9867
|
+
var COLS4 = {
|
|
9493
9868
|
2: "sm:grid-cols-2",
|
|
9494
9869
|
3: "sm:grid-cols-2 lg:grid-cols-3"
|
|
9495
9870
|
};
|
|
@@ -9510,7 +9885,7 @@ function Blog({
|
|
|
9510
9885
|
title != null && /* @__PURE__ */ jsx("h2", { className: "text-2xl font-bold tracking-tight text-foreground sm:text-3xl", children: title }),
|
|
9511
9886
|
description != null && /* @__PURE__ */ jsx("p", { className: "max-w-2xl text-base leading-relaxed text-foreground-secondary", children: description })
|
|
9512
9887
|
] }),
|
|
9513
|
-
/* @__PURE__ */ jsx("div", { className: ["grid grid-cols-1 gap-6",
|
|
9888
|
+
/* @__PURE__ */ jsx("div", { className: ["grid grid-cols-1 gap-6", COLS4[columns]].join(" "), children: posts.map((post, i) => {
|
|
9514
9889
|
const meta = [post.author, post.date, post.readTime].filter((m) => m != null);
|
|
9515
9890
|
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9516
9891
|
post.image && /* @__PURE__ */ jsxs("div", { className: "relative aspect-video overflow-hidden bg-backdrop", children: [
|
|
@@ -9521,7 +9896,7 @@ function Blog({
|
|
|
9521
9896
|
post.tag != null && !post.image && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Badge, { tone: "accent", variant: "soft", size: "sm", children: post.tag }) }),
|
|
9522
9897
|
/* @__PURE__ */ jsx("h3", { className: "text-base font-semibold leading-snug text-foreground transition-colors group-hover:text-accent", children: post.title }),
|
|
9523
9898
|
post.excerpt != null && /* @__PURE__ */ jsx("p", { className: "line-clamp-3 text-sm leading-relaxed text-foreground-secondary", children: post.excerpt }),
|
|
9524
|
-
meta.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-auto flex flex-wrap items-center gap-x-2 gap-y-1 pt-3 text-xs text-foreground-muted", children: meta.map((m, j) => /* @__PURE__ */ jsxs(
|
|
9899
|
+
meta.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-auto flex flex-wrap items-center gap-x-2 gap-y-1 pt-3 text-xs text-foreground-muted", children: meta.map((m, j) => /* @__PURE__ */ jsxs(React29.Fragment, { children: [
|
|
9525
9900
|
j > 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\xB7" }),
|
|
9526
9901
|
/* @__PURE__ */ jsx("span", { children: m })
|
|
9527
9902
|
] }, j)) })
|
|
@@ -9694,6 +10069,6 @@ function LeadCapture({
|
|
|
9694
10069
|
);
|
|
9695
10070
|
}
|
|
9696
10071
|
|
|
9697
|
-
export { Accordion_default as Accordion, AppShell, AutoComplete, Avatar, Badge, Blog, Box, Breadcrumbs, Button_default as Button, CARD_BRANDS, Card_default as Card, CardCarousel, Cart, CartButton, CartProvider, Catalog, CatalogCarousel, CatalogGrid, Chat, Checkbox, Checkout, ColorPicker, ContextMenu, CookieConsent, CreditCardForm, DateRangePicker, Drawer, Dropdown, EmptyCart, FAB, FadingBase, FeatureGrid, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid, GridCard, IconButton, Jumbotron, Kbd, LeadCapture, List2 as List, LoadingSpinner, LogoutTimer, MegaMenu_default as MegaMenu, MenuButton, Modal, NotificationProvider, NumberInput, OpaqueGridCard, OtpInput, Parallax, Password, PopConfirm, Portal, PricingPlans, RadioGroup, Rating, ScalableContainer, Scheduler, SearchInput_default as SearchInput, SecureLayout, SegmentedControl, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, SlideShow, Slider, Socials, Statistic, Stepper, Switch, Table, Tabs_default as Tabs, TagsInput, DatePicker as Temporal, Testimonials, TextArea, TextInput, ThemeProvider, ThemeSwitch, TimePicker, Timeline, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Typography, Video, Wizard, cardNumberError, cvvError, cx, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useBreakpoint, useCart, useFieldArray, useForm, useFormField, useFormStore, useJwt, useLocalStorage, useMediaQuery, useNotification };
|
|
10072
|
+
export { Accordion_default as Accordion, AppShell, AutoComplete, Avatar, Badge, Blog, Box, Breadcrumbs, Button_default as Button, CARD_BRANDS, Card_default as Card, CardCarousel, Cart, CartButton, CartProvider, Catalog, CatalogCarousel, CatalogGrid, Chat, Checkbox, Checkout, ColorPicker, ContextMenu, CookieConsent, CreditCardForm, DateRangePicker, Drawer, Dropdown, EmptyCart, FAB, FadingBase, FeatureGrid, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid, GridCard, IconButton, Jumbotron, Kbd, LeadCapture, List2 as List, LoadingSpinner, LogoutTimer, MegaMenu_default as MegaMenu, MenuButton, Modal, NotificationProvider, NumberInput, OpaqueGridCard, OtpInput, Parallax, Password, PasswordStrength, PopConfirm, Portal, PricingPlans, RadioGroup, RadioTile, Rating, ScalableContainer, Scheduler, SearchInput_default as SearchInput, SecureLayout, SegmentedControl, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, SlideShow, Slider, Socials, Statistic, Stepper, Switch, Table, Tabs_default as Tabs, TagsInput, DatePicker as Temporal, Testimonials, TextArea, TextInput, ThemeProvider, ThemeSwitch, TimePicker, Timeline, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Typography, Video, VirtualList, Wizard, cardNumberError, cvvError, cx, defaultPasswordRules, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, scorePassword, useBreakpoint, useCart, useFieldArray, useForm, useFormField, useFormStore, useJwt, useLocalStorage, useMediaQuery, useNotification };
|
|
9698
10073
|
//# sourceMappingURL=index.js.map
|
|
9699
10074
|
//# sourceMappingURL=index.js.map
|