@crisp-ui-kit/crisp 0.31.3 → 0.31.5
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/authshell.css +1 -1
- package/dist/cjs/components/accordion/accordion.js +1 -1
- package/dist/cjs/components/accordion/accordion.recipe.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/barchart/barchart.recipe.js +1 -1
- package/dist/cjs/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/cjs/components/breadcrumb/breadcrumb.recipe.js +1 -1
- package/dist/cjs/components/bulkbar/bulkbar.js +1 -1
- package/dist/cjs/components/bulkbar/bulkbar.recipe.js +1 -1
- package/dist/cjs/components/callout/callout.js +1 -1
- package/dist/cjs/components/callout/callout.recipe.js +1 -1
- package/dist/cjs/components/checkbox/checkbox.js +1 -1
- package/dist/cjs/components/checkbox/checkbox.recipe.js +1 -1
- package/dist/cjs/components/columncalc/columncalc.js +2 -2
- package/dist/cjs/components/columncalc/columncalc.recipe.js +2 -2
- package/dist/cjs/components/datatable/datatable.js +5 -5
- package/dist/cjs/components/datatable/datatable.recipe.js +5 -5
- package/dist/cjs/components/datepicker/datepicker.recipe.js +3 -3
- package/dist/cjs/components/datepickerfield/datepickerfield.js +1 -1
- package/dist/cjs/components/datepickerfield/datepickerfield.recipe.js +2 -2
- package/dist/cjs/components/dialog/dialog.js +1 -1
- package/dist/cjs/components/dialog/dialog.recipe.js +1 -1
- package/dist/cjs/components/donutchart/donutchart.js +1 -1
- package/dist/cjs/components/donutchart/donutchart.recipe.js +1 -1
- package/dist/cjs/components/emptystate/emptystate.recipe.js +2 -2
- package/dist/cjs/components/fileupload/fileupload.js +1 -1
- package/dist/cjs/components/fileupload/fileupload.recipe.js +6 -6
- package/dist/cjs/components/formfield/formfield.js +1 -1
- package/dist/cjs/components/formfield/formfield.recipe.js +1 -1
- package/dist/cjs/components/input/input.recipe.js +1 -1
- package/dist/cjs/components/linechart/linechart.js +1 -1
- package/dist/cjs/components/linechart/linechart.recipe.js +1 -1
- package/dist/cjs/components/menu/menu.js +1 -1
- package/dist/cjs/components/menu/menu.recipe.js +2 -2
- package/dist/cjs/components/multiselect/multiselect.js +1 -1
- package/dist/cjs/components/multiselect/multiselect.recipe.js +1 -1
- package/dist/cjs/components/progress/progress.recipe.js +1 -1
- package/dist/cjs/components/quantitypicker/quantitypicker.recipe.js +2 -2
- package/dist/cjs/components/radiogroup/radiogroup.js +1 -1
- package/dist/cjs/components/radiogroup/radiogroup.recipe.js +1 -1
- package/dist/cjs/components/resizablepanel/resizablepanel.js +1 -1
- package/dist/cjs/components/resizablepanel/resizablepanel.recipe.js +2 -2
- package/dist/cjs/components/segmented/segmented.js +1 -1
- package/dist/cjs/components/segmented/segmented.recipe.js +1 -1
- package/dist/cjs/components/select/select.js +1 -1
- package/dist/cjs/components/select/select.recipe.js +2 -2
- package/dist/cjs/components/slider/slider.recipe.js +2 -2
- package/dist/cjs/components/stagebar/stagebar.js +1 -1
- package/dist/cjs/components/stagebar/stagebar.recipe.js +1 -1
- package/dist/cjs/components/statcard/statcard.js +1 -1
- package/dist/cjs/components/statcard/statcard.recipe.js +2 -2
- package/dist/cjs/components/switch/switch.js +1 -1
- package/dist/cjs/components/switch/switch.recipe.js +1 -1
- package/dist/cjs/components/table/table.recipe.js +1 -1
- package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +2 -2
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +2 -2
- package/dist/cjs/components/tabletoolbar/tabletoolbar.recipe.js +1 -1
- package/dist/cjs/components/tabs/tabs.js +2 -2
- package/dist/cjs/components/tabs/tabs.recipe.js +1 -1
- package/dist/cjs/components/textarea/textarea.js +1 -1
- package/dist/cjs/components/textarea/textarea.recipe.js +1 -1
- package/dist/cjs/components/tooltip/tooltip.js +1 -1
- package/dist/cjs/components/tooltip/tooltip.recipe.js +1 -1
- package/dist/cjs/product/appshell/appshell.js +4 -4
- package/dist/cjs/product/appshell/appshell.recipe.js +1 -1
- package/dist/cjs/product/authshell/authshell.js +1 -1
- package/dist/cjs/product/authshell/authshell.recipe.js +3 -3
- package/dist/cjs/product/board/board.js +1 -1
- package/dist/cjs/product/board/board.recipe.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/entitycard/entitycard.recipe.js +1 -1
- package/dist/cjs/product/flowcanvas/flowcanvas.js +1 -1
- package/dist/cjs/product/flowcanvas/flowcanvas.recipe.js +1 -1
- package/dist/cjs/product/inbox/inbox.js +1 -1
- package/dist/cjs/product/inbox/inbox.recipe.js +1 -1
- package/dist/cjs/product/listpage/listpage.js +1 -1
- package/dist/cjs/product/listpage/listpage.recipe.js +1 -1
- package/dist/cjs/product/onboarding/onboarding.js +1 -1
- package/dist/cjs/product/onboarding/onboarding.recipe.js +1 -1
- package/dist/cjs/product/recordpage/recordpage.js +7 -7
- package/dist/cjs/product/recordpage/recordpage.recipe.js +2 -2
- package/dist/cjs/product/recordpanel/recordpanel.recipe.js +1 -1
- package/dist/cjs/product/recordstable/recordstable.js +9 -9
- package/dist/cjs/product/recordstable/recordstable.recipe.js +2 -2
- package/dist/cjs/product/recordstable/recordstable.tag.js +1 -1
- package/dist/cjs/product/richtext/richtext.js +1 -1
- package/dist/cjs/product/richtext/richtext.recipe.js +1 -1
- package/dist/cjs/product/settingssection/settingssection.js +1 -1
- package/dist/cjs/product/settingssection/settingssection.recipe.js +1 -1
- package/dist/cjs/product/settingsshell/settingsshell.js +1 -1
- package/dist/cjs/product/settingsshell/settingsshell.recipe.js +2 -2
- package/dist/cjs/product/sidebar/sidebar.js +6 -6
- package/dist/cjs/product/tasklist/tasklist.js +1 -1
- package/dist/cjs/product/tasklist/tasklist.recipe.js +1 -1
- package/dist/cjs/product/trialbanner/trialbanner.js +1 -1
- package/dist/cjs/product/trialbanner/trialbanner.recipe.js +2 -2
- package/dist/cjs/product/viewtoggle/viewtoggle.js +1 -1
- package/dist/cjs/product/viewtoggle/viewtoggle.recipe.js +1 -1
- package/dist/columncalc.css +1 -1
- package/dist/datatable.css +5 -5
- package/dist/esm/components/accordion/accordion.js +1 -1
- package/dist/esm/components/accordion/accordion.recipe.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/barchart/barchart.recipe.js +1 -1
- package/dist/esm/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/esm/components/breadcrumb/breadcrumb.recipe.js +1 -1
- package/dist/esm/components/bulkbar/bulkbar.js +1 -1
- package/dist/esm/components/bulkbar/bulkbar.recipe.js +1 -1
- package/dist/esm/components/callout/callout.js +1 -1
- package/dist/esm/components/callout/callout.recipe.js +1 -1
- package/dist/esm/components/checkbox/checkbox.js +1 -1
- package/dist/esm/components/checkbox/checkbox.recipe.js +1 -1
- package/dist/esm/components/columncalc/columncalc.js +2 -2
- package/dist/esm/components/columncalc/columncalc.recipe.js +2 -2
- package/dist/esm/components/datatable/datatable.js +5 -5
- package/dist/esm/components/datatable/datatable.recipe.js +5 -5
- package/dist/esm/components/datepicker/datepicker.recipe.js +3 -3
- package/dist/esm/components/datepickerfield/datepickerfield.js +1 -1
- package/dist/esm/components/datepickerfield/datepickerfield.recipe.js +2 -2
- package/dist/esm/components/dialog/dialog.js +1 -1
- package/dist/esm/components/dialog/dialog.recipe.js +1 -1
- package/dist/esm/components/donutchart/donutchart.js +1 -1
- package/dist/esm/components/donutchart/donutchart.recipe.js +1 -1
- package/dist/esm/components/emptystate/emptystate.recipe.js +2 -2
- package/dist/esm/components/fileupload/fileupload.js +1 -1
- package/dist/esm/components/fileupload/fileupload.recipe.js +6 -6
- package/dist/esm/components/formfield/formfield.js +1 -1
- package/dist/esm/components/formfield/formfield.recipe.js +1 -1
- package/dist/esm/components/input/input.recipe.js +1 -1
- package/dist/esm/components/linechart/linechart.js +1 -1
- package/dist/esm/components/linechart/linechart.recipe.js +1 -1
- package/dist/esm/components/menu/menu.js +1 -1
- package/dist/esm/components/menu/menu.recipe.js +2 -2
- package/dist/esm/components/multiselect/multiselect.js +1 -1
- package/dist/esm/components/multiselect/multiselect.recipe.js +1 -1
- package/dist/esm/components/progress/progress.recipe.js +1 -1
- package/dist/esm/components/quantitypicker/quantitypicker.recipe.js +2 -2
- package/dist/esm/components/radiogroup/radiogroup.js +1 -1
- package/dist/esm/components/radiogroup/radiogroup.recipe.js +1 -1
- package/dist/esm/components/resizablepanel/resizablepanel.js +1 -1
- package/dist/esm/components/resizablepanel/resizablepanel.recipe.js +2 -2
- package/dist/esm/components/segmented/segmented.js +1 -1
- package/dist/esm/components/segmented/segmented.recipe.js +1 -1
- package/dist/esm/components/select/select.js +1 -1
- package/dist/esm/components/select/select.recipe.js +2 -2
- package/dist/esm/components/slider/slider.recipe.js +2 -2
- package/dist/esm/components/stagebar/stagebar.js +1 -1
- package/dist/esm/components/stagebar/stagebar.recipe.js +1 -1
- package/dist/esm/components/statcard/statcard.js +1 -1
- package/dist/esm/components/statcard/statcard.recipe.js +2 -2
- package/dist/esm/components/switch/switch.js +1 -1
- package/dist/esm/components/switch/switch.recipe.js +1 -1
- package/dist/esm/components/table/table.recipe.js +1 -1
- package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +2 -2
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +2 -2
- package/dist/esm/components/tabletoolbar/tabletoolbar.recipe.js +1 -1
- package/dist/esm/components/tabs/tabs.js +2 -2
- package/dist/esm/components/tabs/tabs.recipe.js +1 -1
- package/dist/esm/components/textarea/textarea.js +1 -1
- package/dist/esm/components/textarea/textarea.recipe.js +1 -1
- package/dist/esm/components/tooltip/tooltip.js +1 -1
- package/dist/esm/components/tooltip/tooltip.recipe.js +1 -1
- package/dist/esm/product/appshell/appshell.js +4 -4
- package/dist/esm/product/appshell/appshell.recipe.js +1 -1
- package/dist/esm/product/authshell/authshell.js +1 -1
- package/dist/esm/product/authshell/authshell.recipe.js +3 -3
- package/dist/esm/product/board/board.js +1 -1
- package/dist/esm/product/board/board.recipe.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/entitycard/entitycard.recipe.js +1 -1
- package/dist/esm/product/flowcanvas/flowcanvas.js +1 -1
- package/dist/esm/product/flowcanvas/flowcanvas.recipe.js +1 -1
- package/dist/esm/product/inbox/inbox.js +1 -1
- package/dist/esm/product/inbox/inbox.recipe.js +1 -1
- package/dist/esm/product/listpage/listpage.js +1 -1
- package/dist/esm/product/listpage/listpage.recipe.js +1 -1
- package/dist/esm/product/onboarding/onboarding.js +1 -1
- package/dist/esm/product/onboarding/onboarding.recipe.js +1 -1
- package/dist/esm/product/recordpage/recordpage.js +7 -7
- package/dist/esm/product/recordpage/recordpage.recipe.js +2 -2
- package/dist/esm/product/recordpanel/recordpanel.recipe.js +1 -1
- package/dist/esm/product/recordstable/recordstable.js +9 -9
- package/dist/esm/product/recordstable/recordstable.recipe.js +2 -2
- package/dist/esm/product/recordstable/recordstable.tag.js +1 -1
- package/dist/esm/product/richtext/richtext.js +1 -1
- package/dist/esm/product/richtext/richtext.recipe.js +1 -1
- package/dist/esm/product/settingssection/settingssection.js +1 -1
- package/dist/esm/product/settingssection/settingssection.recipe.js +1 -1
- package/dist/esm/product/settingsshell/settingsshell.js +1 -1
- package/dist/esm/product/settingsshell/settingsshell.recipe.js +2 -2
- package/dist/esm/product/sidebar/sidebar.js +6 -6
- package/dist/esm/product/tasklist/tasklist.js +1 -1
- package/dist/esm/product/tasklist/tasklist.recipe.js +1 -1
- package/dist/esm/product/trialbanner/trialbanner.js +1 -1
- package/dist/esm/product/trialbanner/trialbanner.recipe.js +2 -2
- package/dist/esm/product/viewtoggle/viewtoggle.js +1 -1
- package/dist/esm/product/viewtoggle/viewtoggle.recipe.js +1 -1
- package/dist/fileupload.css +2 -2
- package/dist/recordpage.css +1 -1
- package/dist/recordstable.css +1 -1
- package/dist/settingsshell.css +1 -1
- package/dist/styles.css +12 -12
- 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/recordstable/recordstable.tag.d.ts +1 -1
- 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
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.selectRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// A select / dropdown, measured from
|
|
6
|
+
// A select / dropdown, measured from settings: a 32px combobox trigger
|
|
7
7
|
// (radius 9, value + a 16px chevron) over a listbox — radius 12, 4px padding, a
|
|
8
8
|
// layered soft shadow — of 32px options (radius 8, 6/8 padding) that show a
|
|
9
9
|
// check on the selected one and highlight on hover / keyboard. The listbox is
|
|
@@ -57,7 +57,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
57
57
|
`,
|
|
58
58
|
variants: {
|
|
59
59
|
// ghost: borderless at rest (transparent), reveals a subtle fill on hover —
|
|
60
|
-
//
|
|
60
|
+
// inline selects (e.g. the sort configurator).
|
|
61
61
|
variant: {
|
|
62
62
|
default: "",
|
|
63
63
|
ghost: `
|
|
@@ -5,9 +5,9 @@ const core_1 = require("../../core");
|
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
6
|
// seed-design's slider, shape for shape, in crisp's colours.
|
|
7
7
|
//
|
|
8
|
-
//
|
|
8
|
+
// No slider ships anywhere — Records, Reports, Settings and the record
|
|
9
9
|
// pages contain no `input[type=range]` or `[role=slider]` — so there is nothing
|
|
10
|
-
//
|
|
10
|
+
// measured to draw from. The GEOMETRY is therefore seed's own, read from
|
|
11
11
|
// `@seed-design/css/recipes/slider.css`: a 26px control row, a 4px track on
|
|
12
12
|
// `radius.full`, a 20px thumb whose visible disc is an `::after` that scales to
|
|
13
13
|
// 1.2 while dragging, and a 2px focus ring offset 2px.
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const stagebar_recipe_1 = require("./stagebar.recipe");
|
|
6
6
|
const DEFAULT = "#266df0";
|
|
7
7
|
/**
|
|
8
|
-
* A pipeline stage bar — measured from
|
|
8
|
+
* A pipeline stage bar — measured from a deal-stage highlight. Each stage
|
|
9
9
|
* is a segment tinted with its colour; the current stage is at full strength.
|
|
10
10
|
*/
|
|
11
11
|
function StageBar({ stages, current, "aria-label": ariaLabel, className, ...rest }) {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.stagebarRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// A pipeline stage indicator —
|
|
6
|
+
// A pipeline stage indicator — a Deal-stage Highlight bar: one segment per
|
|
7
7
|
// stage, each tinted with its stage colour, the current stage at full strength.
|
|
8
8
|
const config = (0, core_1.defineRecipe)({
|
|
9
9
|
name: "stagebar",
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const lucide_react_1 = require("lucide-react");
|
|
6
6
|
const statcard_recipe_1 = require("./statcard.recipe");
|
|
7
7
|
/**
|
|
8
|
-
* A single-metric KPI tile — measured from
|
|
8
|
+
* A single-metric KPI tile — measured from a reports number/insight card.
|
|
9
9
|
* Label, a large value, and an optional up/down delta pill with a caption.
|
|
10
10
|
*/
|
|
11
11
|
function StatCard({ label, icon, value, delta, deltaSuffix = "%", caption, card, className, ...rest }) {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.statcardRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// A single-metric KPI tile — measured from
|
|
6
|
+
// A single-metric KPI tile — measured from a Reports "Insight" number
|
|
7
7
|
// report: a small muted label, a large semibold value, and an optional delta
|
|
8
8
|
// pill (green up / red down) with a caption. Fills its container.
|
|
9
9
|
const config = (0, core_1.defineRecipe)({
|
|
@@ -21,7 +21,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
21
21
|
& .statcard-delta[data-trend="flat"] { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 6%, transparent); color: ${tokens_1.contract.fgMuted}; }`,
|
|
22
22
|
variants: {
|
|
23
23
|
// Opt-in chrome for consumers who want the tile self-contained instead of
|
|
24
|
-
// hand-wrapping it in <Card><CardBody>. Not measured as part of the
|
|
24
|
+
// hand-wrapping it in <Card><CardBody>. Not measured as part of the
|
|
25
25
|
// report tile itself (the tile sits bare inside the report's own Card —
|
|
26
26
|
// see the docs page) — reuses Card's exact border/radius/bg rather than
|
|
27
27
|
// inventing a new value, since it is only ever an explicit opt-in.
|
|
@@ -39,7 +39,7 @@ const React = __importStar(require("react"));
|
|
|
39
39
|
const core_1 = require("../../core");
|
|
40
40
|
const switch_recipe_1 = require("./switch.recipe");
|
|
41
41
|
/**
|
|
42
|
-
* An on/off toggle — the settings switch, measured
|
|
42
|
+
* An on/off toggle — the settings switch, measured live. Renders a
|
|
43
43
|
* `role="switch"` button (a native checkbox's semantics without its box), so
|
|
44
44
|
* label association and keyboard (Space/Enter) come for free. Controlled via
|
|
45
45
|
* `checked`/`onCheckedChange`, or uncontrolled from `defaultChecked`.
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.switchRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
//
|
|
6
|
+
// A settings toggle, measured from the live app: a 24×16 pill track that
|
|
7
7
|
// flips from a muted grey to brand blue (#266df0), with a 12px white thumb
|
|
8
8
|
// (2px inset) that slides 8px across. background + transform both animate .2s.
|
|
9
9
|
const config = (0, core_1.defineRecipe)({
|
|
@@ -5,7 +5,7 @@ const core_1 = require("../../core");
|
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
6
|
// A general-purpose, composable data table — the lightweight primitive for
|
|
7
7
|
// arbitrary tabular data (as opposed to `product/recordstable`, which is a
|
|
8
|
-
// faithful rebuild of
|
|
8
|
+
// faithful rebuild of a heavy records grid). It carries the SAME measured
|
|
9
9
|
// grid styling as RecordsTable — 36px rows, a 40px header, hairline vertical +
|
|
10
10
|
// horizontal grid lines — so `DataTable` (built on this) matches that polish.
|
|
11
11
|
const config = (0, core_1.defineRecipe)({
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toolbarChromeBody = exports.toolbarChromeHead = void 0;
|
|
4
4
|
const tokens_1 = require("../../tokens");
|
|
5
|
-
// The measured chrome of
|
|
5
|
+
// The measured chrome of the table toolbar: the Sort/Filter controls, the
|
|
6
6
|
// menu/popover surface they open into, the sort-condition rows, and the filter
|
|
7
7
|
// chips. It lives here, parameterised by class prefix, because TWO surfaces
|
|
8
8
|
// render it — the standalone `TableToolbar` primitive and `RecordsTable`, whose
|
|
9
9
|
// markup predates it and must keep its own `recordstable-` class names.
|
|
10
10
|
//
|
|
11
11
|
// These strings were MOVED out of `recordstable.recipe.ts` verbatim, not
|
|
12
|
-
// retyped: every value is still the one measured
|
|
12
|
+
// retyped: every value is still the one originally measured. Do not "tidy" them.
|
|
13
13
|
//
|
|
14
14
|
// It comes in two halves because RecordsTable interleaves three rules of its own
|
|
15
15
|
// (the context-menu z-index and the column drop-target) into the middle of the
|
|
@@ -66,7 +66,7 @@ const asText = (v) => {
|
|
|
66
66
|
// Before the generic object branch, which would look for `.name`, find none
|
|
67
67
|
// and return "" — turning every Date into the empty string (#185). The ISO
|
|
68
68
|
// date is stable and locale-independent, so `contains "2026-06"` works; it
|
|
69
|
-
// will not match "16/06/2026", and a date-aware operator set
|
|
69
|
+
// will not match "16/06/2026", and a date-aware operator set needs a
|
|
70
70
|
// date-picker UI, which has to be measured before it can be built.
|
|
71
71
|
if (v instanceof Date)
|
|
72
72
|
return Number.isNaN(v.getTime()) ? "" : v.toISOString().slice(0, 10);
|
|
@@ -128,7 +128,7 @@ function applySorts(rows, sorts, get = (row, key) => row[key]) {
|
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* The table toolbar as a standalone primitive: the Sort and Filter
|
|
132
132
|
* controls, their menus, the sort-condition rows and the filter chips.
|
|
133
133
|
*
|
|
134
134
|
* `RecordsTable` renders this same measured chrome internally; this is the
|
|
@@ -4,7 +4,7 @@ exports.tabletoolbarRecipe = void 0;
|
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
6
|
const tabletoolbar_chrome_1 = require("./tabletoolbar.chrome");
|
|
7
|
-
//
|
|
7
|
+
// The table toolbar, measured: 28px controls, the Sort/Filter buttons and
|
|
8
8
|
// the menus they open, sort-condition rows, and the filter chips. The chrome
|
|
9
9
|
// itself lives in ./tabletoolbar.chrome.ts because RecordsTable renders the
|
|
10
10
|
// same measured surface under its own class prefix — one source, two prefixes,
|
|
@@ -40,8 +40,8 @@ const tabs_recipe_1 = require("./tabs.recipe");
|
|
|
40
40
|
const tabs_keyboard_1 = require("./tabs-keyboard");
|
|
41
41
|
/**
|
|
42
42
|
* A row of text tabs over a sliding ink underline — the record-view tab bar,
|
|
43
|
-
* measured
|
|
44
|
-
* Home/End jump); activation follows focus
|
|
43
|
+
* measured live. Roving-tabindex keyboard model (←/→ move + activate,
|
|
44
|
+
* Home/End jump); activation follows focus. Controlled via
|
|
45
45
|
* `value`/`onValueChange`, or uncontrolled from `defaultValue`.
|
|
46
46
|
*/
|
|
47
47
|
function Tabs({ tabs, value, defaultValue, onValueChange, leading, children, className, "aria-label": ariaLabel, ...rest }) {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.tabsRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
//
|
|
6
|
+
// Record-view tabs: a row of segmented tab buttons over a 1px baseline.
|
|
7
7
|
// The active tab is a light pill — bg #fbfbfb + inset ring borderSubtle, r8 —
|
|
8
8
|
// with a 2px ink underline that slides along the baseline; inactive tabs are
|
|
9
9
|
// muted and fill to a subtle pill on hover. Each tab carries a 16px leading icon
|
|
@@ -38,7 +38,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const textarea_recipe_1 = require("./textarea.recipe");
|
|
40
40
|
/**
|
|
41
|
-
* A multiline text field — measured from
|
|
41
|
+
* A multiline text field — measured from settings. Forwards every native
|
|
42
42
|
* `<textarea>` prop; pass `showCount` with `maxLength` to render a live
|
|
43
43
|
* character counter (which turns red if the value exceeds the limit).
|
|
44
44
|
*/
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.textareaRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// A multiline text field, measured from
|
|
6
|
+
// A multiline text field, measured from a settings "Personal context" field: an
|
|
7
7
|
// inset 1px ring (radius 8), 14px text, 6/10 padding, and an optional character
|
|
8
8
|
// counter pinned bottom-right (12px, muted). Focus rings the field brand.
|
|
9
9
|
const config = (0, core_1.defineRecipe)({
|
|
@@ -39,7 +39,7 @@ const React = __importStar(require("react"));
|
|
|
39
39
|
const react_dom_1 = require("react-dom");
|
|
40
40
|
const tooltip_recipe_1 = require("./tooltip.recipe");
|
|
41
41
|
/**
|
|
42
|
-
* A hover/focus tooltip — a dark hint chip measured
|
|
42
|
+
* A hover/focus tooltip — a dark hint chip measured live. Wraps its
|
|
43
43
|
* trigger in an inline element, shows after `delay` on pointer-enter / focus,
|
|
44
44
|
* and hides on leave / blur / Escape. The bubble is portaled and positioned
|
|
45
45
|
* above the trigger (flipping below near the top edge).
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.tooltipRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// The floating bubble for a Tooltip —
|
|
6
|
+
// The floating bubble for a Tooltip — a dark hint chip. Applied to the
|
|
7
7
|
// portaled bubble itself (not a wrapper), so its styles survive the portal.
|
|
8
8
|
const config = (0, core_1.defineRecipe)({
|
|
9
9
|
name: "tooltip",
|
|
@@ -40,8 +40,8 @@ const React = __importStar(require("react"));
|
|
|
40
40
|
const core_1 = require("../../core");
|
|
41
41
|
const appshell_recipe_1 = require("./appshell.recipe");
|
|
42
42
|
/**
|
|
43
|
-
* App-shell layout with a collapsible + resizable sidebar, mirroring
|
|
44
|
-
* window: drag the sidebar's right edge to resize, press the sidebar's
|
|
43
|
+
* App-shell layout with a collapsible + resizable sidebar, mirroring a live
|
|
44
|
+
* app's window: drag the sidebar's right edge to resize, press the sidebar's
|
|
45
45
|
* collapse button to slide it away (a floating button brings it back). The
|
|
46
46
|
* sidebar pane clips rather than squishing, so its content never reflows.
|
|
47
47
|
*/
|
|
@@ -68,8 +68,8 @@ function AppShell({ sidebar, children, width: widthProp, defaultWidth = 275, onW
|
|
|
68
68
|
// it there. Mirroring the handle's CSS without this is the half-conversion
|
|
69
69
|
// lesson 54 is about, which is why both change in one commit (#212).
|
|
70
70
|
const dir = (0, core_1.isRtlElement)(e.currentTarget) ? -1 : 1;
|
|
71
|
-
//
|
|
72
|
-
//
|
|
71
|
+
// Only enter the drag state once the pointer has actually moved — a click
|
|
72
|
+
// on the handle is not a drag, so the blue bar must not flash on press.
|
|
73
73
|
let moved = false;
|
|
74
74
|
let last = startW;
|
|
75
75
|
const prevSelect = document.body.style.userSelect;
|
|
@@ -4,7 +4,7 @@ exports.appshellRecipe = void 0;
|
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
6
|
// App-shell layout: a collapsible + resizable sidebar pane next to a main pane,
|
|
7
|
-
// mirroring
|
|
7
|
+
// mirroring a familiar app-window layout. The sidebar pane clips (never squishes)
|
|
8
8
|
// when collapsing, and a drag handle on its edge resizes it.
|
|
9
9
|
const config = (0, core_1.defineRecipe)({
|
|
10
10
|
name: "appshell",
|
|
@@ -4,7 +4,7 @@ exports.AuthShell = AuthShell;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const authshell_recipe_1 = require("./authshell.recipe");
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
7
|
+
* The welcome/auth layout — measured live.
|
|
8
8
|
* A centered page frame: an optional top progress bar, a logo, a two-pane
|
|
9
9
|
* card (the form + an optional product preview, hidden under 1200px), and
|
|
10
10
|
* a footer. Auth-surface Input/FormField/Button treatment (flatter fields,
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.authshellRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
//
|
|
6
|
+
// A welcome/auth surface — measured live,
|
|
7
7
|
// 2026-09-15. A centered page frame holding a two-pane card: the form on the
|
|
8
8
|
// left, an optional product preview on the right, with an optional top
|
|
9
9
|
// progress bar and a footer under the card. Every value below is measured
|
|
10
10
|
// from the live app, EXCEPT the 1200px preview-hiding breakpoint (called out
|
|
11
|
-
// at the container query below) —
|
|
11
|
+
// at the container query below) — the pane drops out in JS somewhere between a
|
|
12
12
|
// measured 954px and 1393px viewport width, so 1200px is chosen, not measured.
|
|
13
13
|
const config = (0, core_1.defineRecipe)({
|
|
14
14
|
name: "authshell",
|
|
@@ -51,7 +51,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
51
51
|
& .authshell-body .button { height: 36px; padding-inline: ${tokens_1.contract.space["3"]}; border-radius: 10px; }
|
|
52
52
|
& .authshell-body .button--intent_primary { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08); }
|
|
53
53
|
|
|
54
|
-
/*
|
|
54
|
+
/* The preview pane drops out in JS on narrow viewports (measured: two
|
|
55
55
|
panes at 1393px, one at 954px), so 1200px is a chosen threshold inside
|
|
56
56
|
that bracket, not a measured value. A CONTAINER query, not a media
|
|
57
57
|
query: the shell is embedded in the docs inside an ~800px column, where
|
|
@@ -42,7 +42,7 @@ const board_recipe_1 = require("./board.recipe");
|
|
|
42
42
|
* A kanban board with native drag-and-drop between columns. Cards are
|
|
43
43
|
* `draggable`; dropping one on a column reparents it via `onCardsChange`
|
|
44
44
|
* (the parent owns the cards, so the move is a controlled state update).
|
|
45
|
-
* Measured from
|
|
45
|
+
* Measured from a deals pipeline.
|
|
46
46
|
*/
|
|
47
47
|
function Board({ columns, cards, onCardsChange, renderCard, onNewCard, newCardLabel = "New", getCardLabel, announceMove = (column, card) => card ? `${card} moved to ${column}` : `Moved to ${column}`, className, ...rest }) {
|
|
48
48
|
const [dragId, setDragId] = React.useState(null);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.boardRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// A kanban board — measured from
|
|
6
|
+
// A kanban board — measured from a Deals pipeline: horizontally scrolling
|
|
7
7
|
// columns (dot + title + count header, a "New" button, a stack of draggable
|
|
8
8
|
// cards), with the hovered drop column highlighted.
|
|
9
9
|
const config = (0, core_1.defineRecipe)({
|
|
@@ -245,7 +245,7 @@ function Command({ open, onOpenChange, items = exports.defaultCommandItems, plac
|
|
|
245
245
|
combo.setInputValue("", "script");
|
|
246
246
|
combo.clearHighlightValue();
|
|
247
247
|
}, [open]);
|
|
248
|
-
// The footer's primary button mirrors the currently highlighted row (
|
|
248
|
+
// The footer's primary button mirrors the currently highlighted row (this
|
|
249
249
|
// shows the active action there and runs it on ↵ / click).
|
|
250
250
|
const highlightedItem = filteredItems.find((item) => item.id === combo.highlightedValue) ??
|
|
251
251
|
filteredItems[0];
|
|
@@ -4,7 +4,7 @@ exports.EntityCard = EntityCard;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const entitycard_recipe_1 = require("./entitycard.recipe");
|
|
6
6
|
/**
|
|
7
|
-
* A note / entity card — measured from
|
|
7
|
+
* A note / entity card — measured from a notes grid. A bordered white
|
|
8
8
|
* card with an author row, a title, a clamped excerpt, and a footer row with a
|
|
9
9
|
* right-aligned date. Rendered as a button so the whole card is clickable.
|
|
10
10
|
*/
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.entitycardRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// A note / entity card — measured from
|
|
6
|
+
// A note / entity card — measured from a Notes grid: a bordered white card
|
|
7
7
|
// with an author row (avatar + name) at the top, a title, a clamped excerpt,
|
|
8
8
|
// and a footer row (avatar + name … date). The whole card is clickable.
|
|
9
9
|
const config = (0, core_1.defineRecipe)({
|
|
@@ -42,7 +42,7 @@ const GRID = 20;
|
|
|
42
42
|
const clampZoom = (z) => Math.min(1.5, Math.max(0.5, z));
|
|
43
43
|
/**
|
|
44
44
|
* A pannable, zoomable node canvas with draggable nodes and connecting edges —
|
|
45
|
-
* measured from
|
|
45
|
+
* measured from a workflows editor. Drag a node to move it (fires
|
|
46
46
|
* `onNodesChange`); drag the background to pan; use the toolbar to zoom.
|
|
47
47
|
*/
|
|
48
48
|
function FlowCanvas({ nodes, edges, onNodesChange, renderNode, nodeWidth = 240, nodeHeight = 64, "aria-label": ariaLabel, className, zoomOutLabel = "Zoom out", zoomInLabel = "Zoom in", resetLabel = "Reset", edgesLabel = "Edges", ...rest }) {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.flowcanvasRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// A pannable, zoomable node canvas — measured from
|
|
6
|
+
// A pannable, zoomable node canvas — measured from a Workflows editor:
|
|
7
7
|
// a dotted-grid background, draggable node cards, and connecting edges with dots.
|
|
8
8
|
const config = (0, core_1.defineRecipe)({
|
|
9
9
|
name: "flowcanvas",
|
|
@@ -40,7 +40,7 @@ const React = __importStar(require("react"));
|
|
|
40
40
|
const tabs_1 = require("../../components/tabs");
|
|
41
41
|
const inbox_recipe_1 = require("./inbox.recipe");
|
|
42
42
|
/**
|
|
43
|
-
* A notifications inbox panel — measured from
|
|
43
|
+
* A notifications inbox panel — measured from a notification flyout. A
|
|
44
44
|
* title, Notifications/Requests tabs with counts, then notification rows
|
|
45
45
|
* (avatar + message + time + unread dot) or a centred empty state. Put it inside
|
|
46
46
|
* a Popover for the flyout.
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.inboxRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// A notifications inbox panel — measured from
|
|
6
|
+
// A notifications inbox panel — measured from a notification flyout: a
|
|
7
7
|
// ~380px rounded panel with a title, "Notifications / Requests" tabs (with
|
|
8
8
|
// counts), then notification rows (avatar + message + time + unread dot) or a
|
|
9
9
|
// centred empty state. Drop it in a Popover for the flyout, or use standalone.
|
|
@@ -13,7 +13,7 @@ function ListRow({ children, onClick, }) {
|
|
|
13
13
|
return (0, jsx_runtime_1.jsx)("div", { className: "listpage-row", children: children });
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* The entity-list page shell — measured from
|
|
16
|
+
* The entity-list page shell — measured from Reports/Sequences/Tasks/
|
|
17
17
|
* Notes list views. A view-bar toolbar (leading/trailing slots + record count),
|
|
18
18
|
* an optional dashed Favorites region, then column headers and time-grouped
|
|
19
19
|
* rows. Rows are composed by the caller (wrap each in <ListRow>).
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.listpageRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// The entity-list page shell — measured from
|
|
6
|
+
// The entity-list page shell — measured from Reports / Sequences / Tasks
|
|
7
7
|
// / Notes list views: a view-bar toolbar (leading Sort/Filter, trailing view
|
|
8
8
|
// toggle / settings / New, and a record count), an optional dashed "Favorites"
|
|
9
9
|
// region, then a list with column headers and time-grouped 52px rows.
|
|
@@ -15,7 +15,7 @@ exports.onboardingLabels = {
|
|
|
15
15
|
completedStepLabel: (label) => `${String(label)} — completed`,
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
|
-
* An onboarding checklist card — measured from
|
|
18
|
+
* An onboarding checklist card — measured from a floating "Getting
|
|
19
19
|
* started" widget. Title + optional menu/minimize, a segmented progress bar,
|
|
20
20
|
* and step rows (completed rows strike through with a brand check).
|
|
21
21
|
*/
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.onboardingRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// An onboarding checklist card — measured from
|
|
6
|
+
// An onboarding checklist card — measured from a floating "Getting started"
|
|
7
7
|
// widget: a title + menu/minimize header, a "N/total steps" subtitle, a
|
|
8
8
|
// segmented progress bar (filled pills brand, rest 4% ink), then step rows with
|
|
9
9
|
// an icon + label; completed rows strike through and show a brand check.
|
|
@@ -63,7 +63,7 @@ exports.recordPageLabels = {
|
|
|
63
63
|
exitFullScreen: "Exit full screen",
|
|
64
64
|
resizeDetails: "Resize details column",
|
|
65
65
|
composeEmail: "Compose email",
|
|
66
|
-
askAttio: "Ask
|
|
66
|
+
askAttio: "Ask AI",
|
|
67
67
|
addToList: "Add to list",
|
|
68
68
|
noLists: "This record has not been added to any lists.",
|
|
69
69
|
highlights: "Highlights",
|
|
@@ -183,7 +183,7 @@ function EmptyCard({ icon, children, }) {
|
|
|
183
183
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "recordpage-emptycard", children: [icon, children] }));
|
|
184
184
|
}
|
|
185
185
|
/**
|
|
186
|
-
* The full-page company record view — the page
|
|
186
|
+
* The full-page company record view — the page that opens when you click into a
|
|
187
187
|
* record (as opposed to the peek [RecordPanel]). A top breadcrumb bar with
|
|
188
188
|
* favourite/edit/compose/… actions, a 320px left attribute column, and a tabbed
|
|
189
189
|
* main area: Overview stacks Highlights, an Activity feed, and Notes / Tasks /
|
|
@@ -208,12 +208,12 @@ function RecordPage({ record, columns, collection = "Records", labels, onBack, o
|
|
|
208
208
|
const [notes, setNotes] = React.useState([]);
|
|
209
209
|
const [tasks, setTasks] = React.useState([]);
|
|
210
210
|
const [showAllActivity, setShowAllActivity] = React.useState(false);
|
|
211
|
-
// Collapsible + searchable Record Details
|
|
211
|
+
// Collapsible + searchable Record Details.
|
|
212
212
|
const [detailsOpen, setDetailsOpen] = React.useState(true);
|
|
213
213
|
const [searchOpen, setSearchOpen] = React.useState(false);
|
|
214
214
|
const [fieldQuery, setFieldQuery] = React.useState("");
|
|
215
215
|
const [showAllValues, setShowAllValues] = React.useState(false);
|
|
216
|
-
// Drag-resizable left details column
|
|
216
|
+
// Drag-resizable left details column.
|
|
217
217
|
const [detailsW, setDetailsW] = React.useState(320);
|
|
218
218
|
const [resizing, setResizing] = React.useState(false);
|
|
219
219
|
const dragRef = React.useRef(null);
|
|
@@ -254,14 +254,14 @@ function RecordPage({ record, columns, collection = "Records", labels, onBack, o
|
|
|
254
254
|
const matchedFields = q
|
|
255
255
|
? fields.filter((col) => col.label.toLowerCase().includes(q))
|
|
256
256
|
: fields;
|
|
257
|
-
//
|
|
257
|
+
// Shows the first 5 fields; "View all values" reveals the rest.
|
|
258
258
|
const FIELD_LIMIT = 5;
|
|
259
259
|
const canRevealFields = !q && matchedFields.length > FIELD_LIMIT;
|
|
260
260
|
const shownFields = canRevealFields && !showAllValues
|
|
261
261
|
? matchedFields.slice(0, FIELD_LIMIT)
|
|
262
262
|
: matchedFields;
|
|
263
263
|
const byKey = React.useMemo(() => new Map(columns.map((col) => [col.key, col])), [columns]);
|
|
264
|
-
//
|
|
264
|
+
// The Overview "Highlights" — a fixed set of enrichment stats (measured
|
|
265
265
|
// from the live app), a couple derived from the record, the rest empty.
|
|
266
266
|
const arrVal = record.arr;
|
|
267
267
|
const empVal = record.employees;
|
|
@@ -406,7 +406,7 @@ function RecordPage({ record, columns, collection = "Records", labels, onBack, o
|
|
|
406
406
|
setDetailsOpen(true);
|
|
407
407
|
}, children: searchOpen ? ((0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 14, strokeWidth: 1.75 })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 14, strokeWidth: 1.75 })) })] }), detailsOpen &&
|
|
408
408
|
(shownFields.length > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [shownFields.map((col) => ((0, jsx_runtime_1.jsxs)("div", { className: "recordpage-field", children: [(0, jsx_runtime_1.jsxs)("span", { className: "recordpage-field-label", children: [col.icon ? ((0, jsx_runtime_1.jsx)(col.icon, { size: 15, strokeWidth: 1.75 })) : null, (0, jsx_runtime_1.jsx)("span", { className: "recordpage-field-label-text", children: col.label })] }), (0, jsx_runtime_1.jsx)("span", { className: "recordpage-field-value", children: (0, jsx_runtime_1.jsx)(FieldValue, { col: col, row: record, labels: t }) })] }, col.key))), canRevealFields && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "recordpage-viewall recordpage-viewall--section", onClick: () => {
|
|
409
|
-
//
|
|
409
|
+
// Revealing all fields also opens the (focused)
|
|
410
410
|
// field search; collapsing closes it.
|
|
411
411
|
const next = !showAllValues;
|
|
412
412
|
setShowAllValues(next);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.recordpageRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
// The full-page company record view
|
|
6
|
+
// The full-page company record view opened when you click into a record —
|
|
7
7
|
// measured from the live app. A slim top bar (breadcrumb · logo · name 16/600 ·
|
|
8
8
|
// actions), then a two-column body: a 320px left "Record Details" attribute
|
|
9
9
|
// column (transparent, border-right) and a flexible main area whose tab bar
|
|
@@ -53,7 +53,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
53
53
|
& .recordpage-section { padding-top: ${tokens_1.contract.space["2"]}; }
|
|
54
54
|
& .recordpage-section-title { font-size: ${tokens_1.contract.text.sm}; font-weight: ${tokens_1.contract.weight.medium}; letter-spacing: -0.12px; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 63%, transparent); padding: ${tokens_1.contract.space["1"]}; }
|
|
55
55
|
/* main-area section headers (Highlights / Activity / Emails / Notes / Tasks)
|
|
56
|
-
are 14px
|
|
56
|
+
are 14px; the left column's (Record Details / Lists) stay 12px. */
|
|
57
57
|
& .recordpage-main .recordpage-section-title { font-size: ${tokens_1.contract.text.lg}; }
|
|
58
58
|
& .recordpage-detailhead { display: flex; align-items: center; gap: ${tokens_1.contract.space["0.5"]}; margin-bottom: ${tokens_1.contract.space["3"]}; padding-inline-end: ${tokens_1.contract.space["0.5"]}; }
|
|
59
59
|
& .recordpage-collapse { display: inline-flex; align-items: center; gap: 2px; flex: 1; min-width: 0; margin: 0; border: none; background: none; padding: ${tokens_1.contract.space["1"]}; border-radius: ${tokens_1.contract.radius.md}; font-family: inherit; font-size: ${tokens_1.contract.text.sm}; font-weight: ${tokens_1.contract.weight.medium}; letter-spacing: -0.12px; color: ${tokens_1.contract.fgMuted}; cursor: pointer; text-align: start; }
|
|
@@ -5,7 +5,7 @@ const core_1 = require("../../core");
|
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
6
|
const recordstable_tag_1 = require("../recordstable/recordstable.tag");
|
|
7
7
|
// A right-side record peek panel — slides in over the main content to show one
|
|
8
|
-
// record's fields, the way
|
|
8
|
+
// record's fields, the way a row peek panel opens. Positioned absolutely inside a
|
|
9
9
|
// relative container (the app main area); slides in via @starting-style.
|
|
10
10
|
const config = (0, core_1.defineRecipe)({
|
|
11
11
|
name: "recordpanel",
|
|
@@ -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
|