@crisp-ui-kit/crisp 0.34.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bulkbar.css +3 -0
- package/dist/bulkbar.layered.css +3 -0
- package/dist/cjs/components/bulkbar/bulkbar.js +1 -1
- package/dist/cjs/components/bulkbar/bulkbar.recipe.js +6 -0
- package/dist/cjs/components/datatable/datatable.js +65 -5
- package/dist/cjs/components/datatable/datatable.recipe.js +2 -0
- package/dist/cjs/components/filldoc/filldoc.js +102 -0
- package/dist/cjs/components/filldoc/filldoc.recipe.js +211 -0
- package/dist/cjs/components/filldoc/index.js +10 -0
- package/dist/cjs/components/filldoc/serialize.js +39 -0
- package/dist/cjs/components/fillsheet/fillsheet.js +719 -0
- package/dist/cjs/components/fillsheet/fillsheet.recipe.js +325 -0
- package/dist/cjs/components/fillsheet/index.js +12 -0
- package/dist/cjs/components/fillsheet/serialize.js +82 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/product/recordpanel/recordpanel.js +4 -2
- package/dist/cjs/product/recordpanel/recordpanel.recipe.js +8 -0
- package/dist/cjs/product/sidebar/sidebar.js +16 -3
- package/dist/datatable.css +13 -5
- package/dist/datatable.layered.css +13 -5
- package/dist/esm/components/bulkbar/bulkbar.js +1 -1
- package/dist/esm/components/bulkbar/bulkbar.recipe.js +6 -0
- package/dist/esm/components/datatable/datatable.js +65 -5
- package/dist/esm/components/datatable/datatable.recipe.js +2 -0
- package/dist/esm/components/filldoc/filldoc.js +66 -0
- package/dist/esm/components/filldoc/filldoc.recipe.js +208 -0
- package/dist/esm/components/filldoc/index.js +3 -0
- package/dist/esm/components/filldoc/serialize.js +35 -0
- package/dist/esm/components/fillsheet/fillsheet.js +683 -0
- package/dist/esm/components/fillsheet/fillsheet.recipe.js +322 -0
- package/dist/esm/components/fillsheet/index.js +3 -0
- package/dist/esm/components/fillsheet/serialize.js +76 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/product/recordpanel/recordpanel.js +4 -2
- package/dist/esm/product/recordpanel/recordpanel.recipe.js +8 -0
- package/dist/esm/product/sidebar/sidebar.js +17 -4
- package/dist/filldoc.css +31 -0
- package/dist/filldoc.d.ts +7 -0
- package/dist/filldoc.layered.css +33 -0
- package/dist/fillsheet.css +29 -0
- package/dist/fillsheet.d.ts +7 -0
- package/dist/fillsheet.layered.css +31 -0
- package/dist/recordpanel.css +6 -0
- package/dist/recordpanel.layered.css +6 -0
- package/dist/styles.css +84 -5
- package/dist/styles.layered.css +84 -5
- package/dist/types/components/datatable/datatable.d.ts +7 -1
- package/dist/types/components/filldoc/filldoc.d.ts +79 -0
- package/dist/types/components/filldoc/filldoc.recipe.d.ts +201 -0
- package/dist/types/components/filldoc/index.d.ts +3 -0
- package/dist/types/components/filldoc/serialize.d.ts +5 -0
- package/dist/types/components/fillsheet/fillsheet.d.ts +165 -0
- package/dist/types/components/fillsheet/fillsheet.recipe.d.ts +202 -0
- package/dist/types/components/fillsheet/index.d.ts +3 -0
- package/dist/types/components/fillsheet/serialize.d.ts +45 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/product/recordpanel/recordpanel.d.ts +11 -1
- package/dist/types/product/sidebar/sidebar.d.ts +56 -0
- package/package.json +11 -1
|
@@ -40,6 +40,42 @@ export type SidebarListsSection = {
|
|
|
40
40
|
label: string;
|
|
41
41
|
newListLabel: string;
|
|
42
42
|
};
|
|
43
|
+
/** A row in a `groups` section (#325). */
|
|
44
|
+
export type SidebarNavGroupItem = {
|
|
45
|
+
label: string;
|
|
46
|
+
/** 16px icon component, rendered `<Icon />`. Optional — not every group's
|
|
47
|
+
* rows carry one (unlike the main nav's `SidebarNavItem`, where it's
|
|
48
|
+
* required). */
|
|
49
|
+
icon?: React.ComponentType<IconProps>;
|
|
50
|
+
/** Either this or `onSelect` — a plain link, or a handler for anything
|
|
51
|
+
* that isn't real navigation (opening a panel, selecting a view). Both
|
|
52
|
+
* may be set; neither is required to make the row *something* clickable
|
|
53
|
+
* (it still renders as a link, defaulting `href` to "#"). */
|
|
54
|
+
href?: string;
|
|
55
|
+
onSelect?: () => void;
|
|
56
|
+
active?: boolean;
|
|
57
|
+
/** Trailing content — a count, a badge, anything `NavItem`'s own
|
|
58
|
+
* `trailing` slot already takes. */
|
|
59
|
+
count?: React.ReactNode;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* A named, collapsible group of `SidebarNavGroupItem` rows — navigation as
|
|
63
|
+
* data, for a consumer whose sections aren't Attio's Records/Lists/Chats
|
|
64
|
+
* (#325). Pass `groups` to `Sidebar` and it replaces those three sections
|
|
65
|
+
* entirely; a group's `items` can come from runtime data (a re-render with a
|
|
66
|
+
* new array is all a group needs to pick up new rows).
|
|
67
|
+
*/
|
|
68
|
+
export type SidebarNavGroup = {
|
|
69
|
+
/** Identity for this group's own collapse state across renders. Falls
|
|
70
|
+
* back to `label` — set it explicitly if two groups could ever share a
|
|
71
|
+
* label, or if a group's label itself changes at runtime. */
|
|
72
|
+
key?: string;
|
|
73
|
+
label: string;
|
|
74
|
+
items: SidebarNavGroupItem[];
|
|
75
|
+
/** Starts this group collapsed (default: expanded, matching every
|
|
76
|
+
* existing section). Read once, on mount. */
|
|
77
|
+
defaultCollapsed?: boolean;
|
|
78
|
+
};
|
|
43
79
|
/** Footer copy: the onboarding pill, the invite row, and the trial banner. */
|
|
44
80
|
export type SidebarFooter = {
|
|
45
81
|
gettingStartedLabel: string;
|
|
@@ -67,6 +103,16 @@ export type SidebarProps = React.ComponentPropsWithoutRef<"nav"> & {
|
|
|
67
103
|
listsSection?: SidebarListsSection;
|
|
68
104
|
/** The Chats section (label + nav-item rows). */
|
|
69
105
|
chatsSection?: SidebarSection;
|
|
106
|
+
/**
|
|
107
|
+
* Navigation as data (#325): any number of named, collapsible groups,
|
|
108
|
+
* reusing the same section markup/recipe as Records/Lists/Chats. When
|
|
109
|
+
* given, it REPLACES those three sections entirely — a consumer whose
|
|
110
|
+
* sections aren't Attio's (internal/grc's Activity, Governance, Identity,
|
|
111
|
+
* Organization, System Administration, plus user-built registers) passes
|
|
112
|
+
* `groups` instead of the three fixed props. Omit it and `<Sidebar />`
|
|
113
|
+
* renders exactly as before this prop existed.
|
|
114
|
+
*/
|
|
115
|
+
groups?: SidebarNavGroup[];
|
|
70
116
|
/** Footer copy (onboarding pill, invite row, trial banner). */
|
|
71
117
|
footer?: SidebarFooter;
|
|
72
118
|
};
|
|
@@ -102,6 +148,16 @@ export declare const Sidebar: React.ForwardRefExoticComponent<Omit<React.Detaile
|
|
|
102
148
|
listsSection?: SidebarListsSection;
|
|
103
149
|
/** The Chats section (label + nav-item rows). */
|
|
104
150
|
chatsSection?: SidebarSection;
|
|
151
|
+
/**
|
|
152
|
+
* Navigation as data (#325): any number of named, collapsible groups,
|
|
153
|
+
* reusing the same section markup/recipe as Records/Lists/Chats. When
|
|
154
|
+
* given, it REPLACES those three sections entirely — a consumer whose
|
|
155
|
+
* sections aren't Attio's (internal/grc's Activity, Governance, Identity,
|
|
156
|
+
* Organization, System Administration, plus user-built registers) passes
|
|
157
|
+
* `groups` instead of the three fixed props. Omit it and `<Sidebar />`
|
|
158
|
+
* renders exactly as before this prop existed.
|
|
159
|
+
*/
|
|
160
|
+
groups?: SidebarNavGroup[];
|
|
105
161
|
/** Footer copy (onboarding pill, invite row, trial banner). */
|
|
106
162
|
footer?: SidebarFooter;
|
|
107
163
|
} & React.RefAttributes<HTMLDivElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crisp-ui-kit/crisp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "A lean React design system, measured pixel-for-pixel from Attio.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -143,6 +143,16 @@
|
|
|
143
143
|
"import": "./dist/esm/components/fileupload/index.js",
|
|
144
144
|
"require": "./dist/cjs/components/fileupload/index.js"
|
|
145
145
|
},
|
|
146
|
+
"./filldoc": {
|
|
147
|
+
"types": "./dist/types/components/filldoc/index.d.ts",
|
|
148
|
+
"import": "./dist/esm/components/filldoc/index.js",
|
|
149
|
+
"require": "./dist/cjs/components/filldoc/index.js"
|
|
150
|
+
},
|
|
151
|
+
"./fillsheet": {
|
|
152
|
+
"types": "./dist/types/components/fillsheet/index.d.ts",
|
|
153
|
+
"import": "./dist/esm/components/fillsheet/index.js",
|
|
154
|
+
"require": "./dist/cjs/components/fillsheet/index.js"
|
|
155
|
+
},
|
|
146
156
|
"./formfield": {
|
|
147
157
|
"types": "./dist/types/components/formfield/index.d.ts",
|
|
148
158
|
"import": "./dist/esm/components/formfield/index.js",
|