@crisp-ui-kit/crisp 0.31.2 → 0.31.4
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/cjs/components/accordion/accordion.js +1 -1
- package/dist/cjs/components/avatargroup/avatargroup.js +1 -1
- package/dist/cjs/components/barchart/barchart.js +1 -1
- package/dist/cjs/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/cjs/components/bulkbar/bulkbar.js +1 -1
- package/dist/cjs/components/callout/callout.js +1 -1
- package/dist/cjs/components/checkbox/checkbox.js +1 -1
- package/dist/cjs/components/columncalc/columncalc.js +2 -2
- package/dist/cjs/components/datatable/datatable.js +19 -10
- package/dist/cjs/components/datatable/datatable.recipe.js +2 -2
- package/dist/cjs/components/datepickerfield/datepickerfield.js +1 -1
- package/dist/cjs/components/dialog/dialog.js +1 -1
- package/dist/cjs/components/donutchart/donutchart.js +1 -1
- package/dist/cjs/components/fileupload/fileupload.js +1 -1
- package/dist/cjs/components/formfield/formfield.js +1 -1
- package/dist/cjs/components/linechart/linechart.js +1 -1
- package/dist/cjs/components/menu/menu.js +1 -1
- package/dist/cjs/components/multiselect/multiselect.js +1 -1
- package/dist/cjs/components/radiogroup/radiogroup.js +1 -1
- package/dist/cjs/components/resizablepanel/resizablepanel.js +1 -1
- package/dist/cjs/components/segmented/segmented.js +1 -1
- package/dist/cjs/components/select/select.js +1 -1
- package/dist/cjs/components/stagebar/stagebar.js +1 -1
- package/dist/cjs/components/statcard/statcard.js +1 -1
- package/dist/cjs/components/switch/switch.js +1 -1
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +2 -2
- package/dist/cjs/components/tabs/tabs.js +2 -2
- package/dist/cjs/components/textarea/textarea.js +1 -1
- package/dist/cjs/components/tooltip/tooltip.js +1 -1
- package/dist/cjs/product/appshell/appshell.js +4 -4
- package/dist/cjs/product/authshell/authshell.js +1 -1
- package/dist/cjs/product/board/board.js +1 -1
- package/dist/cjs/product/command/command.js +1 -1
- package/dist/cjs/product/entitycard/entitycard.js +1 -1
- package/dist/cjs/product/flowcanvas/flowcanvas.js +1 -1
- package/dist/cjs/product/inbox/inbox.js +1 -1
- package/dist/cjs/product/listpage/listpage.js +1 -1
- package/dist/cjs/product/onboarding/onboarding.js +1 -1
- package/dist/cjs/product/recordpage/recordpage.js +7 -7
- package/dist/cjs/product/recordstable/recordstable.js +9 -9
- package/dist/cjs/product/richtext/richtext.js +1 -1
- package/dist/cjs/product/settingssection/settingssection.js +1 -1
- package/dist/cjs/product/settingsshell/settingsshell.js +1 -1
- package/dist/cjs/product/sidebar/sidebar.js +6 -6
- package/dist/cjs/product/tasklist/tasklist.js +1 -1
- package/dist/cjs/product/trialbanner/trialbanner.js +1 -1
- package/dist/cjs/product/viewtoggle/viewtoggle.js +1 -1
- package/dist/datatable.css +2 -2
- package/dist/esm/components/accordion/accordion.js +1 -1
- package/dist/esm/components/avatargroup/avatargroup.js +1 -1
- package/dist/esm/components/barchart/barchart.js +1 -1
- package/dist/esm/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/esm/components/bulkbar/bulkbar.js +1 -1
- package/dist/esm/components/callout/callout.js +1 -1
- package/dist/esm/components/checkbox/checkbox.js +1 -1
- package/dist/esm/components/columncalc/columncalc.js +2 -2
- package/dist/esm/components/datatable/datatable.js +19 -10
- package/dist/esm/components/datatable/datatable.recipe.js +2 -2
- package/dist/esm/components/datepickerfield/datepickerfield.js +1 -1
- package/dist/esm/components/dialog/dialog.js +1 -1
- package/dist/esm/components/donutchart/donutchart.js +1 -1
- package/dist/esm/components/fileupload/fileupload.js +1 -1
- package/dist/esm/components/formfield/formfield.js +1 -1
- package/dist/esm/components/linechart/linechart.js +1 -1
- package/dist/esm/components/menu/menu.js +1 -1
- package/dist/esm/components/multiselect/multiselect.js +1 -1
- package/dist/esm/components/radiogroup/radiogroup.js +1 -1
- package/dist/esm/components/resizablepanel/resizablepanel.js +1 -1
- package/dist/esm/components/segmented/segmented.js +1 -1
- package/dist/esm/components/select/select.js +1 -1
- package/dist/esm/components/stagebar/stagebar.js +1 -1
- package/dist/esm/components/statcard/statcard.js +1 -1
- package/dist/esm/components/switch/switch.js +1 -1
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +2 -2
- package/dist/esm/components/tabs/tabs.js +2 -2
- package/dist/esm/components/textarea/textarea.js +1 -1
- package/dist/esm/components/tooltip/tooltip.js +1 -1
- package/dist/esm/product/appshell/appshell.js +4 -4
- package/dist/esm/product/authshell/authshell.js +1 -1
- package/dist/esm/product/board/board.js +1 -1
- package/dist/esm/product/command/command.js +1 -1
- package/dist/esm/product/entitycard/entitycard.js +1 -1
- package/dist/esm/product/flowcanvas/flowcanvas.js +1 -1
- package/dist/esm/product/inbox/inbox.js +1 -1
- package/dist/esm/product/listpage/listpage.js +1 -1
- package/dist/esm/product/onboarding/onboarding.js +1 -1
- package/dist/esm/product/recordpage/recordpage.js +7 -7
- package/dist/esm/product/recordstable/recordstable.js +9 -9
- package/dist/esm/product/richtext/richtext.js +1 -1
- package/dist/esm/product/settingssection/settingssection.js +1 -1
- package/dist/esm/product/settingsshell/settingsshell.js +1 -1
- package/dist/esm/product/sidebar/sidebar.js +6 -6
- package/dist/esm/product/tasklist/tasklist.js +1 -1
- package/dist/esm/product/trialbanner/trialbanner.js +1 -1
- package/dist/esm/product/viewtoggle/viewtoggle.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/components/avatargroup/avatargroup.d.ts +1 -1
- package/dist/types/components/barchart/barchart.d.ts +1 -1
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist/types/components/bulkbar/bulkbar.d.ts +1 -1
- package/dist/types/components/callout/callout.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/columncalc/columncalc.d.ts +5 -5
- package/dist/types/components/datatable/datatable.d.ts +5 -5
- package/dist/types/components/datepickerfield/datepickerfield.d.ts +1 -1
- package/dist/types/components/dialog/dialog.d.ts +1 -1
- package/dist/types/components/donutchart/donutchart.d.ts +1 -1
- package/dist/types/components/emptystate/emptystate.d.ts +1 -1
- package/dist/types/components/formfield/formfield.d.ts +1 -1
- package/dist/types/components/linechart/linechart.d.ts +1 -1
- package/dist/types/components/menu/menu.d.ts +1 -1
- package/dist/types/components/multiselect/multiselect.d.ts +1 -1
- package/dist/types/components/progress/progress.d.ts +1 -1
- package/dist/types/components/radiogroup/radiogroup.d.ts +1 -1
- package/dist/types/components/resizablepanel/resizablepanel.d.ts +4 -4
- package/dist/types/components/segmented/segmented.d.ts +1 -1
- package/dist/types/components/select/select.d.ts +2 -2
- package/dist/types/components/stagebar/stagebar.d.ts +1 -1
- package/dist/types/components/statcard/statcard.d.ts +1 -1
- package/dist/types/components/switch/switch.d.ts +1 -1
- package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +1 -1
- package/dist/types/components/tabs/tabs.d.ts +2 -2
- package/dist/types/components/textarea/textarea.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.d.ts +1 -1
- package/dist/types/product/appshell/appshell.d.ts +2 -2
- package/dist/types/product/authshell/authshell.d.ts +1 -1
- package/dist/types/product/board/board.d.ts +1 -1
- package/dist/types/product/entitycard/entitycard.d.ts +1 -1
- package/dist/types/product/flowcanvas/flowcanvas.d.ts +1 -1
- package/dist/types/product/inbox/inbox.d.ts +1 -1
- package/dist/types/product/listpage/listpage.d.ts +1 -1
- package/dist/types/product/onboarding/onboarding.d.ts +1 -1
- package/dist/types/product/recordpage/recordpage.d.ts +2 -2
- package/dist/types/product/recordstable/recordstable.d.ts +10 -4
- package/dist/types/product/richtext/richtext.d.ts +1 -1
- package/dist/types/product/settingssection/settingssection.d.ts +1 -1
- package/dist/types/product/settingsshell/settingsshell.d.ts +1 -1
- package/dist/types/product/sidebar/sidebar.d.ts +10 -10
- package/dist/types/product/tasklist/tasklist.d.ts +1 -1
- package/dist/types/product/trialbanner/trialbanner.d.ts +1 -1
- package/dist/types/product/viewtoggle/viewtoggle.d.ts +1 -1
- package/package.json +1 -1
|
@@ -311,7 +311,7 @@ function CellView({ column, row, pinned, onOpenPage, avatarTone = "brand", label
|
|
|
311
311
|
}
|
|
312
312
|
// Always-interactive cell editors for the picker column types (status / date /
|
|
313
313
|
// reference). Each is a ghost crisp control that reads the cell value and
|
|
314
|
-
// commits the new one — matching
|
|
314
|
+
// commits the new one — matching measured inline field editors.
|
|
315
315
|
function StatusCell({ column, row, onChange, }) {
|
|
316
316
|
return ((0, jsx_runtime_1.jsx)(select_1.Select, { variant: "ghost", "aria-label": column.label, placeholder: "\u2014", value: row[column.key] ?? undefined, onValueChange: onChange, options: column.options ?? [] }));
|
|
317
317
|
}
|
|
@@ -328,8 +328,8 @@ function TagsCell({ column, row, options, onChange, labels, }) {
|
|
|
328
328
|
/**
|
|
329
329
|
* A date-only cell is a CALENDAR DATE, not an instant. ECMA-262 parses the
|
|
330
330
|
* date-only ISO forms — `1998`, `1998-09`, `1998-09-04` — as UTC midnight, and
|
|
331
|
-
* the field then renders that instant in the reader's own timezone.
|
|
332
|
-
*
|
|
331
|
+
* the field then renders that instant in the reader's own timezone. A
|
|
332
|
+
* `founded: "1998"` field therefore read **Dec 31, 1997** for every reader west
|
|
333
333
|
* of UTC, at every hour of every day, and a date picked east of UTC
|
|
334
334
|
* round-tripped back a day short through `toISOString()` (#220).
|
|
335
335
|
*
|
|
@@ -358,7 +358,7 @@ function DateCell({ column, row, onChange, }) {
|
|
|
358
358
|
return ((0, jsx_runtime_1.jsx)(datepickerfield_1.DatePickerField, { variant: "ghost", "aria-label": column.label, value: value, onChange: (d) => onChange(formatCellDate(d)) }));
|
|
359
359
|
}
|
|
360
360
|
/**
|
|
361
|
-
* The "New <object>" create modal — measured from
|
|
361
|
+
* The "New <object>" create modal — measured from a create-record dialog:
|
|
362
362
|
* a stacked label + "Set …" input per column, a "Create more" toggle, and a
|
|
363
363
|
* primary "Create record" action (⌘↵). Building the row mirrors the inline
|
|
364
364
|
* editor's per-type coercion so a created record reads back like an edited one.
|
|
@@ -418,7 +418,7 @@ function CreateRecordDialog({ open, onOpenChange, columns, entityLabel, onCreate
|
|
|
418
418
|
} })] }, col.key))) }), (0, jsx_runtime_1.jsxs)(dialog_1.DialogFooter, { children: [(0, jsx_runtime_1.jsxs)("span", { className: "dialog-more", children: [labels.createMore, (0, jsx_runtime_1.jsx)(switch_1.Switch, { checked: createMore, onCheckedChange: setCreateMore, "aria-label": labels.createMore })] }), (0, jsx_runtime_1.jsxs)("button", { type: "button", className: "dialog-submit", onClick: submit, children: [labels.createRecord, (0, jsx_runtime_1.jsx)("span", { className: "dialog-submit-key", children: "\u2318\u21B5" })] })] })] }));
|
|
419
419
|
}
|
|
420
420
|
/**
|
|
421
|
-
*
|
|
421
|
+
* A measured-style record grid — fully featured. Toolbar (search / sort status /
|
|
422
422
|
* count / New), sticky checkbox + entity columns, 36px rows, typed cells,
|
|
423
423
|
* click-to-sort headers, column resize by dragging a header edge, inline cell
|
|
424
424
|
* editing (double-click a text/number/url/date cell), add-row and add-column,
|
|
@@ -437,13 +437,13 @@ function RecordsTable({ labels, columns: columnsProp = exports.defaultColumns, r
|
|
|
437
437
|
// because a caller passing a stable array never triggers this.
|
|
438
438
|
React.useEffect(() => setCols(columnsProp), [columnsProp]);
|
|
439
439
|
React.useEffect(() => setData(rowsProp), [rowsProp]);
|
|
440
|
-
//
|
|
440
|
+
// Multi-criteria sort: an ordered list of {field, direction} rows.
|
|
441
441
|
const [sorts, setSorts] = React.useState([]);
|
|
442
442
|
const [dragSort, setDragSort] = React.useState(null);
|
|
443
443
|
const [editing, setEditing] = React.useState(null);
|
|
444
444
|
const [renamingCol, setRenamingCol] = React.useState(null);
|
|
445
445
|
const [creating, setCreating] = React.useState(false);
|
|
446
|
-
//
|
|
446
|
+
// A measured-style filter: an ordered list of conditions, each shown as a toolbar
|
|
447
447
|
// chip with an editable value (operator is "contains")
|
|
448
448
|
const [filterConds, setFilterConds] = React.useState([]);
|
|
449
449
|
const [filterQuery, setFilterQuery] = React.useState("");
|
|
@@ -734,7 +734,7 @@ function RecordsTable({ labels, columns: columnsProp = exports.defaultColumns, r
|
|
|
734
734
|
* `nearest` on both axes: a cell already in view is left exactly where it
|
|
735
735
|
* is, which is what makes this safe to run after a click too.
|
|
736
736
|
*
|
|
737
|
-
* No `behavior` of our own — the page's `scroll-behavior` decides, and
|
|
737
|
+
* No `behavior` of our own — the page's `scroll-behavior` decides, and it
|
|
738
738
|
* jumps rather than glides — except under reduced motion, where an explicit
|
|
739
739
|
* "auto" is the only thing that beats a host page that set
|
|
740
740
|
* `scroll-behavior: smooth` on the scroller (#208's rule: JS motion reads
|
|
@@ -1023,7 +1023,7 @@ function RecordsTable({ labels, columns: columnsProp = exports.defaultColumns, r
|
|
|
1023
1023
|
label: ((0, jsx_runtime_1.jsxs)("span", { className: "recordstable-sort-optlabel", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ArrowDownWideNarrow, { size: 15, strokeWidth: 1.75 }), t.descending] })),
|
|
1024
1024
|
keywords: t.descending,
|
|
1025
1025
|
},
|
|
1026
|
-
], "aria-label": t.sortDirection }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "recordstable-sort-remove", onClick: () => removeSort(i), "aria-label": t.removeSort, children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 15, strokeWidth: 1.75 }) })] }, s.key)))), (0, jsx_runtime_1.jsx)("div", { className: "recordstable-sort-addrow", children: (0, jsx_runtime_1.jsxs)("button", { type: "button", className: "recordstable-sort-add", onClick: addSort, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 15, strokeWidth: 1.75 }), t.addSort] }) }), (0, jsx_runtime_1.jsx)("div", { className: "recordstable-sort-foot", children: (0, jsx_runtime_1.jsxs)("a", { className: "recordstable-sort-learn", href:
|
|
1026
|
+
], "aria-label": t.sortDirection }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "recordstable-sort-remove", onClick: () => removeSort(i), "aria-label": t.removeSort, children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 15, strokeWidth: 1.75 }) })] }, s.key)))), (0, jsx_runtime_1.jsx)("div", { className: "recordstable-sort-addrow", children: (0, jsx_runtime_1.jsxs)("button", { type: "button", className: "recordstable-sort-add", onClick: addSort, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 15, strokeWidth: 1.75 }), t.addSort] }) }), (0, jsx_runtime_1.jsx)("div", { className: "recordstable-sort-foot", children: t.learnSortingHref ? ((0, jsx_runtime_1.jsxs)("a", { className: "recordstable-sort-learn", href: t.learnSortingHref, target: "_blank", rel: "noreferrer", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CircleHelp, { size: 14, strokeWidth: 1.75 }), t.learnSorting] })) : ((0, jsx_runtime_1.jsxs)("span", { className: "recordstable-sort-learn", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CircleHelp, { size: 14, strokeWidth: 1.75 }), t.learnSorting] })) })] }))] }), (0, jsx_runtime_1.jsxs)("span", { className: "recordstable-toolgroup", children: [(0, jsx_runtime_1.jsxs)("button", { type: "button", className: `recordstable-tool recordstable-tool--ghost${activeFilters ? " recordstable-tool--active" : ""}`, onClick: () => setOpenMenu(openMenu === "filter" ? null : "filter"), "aria-haspopup": "dialog", "aria-expanded": openMenu === "filter", "data-menu-trigger": true, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ListFilter, { size: 14, strokeWidth: 1.75, "aria-hidden": "true" }), t.filterCount(activeFilters)] }), openMenu === "filter" && ((0, jsx_runtime_1.jsxs)("div", { className: "recordstable-menu", role: "dialog", "aria-label": t.addFilter, children: [(0, jsx_runtime_1.jsx)("input", { className: "recordstable-menu-input", placeholder: t.filterByPlaceholder, "aria-label": t.filterByField,
|
|
1027
1027
|
// biome-ignore lint/a11y/noAutofocus: focus the picker on open
|
|
1028
1028
|
autoFocus: true, value: filterQuery, onChange: (e) => setFilterQuery(e.target.value) }), cols
|
|
1029
1029
|
.filter((col) => col.label
|
|
@@ -40,7 +40,7 @@ const React = __importStar(require("react"));
|
|
|
40
40
|
const richtext_recipe_1 = require("./richtext.recipe");
|
|
41
41
|
const exec = (cmd, value) => document.execCommand(cmd, false, value);
|
|
42
42
|
/**
|
|
43
|
-
* A block rich-text editor — measured from
|
|
43
|
+
* A block rich-text editor — measured from a notes editor. A large title,
|
|
44
44
|
* a prose body (headings, lists, quote, marks, links), and a floating toolbar
|
|
45
45
|
* that appears over a text selection. Built on contentEditable, dependency-free.
|
|
46
46
|
* Uncontrolled: seed with `defaultTitle`/`defaultHtml`, read via `onChange`.
|
|
@@ -4,7 +4,7 @@ exports.SettingsSection = SettingsSection;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const settingssection_recipe_1 = require("./settingssection.recipe");
|
|
6
6
|
/**
|
|
7
|
-
* A settings section — measured from
|
|
7
|
+
* A settings section — measured from settings pages. A title + optional
|
|
8
8
|
* subtitle and trailing action, then a gapped stack of rows (pair with
|
|
9
9
|
* FormField). Compose several inside a settings content pane.
|
|
10
10
|
*/
|
|
@@ -39,7 +39,7 @@ const lucide_react_1 = require("lucide-react");
|
|
|
39
39
|
const React = __importStar(require("react"));
|
|
40
40
|
const settingsshell_recipe_1 = require("./settingsshell.recipe");
|
|
41
41
|
/**
|
|
42
|
-
* The Settings layout — measured
|
|
42
|
+
* The Settings layout — measured live. A left nav (back header,
|
|
43
43
|
* search, grouped items) beside a scrolling content pane. The search filters the
|
|
44
44
|
* nav by label. Fills the height its container gives it.
|
|
45
45
|
*/
|
|
@@ -64,13 +64,13 @@ const GlyphPeople = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.User, { size: 1
|
|
|
64
64
|
const GlyphDeals = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.CircleDollarSign, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
65
65
|
const GlyphUsers = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
66
66
|
const GlyphWorkspaces = () => ((0, jsx_runtime_1.jsx)(lucide_react_1.LayoutGrid, { size: 12, color: "white", strokeWidth: 1.75, "aria-hidden": "true" }));
|
|
67
|
-
/** The measured
|
|
67
|
+
/** The measured workspace switcher — the default `workspace` prop. */
|
|
68
68
|
exports.ATTIO_SIDEBAR_WORKSPACE = {
|
|
69
69
|
name: "techpartners",
|
|
70
70
|
avatarLabel: "T",
|
|
71
71
|
avatarTone: "cyan",
|
|
72
72
|
};
|
|
73
|
-
/** The measured
|
|
73
|
+
/** The measured main nav — the default `items` prop. */
|
|
74
74
|
exports.ATTIO_SIDEBAR_ITEMS = [
|
|
75
75
|
{ label: "Home", icon: IconHome },
|
|
76
76
|
{
|
|
@@ -86,7 +86,7 @@ exports.ATTIO_SIDEBAR_ITEMS = [
|
|
|
86
86
|
{ label: "Sequences", icon: IconSequences },
|
|
87
87
|
{ label: "Workflows", icon: IconWorkflows },
|
|
88
88
|
];
|
|
89
|
-
/** The measured
|
|
89
|
+
/** The measured Records section — the default `recordsSection` prop. */
|
|
90
90
|
exports.ATTIO_SIDEBAR_RECORDS_SECTION = {
|
|
91
91
|
label: "Records",
|
|
92
92
|
items: [
|
|
@@ -97,17 +97,17 @@ exports.ATTIO_SIDEBAR_RECORDS_SECTION = {
|
|
|
97
97
|
{ label: "Workspaces", tone: "purple", glyph: GlyphWorkspaces },
|
|
98
98
|
],
|
|
99
99
|
};
|
|
100
|
-
/** The measured
|
|
100
|
+
/** The measured Lists section — the default `listsSection` prop. */
|
|
101
101
|
exports.ATTIO_SIDEBAR_LISTS_SECTION = {
|
|
102
102
|
label: "Lists",
|
|
103
103
|
newListLabel: "+ New list",
|
|
104
104
|
};
|
|
105
|
-
/** The measured
|
|
105
|
+
/** The measured Chats section — the default `chatsSection` prop. */
|
|
106
106
|
exports.ATTIO_SIDEBAR_CHATS_SECTION = {
|
|
107
107
|
label: "Chats",
|
|
108
108
|
items: [{ label: "In-app notification for deal wins", icon: IconChat }],
|
|
109
109
|
};
|
|
110
|
-
/** The measured
|
|
110
|
+
/** The measured footer copy — the default `footer` prop. */
|
|
111
111
|
exports.ATTIO_SIDEBAR_FOOTER = {
|
|
112
112
|
gettingStartedLabel: "Getting started 1/6",
|
|
113
113
|
inviteLabel: "Invite team members",
|
|
@@ -7,7 +7,7 @@ function Row({ task, onToggle, completeLabel, incompleteLabel, }) {
|
|
|
7
7
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "tasklist-row", "data-done": task.done ? "" : undefined, children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", className: "tasklist-check", checked: !!task.done, "aria-label": task.done ? incompleteLabel : completeLabel, onChange: () => onToggle?.(task.id, !task.done) }), (0, jsx_runtime_1.jsx)("span", { className: "tasklist-title", children: task.title }), (task.due != null || task.meta != null) && ((0, jsx_runtime_1.jsxs)("span", { className: "tasklist-meta", children: [task.due != null && ((0, jsx_runtime_1.jsx)("span", { className: "tasklist-due", "data-overdue": task.overdue ? "" : undefined, children: task.due })), task.meta] }))] }));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* A task list — measured from
|
|
10
|
+
* A task list — measured from a tasks page. Optional group headers with a
|
|
11
11
|
* count, then rows of a round complete-checkbox + title + trailing meta.
|
|
12
12
|
* Completed rows strike through; overdue dates go red.
|
|
13
13
|
*/
|
|
@@ -4,7 +4,7 @@ exports.TrialBanner = TrialBanner;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const trialbanner_recipe_1 = require("./trialbanner.recipe");
|
|
6
6
|
/**
|
|
7
|
-
* A compact trial / upgrade banner — measured from
|
|
7
|
+
* A compact trial / upgrade banner — measured from a sidebar footer.
|
|
8
8
|
* Icon + message + an optional small action pill (soft-glow outlined button).
|
|
9
9
|
*/
|
|
10
10
|
function TrialBanner({ icon, children, action, onAction, tone = "neutral", className, ...rest }) {
|
|
@@ -38,7 +38,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const viewtoggle_recipe_1 = require("./viewtoggle.recipe");
|
|
40
40
|
/**
|
|
41
|
-
* A compact icon toggle — measured from
|
|
41
|
+
* A compact icon toggle — measured from a list/grid switch. A padded track
|
|
42
42
|
* of icon tiles; the selected tile is raised. Use for view-mode switches (list ⇄
|
|
43
43
|
* grid) or any small mutually-exclusive icon choice.
|
|
44
44
|
*/
|
package/dist/datatable.css
CHANGED
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
/* fixed layout so column widths (and resize) are exact — like RecordsTable */
|
|
64
64
|
& table { table-layout: fixed; }
|
|
65
65
|
/* column resize grip */
|
|
66
|
-
& .datatable-resize { position: absolute; top: 0;
|
|
67
|
-
& .datatable-resize::after { content: ""; position: absolute; top: 0;
|
|
66
|
+
& .datatable-resize { position: absolute; top: 0; inset-inline-end: -3px; width: 9px; height: 100%; cursor: col-resize; z-index: 6; touch-action: none; }
|
|
67
|
+
& .datatable-resize::after { content: ""; position: absolute; top: 0; inset-inline-start: 3px; width: 2px; height: 100%; background: var(--bg-brand-solid); opacity: 0; transition: opacity .12s; }
|
|
68
68
|
& .datatable-resize:hover::after, & .datatable-resize[data-resizing]::after { opacity: 1; }
|
|
69
69
|
/* typed cells — entity (avatar + name), colour-coded tags, numbers, dates */
|
|
70
70
|
& .datatable-entity { display: flex; align-items: center; gap: var(--space-1-5); min-width: 0; color: var(--fg-primary); font-weight: var(--weight-medium); }
|
|
@@ -3,7 +3,7 @@ import { ChevronDown } from "lucide-react";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { accordionRecipe } from "./accordion.recipe.js";
|
|
5
5
|
/**
|
|
6
|
-
* A collapsible section list — measured from
|
|
6
|
+
* A collapsible section list — measured from sidebar groups. Single or
|
|
7
7
|
* multiple open; panels animate their height (grid-rows 0fr->1fr). Headers are
|
|
8
8
|
* buttons with `aria-expanded` / `aria-controls`.
|
|
9
9
|
*/
|
|
@@ -4,7 +4,7 @@ import { Avatar } from "../avatar/avatar.js";
|
|
|
4
4
|
import { avatargroupRecipe } from "./avatargroup.recipe.js";
|
|
5
5
|
/**
|
|
6
6
|
* A stack of overlapping avatars with an optional "+N" overflow chip — measured
|
|
7
|
-
* from
|
|
7
|
+
* from team / member rows. Pass `<Avatar>` children; each is ringed in
|
|
8
8
|
* the surface colour so it reads against its neighbour.
|
|
9
9
|
*/
|
|
10
10
|
export function AvatarGroup({ children, max, size = "md", className, "aria-label": ariaLabel, ...rest }) {
|
|
@@ -11,7 +11,7 @@ function niceNum(raw) {
|
|
|
11
11
|
return step * mag;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* A responsive bar chart
|
|
14
|
+
* A responsive bar chart for dashboards. Pure CSS, so
|
|
15
15
|
* it scales with its container. Renders `role="img"` with an accessible summary.
|
|
16
16
|
*/
|
|
17
17
|
export function BarChart({ data, height = 240, max, ticks = 5, color, format = (n) => n.toLocaleString(), yAxisWidth, xAxisTitle, "aria-label": ariaLabel, className, ...rest }) {
|
|
@@ -3,7 +3,7 @@ import { ChevronRight } from "lucide-react";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { breadcrumbRecipe } from "./breadcrumb.recipe.js";
|
|
5
5
|
/**
|
|
6
|
-
* A breadcrumb trail — measured from
|
|
6
|
+
* A breadcrumb trail — measured from a record-page nav. The last item is
|
|
7
7
|
* marked `aria-current="page"`; earlier items render as links or buttons.
|
|
8
8
|
*/
|
|
9
9
|
export function Breadcrumb({ items, separator, "aria-label": ariaLabel = "Breadcrumb", className, ...rest }) {
|
|
@@ -5,7 +5,7 @@ import { bulkbarRecipe } from "./bulkbar.recipe.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* A floating bulk-action bar. Rises from the bottom-centre of its nearest
|
|
7
7
|
* positioned ancestor when a selection is active; render it conditionally
|
|
8
|
-
* (e.g. `count > 0 && <BulkBar …/>`). Measured from
|
|
8
|
+
* (e.g. `count > 0 && <BulkBar …/>`). Measured from a records table.
|
|
9
9
|
*/
|
|
10
10
|
export function BulkBar({ count, onClear, countLabel = "selected", countText = (count, label) => (_jsxs(_Fragment, { children: [count, " ", label] })), children, className, clearLabel = "Clear selection", ...rest }) {
|
|
11
11
|
return (_jsx("div", { className: bulkbarRecipe({ className }), ...rest, children: _jsxs("div", { className: "bulkbar-bar", children: [count != null && (_jsxs("button", { type: "button", className: "bulkbar-count", onClick: onClear, title: clearLabel, children: [countText(count, countLabel), _jsx(X, { size: 13, strokeWidth: 2, "aria-hidden": "true" })] })), children] }) }));
|
|
@@ -9,7 +9,7 @@ const DEFAULT_ICONS = {
|
|
|
9
9
|
danger: CircleAlert,
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* An inline callout / banner — measured from
|
|
12
|
+
* An inline callout / banner — measured from info notices. `tone` tints
|
|
13
13
|
* the background and icon; pass a `title` and/or body `children`.
|
|
14
14
|
*/
|
|
15
15
|
export function Callout({ tone = "neutral", icon, title, children, action, className, ...rest }) {
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { Primitive } from "../../core/index.js";
|
|
4
4
|
import { checkboxRecipe } from "./checkbox.recipe.js";
|
|
5
5
|
/**
|
|
6
|
-
* A native `<input type="checkbox">` styled to
|
|
6
|
+
* A native `<input type="checkbox">` styled to the measured grid checkbox (16px,
|
|
7
7
|
* r6, brand fill + white check). Native on purpose: keyboard, focus, and form
|
|
8
8
|
* semantics come for free. `indeterminate` is a DOM-only property, so it is
|
|
9
9
|
* applied via ref rather than an attribute.
|
|
@@ -3,14 +3,14 @@ import { ChevronDown, Plus } from "lucide-react";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Menu, MenuItem } from "../menu/index.js";
|
|
5
5
|
import { columncalcRecipe } from "./columncalc.recipe.js";
|
|
6
|
-
/** The four
|
|
6
|
+
/** The four calcs offered on every column, in their order. */
|
|
7
7
|
export const UNIVERSAL_CALCS = [
|
|
8
8
|
"countEmpty",
|
|
9
9
|
"countFilled",
|
|
10
10
|
"percentEmpty",
|
|
11
11
|
"percentFilled",
|
|
12
12
|
];
|
|
13
|
-
/** The four
|
|
13
|
+
/** The four calcs added for numeric columns, in their order. */
|
|
14
14
|
export const NUMERIC_CALCS = ["sum", "average", "min", "max"];
|
|
15
15
|
export const CALC_LABEL = {
|
|
16
16
|
none: "None",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowDown, ArrowUp, Check, ChevronsUpDown, GripVertical, Plus, Search, SlidersHorizontal, } from "lucide-react";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
import { isRtlElement } from "../../core/index.js";
|
|
4
5
|
import { Checkbox } from "../checkbox/index.js";
|
|
5
6
|
import { Menu, MenuItem } from "../menu/index.js";
|
|
6
7
|
import { Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "../table/index.js";
|
|
@@ -32,7 +33,7 @@ function asText(v) {
|
|
|
32
33
|
return v.join(", ");
|
|
33
34
|
return String(v);
|
|
34
35
|
}
|
|
35
|
-
// stable pastel tone per string value — colour-coded tags/statuses
|
|
36
|
+
// stable pastel tone per string value — colour-coded tags/statuses
|
|
36
37
|
const TAG_TONES = [
|
|
37
38
|
"brand",
|
|
38
39
|
"success",
|
|
@@ -240,8 +241,8 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
240
241
|
});
|
|
241
242
|
}, [filtered, sorts, colByKey]);
|
|
242
243
|
/**
|
|
243
|
-
* Rows bucketed under a heading, preserving first-seen group order (
|
|
244
|
-
*
|
|
244
|
+
* Rows bucketed under a heading, preserving first-seen group order (a
|
|
245
|
+
* grouped view without reordering within a group). One bucket with a null
|
|
245
246
|
* group when `groupBy` is absent, so the render path is identical either way.
|
|
246
247
|
*/
|
|
247
248
|
const groupedRows = React.useMemo(() => {
|
|
@@ -273,7 +274,7 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
273
274
|
}
|
|
274
275
|
function cycleSort(key) {
|
|
275
276
|
// Clicking a header drives a single sort, as before. Multi-sort is supplied
|
|
276
|
-
// by the caller through the `sort` prop (
|
|
277
|
+
// by the caller through the `sort` prop (built in a sort popover).
|
|
277
278
|
const dir = sortDirByKey.get(key);
|
|
278
279
|
if (!dir)
|
|
279
280
|
setSort({ key, dir: "asc" });
|
|
@@ -283,7 +284,7 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
283
284
|
setSort(null);
|
|
284
285
|
}
|
|
285
286
|
/**
|
|
286
|
-
* Which editor a column gets. Mirrors RecordsTable — the
|
|
287
|
+
* Which editor a column gets. Mirrors RecordsTable — the measured
|
|
287
288
|
* sibling — rather than giving every type the same text box:
|
|
288
289
|
* number/currency numeric, with a decimal keypad on touch
|
|
289
290
|
* date a native date field
|
|
@@ -329,10 +330,13 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
329
330
|
nr = Math.max(0, r - 1);
|
|
330
331
|
else if (e.key === "ArrowDown")
|
|
331
332
|
nr = Math.min(rows.length - 1, r + 1);
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
else if (e.key === "ArrowRight")
|
|
335
|
-
|
|
333
|
+
// The arrows follow what the user SEES: under RTL the first column renders
|
|
334
|
+
// rightmost, so ArrowLeft steps forward and ArrowRight steps back (#255).
|
|
335
|
+
else if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
336
|
+
const rtl = isRtlElement(e.currentTarget);
|
|
337
|
+
const forward = e.key === (rtl ? "ArrowLeft" : "ArrowRight");
|
|
338
|
+
nc = forward ? Math.min(columns.length - 1, c + 1) : Math.max(0, c - 1);
|
|
339
|
+
}
|
|
336
340
|
else if (e.key === "Escape") {
|
|
337
341
|
setSelCell(null);
|
|
338
342
|
return;
|
|
@@ -390,6 +394,11 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
390
394
|
key: col.key,
|
|
391
395
|
startX: e.clientX,
|
|
392
396
|
startW: colWidth(col),
|
|
397
|
+
// The columns reverse under RTL, so the grip — anchored at
|
|
398
|
+
// `inset-inline-end` — lands on the column's LEFT edge there, and
|
|
399
|
+
// pulling it further left must GROW the column. `clientX` stays
|
|
400
|
+
// physical, so the sign is the other half of that conversion (#214).
|
|
401
|
+
dir: isRtlElement(e.currentTarget) ? -1 : 1,
|
|
393
402
|
};
|
|
394
403
|
setResizingKey(col.key);
|
|
395
404
|
}
|
|
@@ -397,7 +406,7 @@ export function DataTable({ columns: columnsProp, data, selectable = false, sele
|
|
|
397
406
|
const r = resizeRef.current;
|
|
398
407
|
if (!r)
|
|
399
408
|
return;
|
|
400
|
-
const w = Math.max(64, r.startW + (e.clientX - r.startX));
|
|
409
|
+
const w = Math.max(64, r.startW + r.dir * (e.clientX - r.startX));
|
|
401
410
|
setWidths((prev) => ({ ...prev, [r.key]: w }));
|
|
402
411
|
}
|
|
403
412
|
function endResize(e) {
|
|
@@ -70,8 +70,8 @@ const config = defineRecipe({
|
|
|
70
70
|
/* fixed layout so column widths (and resize) are exact — like RecordsTable */
|
|
71
71
|
& table { table-layout: fixed; }
|
|
72
72
|
/* column resize grip */
|
|
73
|
-
& .datatable-resize { position: absolute; top: 0;
|
|
74
|
-
& .datatable-resize::after { content: ""; position: absolute; top: 0;
|
|
73
|
+
& .datatable-resize { position: absolute; top: 0; inset-inline-end: -3px; width: 9px; height: 100%; cursor: col-resize; z-index: 6; touch-action: none; }
|
|
74
|
+
& .datatable-resize::after { content: ""; position: absolute; top: 0; inset-inline-start: 3px; width: 2px; height: 100%; background: ${c.bgBrandSolid}; opacity: 0; transition: opacity .12s; }
|
|
75
75
|
& .datatable-resize:hover::after, & .datatable-resize[data-resizing]::after { opacity: 1; }
|
|
76
76
|
/* typed cells — entity (avatar + name), colour-coded tags, numbers, dates */
|
|
77
77
|
& .datatable-entity { display: flex; align-items: center; gap: ${c.space["1.5"]}; min-width: 0; color: ${c.fgPrimary}; font-weight: ${c.weight.medium}; }
|
|
@@ -17,7 +17,7 @@ const fromDate = (d) => ({
|
|
|
17
17
|
day: d.getDate(),
|
|
18
18
|
});
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* A measured date field: a trigger showing the value, opening a calendar in a
|
|
21
21
|
* popover. This is what `DatePicker` used to be; `DatePicker` is now
|
|
22
22
|
* seed-design's bare calendar, and this composes it.
|
|
23
23
|
*/
|
|
@@ -19,7 +19,7 @@ function useDialogInstanceId() {
|
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* A modal dialog — composes Zag's dialog machine (focus trap, scroll lock,
|
|
22
|
-
* Escape / outside-click dismissal) with the measured
|
|
22
|
+
* Escape / outside-click dismissal) with the measured modal surface.
|
|
23
23
|
* Compose the body with `DialogBody` and actions with `DialogFooter`.
|
|
24
24
|
*/
|
|
25
25
|
export function Dialog({ open, onOpenChange, title, icon, width = 640, "aria-label": ariaLabel, closeLabel = "Close", children, className, style, "aria-describedby": describedBy, ...rest }) {
|
|
@@ -12,7 +12,7 @@ const PALETTE = [
|
|
|
12
12
|
c.bgDanger,
|
|
13
13
|
];
|
|
14
14
|
/**
|
|
15
|
-
* A donut / ring chart — measured from
|
|
15
|
+
* A donut / ring chart — measured from a reports breakdown report. SVG
|
|
16
16
|
* ring using the r=15.915 (circumference 100) trick so slices are percentages;
|
|
17
17
|
* a centred total and an optional legend. `role="img"` with a summary.
|
|
18
18
|
*/
|
|
@@ -6,7 +6,7 @@ import * as React from "react";
|
|
|
6
6
|
import { useFocusAfterRemoval } from "../../core/index.js";
|
|
7
7
|
import { fileuploadRecipe } from "./fileupload.recipe.js";
|
|
8
8
|
export const fileUploadLabels = {
|
|
9
|
-
//
|
|
9
|
+
// Matches the copy on the record Files pane.
|
|
10
10
|
title: "No files",
|
|
11
11
|
hint: "Drag a file here or choose one from your computer.",
|
|
12
12
|
remove: "Remove file",
|
|
@@ -52,7 +52,7 @@ function useFieldWiring({ htmlFor, messageId, invalid, required, }) {
|
|
|
52
52
|
}, [htmlFor, messageId, invalid, required]);
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* A labelled form field — measured from
|
|
55
|
+
* A labelled form field — measured from settings forms. A muted label
|
|
56
56
|
* above any control, with an optional description or error line below. When
|
|
57
57
|
* `error` is set it replaces the description; the control is given
|
|
58
58
|
* `aria-describedby`, plus `aria-invalid` and `aria-required` as they apply.
|
|
@@ -10,7 +10,7 @@ function niceNum(raw) {
|
|
|
10
10
|
return step * mag;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* A responsive line chart — measured from
|
|
13
|
+
* A responsive line chart — measured from a reports historical chart.
|
|
14
14
|
* A stretched SVG line/area (non-scaling stroke keeps it crisp) over dashed
|
|
15
15
|
* gridlines; dots are HTML so they stay round. `role="img"` with a summary.
|
|
16
16
|
*/
|
|
@@ -6,7 +6,7 @@ import { menuRecipe } from "./menu.recipe.js";
|
|
|
6
6
|
import { useMenuKeyboard } from "./menu-keyboard.js";
|
|
7
7
|
const MenuContext = React.createContext(null);
|
|
8
8
|
/**
|
|
9
|
-
* A dropdown menu — the ⋯ / sort / filter menu surface, on
|
|
9
|
+
* A dropdown menu — the ⋯ / sort / filter menu surface, on a measured
|
|
10
10
|
* popover. Give it a `trigger` element and Menu items as children. Opens on
|
|
11
11
|
* click / ↓ / Enter; roving-focus keyboard model (↑/↓ move, Home/End jump,
|
|
12
12
|
* typeahead, Enter/Space select, Esc closes and returns focus to the trigger);
|
|
@@ -24,7 +24,7 @@ function Chip({ opt }) {
|
|
|
24
24
|
return (_jsx("span", { className: "recordstable-tag", "data-tone": opt.tone ?? toneFor(opt.value), children: opt.label }));
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* A multi-select / tag editor — measured from
|
|
27
|
+
* A multi-select / tag editor — measured from a cell tag picker. The
|
|
28
28
|
* outlined trigger shows the selected values as coloured chips; it opens a
|
|
29
29
|
* popover with a search field over rows of "[chip] … [checkbox]" that toggle on
|
|
30
30
|
* click (the menu stays open). Keyboard: ↑/↓ move, Enter toggles, Esc closes.
|
|
@@ -5,7 +5,7 @@ import { radiogroupRecipe } from "./radiogroup.recipe.js";
|
|
|
5
5
|
import { useRadioGroupKeyboard } from "./radiogroup-keyboard.js";
|
|
6
6
|
const RadioContext = React.createContext(null);
|
|
7
7
|
/**
|
|
8
|
-
* A radio group — measured from
|
|
8
|
+
* A radio group — measured from a settings page. `default` renders rows (a ring
|
|
9
9
|
* that fills brand when selected + a label); `card` renders a row of bordered
|
|
10
10
|
* preview cards whose border turns brand when picked (the Theme picker). Arrow
|
|
11
11
|
* keys move between options (roving focus). Controlled or uncontrolled.
|
|
@@ -53,7 +53,7 @@ export function writeStoredPercent(key, percent, storage = window.localStorage)
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* An adjustable-panel primitive: a spacer that reserves layout width
|
|
57
57
|
* plus a panel that overlays it, so the panel can move between docked
|
|
58
58
|
* (in-flow) and floating (`position: fixed`, an overlay) without a reflow
|
|
59
59
|
* glitch. Drag the edge handle to resize; constraints are CSS `min-width`/
|
|
@@ -4,7 +4,7 @@ import { useLabelAssociation } from "../../core/index.js";
|
|
|
4
4
|
import { useRadioGroupKeyboard } from "../radiogroup/index.js";
|
|
5
5
|
import { segmentedRecipe } from "./segmented.recipe.js";
|
|
6
6
|
/**
|
|
7
|
-
* A segmented control (single-choice toggle) — measured from
|
|
7
|
+
* A segmented control (single-choice toggle) — measured from a view
|
|
8
8
|
* switcher. `role="radiogroup"` over `role="radio"` buttons with roving
|
|
9
9
|
* tabindex and ←/→ (Home/End) keyboard selection.
|
|
10
10
|
*/
|
|
@@ -10,7 +10,7 @@ function optionText(o) {
|
|
|
10
10
|
return typeof o.label === "string" ? o.label : o.value;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* A select / dropdown — the settings control, measured
|
|
13
|
+
* A select / dropdown — the settings control, measured live, with an
|
|
14
14
|
* optional Linear-style search. A `role="combobox"` trigger opens a
|
|
15
15
|
* `role="listbox"`; pass `searchable` to add a filter field at the top (with a
|
|
16
16
|
* "No results" empty state). Full keyboard model — ↑/↓ move, Enter/Space pick,
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { stagebarRecipe } from "./stagebar.recipe.js";
|
|
3
3
|
const DEFAULT = "#266df0";
|
|
4
4
|
/**
|
|
5
|
-
* A pipeline stage bar — measured from
|
|
5
|
+
* A pipeline stage bar — measured from a deal-stage highlight. Each stage
|
|
6
6
|
* is a segment tinted with its colour; the current stage is at full strength.
|
|
7
7
|
*/
|
|
8
8
|
export function StageBar({ stages, current, "aria-label": ariaLabel, className, ...rest }) {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { ArrowDown, ArrowUp } from "lucide-react";
|
|
3
3
|
import { statcardRecipe } from "./statcard.recipe.js";
|
|
4
4
|
/**
|
|
5
|
-
* A single-metric KPI tile — measured from
|
|
5
|
+
* A single-metric KPI tile — measured from a reports number/insight card.
|
|
6
6
|
* Label, a large value, and an optional up/down delta pill with a caption.
|
|
7
7
|
*/
|
|
8
8
|
export function StatCard({ label, icon, value, delta, deltaSuffix = "%", caption, card, className, ...rest }) {
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { formValueStyle, useFormReset } from "../../core/index.js";
|
|
4
4
|
import { switchRecipe } from "./switch.recipe.js";
|
|
5
5
|
/**
|
|
6
|
-
* An on/off toggle — the settings switch, measured
|
|
6
|
+
* An on/off toggle — the settings switch, measured live. Renders a
|
|
7
7
|
* `role="switch"` button (a native checkbox's semantics without its box), so
|
|
8
8
|
* label association and keyboard (Space/Enter) come for free. Controlled via
|
|
9
9
|
* `checked`/`onCheckedChange`, or uncontrolled from `defaultChecked`.
|
|
@@ -28,7 +28,7 @@ const asText = (v) => {
|
|
|
28
28
|
// Before the generic object branch, which would look for `.name`, find none
|
|
29
29
|
// and return "" — turning every Date into the empty string (#185). The ISO
|
|
30
30
|
// date is stable and locale-independent, so `contains "2026-06"` works; it
|
|
31
|
-
// will not match "16/06/2026", and a date-aware operator set
|
|
31
|
+
// will not match "16/06/2026", and a date-aware operator set needs a
|
|
32
32
|
// date-picker UI, which has to be measured before it can be built.
|
|
33
33
|
if (v instanceof Date)
|
|
34
34
|
return Number.isNaN(v.getTime()) ? "" : v.toISOString().slice(0, 10);
|
|
@@ -90,7 +90,7 @@ export function applySorts(rows, sorts, get = (row, key) => row[key]) {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* The table toolbar as a standalone primitive: the Sort and Filter
|
|
94
94
|
* controls, their menus, the sort-condition rows and the filter chips.
|
|
95
95
|
*
|
|
96
96
|
* `RecordsTable` renders this same measured chrome internally; this is the
|
|
@@ -4,8 +4,8 @@ import { tabsRecipe } from "./tabs.recipe.js";
|
|
|
4
4
|
import { useTablistKeyboard } from "./tabs-keyboard.js";
|
|
5
5
|
/**
|
|
6
6
|
* A row of text tabs over a sliding ink underline — the record-view tab bar,
|
|
7
|
-
* measured
|
|
8
|
-
* Home/End jump); activation follows focus
|
|
7
|
+
* measured live. Roving-tabindex keyboard model (←/→ move + activate,
|
|
8
|
+
* Home/End jump); activation follows focus. Controlled via
|
|
9
9
|
* `value`/`onValueChange`, or uncontrolled from `defaultValue`.
|
|
10
10
|
*/
|
|
11
11
|
export function Tabs({ tabs, value, defaultValue, onValueChange, leading, children, className, "aria-label": ariaLabel, ...rest }) {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { textareaRecipe } from "./textarea.recipe.js";
|
|
4
4
|
/**
|
|
5
|
-
* A multiline text field — measured from
|
|
5
|
+
* A multiline text field — measured from settings. Forwards every native
|
|
6
6
|
* `<textarea>` prop; pass `showCount` with `maxLength` to render a live
|
|
7
7
|
* character counter (which turns red if the value exceeds the limit).
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
4
|
import { tooltipRecipe } from "./tooltip.recipe.js";
|
|
5
5
|
/**
|
|
6
|
-
* A hover/focus tooltip — a dark hint chip measured
|
|
6
|
+
* A hover/focus tooltip — a dark hint chip measured live. Wraps its
|
|
7
7
|
* trigger in an inline element, shows after `delay` on pointer-enter / focus,
|
|
8
8
|
* and hides on leave / blur / Escape. The bubble is portaled and positioned
|
|
9
9
|
* above the trigger (flipping below near the top edge).
|