@crisp-ui-kit/crisp 0.57.1 → 0.57.3
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 +9 -4
- package/dist/authshell.layered.css +9 -4
- package/dist/badge.css +3 -3
- package/dist/badge.layered.css +3 -3
- package/dist/board.css +28 -8
- package/dist/board.layered.css +28 -8
- package/dist/bottomsheet.css +26 -0
- package/dist/bottomsheet.d.ts +7 -0
- package/dist/bottomsheet.layered.css +28 -0
- package/dist/button.css +10 -6
- package/dist/button.d.ts +2 -2
- package/dist/button.layered.css +10 -6
- package/dist/checkbox.css +7 -3
- package/dist/checkbox.layered.css +7 -3
- package/dist/chip.css +16 -1
- package/dist/chip.d.ts +3 -1
- package/dist/chip.layered.css +16 -1
- package/dist/chipgroup.css +5 -0
- package/dist/chipgroup.d.ts +7 -0
- package/dist/chipgroup.layered.css +7 -0
- package/dist/cjs/components/badge/badge.recipe.js +22 -8
- package/dist/cjs/components/bottomsheet/bottomsheet.js +90 -0
- package/dist/cjs/components/bottomsheet/bottomsheet.recipe.js +77 -0
- package/dist/cjs/components/bottomsheet/index.js +9 -0
- package/dist/cjs/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/cjs/components/button/button.recipe.js +67 -15
- package/dist/cjs/components/checkbox/checkbox.recipe.js +61 -9
- package/dist/cjs/components/chip/chip.js +14 -2
- package/dist/cjs/components/chip/chip.recipe.js +72 -2
- package/dist/cjs/components/chipgroup/chipgroup.js +51 -0
- package/dist/cjs/components/chipgroup/chipgroup.recipe.js +36 -0
- package/dist/cjs/components/chipgroup/index.js +7 -0
- package/dist/cjs/components/datatable/datatable.js +5 -1
- package/dist/cjs/components/datatable/datatable.recipe.js +21 -6
- package/dist/cjs/components/datepickerfield/datepickerfield.js +2 -2
- package/dist/cjs/components/datepickerfield/datepickerfield.recipe.js +16 -3
- package/dist/cjs/components/dialog/dialog.recipe.js +21 -10
- package/dist/cjs/components/emptystate/emptystate.recipe.js +7 -2
- package/dist/cjs/components/fileupload/fileupload.js +21 -4
- package/dist/cjs/components/input/index.js +2 -1
- package/dist/cjs/components/input/input.js +31 -1
- package/dist/cjs/components/input/input.recipe.js +16 -9
- package/dist/cjs/components/menu/menu.js +18 -2
- package/dist/cjs/components/menu/menu.recipe.js +21 -7
- package/dist/cjs/components/menusheet/index.js +9 -0
- package/dist/cjs/components/menusheet/menusheet.js +133 -0
- package/dist/cjs/components/menusheet/menusheet.recipe.js +103 -0
- package/dist/cjs/components/multiselect/multiselect.js +1 -1
- package/dist/cjs/components/multiselect/multiselect.recipe.js +33 -9
- package/dist/cjs/components/select/select.js +1 -1
- package/dist/cjs/components/select/select.recipe.js +38 -12
- package/dist/cjs/components/snackbar/index.js +8 -0
- package/dist/cjs/components/snackbar/snackbar.js +121 -0
- package/dist/cjs/components/snackbar/snackbar.recipe.js +71 -0
- package/dist/cjs/components/table/table.recipe.js +7 -1
- package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +7 -2
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +37 -12
- package/dist/cjs/components/tabs/tabs.js +10 -4
- package/dist/cjs/components/tabs/tabs.recipe.js +23 -6
- package/dist/cjs/components/textarea/textarea.recipe.js +11 -8
- package/dist/cjs/core/floating-portal.js +7 -4
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/product/authshell/authshell.recipe.js +5 -1
- package/dist/cjs/product/command/command.recipe.js +4 -1
- package/dist/cjs/product/comments/comments.js +7 -2
- package/dist/cjs/product/comments/comments.recipe.js +25 -7
- package/dist/cjs/product/inbox/inbox.js +11 -3
- package/dist/cjs/product/memberssettings/index.js +6 -0
- package/dist/cjs/product/memberssettings/memberssettings.js +99 -0
- package/dist/cjs/product/memberssettings/memberssettings.recipe.js +83 -0
- package/dist/cjs/product/notificationssettings/index.js +5 -0
- package/dist/cjs/product/notificationssettings/notificationssettings.js +19 -0
- package/dist/cjs/product/notificationssettings/notificationssettings.recipe.js +44 -0
- package/dist/cjs/product/recordpage/index.js +2 -1
- package/dist/cjs/product/recordpage/recordpage.js +106 -9
- package/dist/cjs/product/recordpage/recordpage.recipe.js +68 -6
- package/dist/cjs/product/workspacegeneralsettings/index.js +5 -0
- package/dist/cjs/product/workspacegeneralsettings/workspacegeneralsettings.js +21 -0
- package/dist/cjs/product/workspacegeneralsettings/workspacegeneralsettings.recipe.js +51 -0
- package/dist/cjs/tokens/contract.js +1 -0
- package/dist/cjs/tokens/elevation.js +8 -5
- package/dist/cjs/tokens/palette.js +28 -8
- package/dist/cjs/tokens/scale.js +44 -2
- package/dist/cjs/tokens/semantic.js +2 -0
- package/dist/columncalc.css +15 -7
- package/dist/columncalc.layered.css +15 -7
- package/dist/command.css +23 -19
- package/dist/command.layered.css +23 -19
- package/dist/comments.css +28 -19
- package/dist/comments.d.ts +2 -2
- package/dist/comments.layered.css +28 -19
- package/dist/datatable.css +171 -71
- package/dist/datatable.layered.css +171 -71
- package/dist/datepicker.css +13 -41
- package/dist/datepicker.layered.css +13 -41
- package/dist/datepickerfield.css +12 -3
- package/dist/datepickerfield.d.ts +2 -2
- package/dist/datepickerfield.layered.css +12 -3
- package/dist/dialog.css +12 -7
- package/dist/dialog.layered.css +12 -7
- package/dist/emptystate.css +5 -3
- package/dist/emptystate.layered.css +5 -3
- package/dist/esm/components/badge/badge.recipe.js +22 -8
- package/dist/esm/components/bottomsheet/bottomsheet.js +52 -0
- package/dist/esm/components/bottomsheet/bottomsheet.recipe.js +74 -0
- package/dist/esm/components/bottomsheet/index.js +2 -0
- package/dist/esm/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/esm/components/button/button.recipe.js +68 -16
- package/dist/esm/components/checkbox/checkbox.recipe.js +61 -9
- package/dist/esm/components/chip/chip.js +14 -2
- package/dist/esm/components/chip/chip.recipe.js +72 -2
- package/dist/esm/components/chipgroup/chipgroup.js +15 -0
- package/dist/esm/components/chipgroup/chipgroup.recipe.js +33 -0
- package/dist/esm/components/chipgroup/index.js +2 -0
- package/dist/esm/components/datatable/datatable.js +5 -1
- package/dist/esm/components/datatable/datatable.recipe.js +21 -6
- package/dist/esm/components/datepickerfield/datepickerfield.js +2 -2
- package/dist/esm/components/datepickerfield/datepickerfield.recipe.js +16 -3
- package/dist/esm/components/dialog/dialog.recipe.js +22 -11
- package/dist/esm/components/emptystate/emptystate.recipe.js +7 -2
- package/dist/esm/components/fileupload/fileupload.js +20 -5
- package/dist/esm/components/input/index.js +1 -1
- package/dist/esm/components/input/input.js +30 -0
- package/dist/esm/components/input/input.recipe.js +17 -10
- package/dist/esm/components/menu/menu.js +18 -2
- package/dist/esm/components/menu/menu.recipe.js +21 -7
- package/dist/esm/components/menusheet/index.js +2 -0
- package/dist/esm/components/menusheet/menusheet.js +95 -0
- package/dist/esm/components/menusheet/menusheet.recipe.js +100 -0
- package/dist/esm/components/multiselect/multiselect.js +1 -1
- package/dist/esm/components/multiselect/multiselect.recipe.js +33 -9
- package/dist/esm/components/select/select.js +1 -1
- package/dist/esm/components/select/select.recipe.js +38 -12
- package/dist/esm/components/snackbar/index.js +2 -0
- package/dist/esm/components/snackbar/snackbar.js +84 -0
- package/dist/esm/components/snackbar/snackbar.recipe.js +68 -0
- package/dist/esm/components/table/table.recipe.js +7 -1
- package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +7 -2
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +37 -12
- package/dist/esm/components/tabs/tabs.js +10 -4
- package/dist/esm/components/tabs/tabs.recipe.js +23 -6
- package/dist/esm/components/textarea/textarea.recipe.js +12 -9
- package/dist/esm/core/floating-portal.js +7 -4
- package/dist/esm/index.js +7 -0
- package/dist/esm/product/authshell/authshell.recipe.js +5 -1
- package/dist/esm/product/command/command.recipe.js +4 -1
- package/dist/esm/product/comments/comments.js +7 -2
- package/dist/esm/product/comments/comments.recipe.js +25 -7
- package/dist/esm/product/inbox/inbox.js +11 -3
- package/dist/esm/product/memberssettings/index.js +1 -0
- package/dist/esm/product/memberssettings/memberssettings.js +62 -0
- package/dist/esm/product/memberssettings/memberssettings.recipe.js +80 -0
- package/dist/esm/product/notificationssettings/index.js +1 -0
- package/dist/esm/product/notificationssettings/notificationssettings.js +16 -0
- package/dist/esm/product/notificationssettings/notificationssettings.recipe.js +41 -0
- package/dist/esm/product/recordpage/index.js +1 -1
- package/dist/esm/product/recordpage/recordpage.js +106 -10
- package/dist/esm/product/recordpage/recordpage.recipe.js +68 -6
- package/dist/esm/product/workspacegeneralsettings/index.js +1 -0
- package/dist/esm/product/workspacegeneralsettings/workspacegeneralsettings.js +18 -0
- package/dist/esm/product/workspacegeneralsettings/workspacegeneralsettings.recipe.js +48 -0
- package/dist/esm/tokens/contract.js +2 -1
- package/dist/esm/tokens/elevation.js +8 -5
- package/dist/esm/tokens/palette.js +28 -8
- package/dist/esm/tokens/scale.js +43 -1
- package/dist/esm/tokens/semantic.js +2 -0
- package/dist/fileupload.css +3 -1
- package/dist/fileupload.layered.css +3 -1
- package/dist/input.css +6 -4
- package/dist/input.layered.css +6 -4
- package/dist/listpage.css +3 -1
- package/dist/listpage.layered.css +3 -1
- package/dist/memberssettings.css +67 -0
- package/dist/memberssettings.d.ts +7 -0
- package/dist/memberssettings.layered.css +69 -0
- package/dist/menu.css +2 -2
- package/dist/menu.layered.css +2 -2
- package/dist/menusheet.css +36 -0
- package/dist/menusheet.d.ts +7 -0
- package/dist/menusheet.layered.css +38 -0
- package/dist/multiselect.css +13 -6
- package/dist/multiselect.layered.css +13 -6
- package/dist/native/tokens.d.ts +2 -1
- package/dist/native/tokens.js +20 -3
- package/dist/notificationssettings.css +22 -0
- package/dist/notificationssettings.d.ts +7 -0
- package/dist/notificationssettings.layered.css +24 -0
- package/dist/objectsettings.css +4 -4
- package/dist/objectsettings.layered.css +4 -4
- package/dist/recordpage.css +90 -23
- package/dist/recordpage.layered.css +90 -23
- package/dist/recordpanel.css +35 -16
- package/dist/recordpanel.layered.css +35 -16
- package/dist/resizablepanel.css +8 -5
- package/dist/resizablepanel.layered.css +8 -5
- package/dist/richtext.css +24 -8
- package/dist/richtext.layered.css +24 -8
- package/dist/savedviews.css +9 -2
- package/dist/savedviews.layered.css +9 -2
- package/dist/select.css +25 -5
- package/dist/select.layered.css +25 -5
- package/dist/settingsshell.css +2 -3
- package/dist/settingsshell.layered.css +2 -3
- package/dist/slider.css +6 -27
- package/dist/slider.layered.css +6 -27
- package/dist/snackbar.css +24 -0
- package/dist/snackbar.d.ts +7 -0
- package/dist/snackbar.layered.css +26 -0
- package/dist/statcard.css +3 -1
- package/dist/statcard.layered.css +3 -1
- package/dist/styles.css +911 -354
- package/dist/styles.layered.css +911 -354
- package/dist/table.css +35 -12
- package/dist/table.layered.css +35 -12
- package/dist/tabletoolbar.css +35 -24
- package/dist/tabletoolbar.layered.css +35 -24
- package/dist/tabs.css +18 -4
- package/dist/tabs.layered.css +18 -4
- package/dist/textarea.css +2 -6
- package/dist/textarea.layered.css +2 -6
- package/dist/themepicker.css +2 -1
- package/dist/themepicker.layered.css +2 -1
- package/dist/tokens.css +13 -2
- package/dist/tokens.json +20 -3
- package/dist/types/components/bottomsheet/bottomsheet.d.ts +35 -0
- package/dist/types/components/bottomsheet/bottomsheet.recipe.d.ts +3 -0
- package/dist/types/components/bottomsheet/index.d.ts +2 -0
- 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 +24 -6
- package/dist/types/components/checkbox/checkbox.recipe.d.ts +28 -5
- package/dist/types/components/chip/chip.d.ts +22 -0
- package/dist/types/components/chip/chip.recipe.d.ts +49 -1
- package/dist/types/components/chipgroup/chipgroup.d.ts +14 -0
- package/dist/types/components/chipgroup/chipgroup.recipe.d.ts +5 -0
- package/dist/types/components/chipgroup/index.d.ts +2 -0
- package/dist/types/components/datatable/datatable.d.ts +19 -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/fileupload/fileupload.d.ts +26 -0
- package/dist/types/components/input/index.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +72 -0
- package/dist/types/components/menusheet/index.d.ts +2 -0
- package/dist/types/components/menusheet/menusheet.d.ts +42 -0
- package/dist/types/components/menusheet/menusheet.recipe.d.ts +3 -0
- package/dist/types/components/snackbar/index.d.ts +2 -0
- package/dist/types/components/snackbar/snackbar.d.ts +36 -0
- package/dist/types/components/snackbar/snackbar.recipe.d.ts +5 -0
- package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +28 -1
- package/dist/types/components/tabs/tabs.d.ts +11 -1
- package/dist/types/core/floating-portal.d.ts +6 -5
- package/dist/types/index.d.ts +7 -0
- package/dist/types/product/comments/comments.d.ts +9 -3
- package/dist/types/product/comments/comments.recipe.d.ts +12 -2
- package/dist/types/product/inbox/inbox.d.ts +13 -1
- package/dist/types/product/memberssettings/index.d.ts +1 -0
- package/dist/types/product/memberssettings/memberssettings.d.ts +85 -0
- package/dist/types/product/memberssettings/memberssettings.recipe.d.ts +3 -0
- package/dist/types/product/notificationssettings/index.d.ts +1 -0
- package/dist/types/product/notificationssettings/notificationssettings.d.ts +37 -0
- package/dist/types/product/notificationssettings/notificationssettings.recipe.d.ts +3 -0
- package/dist/types/product/recordpage/index.d.ts +1 -1
- package/dist/types/product/recordpage/recordpage.d.ts +99 -2
- package/dist/types/product/workspacegeneralsettings/index.d.ts +1 -0
- package/dist/types/product/workspacegeneralsettings/workspacegeneralsettings.d.ts +48 -0
- package/dist/types/product/workspacegeneralsettings/workspacegeneralsettings.recipe.d.ts +3 -0
- package/dist/types/tokens/contract.d.ts +4 -1
- package/dist/types/tokens/elevation.d.ts +8 -5
- package/dist/types/tokens/palette.d.ts +9 -1
- package/dist/types/tokens/scale.d.ts +11 -1
- package/dist/types/tokens/semantic.d.ts +2 -0
- package/dist/wheelpicker.css +4 -2
- package/dist/wheelpicker.layered.css +4 -2
- package/dist/workspacegeneralsettings.css +30 -0
- package/dist/workspacegeneralsettings.d.ts +7 -0
- package/dist/workspacegeneralsettings.layered.css +32 -0
- package/package.json +36 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ChipGroup = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const core_1 = require("../../core");
|
|
40
|
+
const chipgroup_recipe_1 = require("./chipgroup.recipe");
|
|
41
|
+
/**
|
|
42
|
+
* A single-line, horizontally-scrolling row of `Chip`s (or anything else),
|
|
43
|
+
* with scroll-snap — for a filter/status row that would otherwise wrap onto
|
|
44
|
+
* a second line once it runs out of width (crisp#908). Every child snaps to
|
|
45
|
+
* the row's start edge and never shrinks, so scrolling always lands a chip
|
|
46
|
+
* flush against the left edge rather than mid-chip.
|
|
47
|
+
*/
|
|
48
|
+
exports.ChipGroup = React.forwardRef(({ className, asChild, ...props }, ref) => {
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)(core_1.Primitive.div, { ref: ref, asChild: asChild, role: "group", className: (0, chipgroup_recipe_1.chipgroupRecipe)({ className }), ...props }));
|
|
50
|
+
});
|
|
51
|
+
exports.ChipGroup.displayName = "ChipGroup";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.chipgroupRecipe = void 0;
|
|
4
|
+
const core_1 = require("../../core");
|
|
5
|
+
const tokens_1 = require("../../tokens");
|
|
6
|
+
// your-moon/crisp#908: a horizontally-scrolling, single-line row for a set of
|
|
7
|
+
// `Chip`s -- Naver/Kakao both solve "many filter/status chips" this way
|
|
8
|
+
// (docs/study/korean/: Naver home `comp_snap_list`, `scroll-snap-type: x
|
|
9
|
+
// mandatory`; Daum `UL.grid_xscroll`, native overflow with no snap). crisp
|
|
10
|
+
// had no equivalent: a consumer's own flex row wraps chips onto a second
|
|
11
|
+
// line once they run out of horizontal space, which breaks the one-line
|
|
12
|
+
// table-header density Attio parity is built on (GRC's own toolbar filter
|
|
13
|
+
// row and record tabs, per the issue). No new visual values -- the gap
|
|
14
|
+
// between chips reuses `Chip`'s own measured 3px inter-child gap
|
|
15
|
+
// (chip.recipe.ts's `gap: "3px"` comment), and the scrollbar is hidden the
|
|
16
|
+
// same way `WheelPicker`'s already-shipped scroll column does
|
|
17
|
+
// (`scrollbar-width: none` + the `-webkit-scrollbar` pseudo), not a new
|
|
18
|
+
// pattern invented for this component.
|
|
19
|
+
const config = (0, core_1.defineRecipe)({
|
|
20
|
+
name: "chipgroup",
|
|
21
|
+
base: `
|
|
22
|
+
display: flex; flex-wrap: nowrap; align-items: center; gap: ${tokens_1.contract.space["1.5"]};
|
|
23
|
+
overflow-x: auto; overscroll-behavior-x: contain;
|
|
24
|
+
scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
|
|
25
|
+
scrollbar-width: none; -ms-overflow-style: none;
|
|
26
|
+
&::-webkit-scrollbar { display: none; }
|
|
27
|
+
& > * { flex-shrink: 0; scroll-snap-align: start; }
|
|
28
|
+
`,
|
|
29
|
+
variants: {},
|
|
30
|
+
defaultVariants: {},
|
|
31
|
+
compoundVariants: [],
|
|
32
|
+
});
|
|
33
|
+
exports.chipgroupRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
|
|
34
|
+
config,
|
|
35
|
+
});
|
|
36
|
+
exports.default = config;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.chipgroupRecipe = exports.ChipGroup = void 0;
|
|
4
|
+
var chipgroup_1 = require("./chipgroup");
|
|
5
|
+
Object.defineProperty(exports, "ChipGroup", { enumerable: true, get: function () { return chipgroup_1.ChipGroup; } });
|
|
6
|
+
var chipgroup_recipe_1 = require("./chipgroup.recipe");
|
|
7
|
+
Object.defineProperty(exports, "chipgroupRecipe", { enumerable: true, get: function () { return chipgroup_recipe_1.chipgroupRecipe; } });
|
|
@@ -407,7 +407,11 @@ function renderTyped(col, value, avatarTone, row, display, locale = "en-US", ope
|
|
|
407
407
|
const e = display ? { ...raw, name: display } : raw;
|
|
408
408
|
if (!e.name)
|
|
409
409
|
return empty;
|
|
410
|
-
return ((0, jsx_runtime_1.jsxs)("span", { className: "crisp-datatable-entity", children: [(0, jsx_runtime_1.jsx)("span", { className: "crisp-datatable-avatar", "data-tone": avatarTone === "hashed" ? toneFor(raw.name) : undefined, children: e.avatar ? ((0, jsx_runtime_1.jsx)("img", { src: e.avatar, alt: "" })) : (initials(e.name).slice(0, 2)) }), col.
|
|
410
|
+
return ((0, jsx_runtime_1.jsxs)("span", { className: "crisp-datatable-entity", children: [(0, jsx_runtime_1.jsx)("span", { className: "crisp-datatable-avatar", "data-tone": avatarTone === "hashed" ? toneFor(raw.name) : undefined, "data-shape": col.avatarShape === "circle" ? "circle" : undefined, children: e.avatar ? ((0, jsx_runtime_1.jsx)("img", { src: e.avatar, alt: "" })) : (initials(e.name).slice(0, 2)) }), col.href ? ((0, jsx_runtime_1.jsx)("a", { href: col.href(row), className: "crisp-datatable-entity-name crisp-datatable-entity-name--link", onClick: (ev) => {
|
|
411
|
+
// same reasoning as onEntityClick's stopPropagation below --
|
|
412
|
+
// this must not also trigger the row's own onRowClick.
|
|
413
|
+
ev.stopPropagation();
|
|
414
|
+
}, children: e.name })) : col.onEntityClick ? ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "crisp-datatable-entity-name crisp-datatable-entity-name--link", onClick: (ev) => {
|
|
411
415
|
// the cell's own click already just selects (see the
|
|
412
416
|
// TableCell onClick above) -- this must additionally stop
|
|
413
417
|
// the row's onRowClick from firing, since this name points
|
|
@@ -116,7 +116,13 @@ const config = (0, core_1.defineRecipe)({
|
|
|
116
116
|
& .crisp-datatable-group-count { margin-inline-start: ${tokens_1.contract.space["1.5"]}; color: ${tokens_1.contract.fgMuted}; font-variant-numeric: tabular-nums; }
|
|
117
117
|
& .crisp-datatable-th-rename { width: 100%; min-width: 0; height: ${tokens_1.contract.size.row}; margin: 0; padding: 0 ${tokens_1.contract.space["1"]}; border: none; border-radius: ${tokens_1.contract.radius.md}; background: ${tokens_1.contract.bgSurface}; box-shadow: inset 0 0 0 1px ${tokens_1.contract.bgBrandSolid}; font-family: inherit; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgPrimary}; outline: none; }
|
|
118
118
|
& .crisp-datatable-th-rename:focus { box-shadow: inset 0 0 0 1px ${tokens_1.contract.bgBrandSolid}; }
|
|
119
|
-
|
|
119
|
+
/* #719: overflow: clip, not hidden, on every truncation rule below --
|
|
120
|
+
hidden still honours a programmatic scrollLeft assignment (found via
|
|
121
|
+
a screenshot tool that pans anything with scrollWidth > clientWidth),
|
|
122
|
+
blanking or fragmenting the visible text even though real user
|
|
123
|
+
scrolling was already blocked. clip renders the ellipsis identically
|
|
124
|
+
and leaves no scroll position to move. */
|
|
125
|
+
& .crisp-datatable-th-label { overflow: clip; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
|
120
126
|
/* #465: 12px per the comment above (and Attio's measured header cell
|
|
121
127
|
padding: 0 12px) -- was still c.space["2"] (8px), drifted from its
|
|
122
128
|
own documented value. */
|
|
@@ -203,7 +209,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
203
209
|
/* reference picker: a leading 16px avatar per option, plus a trailing
|
|
204
210
|
"Create X" row when the consumer supplies one (#449) -- same measured
|
|
205
211
|
values as RecordsTable's own .crisp-recordstable-refoption*. */
|
|
206
|
-
& .crisp-datatable-refoption { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; min-width: 0; overflow:
|
|
212
|
+
& .crisp-datatable-refoption { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; min-width: 0; overflow: clip; text-overflow: ellipsis; }
|
|
207
213
|
& .crisp-datatable-refoption-avatar { flex-shrink: 0; }
|
|
208
214
|
& .crisp-datatable-refoption--create { color: ${tokens_1.contract.fgMuted}; }
|
|
209
215
|
& .crisp-datatable-empty { padding: ${tokens_1.contract.space["8"]} ${tokens_1.contract.space["3"]}; text-align: center; color: ${tokens_1.contract.fgMuted}; font-size: ${tokens_1.contract.text.lg}; }
|
|
@@ -289,8 +295,11 @@ const config = (0, core_1.defineRecipe)({
|
|
|
289
295
|
(#833/#835/#848) that happened to apply the same 500 to every
|
|
290
296
|
primary-column body cell regardless of type. Made explicit here so
|
|
291
297
|
fixing that leak doesn't also (wrongly) drop entity names to 400. */
|
|
292
|
-
& .crisp-datatable-entity-name { overflow:
|
|
293
|
-
|
|
298
|
+
& .crisp-datatable-entity-name { overflow: clip; text-overflow: ellipsis; white-space: nowrap; font-weight: ${tokens_1.contract.weight.medium}; text-decoration: underline; text-decoration-color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 9%, transparent); }
|
|
299
|
+
/* #893: shared by the button (onEntityClick, a different record) and
|
|
300
|
+
the anchor (href, the row's own record) -- was button-only, which
|
|
301
|
+
silently left a real <a> unstyled the day #893 added one. */
|
|
302
|
+
& .crisp-datatable-entity-name--link { margin: 0; padding: 0; border: none; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-align: start; cursor: pointer; max-width: 100%; }
|
|
294
303
|
/* crisp/#601, G-048: two 20px ghost icons, right-aligned in the primary
|
|
295
304
|
column, revealed on ROW hover (the issue's own title says "row
|
|
296
305
|
hover", and a live check confirmed hovering well past the name --
|
|
@@ -304,7 +313,13 @@ const config = (0, core_1.defineRecipe)({
|
|
|
304
313
|
& tr:hover .crisp-datatable-entity-actions, & .crisp-datatable-entity-actions:focus-within { opacity: 1; }
|
|
305
314
|
& .crisp-datatable-entity-action { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin: 0; padding: 0; border: none; border-radius: ${tokens_1.contract.radius.sm}; background: none; font-family: inherit; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 55%, transparent); cursor: pointer; flex-shrink: 0; }
|
|
306
315
|
& .crisp-datatable-entity-action:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 4%, transparent); color: ${tokens_1.contract.fgPrimary}; }
|
|
307
|
-
|
|
316
|
+
/* #892: the default shape's radius was a stray literal (radius.sm, 6px)
|
|
317
|
+
-- Attio's own real company/object avatar measures 30%, which is
|
|
318
|
+
Avatar's own already-shipped shape="rounded" value, not a new number.
|
|
319
|
+
shape="circle" reuses Avatar's own shape="circle" value (radius.full)
|
|
320
|
+
the same way, measured live on a real Attio person avatar. */
|
|
321
|
+
& .crisp-datatable-avatar { width: ${tokens_1.contract.size.icon}; height: ${tokens_1.contract.size.icon}; border-radius: 30%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; font-weight: ${tokens_1.contract.weight.semibold}; text-transform: uppercase; color: ${tokens_1.contract.fgOnBrand}; background: ${tokens_1.contract.bgBrandSolid}; }
|
|
322
|
+
& .crisp-datatable-avatar[data-shape="circle"] { border-radius: ${tokens_1.contract.radius.full}; }
|
|
308
323
|
& .crisp-datatable-avatar[data-tone="success"] { background: ${tokens_1.contract.bgSuccess}; } & .crisp-datatable-avatar[data-tone="warning"] { background: ${tokens_1.contract.bgWarning}; } & .crisp-datatable-avatar[data-tone="danger"] { background: ${tokens_1.contract.bgDanger}; } & .crisp-datatable-avatar[data-tone="purple"] { background: ${tokens_1.contract.bgPurple}; } & .crisp-datatable-avatar[data-tone="cyan"] { background: ${tokens_1.contract.bgCyan}; } & .crisp-datatable-avatar[data-tone="orange"] { background: ${tokens_1.contract.bgOrange}; }
|
|
309
324
|
& .crisp-datatable-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
|
|
310
325
|
& .crisp-datatable-tags { display: flex; align-items: center; gap: ${tokens_1.contract.space["1"]}; overflow: hidden; }
|
|
@@ -326,7 +341,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
326
341
|
own .crisp-recordstable-link, which this mirrors: no underline at
|
|
327
342
|
rest, underline on hover, own-colour text rather than a browser-blue
|
|
328
343
|
link. */
|
|
329
|
-
& .crisp-datatable-link { color: ${tokens_1.contract.fgPrimary}; text-decoration: none; overflow:
|
|
344
|
+
& .crisp-datatable-link { color: ${tokens_1.contract.fgPrimary}; text-decoration: none; overflow: clip; text-overflow: ellipsis; }
|
|
330
345
|
& .crisp-datatable-link:hover { text-decoration: underline; }
|
|
331
346
|
/* phone cell type/editor (#765) -- measured live: the dial-code prefix
|
|
332
347
|
is a muted rgba(0,0,0,0.63) at 14px, matching every other muted-text
|
|
@@ -58,7 +58,7 @@ const fromDate = (d) => ({
|
|
|
58
58
|
* popover. This is what `DatePicker` used to be; `DatePicker` is now
|
|
59
59
|
* seed-design's bare calendar, and this composes it.
|
|
60
60
|
*/
|
|
61
|
-
function DatePickerField({ value, defaultValue, onValueChange, onChange, placeholder: placeholderProp, variant = "default", format = defaultFormat, clearable = true, clearLabel: clearLabelProp, presets, calendarProps, "aria-label": ariaLabel, className, ...rest }) {
|
|
61
|
+
function DatePickerField({ value, defaultValue, onValueChange, onChange, placeholder: placeholderProp, variant = "default", width = "full", format = defaultFormat, clearable = true, clearLabel: clearLabelProp, presets, calendarProps, "aria-label": ariaLabel, className, ...rest }) {
|
|
62
62
|
// crisp/#471: same resolution order as Select's own.
|
|
63
63
|
const placeholder = (0, core_1.useCrispMessage)(placeholderProp, "Set date…");
|
|
64
64
|
const clearLabel = (0, core_1.useCrispMessage)(clearLabelProp, "Clear date");
|
|
@@ -79,7 +79,7 @@ function DatePickerField({ value, defaultValue, onValueChange, onChange, placeho
|
|
|
79
79
|
onValueChange?.(null);
|
|
80
80
|
onChange?.(null);
|
|
81
81
|
};
|
|
82
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: (0, datepickerfield_recipe_1.datepickerfieldRecipe)({ className }), ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "crisp-datepickerfield-box", "data-ghost": variant === "ghost" ? "" : undefined, "data-placeholder": selected ? undefined : "", children: [(0, jsx_runtime_1.jsx)(popover_1.Popover, { open: open, onOpenChange: setOpen, "aria-label": ariaLabel, trigger: (0, jsx_runtime_1.jsxs)("button", { type: "button", className: "crisp-datepickerfield-trigger", "aria-label": ariaLabel, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CalendarDays, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), selected ? format(selected) : placeholder] }), children: (0, jsx_runtime_1.jsxs)("div", { className: "crisp-datepickerfield-panel", children: [(0, jsx_runtime_1.jsx)(datepicker_1.DatePicker
|
|
82
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, datepickerfield_recipe_1.datepickerfieldRecipe)({ width, className }), ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "crisp-datepickerfield-box", "data-ghost": variant === "ghost" ? "" : undefined, "data-placeholder": selected ? undefined : "", children: [(0, jsx_runtime_1.jsx)(popover_1.Popover, { open: open, onOpenChange: setOpen, "aria-label": ariaLabel, trigger: (0, jsx_runtime_1.jsxs)("button", { type: "button", className: "crisp-datepickerfield-trigger", "aria-label": ariaLabel, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.CalendarDays, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }), selected ? format(selected) : placeholder] }), children: (0, jsx_runtime_1.jsxs)("div", { className: "crisp-datepickerfield-panel", children: [(0, jsx_runtime_1.jsx)(datepicker_1.DatePicker
|
|
83
83
|
// DatePickerProps is a union over selectionMode, and TypeScript
|
|
84
84
|
// cannot narrow it through a spread: it tries every branch and
|
|
85
85
|
// reports the range one as missing props. The field is always
|
|
@@ -13,7 +13,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
13
13
|
display: inline-flex; font-family: ${tokens_1.contract.font.sans};
|
|
14
14
|
|
|
15
15
|
& .crisp-datepickerfield-box {
|
|
16
|
-
display: inline-flex; align-items: center;
|
|
16
|
+
display: inline-flex; align-items: center; width: 100%;
|
|
17
17
|
box-sizing: border-box; height: 32px; margin: 0;
|
|
18
18
|
border-radius: ${tokens_1.contract.radius.md}; background: transparent;
|
|
19
19
|
box-shadow: inset 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.fgPrimary} 7%, transparent);
|
|
@@ -22,6 +22,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
22
22
|
& .crisp-datepickerfield-box[data-ghost] { background: transparent; box-shadow: none; }
|
|
23
23
|
& .crisp-datepickerfield-box[data-ghost]:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 4%, transparent); }
|
|
24
24
|
& .crisp-datepickerfield-trigger {
|
|
25
|
+
flex: 1; min-width: 0;
|
|
25
26
|
display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["2"]};
|
|
26
27
|
height: 100%; padding: 0 ${tokens_1.contract.space["2.5"]}; margin: 0;
|
|
27
28
|
border: none; background: none; color: inherit; font-family: inherit;
|
|
@@ -51,8 +52,20 @@ const config = (0, core_1.defineRecipe)({
|
|
|
51
52
|
}
|
|
52
53
|
& .crisp-datepickerfield-preset:hover { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 8%, transparent); }
|
|
53
54
|
`,
|
|
54
|
-
variants: {
|
|
55
|
-
|
|
55
|
+
variants: {
|
|
56
|
+
// crisp#980: full (default) fills its container, matching Select's own
|
|
57
|
+
// width variant/default -- so a form composing DatePickerField alongside
|
|
58
|
+
// Input/Select via FormField gets one consistent column width across
|
|
59
|
+
// every field type, not just some of them. auto sizes to content, the
|
|
60
|
+
// behaviour every consumer got unconditionally before this.
|
|
61
|
+
width: {
|
|
62
|
+
full: `width: 100%;`,
|
|
63
|
+
auto: `width: auto;`,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
defaultVariants: {
|
|
67
|
+
width: "full",
|
|
68
|
+
},
|
|
56
69
|
compoundVariants: [],
|
|
57
70
|
});
|
|
58
71
|
exports.datepickerfieldRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
|
|
@@ -3,11 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.dialogRecipe = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
6
|
+
// your-moon/crisp#934: was a radius-16 frosted-glass card (a
|
|
7
|
+
// 60%-tinted, 15px-backdrop-blurred outer shell wrapping a solid radius-12
|
|
8
|
+
// inner card) -- owner-directed: Dialog's identity now follows seed-design
|
|
9
|
+
// (daangn), whose own Dialog spec has no shadow/blur/tint property at all;
|
|
10
|
+
// elevation there is conveyed purely by a darker backdrop scrim plus the
|
|
11
|
+
// existing scale+fade entrance animation (which crisp already had). Flat
|
|
12
|
+
// single surface now: `.crisp-dialog-content` is a bare, invisible sizing
|
|
13
|
+
// wrapper (no background/radius/shadow of its own); `.crisp-dialog-card` is
|
|
14
|
+
// the one real surface, radius bumped from `xl` (12px) to `3xl` (20px,
|
|
15
|
+
// seed's own shared floating-surface radius, `$radius.r5`), no shadow.
|
|
16
|
+
// `bgScrim` itself also moved toward seed's own darker backdrop value
|
|
17
|
+
// (`tokens/palette.ts`). The alert variant no longer needs its own override
|
|
18
|
+
// of either rule -- both variants now render the identical flat surface.
|
|
11
19
|
//
|
|
12
20
|
// #414: the footer's submit-key caps (⌘/Enter) used to be one span drawing a
|
|
13
21
|
// visible pill (18px, 22%-white background). Attio's own are two separate
|
|
@@ -21,10 +29,8 @@ const config = (0, core_1.defineRecipe)({
|
|
|
21
29
|
& .crisp-dialog-backdrop { position: fixed; inset: 0; z-index: 60; background: ${tokens_1.contract.bgScrim}; }
|
|
22
30
|
& .crisp-dialog-positioner { position: fixed; inset: 0; z-index: 61; display: flex; align-items: flex-start; justify-content: center; padding: 15vh ${tokens_1.contract.space["4"]} ${tokens_1.contract.space["4"]}; }
|
|
23
31
|
& .crisp-dialog-positioner[data-variant="alert"] { align-items: center; padding: ${tokens_1.contract.space["4"]}; }
|
|
24
|
-
& .crisp-dialog-content { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: 90vw; max-height: 74vh;
|
|
25
|
-
& .crisp-dialog-
|
|
26
|
-
& .crisp-dialog-card { display: flex; flex-direction: column; flex: 1; min-height: 0; box-sizing: border-box; border-radius: ${tokens_1.contract.radius.xl}; background: ${tokens_1.contract.bgSurface}; box-shadow: 0 0 0 1px color-mix(in srgb, ${tokens_1.contract.fgPrimary} 8%, transparent); overflow: hidden; }
|
|
27
|
-
& .crisp-dialog-content[data-variant="alert"] .crisp-dialog-card { border-radius: ${tokens_1.contract.radius.xl}; background: ${tokens_1.contract.bgPopover}; box-shadow: ${tokens_1.elevation.floating}; }
|
|
32
|
+
& .crisp-dialog-content { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: 90vw; max-height: 74vh; opacity: 1; transform: scale(1); transition: opacity 0.2s ease, transform 0.2s ease; @starting-style { opacity: 0; transform: scale(0.97); } }
|
|
33
|
+
& .crisp-dialog-card { display: flex; flex-direction: column; flex: 1; min-height: 0; box-sizing: border-box; border-radius: ${tokens_1.contract.radius["3xl"]}; background: ${tokens_1.contract.bgSurface}; overflow: hidden; }
|
|
28
34
|
& .crisp-dialog-header { display: flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; flex-shrink: 0; height: 52px; padding: 0 ${tokens_1.contract.space["2"]} 0 ${tokens_1.contract.space["4"]}; border-bottom: 1px solid ${tokens_1.contract.borderSubtle}; }
|
|
29
35
|
& .crisp-dialog-header svg { flex-shrink: 0; color: ${tokens_1.contract.fgMuted}; }
|
|
30
36
|
& .crisp-dialog-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; color: ${tokens_1.contract.fgPrimary}; margin: 0; }
|
|
@@ -46,7 +52,12 @@ const config = (0, core_1.defineRecipe)({
|
|
|
46
52
|
& .crisp-dialog-field { display: flex; flex-direction: column; gap: ${tokens_1.contract.space["1.5"]}; }
|
|
47
53
|
& .crisp-dialog-field-label { font-size: ${tokens_1.contract.text.sm}; font-weight: ${tokens_1.contract.weight.medium}; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 50%, transparent); }
|
|
48
54
|
& .crisp-dialog-more { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; margin-inline-end: auto; border: none; background: none; padding: 0; font-family: inherit; font-size: ${tokens_1.contract.text.md}; color: ${tokens_1.contract.fgMuted}; cursor: pointer; }
|
|
49
|
-
|
|
55
|
+
/* your-moon/crisp#953: bgBrandContrast, not bgBrandSolid --
|
|
56
|
+
the accent (#0298d9) only clears 3.23:1 with white; the darker
|
|
57
|
+
sibling clears 4.5:1+, same fix already applied to Button/Badge/
|
|
58
|
+
Avatar (#897). Scoped to this one fill only -- Dialog's own frosted-
|
|
59
|
+
surface identity (#934) is untouched here. */
|
|
60
|
+
& .crisp-dialog-submit { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["2"]}; height: 28px; padding: 0 ${tokens_1.contract.space["1"]} 0 ${tokens_1.contract.space["2.5"]}; border: none; border-radius: ${tokens_1.contract.radius.md}; background: ${tokens_1.contract.bgBrandContrast}; color: ${tokens_1.contract.fgOnBrand}; font-family: inherit; font-size: ${tokens_1.contract.text.md}; font-weight: ${tokens_1.contract.weight.medium}; cursor: pointer; }
|
|
50
61
|
& .crisp-dialog-submit-key { display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1"]}; }
|
|
51
62
|
& .crisp-dialog-submit-key kbd { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0 3px; border-radius: 4px; background: transparent; color: ${tokens_1.contract.fgOnBrand}; font-family: inherit; font-style: normal; font-size: 10px; }`,
|
|
52
63
|
variants: {},
|
|
@@ -31,9 +31,14 @@ const config = (0, core_1.defineRecipe)({
|
|
|
31
31
|
// A full-view empty state (measured from a filtered-to-zero records table):
|
|
32
32
|
// a 45px ringed circle icon, a 20/24 semibold heading, a 14/20 medium muted body,
|
|
33
33
|
// then a primary action. Gaps are 16 / 8 / 16 (icon→title→desc→action).
|
|
34
|
+
// *Correction (crisp#933):* the original pass above didn't check letter-spacing.
|
|
35
|
+
// `records` below is the exact same title component (confirmed live at
|
|
36
|
+
// /techpartners/users and /techpartners/workspaces, both "No X records" at
|
|
37
|
+
// 20px/600/24px) and measures `-0.4px` -- exactly `c.tracking["20"]` (#909),
|
|
38
|
+
// not a coincidence, just a value nobody read off this element until now.
|
|
34
39
|
page: `gap: ${tokens_1.contract.space["2"]};
|
|
35
40
|
& .crisp-emptystate-icon { width: 45px; height: 45px; margin-bottom: ${tokens_1.contract.space["2"]}; border-radius: ${tokens_1.contract.radius.full}; border: 1px solid ${tokens_1.contract.borderSubtle}; background: none; color: ${tokens_1.contract.fgMuted}; }
|
|
36
|
-
& .crisp-emptystate-title { font-size: 20px; line-height: 24px; }
|
|
41
|
+
& .crisp-emptystate-title { font-size: 20px; line-height: 24px; letter-spacing: ${tokens_1.contract.tracking["20"]}; }
|
|
37
42
|
& .crisp-emptystate-desc { max-width: 266px; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; line-height: 20px; }
|
|
38
43
|
& .crisp-emptystate-action { margin-top: ${tokens_1.contract.space["2"]}; }`,
|
|
39
44
|
// #603: Attio's zero-*records* table state (Users/Workspaces with
|
|
@@ -48,7 +53,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
48
53
|
// by the consumer via the existing `icon` prop, same as every
|
|
49
54
|
// other variant.
|
|
50
55
|
records: `& .crisp-emptystate-icon { width: 138px; height: 138px; margin-bottom: ${tokens_1.contract.space["2"]}; border-radius: 0; color: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 22%, transparent); background: radial-gradient(circle, color-mix(in srgb, ${tokens_1.contract.fgPrimary} 12%, transparent) 1.2px, transparent 1.2px) 0 0 / 16px 16px; }
|
|
51
|
-
& .crisp-emptystate-title { font-size: 20px; line-height: 24px; }
|
|
56
|
+
& .crisp-emptystate-title { font-size: 20px; line-height: 24px; letter-spacing: ${tokens_1.contract.tracking["20"]}; }
|
|
52
57
|
& .crisp-emptystate-desc { max-width: 266px; font-size: ${tokens_1.contract.text.lg}; font-weight: ${tokens_1.contract.weight.medium}; line-height: 20px; }`,
|
|
53
58
|
},
|
|
54
59
|
},
|
|
@@ -35,6 +35,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.fileUploadLabels = void 0;
|
|
38
|
+
exports.FileUploadItem = FileUploadItem;
|
|
39
|
+
exports.formatSize = formatSize;
|
|
38
40
|
exports.FileUpload = FileUpload;
|
|
39
41
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
42
|
const react_file_upload_1 = require("@seed-design/react-file-upload");
|
|
@@ -54,6 +56,21 @@ exports.fileUploadLabels = {
|
|
|
54
56
|
INVALID_TYPE: "That file type is not accepted.",
|
|
55
57
|
},
|
|
56
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* One row of `FileUpload`'s own accepted-file list (crisp#965) — icon-free
|
|
61
|
+
* name + trailing size + remove, `min-height: size.tableRow` on `bgRaised`
|
|
62
|
+
* (measured from a data-grid row, see `fileupload.recipe.ts`). Exported on
|
|
63
|
+
* its own because `FileUpload` internally only lists `File` objects from the
|
|
64
|
+
* current browser session; a caller with already-persisted attachments
|
|
65
|
+
* (fetched from a server, never a real `File`) has no `acceptedFileEntries`
|
|
66
|
+
* to hand it and needs the identical row for its own list instead of
|
|
67
|
+
* hand-rolling one.
|
|
68
|
+
*/
|
|
69
|
+
function FileUploadItem({ name, size, status, progress, onRemove, removeLabel, className, }) {
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)("li", { className: className
|
|
71
|
+
? `crisp-fileupload-item ${className}`
|
|
72
|
+
: "crisp-fileupload-item", "data-status": status, children: [(0, jsx_runtime_1.jsx)("span", { className: "crisp-fileupload-item-name", children: name }), status === "uploading" && progress != null && ((0, jsx_runtime_1.jsx)("span", { className: "crisp-fileupload-progress", role: "progressbar", "aria-valuenow": Math.round(progress), "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": name, children: (0, jsx_runtime_1.jsx)("span", { className: "crisp-fileupload-progress-fill", style: { width: `${progress}%` } }) })), size != null && ((0, jsx_runtime_1.jsx)("span", { className: "crisp-fileupload-item-size", children: formatSize(size) })), onRemove && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "crisp-fileupload-remove", "aria-label": removeLabel, onClick: onRemove, children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 13, strokeWidth: 2 }) }))] }));
|
|
73
|
+
}
|
|
57
74
|
/** 1000-based, matching how every file manager reports size. */
|
|
58
75
|
function formatSize(bytes) {
|
|
59
76
|
if (bytes < 1000)
|
|
@@ -140,8 +157,8 @@ function FileUpload({ className, labels, "aria-label": ariaLabel, id, accept, di
|
|
|
140
157
|
// focus should land next.
|
|
141
158
|
const rootRef = React.useRef(null);
|
|
142
159
|
const focusAfterRemoval = (0, core_1.useFocusAfterRemoval)(rootRef, ".crisp-fileupload-remove", dropzoneRef);
|
|
143
|
-
return ((0, jsx_runtime_1.jsxs)("div", { ref: rootRef, ...rest, className: (0, fileupload_recipe_1.fileuploadRecipe)({ className }), children: [(0, jsx_runtime_1.jsxs)("button", { ...dropzoneProps, ref: dropzoneRef, type: "button", className: "crisp-fileupload-zone", tabIndex: disabled ? -1 : 0, "aria-label": ariaLabel ?? t.hint, disabled: disabled, "data-dragging": dragging ? "" : undefined, "data-disabled": disabled ? "" : undefined, "data-invalid": invalid ? "" : undefined, onClick: () => openFilePicker(), children: [(0, jsx_runtime_1.jsx)("span", { className: "crisp-fileupload-title", children: t.title }), (0, jsx_runtime_1.jsx)("span", { className: "crisp-fileupload-hint", children: t.hint })] }), (0, jsx_runtime_1.jsx)("input", { ...hiddenInputProps, id: id ?? hiddenInputProps.id, ref: inputRef, className: "crisp-fileupload-input" }), acceptedFileEntries.length > 0 && ((0, jsx_runtime_1.jsx)("ul", { className: "crisp-fileupload-list", children: acceptedFileEntries.map((entry, i) => ((0, jsx_runtime_1.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
160
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: rootRef, ...rest, className: (0, fileupload_recipe_1.fileuploadRecipe)({ className }), children: [(0, jsx_runtime_1.jsxs)("button", { ...dropzoneProps, ref: dropzoneRef, type: "button", className: "crisp-fileupload-zone", tabIndex: disabled ? -1 : 0, "aria-label": ariaLabel ?? t.hint, disabled: disabled, "data-dragging": dragging ? "" : undefined, "data-disabled": disabled ? "" : undefined, "data-invalid": invalid ? "" : undefined, onClick: () => openFilePicker(), children: [(0, jsx_runtime_1.jsx)("span", { className: "crisp-fileupload-title", children: t.title }), (0, jsx_runtime_1.jsx)("span", { className: "crisp-fileupload-hint", children: t.hint })] }), (0, jsx_runtime_1.jsx)("input", { ...hiddenInputProps, id: id ?? hiddenInputProps.id, ref: inputRef, className: "crisp-fileupload-input" }), acceptedFileEntries.length > 0 && ((0, jsx_runtime_1.jsx)("ul", { className: "crisp-fileupload-list", children: acceptedFileEntries.map((entry, i) => ((0, jsx_runtime_1.jsx)(FileUploadItem, { name: entry.file.name, size: entry.file.size, status: entry.status, progress: entry.status === "uploading" ? entry.progress : undefined, removeLabel: `${t.remove}: ${entry.file.name}`, onRemove: () => {
|
|
161
|
+
focusAfterRemoval(i);
|
|
162
|
+
removeFileEntry(entry.id);
|
|
163
|
+
} }, entry.id))) })), (0, jsx_runtime_1.jsx)("ul", { className: "crisp-fileupload-errors", "aria-live": "polite", children: rejections.map((r) => ((0, jsx_runtime_1.jsx)("li", { className: "crisp-fileupload-error", children: `${r.file.name}: ${r.errors.map((e) => t.errors[e] ?? e).join(" ")}` }, r.file.name))) })] }));
|
|
147
164
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.inputRecipe = exports.Input = void 0;
|
|
3
|
+
exports.inputRecipe = exports.InputShell = exports.Input = void 0;
|
|
4
4
|
var input_1 = require("./input");
|
|
5
5
|
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return input_1.Input; } });
|
|
6
|
+
Object.defineProperty(exports, "InputShell", { enumerable: true, get: function () { return input_1.InputShell; } });
|
|
6
7
|
var input_recipe_1 = require("./input.recipe");
|
|
7
8
|
Object.defineProperty(exports, "inputRecipe", { enumerable: true, get: function () { return input_recipe_1.inputRecipe; } });
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Input = void 0;
|
|
36
|
+
exports.InputShell = exports.Input = void 0;
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const input_recipe_1 = require("./input.recipe");
|
|
@@ -45,3 +45,33 @@ exports.Input = React.forwardRef(({ size, invalid, className, style, suffix, ...
|
|
|
45
45
|
return ((0, jsx_runtime_1.jsxs)("span", { className: (0, input_recipe_1.inputRecipe)({ size, invalid, className }), style: style, "data-readonly": props.readOnly ? "" : undefined, children: [(0, jsx_runtime_1.jsx)("input", { ref: ref, className: "crisp-input-value", "aria-invalid": invalid === true || undefined, ...props }), suffix != null && (0, jsx_runtime_1.jsx)("span", { className: "crisp-input-suffix", children: suffix })] }));
|
|
46
46
|
});
|
|
47
47
|
exports.Input.displayName = "Input";
|
|
48
|
+
/**
|
|
49
|
+
* crisp#917: the same field chrome `Input` draws (border, focus ring,
|
|
50
|
+
* radius, size, invalid/read-only states) around arbitrary children instead
|
|
51
|
+
* of a hardcoded `<input>` — for a third-party editor (CodeMirror, a
|
|
52
|
+
* rich-text widget, a masked-input library) that needs to mount into a
|
|
53
|
+
* plain element rather than a native `<input>`.
|
|
54
|
+
*
|
|
55
|
+
* Deliberately NOT `asChild` (crisp's usual `Primitive`/`Slot` pattern, used
|
|
56
|
+
* by `Button`/`Chip`/`Avatar`/etc. elsewhere): those merge the shell's own
|
|
57
|
+
* props onto ONE child, replacing it outright — correct when the shell
|
|
58
|
+
* and the interactive surface are the same element. `Input`'s real shape is
|
|
59
|
+
* TWO parts, an outer shell hosting the `::after` focus ring plus an inner
|
|
60
|
+
* value that carries the actual text/interaction; a rich editor mounts its
|
|
61
|
+
* own DOM subtree inside a container div, which is exactly what `children`
|
|
62
|
+
* gives it, not what replacing a single node would.
|
|
63
|
+
*
|
|
64
|
+
* Only draws the OUTER shell (`inputRecipe`'s own class — border, ring,
|
|
65
|
+
* radius, size-driven height, background, `data-readonly` tint) around
|
|
66
|
+
* `children` unchanged, the same granularity GRC's own pre-existing
|
|
67
|
+
* workaround (internal/grc#159, reaching into `.crisp-input`/
|
|
68
|
+
* `.crisp-input--size_medium` by hand) already used — NOT `.crisp-input-
|
|
69
|
+
* value`'s own text-field resets (`border: none`, `padding-inline`, `font:
|
|
70
|
+
* inherit`, …), which assume a real `<input>` and would fight a rich
|
|
71
|
+
* editor's own internal layout. A child that wants to fill the shell the
|
|
72
|
+
* way `Input`'s own `<input>` does should set its own sizing (e.g. `flex: 1
|
|
73
|
+
* 1 auto; min-width: 0; width: 100%; height: 100%`), same as any block
|
|
74
|
+
* content dropped into an `inline-flex` container.
|
|
75
|
+
*/
|
|
76
|
+
exports.InputShell = React.forwardRef(({ size, invalid, className, style, suffix, readOnly, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)("div", { ref: ref, className: (0, input_recipe_1.inputRecipe)({ size, invalid, className }), style: style, "data-readonly": readOnly ? "" : undefined, ...props, children: [children, suffix != null && (0, jsx_runtime_1.jsx)("span", { className: "crisp-input-suffix", children: suffix })] })));
|
|
77
|
+
exports.InputShell.displayName = "InputShell";
|
|
@@ -4,11 +4,13 @@ exports.inputRecipe = void 0;
|
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
6
|
// Geometry is measured: 32/36px tall, r8/r10, 10/12px side padding.
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
// `field`'s button-chrome glow/drop-shadow layers
|
|
10
|
-
//
|
|
11
|
-
//
|
|
7
|
+
// your-moon/crisp#910: the rest-state edge used to be `elevation.textField`,
|
|
8
|
+
// a `box-shadow` ring (#466's fix for a real typed field's 1px ring, not
|
|
9
|
+
// `field`'s button-chrome glow/drop-shadow layers) -- now a real `border`,
|
|
10
|
+
// matching seed-design's own `text-input.yaml` (an actual border that
|
|
11
|
+
// THICKENS on focus/invalid, not a fixed-width ring that only recolors).
|
|
12
|
+
// `borderDefault` (#dcdee3) is seed's own `stroke.neutral-weak`, already the
|
|
13
|
+
// crisp token's exact value.
|
|
12
14
|
// The FOCUS TREATMENT is seed-design's, measured from @seed-design/css: a 2px
|
|
13
15
|
// ring on an ::after overlay that is present-but-transparent at rest, so
|
|
14
16
|
// focusing cannot shift layout the way a width change would, and animates
|
|
@@ -23,7 +25,7 @@ const config = (0, core_1.defineRecipe)({
|
|
|
23
25
|
name: "input",
|
|
24
26
|
base: `
|
|
25
27
|
position: relative; box-sizing: border-box; display: inline-flex; align-items: center;
|
|
26
|
-
width: 100%; background: ${tokens_1.contract.bgSurface};
|
|
28
|
+
width: 100%; background: ${tokens_1.contract.bgSurface}; border: 1px solid ${tokens_1.contract.borderDefault};
|
|
27
29
|
font-family: ${tokens_1.contract.font.sans}; font-size: ${tokens_1.contract.text.lg}; line-height: 20px;
|
|
28
30
|
|
|
29
31
|
&::after {
|
|
@@ -46,8 +48,10 @@ const config = (0, core_1.defineRecipe)({
|
|
|
46
48
|
primary-email field -- a tinted field, not just muted text, driven off
|
|
47
49
|
the native \`readOnly\` attribute. \`ringField\` (rgba(0,0,0,.06)) is an
|
|
48
50
|
exact match for the measured ring; the 2%-fgPrimary tint reuses the
|
|
49
|
-
same color-mix idiom every other soft crisp surface already uses.
|
|
50
|
-
|
|
51
|
+
same color-mix idiom every other soft crisp surface already uses.
|
|
52
|
+
\`border-color: transparent\` neutralises #910's new real rest border
|
|
53
|
+
so this measured ring isn't drawn twice. */
|
|
54
|
+
&[data-readonly] { background: color-mix(in srgb, ${tokens_1.contract.fgPrimary} 2%, transparent); border-color: transparent; box-shadow: inset 0 0 0 1px ${tokens_1.contract.ringField}; }
|
|
51
55
|
& .crisp-input-suffix { flex-shrink: 0; margin-inline-start: ${tokens_1.contract.space["1"]}; }
|
|
52
56
|
`,
|
|
53
57
|
variants: {
|
|
@@ -59,7 +63,10 @@ const config = (0, core_1.defineRecipe)({
|
|
|
59
63
|
// padding `medium` already uses, just 4px shorter.
|
|
60
64
|
sm: `height: ${tokens_1.contract.size.row}; border-radius: ${tokens_1.contract.radius.md}; & .crisp-input-value { padding-inline: ${tokens_1.contract.space["2.5"]}; }`,
|
|
61
65
|
medium: `height: 32px; border-radius: ${tokens_1.contract.radius.md}; & .crisp-input-value { padding-inline: ${tokens_1.contract.space["2.5"]}; }`,
|
|
62
|
-
|
|
66
|
+
// your-moon/crisp#910: was a stray literal \`10px\` -- seed's own
|
|
67
|
+
// large-size field radius is \`$radius.r3\` = 12px (\`text-input.yaml\`),
|
|
68
|
+
// matching Button's own \`lg\` fix in the same PR.
|
|
69
|
+
large: `height: 36px; border-radius: ${tokens_1.contract.radius.xl}; & .crisp-input-value { padding-inline: ${tokens_1.contract.space["3"]}; }`,
|
|
63
70
|
},
|
|
64
71
|
invalid: {
|
|
65
72
|
// critical outranks focus: a field that is wrong stays visibly wrong
|
|
@@ -144,12 +144,28 @@ function Menu({ trigger, children, align = "start", open: openProp, defaultOpen,
|
|
|
144
144
|
document.addEventListener("keydown", onKey);
|
|
145
145
|
return () => document.removeEventListener("keydown", onKey);
|
|
146
146
|
}, [open, close]);
|
|
147
|
-
const { onKeyDown: onContentKeyDown } = (0, menu_keyboard_1.useMenuKeyboard)({
|
|
147
|
+
const { onKeyDown: onContentKeyDown, items } = (0, menu_keyboard_1.useMenuKeyboard)({
|
|
148
148
|
open,
|
|
149
149
|
close,
|
|
150
150
|
dismiss: () => setOpen(false),
|
|
151
151
|
contentRef,
|
|
152
152
|
});
|
|
153
|
+
// Roving tabindex (crisp#964): every item hardcodes tabIndex={-1} for the
|
|
154
|
+
// arrow-key model above, which means none of them is ever a real Tab stop
|
|
155
|
+
// on its own -- kept in sync with wherever focus actually lands, same as
|
|
156
|
+
// MenuSheet's identical fix (#966).
|
|
157
|
+
const onContentFocus = React.useCallback((e) => {
|
|
158
|
+
for (const el of items())
|
|
159
|
+
el.tabIndex = -1;
|
|
160
|
+
e.target.tabIndex = 0;
|
|
161
|
+
}, [items]);
|
|
162
|
+
React.useEffect(() => {
|
|
163
|
+
if (!open)
|
|
164
|
+
return;
|
|
165
|
+
const [first] = items();
|
|
166
|
+
if (first)
|
|
167
|
+
first.tabIndex = 0;
|
|
168
|
+
}, [open, items]);
|
|
153
169
|
const triggerEl = React.cloneElement(trigger, {
|
|
154
170
|
ref: triggerRef,
|
|
155
171
|
id: triggerId,
|
|
@@ -165,7 +181,7 @@ function Menu({ trigger, children, align = "start", open: openProp, defaultOpen,
|
|
|
165
181
|
});
|
|
166
182
|
return ((0, jsx_runtime_1.jsxs)("div", { ref: rootRef, className: (0, menu_recipe_1.menuRecipe)({ className }), children: [triggerEl, open && ((0, jsx_runtime_1.jsx)(core_1.FloatingPortal, { sourceRef: rootRef, children: (0, jsx_runtime_1.jsx)("div", { ref: contentRef, className: contentClassName
|
|
167
183
|
? `crisp-menu-content ${contentClassName}`
|
|
168
|
-
: "crisp-menu-content", role: "menu", id: surfaceId, "aria-label": ariaLabel, "aria-labelledby": ariaLabel ? undefined : triggerId, "data-align": align, "data-up": up ? "" : undefined, style: pos, onKeyDown: onContentKeyDown, children: (0, jsx_runtime_1.jsx)(MenuContext.Provider, { value: { close }, children: children }) }) }))] }));
|
|
184
|
+
: "crisp-menu-content", role: "menu", id: surfaceId, "aria-label": ariaLabel, "aria-labelledby": ariaLabel ? undefined : triggerId, "data-align": align, "data-up": up ? "" : undefined, style: pos, onKeyDown: onContentKeyDown, onFocus: onContentFocus, children: (0, jsx_runtime_1.jsx)(MenuContext.Provider, { value: { close }, children: children }) }) }))] }));
|
|
169
185
|
}
|
|
170
186
|
Menu.displayName = "Menu";
|
|
171
187
|
function MenuItem({ children, icon, shortcut, count, danger, disabled, onSelect, closeOnSelect = true, }) {
|
|
@@ -4,11 +4,25 @@ exports.menuRecipe = void 0;
|
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
5
|
const tokens_1 = require("../../tokens");
|
|
6
6
|
// A dropdown menu — same popover surface used for ⋯ / sort / filter
|
|
7
|
-
// menus (measured from listboxes):
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
7
|
+
// menus (measured from listboxes): 4px padding, over 32px items (radius 8,
|
|
8
|
+
// icon + label + optional shortcut / check). The content portals to
|
|
9
|
+
// document.body (#339) so no ancestor's transform/backdrop-filter can
|
|
10
|
+
// capture its position: fixed box; z-index 70 keeps it above Dialog/
|
|
11
|
+
// Drawer's 60/61.
|
|
12
|
+
//
|
|
13
|
+
// your-moon/crisp#934: radius and shadow are seed-design's,
|
|
14
|
+
// not Attio's -- Menu is the ONE component the seed raw dump confirms
|
|
15
|
+
// actually uses a shadow token at all (every other floating surface in
|
|
16
|
+
// seed's own spec has none). Radius moved from `radius.xl` (12px, this
|
|
17
|
+
// component's own private value) to `radius["3xl"]` (20px) -- seed treats
|
|
18
|
+
// "floating surface radius" as one shared value across Dialog/Menu/Select,
|
|
19
|
+
// not a per-component one; `radius["3xl"]` is already that shared token
|
|
20
|
+
// (Select's listbox, crisp/#867; Dialog, this same PR). Shadow moved from
|
|
21
|
+
// `elevation.floating` (crisp's own 4-layer blue-tinted glow, still used by
|
|
22
|
+
// Popover/ContextMenu/Toast/etc -- NOT touched here, out of scope) to
|
|
23
|
+
// `elevation.selectFloating` -- already seed's exact flat `$shadow.s3`
|
|
24
|
+
// value, already in this file (Select's own listbox, #867), reused rather
|
|
25
|
+
// than duplicated.
|
|
12
26
|
//
|
|
13
27
|
// The menu's floating content and everything inside it live in `globalCss`
|
|
14
28
|
// below, not nested under `&` (#357): nesting compiles to a real descendant
|
|
@@ -35,8 +49,8 @@ const config = (0, core_1.defineRecipe)({
|
|
|
35
49
|
font-family: ${tokens_1.contract.font.sans}; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
36
50
|
position: fixed; z-index: 70; pointer-events: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: ${tokens_1.contract.space.px};
|
|
37
51
|
min-width: 200px; max-height: 360px; overflow-y: auto; padding: ${tokens_1.contract.space["1"]};
|
|
38
|
-
border-radius: ${tokens_1.contract.radius
|
|
39
|
-
box-shadow: ${tokens_1.elevation.
|
|
52
|
+
border-radius: ${tokens_1.contract.radius["3xl"]}; background: ${tokens_1.contract.bgPopover};
|
|
53
|
+
box-shadow: ${tokens_1.elevation.selectFloating};
|
|
40
54
|
transform-origin: top left; opacity: 1; transform: none; transition: opacity .08s ease, transform .08s ease;
|
|
41
55
|
}
|
|
42
56
|
.crisp-menu-content[data-align="end"] { transform-origin: top right; }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.menusheetRecipe = exports.MenuSheetItem = exports.MenuSheetGroup = exports.MenuSheet = void 0;
|
|
4
|
+
var menusheet_1 = require("./menusheet");
|
|
5
|
+
Object.defineProperty(exports, "MenuSheet", { enumerable: true, get: function () { return menusheet_1.MenuSheet; } });
|
|
6
|
+
Object.defineProperty(exports, "MenuSheetGroup", { enumerable: true, get: function () { return menusheet_1.MenuSheetGroup; } });
|
|
7
|
+
Object.defineProperty(exports, "MenuSheetItem", { enumerable: true, get: function () { return menusheet_1.MenuSheetItem; } });
|
|
8
|
+
var menusheet_recipe_1 = require("./menusheet.recipe");
|
|
9
|
+
Object.defineProperty(exports, "menusheetRecipe", { enumerable: true, get: function () { return menusheet_recipe_1.menusheetRecipe; } });
|