@crisp-ui-kit/crisp 0.57.2 → 0.57.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/assigneepicker.css +13 -0
- package/dist/assigneepicker.d.ts +7 -0
- package/dist/assigneepicker.layered.css +15 -0
- package/dist/button.css +3 -0
- package/dist/button.d.ts +2 -2
- package/dist/button.layered.css +3 -0
- package/dist/chip.css +1 -1
- package/dist/chip.layered.css +1 -1
- package/dist/cjs/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/cjs/components/button/button.recipe.js +33 -0
- package/dist/cjs/components/chip/chip.recipe.js +3 -1
- package/dist/cjs/components/datatable/datatable.js +6 -3
- package/dist/cjs/components/datatable/datatable.recipe.js +45 -6
- package/dist/cjs/components/datepickerfield/datepickerfield.js +2 -2
- package/dist/cjs/components/datepickerfield/datepickerfield.recipe.js +16 -3
- package/dist/cjs/components/menu/menu.js +65 -9
- package/dist/cjs/components/multiselect/multiselect.js +3 -0
- package/dist/cjs/components/multiselect/multiselect.recipe.js +18 -0
- package/dist/cjs/components/select/select.js +2 -2
- package/dist/cjs/components/select/select.recipe.js +19 -0
- package/dist/cjs/components/table/table.recipe.js +7 -1
- package/dist/cjs/core/floating-portal.js +7 -4
- package/dist/cjs/core/index.js +2 -1
- package/dist/cjs/core/place-floating.js +38 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/product/assigneepicker/assigneepicker.js +127 -0
- package/dist/cjs/product/assigneepicker/assigneepicker.recipe.js +36 -0
- package/dist/cjs/product/assigneepicker/index.js +7 -0
- package/dist/cjs/product/inbox/inbox.js +11 -3
- package/dist/cjs/product/notesgallery/index.js +7 -0
- package/dist/cjs/product/notesgallery/notesgallery.js +80 -0
- package/dist/cjs/product/notesgallery/notesgallery.recipe.js +46 -0
- package/dist/cjs/product/objectpagemenu/index.js +17 -0
- package/dist/cjs/product/objectpagemenu/objectpagemenu.js +26 -0
- package/dist/cjs/product/objectpagemenu/objectpagemenu.recipe.js +30 -0
- package/dist/cjs/product/objectsettings/objectsettings.js +107 -14
- package/dist/cjs/product/recordpage/index.js +2 -1
- package/dist/cjs/product/recordpage/recordpage.js +112 -7
- package/dist/cjs/product/recordpage/recordpage.recipe.js +63 -0
- package/dist/cjs/product/recordpicker/index.js +7 -0
- package/dist/cjs/product/recordpicker/recordpicker.js +100 -0
- package/dist/cjs/product/recordpicker/recordpicker.recipe.js +36 -0
- package/dist/cjs/product/savedviews/index.js +2 -1
- package/dist/cjs/product/savedviews/savedviews.js +22 -0
- package/dist/cjs/product/savedviews/savedviews.recipe.js +47 -0
- package/dist/cjs/product/share/index.js +7 -0
- package/dist/cjs/product/share/share.js +179 -0
- package/dist/cjs/product/share/share.recipe.js +114 -0
- package/dist/cjs/product/shortcutssheet/index.js +17 -0
- package/dist/cjs/product/shortcutssheet/shortcutssheet.js +125 -0
- package/dist/cjs/product/shortcutssheet/shortcutssheet.recipe.js +50 -0
- package/dist/cjs/product/taskeditpopover/index.js +7 -0
- package/dist/cjs/product/taskeditpopover/taskeditpopover.js +159 -0
- package/dist/cjs/product/taskeditpopover/taskeditpopover.recipe.js +68 -0
- package/dist/cjs/product/workspaceswitchermenu/index.js +17 -0
- package/dist/cjs/product/workspaceswitchermenu/workspaceswitchermenu.js +38 -0
- package/dist/cjs/product/workspaceswitchermenu/workspaceswitchermenu.recipe.js +34 -0
- package/dist/cjs/tokens/palette.js +27 -0
- package/dist/cjs/tokens/semantic.js +20 -0
- package/dist/datatable.css +50 -11
- package/dist/datatable.layered.css +50 -11
- package/dist/datepickerfield.css +8 -2
- package/dist/datepickerfield.d.ts +2 -2
- package/dist/datepickerfield.layered.css +8 -2
- package/dist/esm/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/esm/components/button/button.recipe.js +33 -0
- package/dist/esm/components/chip/chip.recipe.js +3 -1
- package/dist/esm/components/datatable/datatable.js +6 -3
- package/dist/esm/components/datatable/datatable.recipe.js +45 -6
- package/dist/esm/components/datepickerfield/datepickerfield.js +2 -2
- package/dist/esm/components/datepickerfield/datepickerfield.recipe.js +16 -3
- package/dist/esm/components/menu/menu.js +64 -8
- package/dist/esm/components/multiselect/multiselect.js +3 -0
- package/dist/esm/components/multiselect/multiselect.recipe.js +18 -0
- package/dist/esm/components/select/select.js +2 -2
- package/dist/esm/components/select/select.recipe.js +19 -0
- package/dist/esm/components/table/table.recipe.js +7 -1
- package/dist/esm/core/floating-portal.js +7 -4
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/place-floating.js +37 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/product/assigneepicker/assigneepicker.js +91 -0
- package/dist/esm/product/assigneepicker/assigneepicker.recipe.js +33 -0
- package/dist/esm/product/assigneepicker/index.js +2 -0
- package/dist/esm/product/inbox/inbox.js +11 -3
- package/dist/esm/product/notesgallery/index.js +2 -0
- package/dist/esm/product/notesgallery/notesgallery.js +44 -0
- package/dist/esm/product/notesgallery/notesgallery.recipe.js +43 -0
- package/dist/esm/product/objectpagemenu/index.js +1 -0
- package/dist/esm/product/objectpagemenu/objectpagemenu.js +23 -0
- package/dist/esm/product/objectpagemenu/objectpagemenu.recipe.js +27 -0
- package/dist/esm/product/objectsettings/objectsettings.js +106 -13
- package/dist/esm/product/recordpage/index.js +1 -1
- package/dist/esm/product/recordpage/recordpage.js +112 -8
- package/dist/esm/product/recordpage/recordpage.recipe.js +63 -0
- package/dist/esm/product/recordpicker/index.js +2 -0
- package/dist/esm/product/recordpicker/recordpicker.js +64 -0
- package/dist/esm/product/recordpicker/recordpicker.recipe.js +33 -0
- package/dist/esm/product/savedviews/index.js +1 -1
- package/dist/esm/product/savedviews/savedviews.js +22 -1
- package/dist/esm/product/savedviews/savedviews.recipe.js +47 -0
- package/dist/esm/product/share/index.js +2 -0
- package/dist/esm/product/share/share.js +143 -0
- package/dist/esm/product/share/share.recipe.js +111 -0
- package/dist/esm/product/shortcutssheet/index.js +1 -0
- package/dist/esm/product/shortcutssheet/shortcutssheet.js +88 -0
- package/dist/esm/product/shortcutssheet/shortcutssheet.recipe.js +47 -0
- package/dist/esm/product/taskeditpopover/index.js +2 -0
- package/dist/esm/product/taskeditpopover/taskeditpopover.js +123 -0
- package/dist/esm/product/taskeditpopover/taskeditpopover.recipe.js +65 -0
- package/dist/esm/product/workspaceswitchermenu/index.js +1 -0
- package/dist/esm/product/workspaceswitchermenu/workspaceswitchermenu.js +35 -0
- package/dist/esm/product/workspaceswitchermenu/workspaceswitchermenu.recipe.js +31 -0
- package/dist/esm/tokens/palette.js +27 -0
- package/dist/esm/tokens/semantic.js +20 -0
- package/dist/multiselect.css +18 -0
- package/dist/multiselect.layered.css +18 -0
- package/dist/native/tokens.d.ts +1 -1
- package/dist/native/tokens.js +56 -4
- package/dist/notesgallery.css +15 -0
- package/dist/notesgallery.d.ts +7 -0
- package/dist/notesgallery.layered.css +17 -0
- package/dist/objectpagemenu.css +3 -0
- package/dist/objectpagemenu.d.ts +7 -0
- package/dist/objectpagemenu.layered.css +5 -0
- package/dist/recordpage.css +59 -0
- package/dist/recordpage.layered.css +59 -0
- package/dist/recordpicker.css +13 -0
- package/dist/recordpicker.d.ts +7 -0
- package/dist/recordpicker.layered.css +15 -0
- package/dist/savedviews.css +47 -0
- package/dist/savedviews.layered.css +47 -0
- package/dist/select.css +19 -0
- package/dist/select.layered.css +19 -0
- package/dist/share.css +84 -0
- package/dist/share.d.ts +7 -0
- package/dist/share.layered.css +86 -0
- package/dist/shortcutssheet.css +24 -0
- package/dist/shortcutssheet.d.ts +7 -0
- package/dist/shortcutssheet.layered.css +26 -0
- package/dist/styles.css +438 -16
- package/dist/styles.layered.css +438 -16
- package/dist/table.css +7 -2
- package/dist/table.layered.css +7 -2
- package/dist/taskeditpopover.css +36 -0
- package/dist/taskeditpopover.d.ts +7 -0
- package/dist/taskeditpopover.layered.css +38 -0
- package/dist/tokens.css +26 -0
- package/dist/tokens.json +56 -4
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +9 -1
- package/dist/types/components/button/button.d.ts +2 -0
- package/dist/types/components/button/button.recipe.d.ts +12 -0
- package/dist/types/components/chip/chip.recipe.d.ts +1 -1
- package/dist/types/components/datatable/datatable.d.ts +8 -0
- package/dist/types/components/datepickerfield/datepickerfield.d.ts +4 -1
- package/dist/types/components/datepickerfield/datepickerfield.recipe.d.ts +18 -3
- package/dist/types/components/menu/menu.d.ts +50 -7
- package/dist/types/components/multiselect/multiselect.d.ts +9 -0
- package/dist/types/components/select/select.d.ts +10 -0
- package/dist/types/core/floating-portal.d.ts +6 -5
- package/dist/types/core/index.d.ts +1 -1
- package/dist/types/core/place-floating.d.ts +37 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/product/assigneepicker/assigneepicker.d.ts +36 -0
- package/dist/types/product/assigneepicker/assigneepicker.recipe.d.ts +3 -0
- package/dist/types/product/assigneepicker/index.d.ts +2 -0
- package/dist/types/product/inbox/inbox.d.ts +13 -1
- package/dist/types/product/notesgallery/index.d.ts +2 -0
- package/dist/types/product/notesgallery/notesgallery.d.ts +54 -0
- package/dist/types/product/notesgallery/notesgallery.recipe.d.ts +3 -0
- package/dist/types/product/objectpagemenu/index.d.ts +1 -0
- package/dist/types/product/objectpagemenu/objectpagemenu.d.ts +40 -0
- package/dist/types/product/objectpagemenu/objectpagemenu.recipe.d.ts +17 -0
- package/dist/types/product/objectsettings/objectsettings.d.ts +71 -15
- package/dist/types/product/recordpage/index.d.ts +1 -1
- package/dist/types/product/recordpage/recordpage.d.ts +142 -1
- package/dist/types/product/recordpicker/index.d.ts +2 -0
- package/dist/types/product/recordpicker/recordpicker.d.ts +38 -0
- package/dist/types/product/recordpicker/recordpicker.recipe.d.ts +3 -0
- package/dist/types/product/savedviews/index.d.ts +1 -1
- package/dist/types/product/savedviews/savedviews.d.ts +36 -0
- package/dist/types/product/share/index.d.ts +2 -0
- package/dist/types/product/share/share.d.ts +85 -0
- package/dist/types/product/share/share.recipe.d.ts +3 -0
- package/dist/types/product/shortcutssheet/index.d.ts +1 -0
- package/dist/types/product/shortcutssheet/shortcutssheet.d.ts +49 -0
- package/dist/types/product/shortcutssheet/shortcutssheet.recipe.d.ts +3 -0
- package/dist/types/product/taskeditpopover/index.d.ts +2 -0
- package/dist/types/product/taskeditpopover/taskeditpopover.d.ts +67 -0
- package/dist/types/product/taskeditpopover/taskeditpopover.recipe.d.ts +3 -0
- package/dist/types/product/workspaceswitchermenu/index.d.ts +1 -0
- package/dist/types/product/workspaceswitchermenu/workspaceswitchermenu.d.ts +54 -0
- package/dist/types/product/workspaceswitchermenu/workspaceswitchermenu.recipe.d.ts +19 -0
- package/dist/types/tokens/contract.d.ts +13 -0
- package/dist/types/tokens/palette.d.ts +52 -0
- package/dist/types/tokens/semantic.d.ts +20 -0
- package/dist/workspaceswitchermenu.css +4 -0
- package/dist/workspaceswitchermenu.d.ts +7 -0
- package/dist/workspaceswitchermenu.layered.css +6 -0
- package/package.json +41 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type SelectOption } from "../../components/select";
|
|
3
|
+
export type ShareRoleOption = SelectOption;
|
|
4
|
+
export type ShareMember = {
|
|
5
|
+
id: string;
|
|
6
|
+
name: React.ReactNode;
|
|
7
|
+
email?: React.ReactNode;
|
|
8
|
+
/** Defaults to a lettered `Avatar` seeded from `name`'s first character. */
|
|
9
|
+
avatar?: React.ReactNode;
|
|
10
|
+
/** The row's own access value, one of `memberRoleOptions`. */
|
|
11
|
+
access: string;
|
|
12
|
+
/** Disables this row's access select (Attio greys the signed-in user's
|
|
13
|
+
* own row on the Pro-gated surface — still rendered, never editable). */
|
|
14
|
+
accessDisabled?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type SharePopoverProps = Omit<React.ComponentPropsWithoutRef<"div">, "children"> & {
|
|
17
|
+
/** The element that toggles the popover (Attio's own "Share" button). */
|
|
18
|
+
trigger: React.ReactElement;
|
|
19
|
+
align?: "start" | "end";
|
|
20
|
+
open?: boolean;
|
|
21
|
+
defaultOpen?: boolean;
|
|
22
|
+
onOpenChange?: (open: boolean) => void;
|
|
23
|
+
/** Controlled active tab. Omit to let the popover manage it. */
|
|
24
|
+
tab?: "members" | "automations";
|
|
25
|
+
defaultTab?: "members" | "automations";
|
|
26
|
+
onTabChange?: (tab: "members" | "automations") => void;
|
|
27
|
+
membersTabLabel?: string;
|
|
28
|
+
automationsTabLabel?: string;
|
|
29
|
+
/** The workspace's own avatar/icon, shown at the "Workspace access" row. */
|
|
30
|
+
workspaceIcon?: React.ReactNode;
|
|
31
|
+
workspaceAccessLabel?: string;
|
|
32
|
+
workspaceAccessValue: string;
|
|
33
|
+
workspaceAccessOptions: ShareRoleOption[];
|
|
34
|
+
onWorkspaceAccessChange?: (value: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* A slot for the plan-gated upsell card ("Workspace and advanced
|
|
37
|
+
* permissions are not supported on your current plan" + Upgrade, or the
|
|
38
|
+
* Pro "Advanced sharing" card) — crisp has no billing concept, so it
|
|
39
|
+
* never renders this content itself; a consumer on a gated plan supplies
|
|
40
|
+
* its own copy/CTA here. Omit entirely on an ungated plan.
|
|
41
|
+
*/
|
|
42
|
+
advancedSharing?: React.ReactNode;
|
|
43
|
+
/** "Clear permissions" — real, ungated action (unlike `advancedSharing`). */
|
|
44
|
+
onClearPermissions?: () => void;
|
|
45
|
+
clearPermissionsLabel?: string;
|
|
46
|
+
/** The Members tab's "Individual members" list — one row per workspace
|
|
47
|
+
* member with their own access select. Omit to hide the section. */
|
|
48
|
+
members?: ShareMember[];
|
|
49
|
+
membersSectionLabel?: string;
|
|
50
|
+
memberRoleOptions: ShareRoleOption[];
|
|
51
|
+
onMemberAccessChange?: (id: string, value: string) => void;
|
|
52
|
+
/** The Automations tab's search + role + Add row. */
|
|
53
|
+
automationSearchValue?: string;
|
|
54
|
+
defaultAutomationSearchValue?: string;
|
|
55
|
+
onAutomationSearchChange?: (query: string) => void;
|
|
56
|
+
automationSearchPlaceholder?: string;
|
|
57
|
+
automationRoleValue: string;
|
|
58
|
+
automationRoleOptions: ShareRoleOption[];
|
|
59
|
+
onAutomationRoleChange?: (value: string) => void;
|
|
60
|
+
onAddAutomation?: () => void;
|
|
61
|
+
/** Disables "Add" (Attio disables it on an empty search). */
|
|
62
|
+
addAutomationDisabled?: boolean;
|
|
63
|
+
addAutomationLabel?: string;
|
|
64
|
+
learnMoreHref?: string;
|
|
65
|
+
learnMoreLabel?: string;
|
|
66
|
+
"aria-label"?: string;
|
|
67
|
+
className?: string;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* A Share/permissions popover — measured live on app.attio.com (both an
|
|
71
|
+
* object table's and a List's own "Share" trigger, techpartners workspace):
|
|
72
|
+
* Members/Automations pill tabs, a "Workspace access" row (avatar + label +
|
|
73
|
+
* a `Read and write ⌄`-style role select), an optional plan-gated upsell
|
|
74
|
+
* slot, a "Clear permissions" action, an "Individual members" list (one row
|
|
75
|
+
* per member, its own role select), and — on the Automations tab — a
|
|
76
|
+
* search box + role select + "Add" row. Both tabs share a trailing "Learn
|
|
77
|
+
* more about permissions" link.
|
|
78
|
+
*
|
|
79
|
+
* Its own floating shell (not the generic `Popover`): the measured surface
|
|
80
|
+
* is 440px wide, past `Popover`'s 360px content cap. See share.recipe.ts.
|
|
81
|
+
*/
|
|
82
|
+
export declare function SharePopover({ trigger, align, open: openProp, defaultOpen, onOpenChange, tab: tabProp, defaultTab, onTabChange, membersTabLabel: membersTabLabelProp, automationsTabLabel: automationsTabLabelProp, workspaceIcon, workspaceAccessLabel: workspaceAccessLabelProp, workspaceAccessValue, workspaceAccessOptions, onWorkspaceAccessChange, advancedSharing, onClearPermissions, clearPermissionsLabel: clearPermissionsLabelProp, members, membersSectionLabel: membersSectionLabelProp, memberRoleOptions, onMemberAccessChange, automationSearchValue, defaultAutomationSearchValue, onAutomationSearchChange, automationSearchPlaceholder: automationSearchPlaceholderProp, automationRoleValue, automationRoleOptions, onAutomationRoleChange, onAddAutomation, addAutomationDisabled, addAutomationLabel: addAutomationLabelProp, learnMoreHref, learnMoreLabel: learnMoreLabelProp, "aria-label": ariaLabel, className, ...rest }: SharePopoverProps): React.JSX.Element;
|
|
83
|
+
export declare namespace SharePopover {
|
|
84
|
+
var displayName: string;
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./shortcutssheet";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** One simultaneous key combo — each entry its own `Kbd` chip, no separator
|
|
3
|
+
* between them (e.g. `["⌘", "K"]` for ⌘K, `["⌘", "⇧", "↑"]` for ⌘⇧↑). */
|
|
4
|
+
export type ShortcutStep = React.ReactNode[];
|
|
5
|
+
export type ShortcutRow = {
|
|
6
|
+
description: React.ReactNode;
|
|
7
|
+
/** More than one step is a SEQUENTIAL shortcut (Attio's own "G then H") —
|
|
8
|
+
* a `then` label renders between them. A single step is a simultaneous
|
|
9
|
+
* combo and gets no separator. */
|
|
10
|
+
steps: ShortcutStep[];
|
|
11
|
+
};
|
|
12
|
+
export type ShortcutSection = {
|
|
13
|
+
label: React.ReactNode;
|
|
14
|
+
rows: ShortcutRow[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Attio's own canonical keyboard-shortcut list (crisp#615), live-measured
|
|
18
|
+
* off app.attio.com/techpartners' "Keyboard shortcuts" panel (Help →
|
|
19
|
+
* "Shortcuts") — 34 rows across 4 sections. The issue's own quoted table
|
|
20
|
+
* collapsed a few of these ("Navigate to the cell above/right/below/left",
|
|
21
|
+
* "Go to next/previous cell") into one row each; the live panel renders
|
|
22
|
+
* them as separate rows, which is what this list follows.
|
|
23
|
+
*/
|
|
24
|
+
export declare const defaultShortcutSections: ShortcutSection[];
|
|
25
|
+
export type ShortcutsSheetProps = {
|
|
26
|
+
open: boolean;
|
|
27
|
+
onOpenChange: (open: boolean) => void;
|
|
28
|
+
/** Defaults to `defaultShortcutSections`. Swap in your own translated
|
|
29
|
+
* array — this is DATA, not one prop per string, the same way
|
|
30
|
+
* `Command`'s own default items are. */
|
|
31
|
+
sections?: ShortcutSection[];
|
|
32
|
+
title?: string;
|
|
33
|
+
/** The connector between a sequential shortcut's two steps (default
|
|
34
|
+
* "then", as in Attio's own "G then H"). */
|
|
35
|
+
thenLabel?: string;
|
|
36
|
+
/** aria-label on the close button (default "Close", `Drawer`'s own). */
|
|
37
|
+
closeLabel?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
} & Omit<React.ComponentPropsWithoutRef<"div">, "title" | "className" | "children">;
|
|
40
|
+
/**
|
|
41
|
+
* Attio's "Keyboard shortcuts" panel (crisp#615, parity row P-106) — a
|
|
42
|
+
* `Drawer` narrowed to the measured 360px (Drawer's own default is 420px),
|
|
43
|
+
* listing `sections` grouped with a hairline-free 10px row rhythm and a
|
|
44
|
+
* 20px gap before each new section label.
|
|
45
|
+
*/
|
|
46
|
+
export declare function ShortcutsSheet({ open, onOpenChange, sections, title: titleProp, thenLabel: thenLabelProp, closeLabel, className, ...rest }: ShortcutsSheetProps): React.JSX.Element;
|
|
47
|
+
export declare namespace ShortcutsSheet {
|
|
48
|
+
var displayName: string;
|
|
49
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type AssigneePickerUser } from "../assigneepicker/assigneepicker";
|
|
3
|
+
import { type RecordPickerRecord } from "../recordpicker/recordpicker";
|
|
4
|
+
export type { AssigneePickerUser, RecordPickerRecord };
|
|
5
|
+
export type TaskEditPopoverProps = {
|
|
6
|
+
/** The element that opens the popover (a task row, typically). */
|
|
7
|
+
trigger: React.ReactElement;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
title: string;
|
|
12
|
+
onTitleChange?: (title: string) => void;
|
|
13
|
+
done?: boolean;
|
|
14
|
+
onToggleDone?: (done: boolean) => void;
|
|
15
|
+
/** The due-date chip's own label, already formatted (e.g. "August 26,
|
|
16
|
+
* 2026"). Omit for the unset placeholder. */
|
|
17
|
+
dueDateLabel?: React.ReactNode;
|
|
18
|
+
/** The due-date chip's own sub-popover content -- a date picker is a
|
|
19
|
+
* separate, already-scoped surface elsewhere in crisp, so this stays a
|
|
20
|
+
* consumer-supplied slot rather than a second one built here. */
|
|
21
|
+
dueDatePicker?: React.ReactNode;
|
|
22
|
+
/** The task's current single assignee. */
|
|
23
|
+
assignee?: AssigneePickerUser | null;
|
|
24
|
+
/** Candidate users for the assignee picker's list. */
|
|
25
|
+
users?: AssigneePickerUser[];
|
|
26
|
+
onAssigneeChange?: (user: AssigneePickerUser | null) => void;
|
|
27
|
+
/** How many records are already linked -- Attio's own chip reads "Add
|
|
28
|
+
* record" at 0 and "`N` linked record(s)" from 1 up (live-confirmed:
|
|
29
|
+
* opening the composer from a record's own Activity tab pre-links that
|
|
30
|
+
* record and the chip already reads "1 linked record"). */
|
|
31
|
+
linkedRecordCount?: number;
|
|
32
|
+
/** Search results for the record picker. */
|
|
33
|
+
recordCandidates?: RecordPickerRecord[];
|
|
34
|
+
recordCandidatesLoading?: boolean;
|
|
35
|
+
onRecordQueryChange?: (query: string) => void;
|
|
36
|
+
onSelectRecord?: (record: RecordPickerRecord) => void;
|
|
37
|
+
/** The kebab's own dropdown content (e.g. a `Menu` with "Delete task"). */
|
|
38
|
+
menu?: React.ReactNode;
|
|
39
|
+
onCancel?: () => void;
|
|
40
|
+
onSave?: () => void;
|
|
41
|
+
headingLabel?: string;
|
|
42
|
+
closeLabel?: string;
|
|
43
|
+
dueDatePlaceholder?: string;
|
|
44
|
+
assignLabel?: string;
|
|
45
|
+
assignedToLabel?: string;
|
|
46
|
+
addRecordLabel?: string;
|
|
47
|
+
linkedRecordLabel?: string;
|
|
48
|
+
moreActionsLabel?: string;
|
|
49
|
+
cancelLabel?: string;
|
|
50
|
+
/** The Cancel button's key-cap caption (default "Esc"). */
|
|
51
|
+
cancelKeyLabel?: string;
|
|
52
|
+
saveLabel?: string;
|
|
53
|
+
className?: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* A task's "Edit task" popover -- measured live on app.attio.com's Tasks
|
|
57
|
+
* page: a checkbox + editable title, then a chip row (due date / assigned /
|
|
58
|
+
* add record), a "more actions" kebab, and Cancel/Save. Composes
|
|
59
|
+
* `AssigneePicker` and `RecordPicker` (both crisp#626) behind their own
|
|
60
|
+
* chips, using the same core floating primitives `Popover` itself is built
|
|
61
|
+
* on rather than `Popover` directly (its content hardcodes a 360px max
|
|
62
|
+
* width, well under this popover's own measured 800px).
|
|
63
|
+
*/
|
|
64
|
+
export declare function TaskEditPopover({ trigger, open: openProp, defaultOpen, onOpenChange, title, onTitleChange, done, onToggleDone, dueDateLabel, dueDatePicker, assignee, users, onAssigneeChange, linkedRecordCount, recordCandidates, recordCandidatesLoading, onRecordQueryChange, onSelectRecord, menu, onCancel, onSave, headingLabel: headingLabelProp, closeLabel: closeLabelProp, dueDatePlaceholder: dueDatePlaceholderProp, assignLabel: assignLabelProp, assignedToLabel: assignedToLabelProp, addRecordLabel: addRecordLabelProp, linkedRecordLabel: linkedRecordLabelProp, moreActionsLabel: moreActionsLabelProp, cancelLabel: cancelLabelProp, cancelKeyLabel: cancelKeyLabelProp, saveLabel: saveLabelProp, className, }: TaskEditPopoverProps): React.JSX.Element;
|
|
65
|
+
export declare namespace TaskEditPopover {
|
|
66
|
+
var displayName: string;
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./workspaceswitchermenu";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { AvatarProps } from "../../components/avatar";
|
|
2
|
+
export type WorkspaceMenuWorkspace = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
/** Avatar initial/letter. */
|
|
6
|
+
avatarLabel: string;
|
|
7
|
+
avatarTone?: NonNullable<AvatarProps["tone"]>;
|
|
8
|
+
};
|
|
9
|
+
export type WorkspaceSwitcherMenuProps = {
|
|
10
|
+
/** The workspace(s) to list, radio-style (crisp only ever renders one
|
|
11
|
+
* checked at a time — Attio's own row is `role="menuitemradio"`, but
|
|
12
|
+
* `MenuItem` covers the visible behaviour a single account with one
|
|
13
|
+
* workspace needs; a multi-workspace consumer still gets a correct
|
|
14
|
+
* checked/unchecked row per workspace). */
|
|
15
|
+
workspaces: WorkspaceMenuWorkspace[];
|
|
16
|
+
/** Which `workspaces[].id` is current — gets the leading checkmark. */
|
|
17
|
+
currentWorkspaceId: string;
|
|
18
|
+
onSelectWorkspace?: (id: string) => void;
|
|
19
|
+
onNewWorkspace?: () => void;
|
|
20
|
+
onAccountSettings?: () => void;
|
|
21
|
+
onWorkspaceSettings?: () => void;
|
|
22
|
+
onInviteMembers?: () => void;
|
|
23
|
+
onUpgradeAttio?: () => void;
|
|
24
|
+
onReferAnotherTeam?: () => void;
|
|
25
|
+
onAppsAndIntegrations?: () => void;
|
|
26
|
+
onSignOut?: () => void;
|
|
27
|
+
newWorkspaceLabel?: string;
|
|
28
|
+
accountSettingsLabel?: string;
|
|
29
|
+
workspaceSettingsLabel?: string;
|
|
30
|
+
inviteMembersLabel?: string;
|
|
31
|
+
upgradeAttioLabel?: string;
|
|
32
|
+
referAnotherTeamLabel?: string;
|
|
33
|
+
appsAndIntegrationsLabel?: string;
|
|
34
|
+
signOutLabel?: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* The FIXED content of Attio's own workspace-switcher popover (crisp#632) —
|
|
38
|
+
* live-measured off app.attio.com/techpartners: each workspace as a
|
|
39
|
+
* checked/unchecked row, then New workspace, then Account settings /
|
|
40
|
+
* Workspace settings, then Invite members / Upgrade Attio / Refer another
|
|
41
|
+
* team, then Apps and integrations, then Sign out — each group separated by
|
|
42
|
+
* a hairline, matching a 280px-wide popover.
|
|
43
|
+
*
|
|
44
|
+
* This is CONTENT, not a component with its own trigger/popover: pass it as
|
|
45
|
+
* `Sidebar`'s own `workspaceMenu` prop (crisp#415 already builds the real
|
|
46
|
+
* menu-button trigger/popover machinery around whatever children it's
|
|
47
|
+
* given — the workspace switcher itself has no fixed content of its own by
|
|
48
|
+
* design, since which settings exist is the consumer's; this is that fixed
|
|
49
|
+
* content, ready-made, the same way `defaultCommandItems` is for `Command`).
|
|
50
|
+
*/
|
|
51
|
+
export declare function WorkspaceSwitcherMenu({ workspaces, currentWorkspaceId, onSelectWorkspace, onNewWorkspace, onAccountSettings, onWorkspaceSettings, onInviteMembers, onUpgradeAttio, onReferAnotherTeam, onAppsAndIntegrations, onSignOut, newWorkspaceLabel, accountSettingsLabel, workspaceSettingsLabel, inviteMembersLabel, upgradeAttioLabel, referAnotherTeamLabel, appsAndIntegrationsLabel, signOutLabel, }: WorkspaceSwitcherMenuProps): import("react").JSX.Element;
|
|
52
|
+
export declare namespace WorkspaceSwitcherMenu {
|
|
53
|
+
var displayName: string;
|
|
54
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `WorkspaceSwitcherMenu` owns almost no styling of its own — every visible
|
|
3
|
+
* pixel besides the two rules below is `Menu`/`MenuItem`'s own
|
|
4
|
+
* already-measured recipe (crisp#632):
|
|
5
|
+
* - The RTL mirror for its "Sign out" icon: `LogOut` is treated as
|
|
6
|
+
* direction-bearing (`build/spec-check.mjs`'s own DIRECTIONAL set), so
|
|
7
|
+
* it's marked and mirrored the same way ObjectPageMenu's Notifications
|
|
8
|
+
* chevron is (crisp#616) — see that file's identical recipe for why this
|
|
9
|
+
* is a plain absolute selector, not `${rtlFlipCss}`'s `&`-nesting form.
|
|
10
|
+
* - The current-workspace checkmark's colour: `.crisp-menu-item svg` already
|
|
11
|
+
* sets every menu icon to `fgMuted` (menu.recipe.ts), which is deliberate
|
|
12
|
+
* there but wrong for THIS one glyph — Attio's own is brand-coloured, not
|
|
13
|
+
* muted, to read as a status rather than a plain icon. `svg` doubled in
|
|
14
|
+
* the selector (not just the class) so it outranks that rule under equal
|
|
15
|
+
* source order instead of depending on file concatenation order.
|
|
16
|
+
*/
|
|
17
|
+
declare const config: import("../..").RecipeConfig<{}>;
|
|
18
|
+
export declare const workspaceswitchermenuRecipe: import("../..").RecipeFn<{}>;
|
|
19
|
+
export default config;
|
|
@@ -71,6 +71,19 @@ export declare const contract: MapLeafNodes<{
|
|
|
71
71
|
strokeSelectDivider: "selectDivider";
|
|
72
72
|
fgSelectPlaceholder: "selectPlaceholder";
|
|
73
73
|
shadowSelect: "selectShadow";
|
|
74
|
+
bgTagSwatch1: "tagSwatch1";
|
|
75
|
+
bgTagSwatch2: "tagSwatch2";
|
|
76
|
+
bgTagSwatch3: "tagSwatch3";
|
|
77
|
+
bgTagSwatch4: "tagSwatch4";
|
|
78
|
+
bgTagSwatch5: "tagSwatch5";
|
|
79
|
+
bgTagSwatch6: "tagSwatch6";
|
|
80
|
+
bgTagSwatch7: "tagSwatch7";
|
|
81
|
+
bgTagSwatch8: "tagSwatch8";
|
|
82
|
+
bgTagSwatch9: "tagSwatch9";
|
|
83
|
+
bgTagSwatch10: "tagSwatch10";
|
|
84
|
+
bgTagSwatch11: "tagSwatch11";
|
|
85
|
+
bgTagSwatch12: "tagSwatch12";
|
|
86
|
+
fgTagSwatch: "tagSwatchInk";
|
|
74
87
|
}, `var(--${string})`> & {
|
|
75
88
|
space: Record<"0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "5" | "6" | "8" | "px", `var(--${string})`>;
|
|
76
89
|
radius: Record<"2xl" | "3xl" | "4xl" | "chip" | "full" | "lg" | "md" | "sm" | "xl" | "xs", `var(--${string})`>;
|
|
@@ -263,5 +263,57 @@ export declare const palette: {
|
|
|
263
263
|
readonly light: "#0000001f";
|
|
264
264
|
readonly dark: "#000000cc";
|
|
265
265
|
};
|
|
266
|
+
readonly tagSwatch1: {
|
|
267
|
+
readonly light: "#fff3cc";
|
|
268
|
+
readonly dark: "#fff3cc";
|
|
269
|
+
};
|
|
270
|
+
readonly tagSwatch2: {
|
|
271
|
+
readonly light: "#f4fbcb";
|
|
272
|
+
readonly dark: "#f4fbcb";
|
|
273
|
+
};
|
|
274
|
+
readonly tagSwatch3: {
|
|
275
|
+
readonly light: "#fdf7c4";
|
|
276
|
+
readonly dark: "#fdf7c4";
|
|
277
|
+
};
|
|
278
|
+
readonly tagSwatch4: {
|
|
279
|
+
readonly light: "#feecf3";
|
|
280
|
+
readonly dark: "#feecf3";
|
|
281
|
+
};
|
|
282
|
+
readonly tagSwatch5: {
|
|
283
|
+
readonly light: "#e0fced";
|
|
284
|
+
readonly dark: "#e0fced";
|
|
285
|
+
};
|
|
286
|
+
readonly tagSwatch6: {
|
|
287
|
+
readonly light: "#ddf7ff";
|
|
288
|
+
readonly dark: "#ddf7ff";
|
|
289
|
+
};
|
|
290
|
+
readonly tagSwatch7: {
|
|
291
|
+
readonly light: "#f6f7f7";
|
|
292
|
+
readonly dark: "#f6f7f7";
|
|
293
|
+
};
|
|
294
|
+
readonly tagSwatch8: {
|
|
295
|
+
readonly light: "#ffebeb";
|
|
296
|
+
readonly dark: "#ffebeb";
|
|
297
|
+
};
|
|
298
|
+
readonly tagSwatch9: {
|
|
299
|
+
readonly light: "#feeee1";
|
|
300
|
+
readonly dark: "#feeee1";
|
|
301
|
+
};
|
|
302
|
+
readonly tagSwatch10: {
|
|
303
|
+
readonly light: "#e5eeff";
|
|
304
|
+
readonly dark: "#e5eeff";
|
|
305
|
+
};
|
|
306
|
+
readonly tagSwatch11: {
|
|
307
|
+
readonly light: "#f5f0ff";
|
|
308
|
+
readonly dark: "#f5f0ff";
|
|
309
|
+
};
|
|
310
|
+
readonly tagSwatch12: {
|
|
311
|
+
readonly light: "#fdedff";
|
|
312
|
+
readonly dark: "#fdedff";
|
|
313
|
+
};
|
|
314
|
+
readonly tagSwatchInk: {
|
|
315
|
+
readonly light: "#000000";
|
|
316
|
+
readonly dark: "#000000";
|
|
317
|
+
};
|
|
266
318
|
};
|
|
267
319
|
export type PaletteKey = keyof typeof palette;
|
|
@@ -112,5 +112,25 @@ export declare const semantic: {
|
|
|
112
112
|
strokeSelectDivider: "selectDivider";
|
|
113
113
|
fgSelectPlaceholder: "selectPlaceholder";
|
|
114
114
|
shadowSelect: "selectShadow";
|
|
115
|
+
/** your-moon/crisp#998: a Select/MultiSelect option's fixed tag colour
|
|
116
|
+
* (`swatch`, 1-12) -- see palette.ts's own comment on `tagSwatch1` for
|
|
117
|
+
* the measurement. Distinct from `Select`'s existing `color` (an
|
|
118
|
+
* arbitrary-CSS status dot) and `MultiSelect`'s existing `tone` (crisp's
|
|
119
|
+
* own semantic 7-tone chip family): this is Attio's own enumerable,
|
|
120
|
+
* workspace-admin-assigned palette, reproduced verbatim rather than
|
|
121
|
+
* mapped onto either existing mechanism. */
|
|
122
|
+
bgTagSwatch1: "tagSwatch1";
|
|
123
|
+
bgTagSwatch2: "tagSwatch2";
|
|
124
|
+
bgTagSwatch3: "tagSwatch3";
|
|
125
|
+
bgTagSwatch4: "tagSwatch4";
|
|
126
|
+
bgTagSwatch5: "tagSwatch5";
|
|
127
|
+
bgTagSwatch6: "tagSwatch6";
|
|
128
|
+
bgTagSwatch7: "tagSwatch7";
|
|
129
|
+
bgTagSwatch8: "tagSwatch8";
|
|
130
|
+
bgTagSwatch9: "tagSwatch9";
|
|
131
|
+
bgTagSwatch10: "tagSwatch10";
|
|
132
|
+
bgTagSwatch11: "tagSwatch11";
|
|
133
|
+
bgTagSwatch12: "tagSwatch12";
|
|
134
|
+
fgTagSwatch: "tagSwatchInk";
|
|
115
135
|
};
|
|
116
136
|
export type Tokens = typeof semantic;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crisp-ui-kit/crisp",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.4",
|
|
4
4
|
"description": "A lean React design system, measured pixel-for-pixel from Attio.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -378,6 +378,11 @@
|
|
|
378
378
|
"import": "./dist/esm/product/appshell/index.js",
|
|
379
379
|
"require": "./dist/cjs/product/appshell/index.js"
|
|
380
380
|
},
|
|
381
|
+
"./assigneepicker": {
|
|
382
|
+
"types": "./dist/types/product/assigneepicker/index.d.ts",
|
|
383
|
+
"import": "./dist/esm/product/assigneepicker/index.js",
|
|
384
|
+
"require": "./dist/cjs/product/assigneepicker/index.js"
|
|
385
|
+
},
|
|
381
386
|
"./authshell": {
|
|
382
387
|
"types": "./dist/types/product/authshell/index.d.ts",
|
|
383
388
|
"import": "./dist/esm/product/authshell/index.js",
|
|
@@ -443,11 +448,21 @@
|
|
|
443
448
|
"import": "./dist/esm/product/navitem/index.js",
|
|
444
449
|
"require": "./dist/cjs/product/navitem/index.js"
|
|
445
450
|
},
|
|
451
|
+
"./notesgallery": {
|
|
452
|
+
"types": "./dist/types/product/notesgallery/index.d.ts",
|
|
453
|
+
"import": "./dist/esm/product/notesgallery/index.js",
|
|
454
|
+
"require": "./dist/cjs/product/notesgallery/index.js"
|
|
455
|
+
},
|
|
446
456
|
"./notificationssettings": {
|
|
447
457
|
"types": "./dist/types/product/notificationssettings/index.d.ts",
|
|
448
458
|
"import": "./dist/esm/product/notificationssettings/index.js",
|
|
449
459
|
"require": "./dist/cjs/product/notificationssettings/index.js"
|
|
450
460
|
},
|
|
461
|
+
"./objectpagemenu": {
|
|
462
|
+
"types": "./dist/types/product/objectpagemenu/index.d.ts",
|
|
463
|
+
"import": "./dist/esm/product/objectpagemenu/index.js",
|
|
464
|
+
"require": "./dist/cjs/product/objectpagemenu/index.js"
|
|
465
|
+
},
|
|
451
466
|
"./objectsettings": {
|
|
452
467
|
"types": "./dist/types/product/objectsettings/index.d.ts",
|
|
453
468
|
"import": "./dist/esm/product/objectsettings/index.js",
|
|
@@ -468,6 +483,11 @@
|
|
|
468
483
|
"import": "./dist/esm/product/recordpanel/index.js",
|
|
469
484
|
"require": "./dist/cjs/product/recordpanel/index.js"
|
|
470
485
|
},
|
|
486
|
+
"./recordpicker": {
|
|
487
|
+
"types": "./dist/types/product/recordpicker/index.d.ts",
|
|
488
|
+
"import": "./dist/esm/product/recordpicker/index.js",
|
|
489
|
+
"require": "./dist/cjs/product/recordpicker/index.js"
|
|
490
|
+
},
|
|
471
491
|
"./richtext": {
|
|
472
492
|
"types": "./dist/types/product/richtext/index.d.ts",
|
|
473
493
|
"import": "./dist/esm/product/richtext/index.js",
|
|
@@ -488,6 +508,16 @@
|
|
|
488
508
|
"import": "./dist/esm/product/settingsshell/index.js",
|
|
489
509
|
"require": "./dist/cjs/product/settingsshell/index.js"
|
|
490
510
|
},
|
|
511
|
+
"./share": {
|
|
512
|
+
"types": "./dist/types/product/share/index.d.ts",
|
|
513
|
+
"import": "./dist/esm/product/share/index.js",
|
|
514
|
+
"require": "./dist/cjs/product/share/index.js"
|
|
515
|
+
},
|
|
516
|
+
"./shortcutssheet": {
|
|
517
|
+
"types": "./dist/types/product/shortcutssheet/index.d.ts",
|
|
518
|
+
"import": "./dist/esm/product/shortcutssheet/index.js",
|
|
519
|
+
"require": "./dist/cjs/product/shortcutssheet/index.js"
|
|
520
|
+
},
|
|
491
521
|
"./sidebar": {
|
|
492
522
|
"types": "./dist/types/product/sidebar/index.d.ts",
|
|
493
523
|
"import": "./dist/esm/product/sidebar/index.js",
|
|
@@ -498,6 +528,11 @@
|
|
|
498
528
|
"import": "./dist/esm/product/statlist/index.js",
|
|
499
529
|
"require": "./dist/cjs/product/statlist/index.js"
|
|
500
530
|
},
|
|
531
|
+
"./taskeditpopover": {
|
|
532
|
+
"types": "./dist/types/product/taskeditpopover/index.d.ts",
|
|
533
|
+
"import": "./dist/esm/product/taskeditpopover/index.js",
|
|
534
|
+
"require": "./dist/cjs/product/taskeditpopover/index.js"
|
|
535
|
+
},
|
|
501
536
|
"./tasklist": {
|
|
502
537
|
"types": "./dist/types/product/tasklist/index.d.ts",
|
|
503
538
|
"import": "./dist/esm/product/tasklist/index.js",
|
|
@@ -523,6 +558,11 @@
|
|
|
523
558
|
"import": "./dist/esm/product/workspacegeneralsettings/index.js",
|
|
524
559
|
"require": "./dist/cjs/product/workspacegeneralsettings/index.js"
|
|
525
560
|
},
|
|
561
|
+
"./workspaceswitchermenu": {
|
|
562
|
+
"types": "./dist/types/product/workspaceswitchermenu/index.d.ts",
|
|
563
|
+
"import": "./dist/esm/product/workspaceswitchermenu/index.js",
|
|
564
|
+
"require": "./dist/cjs/product/workspaceswitchermenu/index.js"
|
|
565
|
+
},
|
|
526
566
|
"./tokens": {
|
|
527
567
|
"types": "./dist/types/tokens/index.d.ts",
|
|
528
568
|
"import": "./dist/esm/tokens/index.js",
|