pixelize-design-library 2.4.1-beta.3 → 2.4.1-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/LimitReachedModal/LimitReachedModal.d.ts +5 -0
- package/dist/Components/LimitReachedModal/LimitReachedModal.d.ts.map +1 -0
- package/dist/Components/LimitReachedModal/LimitReachedModal.js +45 -0
- package/dist/Components/LimitReachedModal/LimitReachedModalProps.d.ts +16 -0
- package/dist/Components/LimitReachedModal/LimitReachedModalProps.d.ts.map +1 -0
- package/dist/Components/LimitReachedModal/LimitReachedModalProps.js +2 -0
- package/dist/Components/LimitReachedModal/limitReachedCopy.d.ts +7 -0
- package/dist/Components/LimitReachedModal/limitReachedCopy.d.ts.map +1 -0
- package/dist/Components/LimitReachedModal/limitReachedCopy.js +54 -0
- package/dist/Components/PlanBadge/PlanBadge.d.ts +12 -0
- package/dist/Components/PlanBadge/PlanBadge.d.ts.map +1 -0
- package/dist/Components/PlanBadge/PlanBadge.js +22 -0
- package/dist/Components/PlanBadge/PlanBadgeProps.d.ts +11 -0
- package/dist/Components/PlanBadge/PlanBadgeProps.d.ts.map +1 -0
- package/dist/Components/PlanBadge/PlanBadgeProps.js +2 -0
- package/dist/Components/PlanPill/PlanPill.d.ts.map +1 -1
- package/dist/Components/PlanPill/PlanPill.js +6 -5
- package/dist/Components/PlanPill/planPillGradient.d.ts +22 -0
- package/dist/Components/PlanPill/planPillGradient.d.ts.map +1 -0
- package/dist/Components/PlanPill/planPillGradient.js +20 -0
- package/dist/Utils/planBadge.d.ts +39 -0
- package/dist/Utils/planBadge.d.ts.map +1 -0
- package/dist/Utils/planBadge.js +108 -0
- package/dist/Utils/planExpiry.d.ts +16 -0
- package/dist/Utils/planExpiry.d.ts.map +1 -1
- package/dist/Utils/planExpiry.js +54 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -3
- package/package.json +2 -2
- package/dist/App.d.ts +0 -4
- package/dist/App.js +0 -95
- package/dist/Layout.d.ts +0 -3
- package/dist/Layout.js +0 -286
- package/dist/Pages/TInput.d.ts +0 -3
- package/dist/Pages/TInput.d.ts.map +0 -1
- package/dist/Pages/TInput.js +0 -20
- package/dist/Pages/accordion.d.ts +0 -3
- package/dist/Pages/accordion.d.ts.map +0 -1
- package/dist/Pages/accordion.js +0 -21
- package/dist/Pages/alertdialog.d.ts +0 -3
- package/dist/Pages/alertdialog.d.ts.map +0 -1
- package/dist/Pages/alertdialog.js +0 -53
- package/dist/Pages/button.d.ts +0 -3
- package/dist/Pages/button.d.ts.map +0 -1
- package/dist/Pages/button.js +0 -32
- package/dist/Pages/card.d.ts +0 -3
- package/dist/Pages/card.d.ts.map +0 -1
- package/dist/Pages/card.js +0 -102
- package/dist/Pages/chart.d.ts +0 -4
- package/dist/Pages/chart.d.ts.map +0 -1
- package/dist/Pages/chart.js +0 -25
- package/dist/Pages/checkbox.d.ts +0 -3
- package/dist/Pages/checkbox.d.ts.map +0 -1
- package/dist/Pages/checkbox.js +0 -11
- package/dist/Pages/contactForm.d.ts +0 -3
- package/dist/Pages/contactForm.d.ts.map +0 -1
- package/dist/Pages/contactForm.js +0 -15
- package/dist/Pages/customModulesTable.d.ts +0 -4
- package/dist/Pages/customModulesTable.d.ts.map +0 -1
- package/dist/Pages/customModulesTable.js +0 -25
- package/dist/Pages/datePick.d.ts +0 -3
- package/dist/Pages/datePick.d.ts.map +0 -1
- package/dist/Pages/datePick.js +0 -49
- package/dist/Pages/drawer.d.ts +0 -3
- package/dist/Pages/drawer.d.ts.map +0 -1
- package/dist/Pages/drawer.js +0 -53
- package/dist/Pages/dropdown.d.ts +0 -3
- package/dist/Pages/dropdown.d.ts.map +0 -1
- package/dist/Pages/dropdown.js +0 -21
- package/dist/Pages/editor.d.ts +0 -3
- package/dist/Pages/editor.d.ts.map +0 -1
- package/dist/Pages/editor.js +0 -13
- package/dist/Pages/feedback.d.ts +0 -2
- package/dist/Pages/feedback.d.ts.map +0 -1
- package/dist/Pages/feedback.js +0 -12
- package/dist/Pages/fileUpload.d.ts +0 -2
- package/dist/Pages/fileUpload.d.ts.map +0 -1
- package/dist/Pages/fileUpload.js +0 -36
- package/dist/Pages/input.d.ts +0 -3
- package/dist/Pages/input.d.ts.map +0 -1
- package/dist/Pages/input.js +0 -48
- package/dist/Pages/kanbanboard.d.ts +0 -3
- package/dist/Pages/kanbanboard.d.ts.map +0 -1
- package/dist/Pages/kanbanboard.js +0 -182
- package/dist/Pages/modal.d.ts +0 -3
- package/dist/Pages/modal.d.ts.map +0 -1
- package/dist/Pages/modal.js +0 -61
- package/dist/Pages/multiSelect.d.ts +0 -3
- package/dist/Pages/multiSelect.d.ts.map +0 -1
- package/dist/Pages/multiSelect.js +0 -22
- package/dist/Pages/noteArea.d.ts +0 -3
- package/dist/Pages/noteArea.d.ts.map +0 -1
- package/dist/Pages/noteArea.js +0 -26
- package/dist/Pages/notification.d.ts +0 -3
- package/dist/Pages/notification.d.ts.map +0 -1
- package/dist/Pages/notification.js +0 -37
- package/dist/Pages/numberInput.d.ts +0 -3
- package/dist/Pages/numberInput.d.ts.map +0 -1
- package/dist/Pages/numberInput.js +0 -16
- package/dist/Pages/orgSwitcher.d.ts +0 -4
- package/dist/Pages/orgSwitcher.d.ts.map +0 -1
- package/dist/Pages/orgSwitcher.js +0 -36
- package/dist/Pages/organizationDetails.d.ts +0 -4
- package/dist/Pages/organizationDetails.d.ts.map +0 -1
- package/dist/Pages/organizationDetails.js +0 -64
- package/dist/Pages/photoViewer.d.ts +0 -3
- package/dist/Pages/photoViewer.d.ts.map +0 -1
- package/dist/Pages/photoViewer.js +0 -12
- package/dist/Pages/pinInputs.d.ts +0 -3
- package/dist/Pages/pinInputs.d.ts.map +0 -1
- package/dist/Pages/pinInputs.js +0 -11
- package/dist/Pages/productCaard.d.ts +0 -3
- package/dist/Pages/productCaard.d.ts.map +0 -1
- package/dist/Pages/productCaard.js +0 -311
- package/dist/Pages/productDetailCard.d.ts +0 -3
- package/dist/Pages/productDetailCard.d.ts.map +0 -1
- package/dist/Pages/productDetailCard.js +0 -78
- package/dist/Pages/productFilter.d.ts +0 -3
- package/dist/Pages/productFilter.d.ts.map +0 -1
- package/dist/Pages/productFilter.js +0 -148
- package/dist/Pages/progressbar.d.ts +0 -3
- package/dist/Pages/progressbar.d.ts.map +0 -1
- package/dist/Pages/progressbar.js +0 -11
- package/dist/Pages/radioButton.d.ts +0 -3
- package/dist/Pages/radioButton.d.ts.map +0 -1
- package/dist/Pages/radioButton.js +0 -18
- package/dist/Pages/rolesPermission.d.ts +0 -4
- package/dist/Pages/rolesPermission.d.ts.map +0 -1
- package/dist/Pages/rolesPermission.js +0 -144
- package/dist/Pages/search.d.ts +0 -3
- package/dist/Pages/search.d.ts.map +0 -1
- package/dist/Pages/search.js +0 -21
- package/dist/Pages/searchSelect.d.ts +0 -3
- package/dist/Pages/searchSelect.d.ts.map +0 -1
- package/dist/Pages/searchSelect.js +0 -97
- package/dist/Pages/select.d.ts +0 -3
- package/dist/Pages/select.d.ts.map +0 -1
- package/dist/Pages/select.js +0 -20
- package/dist/Pages/selectSearch.d.ts +0 -3
- package/dist/Pages/selectSearch.d.ts.map +0 -1
- package/dist/Pages/selectSearch.js +0 -58
- package/dist/Pages/signInActivityTable.d.ts +0 -4
- package/dist/Pages/signInActivityTable.d.ts.map +0 -1
- package/dist/Pages/signInActivityTable.js +0 -17
- package/dist/Pages/skeleton.d.ts +0 -3
- package/dist/Pages/skeleton.d.ts.map +0 -1
- package/dist/Pages/skeleton.js +0 -12
- package/dist/Pages/stageProgress.d.ts +0 -4
- package/dist/Pages/stageProgress.d.ts.map +0 -1
- package/dist/Pages/stageProgress.js +0 -31
- package/dist/Pages/switch.d.ts +0 -3
- package/dist/Pages/switch.d.ts.map +0 -1
- package/dist/Pages/switch.js +0 -17
- package/dist/Pages/table.d.ts +0 -3
- package/dist/Pages/table.d.ts.map +0 -1
- package/dist/Pages/table.js +0 -182
- package/dist/Pages/tag.d.ts +0 -3
- package/dist/Pages/tag.d.ts.map +0 -1
- package/dist/Pages/tag.js +0 -27
- package/dist/Pages/textArea.d.ts +0 -3
- package/dist/Pages/textArea.d.ts.map +0 -1
- package/dist/Pages/textArea.js +0 -14
- package/dist/Pages/tier1.d.ts +0 -4
- package/dist/Pages/tier1.d.ts.map +0 -1
- package/dist/Pages/tier1.js +0 -86
- package/dist/Pages/timeline.d.ts +0 -3
- package/dist/Pages/timeline.d.ts.map +0 -1
- package/dist/Pages/timeline.js +0 -73
- package/dist/Pages/tooltip.d.ts +0 -3
- package/dist/Pages/tooltip.d.ts.map +0 -1
- package/dist/Pages/tooltip.js +0 -11
- package/dist/Pages/toster.d.ts +0 -3
- package/dist/Pages/toster.d.ts.map +0 -1
- package/dist/Pages/toster.js +0 -53
- package/dist/Pages/upgradeButton.d.ts +0 -4
- package/dist/Pages/upgradeButton.d.ts.map +0 -1
- package/dist/Pages/upgradeButton.js +0 -17
- package/dist/Pages/userDetails.d.ts +0 -4
- package/dist/Pages/userDetails.d.ts.map +0 -1
- package/dist/Pages/userDetails.js +0 -79
- package/dist/Pages/verifyEmail.d.ts +0 -3
- package/dist/Pages/verifyEmail.d.ts.map +0 -1
- package/dist/Pages/verifyEmail.js +0 -17
- package/dist/bootstrap.d.ts +0 -2
- package/dist/bootstrap.js +0 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LimitReachedModal.d.ts","sourceRoot":"","sources":["../../../src/Components/LimitReachedModal/LimitReachedModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAyB3C,OAAO,EAAa,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAW7E,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAwIvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("@chakra-ui/react");
|
|
8
|
+
const lucide_react_1 = require("lucide-react");
|
|
9
|
+
const Button_1 = __importDefault(require("../Button/Button"));
|
|
10
|
+
const UpgradeButton_1 = __importDefault(require("../UpgradeButton/UpgradeButton"));
|
|
11
|
+
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
12
|
+
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
13
|
+
const limitReachedCopy_1 = require("./limitReachedCopy");
|
|
14
|
+
const KIND_ICON = {
|
|
15
|
+
record: lucide_react_1.Crown,
|
|
16
|
+
automation: lucide_react_1.Crown,
|
|
17
|
+
custom_modules: lucide_react_1.Crown,
|
|
18
|
+
user: lucide_react_1.Users,
|
|
19
|
+
projects: lucide_react_1.Crown,
|
|
20
|
+
tickets: lucide_react_1.Crown,
|
|
21
|
+
};
|
|
22
|
+
const LimitReachedModal = ({ isOpen, onClose, kind, limit = null, used = null, canManageBilling, onUpgrade, title, message, features, }) => {
|
|
23
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
24
|
+
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
25
|
+
const copy = (0, limitReachedCopy_1.resolveLimitCopy)(kind, canManageBilling);
|
|
26
|
+
const usage = (0, limitReachedCopy_1.formatLimitUsage)(kind, used, limit);
|
|
27
|
+
const KindIcon = KIND_ICON[kind];
|
|
28
|
+
// Unlike every other color read in this file, these three were unguarded — a
|
|
29
|
+
// theme missing `primary`/`white`/`black` (a bare ChakraProvider, or a future
|
|
30
|
+
// palette shape change) threw here instead of falling back like the rest of
|
|
31
|
+
// the component does, so the header specifically went from possible-wrong-tint
|
|
32
|
+
// to fully unrendered.
|
|
33
|
+
const gradient = (_a = colors === null || colors === void 0 ? void 0 : colors.gradient) !== null && _a !== void 0 ? _a : {
|
|
34
|
+
from: (_c = (_b = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _b === void 0 ? void 0 : _b[500]) !== null && _c !== void 0 ? _c : "#1a202c",
|
|
35
|
+
to: (_e = (_d = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _d === void 0 ? void 0 : _d[700]) !== null && _e !== void 0 ? _e : "#000000",
|
|
36
|
+
};
|
|
37
|
+
// Header banner uses the brand gradient (not a fixed blue/purple) so it reads correctly
|
|
38
|
+
// across all 9 brand themes, with ink picked for AA against whichever stop is lighter.
|
|
39
|
+
const ink = (0, accentText_1.onGradient)(gradient.from, gradient.to, (_f = colors === null || colors === void 0 ? void 0 : colors.white) !== null && _f !== void 0 ? _f : "#ffffff", (_g = colors === null || colors === void 0 ? void 0 : colors.black) !== null && _g !== void 0 ? _g : "#000000");
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, size: "lg", motionPreset: "slideInBottom", children: [(0, jsx_runtime_1.jsx)(react_1.ModalOverlay, { backdropFilter: "blur(5px)" }), (0, jsx_runtime_1.jsxs)(react_1.ModalContent, { borderRadius: "xl", overflow: "hidden", boxShadow: "2xl", mx: 4, children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { bgGradient: `linear(to-r, ${gradient.from}, ${gradient.to})`, color: ink, children: [(0, jsx_runtime_1.jsx)(react_1.ModalHeader, { pb: 4, children: (0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", children: [(0, jsx_runtime_1.jsx)(react_1.Icon, { as: KindIcon, boxSize: "24px", mr: "12px" }), (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "xl", fontWeight: "bold", children: title !== null && title !== void 0 ? title : copy.title })] }) }), (0, jsx_runtime_1.jsx)(react_1.ModalCloseButton, { "aria-label": "Dismiss", color: ink, _hover: { opacity: 0.7 } })] }), (0, jsx_runtime_1.jsxs)(react_1.ModalBody, { py: 6, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { textAlign: "center", fontSize: "md", fontWeight: 600, color: (_j = (_h = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _h === void 0 ? void 0 : _h[700]) !== null && _j !== void 0 ? _j : (_k = colors === null || colors === void 0 ? void 0 : colors.text) === null || _k === void 0 ? void 0 : _k[700], children: message !== null && message !== void 0 ? message : copy.message }), usage && ((0, jsx_runtime_1.jsx)(react_1.Text, { textAlign: "center", fontSize: "sm", color: (_m = (_l = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _l === void 0 ? void 0 : _l[500]) !== null && _m !== void 0 ? _m : (_o = colors === null || colors === void 0 ? void 0 : colors.text) === null || _o === void 0 ? void 0 : _o[500], mt: 2, children: usage })), features && features.length > 0 && ((0, jsx_runtime_1.jsx)(react_1.List, { spacing: 2, mt: 5, children: features.map((feature) => {
|
|
41
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.ListItem, { display: "flex", alignItems: "center", fontSize: "sm", color: (_b = (_a = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _a === void 0 ? void 0 : _a[600]) !== null && _b !== void 0 ? _b : (_c = colors === null || colors === void 0 ? void 0 : colors.text) === null || _c === void 0 ? void 0 : _c[600], children: [(0, jsx_runtime_1.jsx)(react_1.ListIcon, { as: lucide_react_1.CheckCircle, color: (_f = (_e = (_d = colors === null || colors === void 0 ? void 0 : colors.semantic) === null || _d === void 0 ? void 0 : _d.success) === null || _e === void 0 ? void 0 : _e[500]) !== null && _f !== void 0 ? _f : (_g = colors === null || colors === void 0 ? void 0 : colors.green) === null || _g === void 0 ? void 0 : _g[500] }), feature] }, feature));
|
|
43
|
+
}) }))] }), (0, jsx_runtime_1.jsx)(react_1.Divider, {}), (0, jsx_runtime_1.jsx)(react_1.ModalFooter, { children: (0, jsx_runtime_1.jsxs)(react_1.HStack, { spacing: 3, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { label: canManageBilling ? "Maybe later" : "Close", variant: "outline", colorScheme: "gray", size: "md", onClick: onClose }), canManageBilling && ((0, jsx_runtime_1.jsx)(UpgradeButton_1.default, { label: "Upgrade plan", size: "md", onClick: () => onUpgrade === null || onUpgrade === void 0 ? void 0 : onUpgrade() }))] }) })] })] }));
|
|
44
|
+
};
|
|
45
|
+
exports.default = LimitReachedModal;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type LimitKind = "record" | "automation" | "custom_modules" | "user" | "projects" | "tickets";
|
|
2
|
+
export interface LimitReachedModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
kind: LimitKind;
|
|
6
|
+
/** Plan limit for `kind`. Pass with `used` to show an inline usage line. */
|
|
7
|
+
limit?: number | null;
|
|
8
|
+
used?: number | null;
|
|
9
|
+
/** false hides the upgrade CTA and swaps in "contact your administrator" copy. */
|
|
10
|
+
canManageBilling: boolean;
|
|
11
|
+
onUpgrade?: () => void;
|
|
12
|
+
title?: string;
|
|
13
|
+
message?: string;
|
|
14
|
+
features?: string[];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=LimitReachedModalProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LimitReachedModalProps.d.ts","sourceRoot":"","sources":["../../../src/Components/LimitReachedModal/LimitReachedModalProps.tsx"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,YAAY,GACZ,gBAAgB,GAChB,MAAM,GACN,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,kFAAkF;IAClF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LimitKind } from "./LimitReachedModalProps";
|
|
2
|
+
export declare function resolveLimitCopy(kind: LimitKind, canManageBilling: boolean): {
|
|
3
|
+
title: string;
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function formatLimitUsage(kind: LimitKind, used?: number | null, limit?: number | null): string | null;
|
|
7
|
+
//# sourceMappingURL=limitReachedCopy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limitReachedCopy.d.ts","sourceRoot":"","sources":["../../../src/Components/LimitReachedModal/limitReachedCopy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AA0DrD,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,EACf,gBAAgB,EAAE,OAAO,GACxB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAGpC;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,EACf,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,EACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GACpB,MAAM,GAAG,IAAI,CAGf"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveLimitCopy = resolveLimitCopy;
|
|
4
|
+
exports.formatLimitUsage = formatLimitUsage;
|
|
5
|
+
// Canonical strings ported from crm-frontend's orgPlanLimits.ts / orgRecordLimit.ts and
|
|
6
|
+
// account-frontend's useSeatLimitGate.ts, kept verbatim so the promoted modal reads exactly
|
|
7
|
+
// like the copies it replaces. `projects`/`tickets` are new — matched to the same voice.
|
|
8
|
+
const COPY = {
|
|
9
|
+
record: {
|
|
10
|
+
title: "Record limit reached",
|
|
11
|
+
unit: "records",
|
|
12
|
+
admin: "You have reached your plan record limit. Upgrade to add more records.",
|
|
13
|
+
member: "Your organization has reached its record limit. Contact your organization administrator to upgrade the plan.",
|
|
14
|
+
},
|
|
15
|
+
automation: {
|
|
16
|
+
title: "Automation limit reached",
|
|
17
|
+
unit: "automations",
|
|
18
|
+
admin: "You have reached your plan automation limit. Upgrade to create more workflows and cadences.",
|
|
19
|
+
member: "Your organization has reached its automation limit. Contact your organization administrator to upgrade the plan.",
|
|
20
|
+
},
|
|
21
|
+
custom_modules: {
|
|
22
|
+
title: "Custom module limit reached",
|
|
23
|
+
unit: "custom modules",
|
|
24
|
+
admin: "You have reached your plan custom module limit. Upgrade to add more custom modules.",
|
|
25
|
+
member: "Your organization has reached its custom module limit. Contact your organization administrator to upgrade the plan.",
|
|
26
|
+
},
|
|
27
|
+
user: {
|
|
28
|
+
title: "Seat limit reached",
|
|
29
|
+
unit: "users",
|
|
30
|
+
admin: "You have reached the number of users included on your plan. Upgrade to add more.",
|
|
31
|
+
member: "Your organization has reached its user limit. Contact your organization administrator to upgrade the plan.",
|
|
32
|
+
},
|
|
33
|
+
projects: {
|
|
34
|
+
title: "Project limit reached",
|
|
35
|
+
unit: "projects",
|
|
36
|
+
admin: "You have reached your plan project limit. Upgrade to create more projects.",
|
|
37
|
+
member: "Your organization has reached its project limit. Contact your organization administrator to upgrade the plan.",
|
|
38
|
+
},
|
|
39
|
+
tickets: {
|
|
40
|
+
title: "Ticket limit reached",
|
|
41
|
+
unit: "tickets",
|
|
42
|
+
admin: "You have reached your plan ticket limit. Upgrade to create more tickets.",
|
|
43
|
+
member: "Your organization has reached its ticket limit. Contact your organization administrator to upgrade the plan.",
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
function resolveLimitCopy(kind, canManageBilling) {
|
|
47
|
+
const c = COPY[kind];
|
|
48
|
+
return { title: c.title, message: canManageBilling ? c.admin : c.member };
|
|
49
|
+
}
|
|
50
|
+
function formatLimitUsage(kind, used, limit) {
|
|
51
|
+
if (used == null || limit == null)
|
|
52
|
+
return null;
|
|
53
|
+
return `${used} of ${limit} ${COPY[kind].unit} used`;
|
|
54
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { PlanBadgeProps } from "./PlanBadgeProps";
|
|
3
|
+
/**
|
|
4
|
+
* The top-bar plan badge: resolves an org's plan state into a `PlanPill`, or
|
|
5
|
+
* renders nothing when there is nothing to say (or nobody who can act on it).
|
|
6
|
+
*
|
|
7
|
+
* Use this when the app has the plan state to hand; drop to `PlanPill` directly
|
|
8
|
+
* for a badge whose copy is decided elsewhere.
|
|
9
|
+
*/
|
|
10
|
+
declare const PlanBadge: React.FC<PlanBadgeProps>;
|
|
11
|
+
export default PlanBadge;
|
|
12
|
+
//# sourceMappingURL=PlanBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlanBadge.d.ts","sourceRoot":"","sources":["../../../src/Components/PlanBadge/PlanBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;GAMG;AACH,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAsBvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const planBadge_1 = require("../../Utils/planBadge");
|
|
8
|
+
const PlanPill_1 = __importDefault(require("../PlanPill/PlanPill"));
|
|
9
|
+
/**
|
|
10
|
+
* The top-bar plan badge: resolves an org's plan state into a `PlanPill`, or
|
|
11
|
+
* renders nothing when there is nothing to say (or nobody who can act on it).
|
|
12
|
+
*
|
|
13
|
+
* Use this when the app has the plan state to hand; drop to `PlanPill` directly
|
|
14
|
+
* for a badge whose copy is decided elsewhere.
|
|
15
|
+
*/
|
|
16
|
+
const PlanBadge = ({ input, maxLabelWidth, ariaLabel, onClick, }) => {
|
|
17
|
+
const { visible, label, mobileLabel, subtitle, tone } = (0, planBadge_1.resolvePlanBadge)(input);
|
|
18
|
+
if (!visible)
|
|
19
|
+
return null;
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(PlanPill_1.default, { label: label, mobileLabel: mobileLabel, status: subtitle, tone: tone, maxLabelWidth: maxLabelWidth, ariaLabel: ariaLabel, onClick: onClick }));
|
|
21
|
+
};
|
|
22
|
+
exports.default = PlanBadge;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PlanBadgeInput } from "../../Utils/planBadge";
|
|
2
|
+
export interface PlanBadgeProps {
|
|
3
|
+
/** The org's plan state. Resolved into label, tone and chip text internally. */
|
|
4
|
+
input: PlanBadgeInput;
|
|
5
|
+
/** Truncate the label beyond this width. */
|
|
6
|
+
maxLabelWidth?: string;
|
|
7
|
+
/** Accessible label (falls back to `label — status`). */
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=PlanBadgeProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlanBadgeProps.d.ts","sourceRoot":"","sources":["../../../src/Components/PlanBadge/PlanBadgeProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B,gFAAgF;IAChF,KAAK,EAAE,cAAc,CAAC;IACtB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlanPill.d.ts","sourceRoot":"","sources":["../../../src/Components/PlanPill/PlanPill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PlanPill.d.ts","sourceRoot":"","sources":["../../../src/Components/PlanPill/PlanPill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,aAAa,EAAgB,MAAM,iBAAiB,CAAC;AAQ9D,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwGrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -5,19 +5,17 @@ const react_1 = require("@chakra-ui/react");
|
|
|
5
5
|
const lucide_react_1 = require("lucide-react");
|
|
6
6
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
7
7
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
8
|
+
const planPillGradient_1 = require("./planPillGradient");
|
|
8
9
|
const TONE_ICON = {
|
|
9
10
|
normal: lucide_react_1.Sparkles,
|
|
10
11
|
warning: lucide_react_1.Clock,
|
|
11
12
|
danger: lucide_react_1.AlertCircle,
|
|
12
13
|
};
|
|
13
14
|
const PlanPill = ({ label, mobileLabel, status, tone = "normal", icon, gradient, maxLabelWidth = "150px", ariaLabel, onClick, }) => {
|
|
14
|
-
var _a;
|
|
15
15
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
16
16
|
const c = theme.colors;
|
|
17
|
-
// Only reachable if a consumer hand-builds a palette without `gradient`; every shipped brand sets it.
|
|
18
|
-
const themeGradient = (_a = c.gradient) !== null && _a !== void 0 ? _a : { from: c.primary[500], to: c.primary[700] };
|
|
19
17
|
const toneGradient = {
|
|
20
|
-
normal:
|
|
18
|
+
normal: planPillGradient_1.ACCENT_GRADIENT,
|
|
21
19
|
warning: { from: c.semantic.warning[400], to: c.semantic.warning[600] },
|
|
22
20
|
danger: { from: c.semantic.error[400], to: c.semantic.error[600] },
|
|
23
21
|
};
|
|
@@ -31,7 +29,10 @@ const PlanPill = ({ label, mobileLabel, status, tone = "normal", icon, gradient,
|
|
|
31
29
|
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "button", type: "button", "aria-label": ariaLabel || (status ? `${label} — ${status}` : label), onClick: onClick, display: "inline-flex", alignItems: "center", gap: "7px", pl: "12px", pr: status ? "5px" : "12px", py: "3px", bgImage: `linear-gradient(135deg, ${resolved.from} 0%, ${resolved.to} 100%)`, color: ink, borderRadius: "999px", whiteSpace: "nowrap", cursor: "pointer", transition: "transform 0.2s ease, box-shadow 0.2s ease", _hover: {
|
|
32
30
|
transform: "translateY(-1px)",
|
|
33
31
|
boxShadow: `0 6px 18px ${resolved.from}59`,
|
|
34
|
-
}, _focusVisible: {
|
|
32
|
+
}, _focusVisible: {
|
|
33
|
+
outline: "none",
|
|
34
|
+
boxShadow: `0 0 0 3px ${resolved.from}55`,
|
|
35
|
+
}, sx: {
|
|
35
36
|
"@media (prefers-reduced-motion: reduce)": {
|
|
36
37
|
transition: "none",
|
|
37
38
|
_hover: { transform: "none" },
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type Gradient = {
|
|
2
|
+
from: string;
|
|
3
|
+
to: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* The plan badge's `normal` tone is a single fixed accent — not brand-driven, and
|
|
7
|
+
* not mode-dependent.
|
|
8
|
+
*
|
|
9
|
+
* Its tone carries meaning (normal / warning / danger), and a brand gradient can
|
|
10
|
+
* collide with that: rosewood's `#c74962 → #ea0727` is red, so a healthy plan
|
|
11
|
+
* rendered as if it had expired. Greyscale brands failed the other way, sinking
|
|
12
|
+
* the badge into the header chrome.
|
|
13
|
+
*
|
|
14
|
+
* One accent for both color modes is deliberate: a lighter dark-mode variant was
|
|
15
|
+
* tried and flipped `onGradient`'s ink to black, which read as a washed-out candy
|
|
16
|
+
* pill on dark chrome. These stops keep white ink in both modes, so the badge looks
|
|
17
|
+
* like the same component everywhere. Verified at AA (>= 4.5:1) on both stops.
|
|
18
|
+
*
|
|
19
|
+
* Consumers who genuinely want another colour still pass `gradient`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ACCENT_GRADIENT: Gradient;
|
|
22
|
+
//# sourceMappingURL=planPillGradient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planPillGradient.d.ts","sourceRoot":"","sources":["../../../src/Components/PlanPill/planPillGradient.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,EAAE,QAA6C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ACCENT_GRADIENT = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The plan badge's `normal` tone is a single fixed accent — not brand-driven, and
|
|
6
|
+
* not mode-dependent.
|
|
7
|
+
*
|
|
8
|
+
* Its tone carries meaning (normal / warning / danger), and a brand gradient can
|
|
9
|
+
* collide with that: rosewood's `#c74962 → #ea0727` is red, so a healthy plan
|
|
10
|
+
* rendered as if it had expired. Greyscale brands failed the other way, sinking
|
|
11
|
+
* the badge into the header chrome.
|
|
12
|
+
*
|
|
13
|
+
* One accent for both color modes is deliberate: a lighter dark-mode variant was
|
|
14
|
+
* tried and flipped `onGradient`'s ink to black, which read as a washed-out candy
|
|
15
|
+
* pill on dark chrome. These stops keep white ink in both modes, so the badge looks
|
|
16
|
+
* like the same component everywhere. Verified at AA (>= 4.5:1) on both stops.
|
|
17
|
+
*
|
|
18
|
+
* Consumers who genuinely want another colour still pass `gradient`.
|
|
19
|
+
*/
|
|
20
|
+
exports.ACCENT_GRADIENT = { from: "#8B3FC8", to: "#df187a" };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { PlanPillTone } from "../Components/PlanPill/PlanPillProps";
|
|
2
|
+
import { PlanExpiryInput } from "./planExpiry";
|
|
3
|
+
export type PlanBadgeInput = {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the org is on any plan at all. Defaults to true, so a caller that
|
|
6
|
+
* only knows the plan's name/code can omit it.
|
|
7
|
+
*/
|
|
8
|
+
hasPlan?: boolean;
|
|
9
|
+
planName?: string | null;
|
|
10
|
+
/** Plan code, e.g. `"free"`. Used to detect the free plan when `isFreePlan` is omitted. */
|
|
11
|
+
planCode?: string | null;
|
|
12
|
+
/** Legacy numeric plan id, where `1` is the free plan. */
|
|
13
|
+
planId?: number | null;
|
|
14
|
+
/** Explicit free-plan flag. Overrides detection from `planCode`/`planId`/`planName`. */
|
|
15
|
+
isFreePlan?: boolean;
|
|
16
|
+
isTrial?: boolean;
|
|
17
|
+
isExpired?: boolean;
|
|
18
|
+
expiryDate?: PlanExpiryInput;
|
|
19
|
+
/** The badge is hidden entirely for anyone who cannot act on it. */
|
|
20
|
+
canManageBilling?: boolean;
|
|
21
|
+
/** Injectable clock, for tests. */
|
|
22
|
+
now?: Date;
|
|
23
|
+
};
|
|
24
|
+
export type PlanBadgeResult = {
|
|
25
|
+
visible: boolean;
|
|
26
|
+
label: string;
|
|
27
|
+
mobileLabel: string;
|
|
28
|
+
subtitle: string;
|
|
29
|
+
tone: PlanPillTone;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Turns an org's plan state into the label, urgency tone and inset-chip text for
|
|
33
|
+
* a `PlanPill` — the "Upgrade your plan" badge in an app's top bar.
|
|
34
|
+
*
|
|
35
|
+
* Copy and thresholds are centralized here so every app shows the same badge for
|
|
36
|
+
* the same org.
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolvePlanBadge(input: PlanBadgeInput): PlanBadgeResult;
|
|
39
|
+
//# sourceMappingURL=planBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planBadge.d.ts","sourceRoot":"","sources":["../../src/Utils/planBadge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EACL,eAAe,EAGhB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,wFAAwF;IACxF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mCAAmC;IACnC,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AA0DF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,GAAG,eAAe,CAuDvE"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvePlanBadge = resolvePlanBadge;
|
|
4
|
+
const planExpiry_1 = require("./planExpiry");
|
|
5
|
+
const UPGRADE_LABEL = "Upgrade your plan";
|
|
6
|
+
const UPGRADE_MOBILE_LABEL = "Upgrade";
|
|
7
|
+
const EXPIRED_MOBILE_LABEL = "Expired";
|
|
8
|
+
const TRIAL_LABEL = "Trial";
|
|
9
|
+
const GENERIC_PLAN_NAME = "Plan";
|
|
10
|
+
const LEGACY_FREE_PLAN_ID = 1;
|
|
11
|
+
const TRIAL_DANGER_DAYS = 3;
|
|
12
|
+
const ACTIVE_WARNING_DAYS = 15;
|
|
13
|
+
const HIDDEN = {
|
|
14
|
+
visible: false,
|
|
15
|
+
label: "",
|
|
16
|
+
mobileLabel: "",
|
|
17
|
+
subtitle: "",
|
|
18
|
+
tone: "normal",
|
|
19
|
+
};
|
|
20
|
+
const upgrade = (subtitle, tone = "normal") => ({
|
|
21
|
+
visible: true,
|
|
22
|
+
label: UPGRADE_LABEL,
|
|
23
|
+
mobileLabel: UPGRADE_MOBILE_LABEL,
|
|
24
|
+
subtitle,
|
|
25
|
+
tone,
|
|
26
|
+
});
|
|
27
|
+
const normalize = (value) => String(value !== null && value !== void 0 ? value : "")
|
|
28
|
+
.trim()
|
|
29
|
+
.toLowerCase();
|
|
30
|
+
function isFreePlan(input, planName) {
|
|
31
|
+
if (input.isFreePlan !== undefined)
|
|
32
|
+
return input.isFreePlan;
|
|
33
|
+
if (normalize(input.planCode) === "free")
|
|
34
|
+
return true;
|
|
35
|
+
if (input.planId !== null && input.planId !== undefined) {
|
|
36
|
+
return Number(input.planId) === LEGACY_FREE_PLAN_ID;
|
|
37
|
+
}
|
|
38
|
+
return normalize(planName) === "free";
|
|
39
|
+
}
|
|
40
|
+
/** Whole days from today to the expiry day; null when there is no usable date. */
|
|
41
|
+
function daysUntil(expiryDate, now) {
|
|
42
|
+
if (expiryDate === null || expiryDate === undefined || expiryDate === "") {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
const expiry = expiryDate instanceof Date ? expiryDate : new Date(expiryDate);
|
|
46
|
+
if (isNaN(expiry.getTime()))
|
|
47
|
+
return null;
|
|
48
|
+
const startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
49
|
+
return Math.round((startOfDay(expiry).getTime() - startOfDay(now).getTime()) / 86400000);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Turns an org's plan state into the label, urgency tone and inset-chip text for
|
|
53
|
+
* a `PlanPill` — the "Upgrade your plan" badge in an app's top bar.
|
|
54
|
+
*
|
|
55
|
+
* Copy and thresholds are centralized here so every app shows the same badge for
|
|
56
|
+
* the same org.
|
|
57
|
+
*/
|
|
58
|
+
function resolvePlanBadge(input) {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
if (!input.canManageBilling)
|
|
61
|
+
return HIDDEN;
|
|
62
|
+
const now = (_a = input.now) !== null && _a !== void 0 ? _a : new Date();
|
|
63
|
+
const planName = ((_b = input.planName) === null || _b === void 0 ? void 0 : _b.trim()) || "";
|
|
64
|
+
const daysLeft = daysUntil(input.expiryDate, now);
|
|
65
|
+
const remaining = (0, planExpiry_1.formatPlanRemaining)(input.expiryDate, now);
|
|
66
|
+
const elapsed = (0, planExpiry_1.formatPlanElapsed)(input.expiryDate, now);
|
|
67
|
+
// Checked before the expiry branch: a lapsed org is downgraded to free, and
|
|
68
|
+
// "Free expired" is not a state worth shouting about.
|
|
69
|
+
if (isFreePlan(input, planName))
|
|
70
|
+
return upgrade("");
|
|
71
|
+
if (input.isExpired || elapsed !== "") {
|
|
72
|
+
// "<plan> expired" as the label with the elapsed time in the inset chip —
|
|
73
|
+
// folding both behind "Upgrade your plan" made the pill wide enough to
|
|
74
|
+
// crowd the header.
|
|
75
|
+
return {
|
|
76
|
+
visible: true,
|
|
77
|
+
label: `${planName || GENERIC_PLAN_NAME} expired`,
|
|
78
|
+
mobileLabel: EXPIRED_MOBILE_LABEL,
|
|
79
|
+
subtitle: elapsed,
|
|
80
|
+
tone: "danger",
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
if (input.hasPlan === false)
|
|
84
|
+
return upgrade("");
|
|
85
|
+
if (input.isTrial) {
|
|
86
|
+
return {
|
|
87
|
+
visible: true,
|
|
88
|
+
label: TRIAL_LABEL,
|
|
89
|
+
mobileLabel: TRIAL_LABEL,
|
|
90
|
+
subtitle: remaining,
|
|
91
|
+
tone: daysLeft !== null && daysLeft <= TRIAL_DANGER_DAYS
|
|
92
|
+
? "danger"
|
|
93
|
+
: "warning",
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
const tone = daysLeft !== null && daysLeft < ACTIVE_WARNING_DAYS ? "warning" : "normal";
|
|
97
|
+
// An active paid plan names itself — falling through to "Upgrade your plan"
|
|
98
|
+
// told users with years remaining that they were on nothing.
|
|
99
|
+
if (!planName)
|
|
100
|
+
return upgrade(remaining, tone);
|
|
101
|
+
return {
|
|
102
|
+
visible: true,
|
|
103
|
+
label: planName,
|
|
104
|
+
mobileLabel: planName,
|
|
105
|
+
subtitle: remaining,
|
|
106
|
+
tone,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
@@ -16,4 +16,20 @@ export declare function splitMonthsAndDays(from: Date, to: Date): {
|
|
|
16
16
|
* consuming app owns.
|
|
17
17
|
*/
|
|
18
18
|
export declare function formatPlanExpiry(expiryDate: PlanExpiryInput, now?: Date): string;
|
|
19
|
+
/**
|
|
20
|
+
* Time left on a plan, to the minute in the final day: `"3mo left"`, `"18d left"`,
|
|
21
|
+
* then `"23h 45m left"` down to `"1m left"`. `""` once lapsed.
|
|
22
|
+
*
|
|
23
|
+
* Differs from `formatPlanExpiry` only in that last day: a calendar-day count
|
|
24
|
+
* reads as "Expires today" for the whole day, which goes stale next to a live
|
|
25
|
+
* countdown. Prefer this for a badge that sits on screen; `formatPlanExpiry`
|
|
26
|
+
* stays the cheaper day-granular option.
|
|
27
|
+
*/
|
|
28
|
+
export declare function formatPlanRemaining(expiryDate: PlanExpiryInput, now?: Date): string;
|
|
29
|
+
/**
|
|
30
|
+
* How long ago a plan lapsed: `"1h 10m ago"` under a day, `"2d ago"` / `"1mo ago"`
|
|
31
|
+
* beyond it. `""` while the plan is still live — so a badge can say how stale a
|
|
32
|
+
* lapse is rather than a bare "expired".
|
|
33
|
+
*/
|
|
34
|
+
export declare function formatPlanElapsed(expiryDate: PlanExpiryInput, now?: Date): string;
|
|
19
35
|
//# sourceMappingURL=planExpiry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planExpiry.d.ts","sourceRoot":"","sources":["../../src/Utils/planExpiry.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;AAoCxE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,IAAI,GACP;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAOlC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,eAAe,EAC3B,GAAG,CAAC,EAAE,IAAI,GACT,MAAM,CAaR"}
|
|
1
|
+
{"version":3,"file":"planExpiry.d.ts","sourceRoot":"","sources":["../../src/Utils/planExpiry.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;AAoCxE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,IAAI,GACP;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAOlC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,eAAe,EAC3B,GAAG,CAAC,EAAE,IAAI,GACT,MAAM,CAaR;AAYD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,eAAe,EAC3B,GAAG,CAAC,EAAE,IAAI,GACT,MAAM,CAgBR;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,GAAG,CAAC,EAAE,IAAI,GACT,MAAM,CAgBR"}
|
package/dist/Utils/planExpiry.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.splitMonthsAndDays = splitMonthsAndDays;
|
|
4
4
|
exports.formatPlanExpiry = formatPlanExpiry;
|
|
5
|
+
exports.formatPlanRemaining = formatPlanRemaining;
|
|
6
|
+
exports.formatPlanElapsed = formatPlanElapsed;
|
|
5
7
|
const MS_PER_DAY = 24 * 60 * 60 * 1000;
|
|
6
8
|
function toDate(value) {
|
|
7
9
|
if (value === null || value === undefined || value === "")
|
|
@@ -59,3 +61,55 @@ function formatPlanExpiry(expiryDate, now) {
|
|
|
59
61
|
const { months, days } = splitMonthsAndDays(today, expiryDay);
|
|
60
62
|
return months > 0 ? `${unit(months, "mo")} left` : `${unit(days, "d")} left`;
|
|
61
63
|
}
|
|
64
|
+
/** Never reports `0m`; the final stretch reads `1m`. */
|
|
65
|
+
function formatHoursMinutes(ms, suffix) {
|
|
66
|
+
const totalMinutes = Math.floor(ms / 60000);
|
|
67
|
+
const hours = Math.floor(totalMinutes / 60);
|
|
68
|
+
const minutes = totalMinutes % 60;
|
|
69
|
+
return hours > 0
|
|
70
|
+
? `${unit(hours, "h")} ${unit(minutes, "m")} ${suffix}`
|
|
71
|
+
: `${unit(Math.max(minutes, 1), "m")} ${suffix}`;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Time left on a plan, to the minute in the final day: `"3mo left"`, `"18d left"`,
|
|
75
|
+
* then `"23h 45m left"` down to `"1m left"`. `""` once lapsed.
|
|
76
|
+
*
|
|
77
|
+
* Differs from `formatPlanExpiry` only in that last day: a calendar-day count
|
|
78
|
+
* reads as "Expires today" for the whole day, which goes stale next to a live
|
|
79
|
+
* countdown. Prefer this for a badge that sits on screen; `formatPlanExpiry`
|
|
80
|
+
* stays the cheaper day-granular option.
|
|
81
|
+
*/
|
|
82
|
+
function formatPlanRemaining(expiryDate, now) {
|
|
83
|
+
const expiry = toDate(expiryDate);
|
|
84
|
+
if (!expiry)
|
|
85
|
+
return "";
|
|
86
|
+
const referenceNow = now !== null && now !== void 0 ? now : new Date();
|
|
87
|
+
const msLeft = expiry.getTime() - referenceNow.getTime();
|
|
88
|
+
if (msLeft < 0)
|
|
89
|
+
return "";
|
|
90
|
+
if (msLeft < MS_PER_DAY) {
|
|
91
|
+
return msLeft === 0 ? "Expires today" : formatHoursMinutes(msLeft, "left");
|
|
92
|
+
}
|
|
93
|
+
const { months, days } = splitMonthsAndDays(startOfDay(referenceNow), startOfDay(expiry));
|
|
94
|
+
return months > 0 ? `${unit(months, "mo")} left` : `${unit(days, "d")} left`;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* How long ago a plan lapsed: `"1h 10m ago"` under a day, `"2d ago"` / `"1mo ago"`
|
|
98
|
+
* beyond it. `""` while the plan is still live — so a badge can say how stale a
|
|
99
|
+
* lapse is rather than a bare "expired".
|
|
100
|
+
*/
|
|
101
|
+
function formatPlanElapsed(expiryDate, now) {
|
|
102
|
+
const expiry = toDate(expiryDate);
|
|
103
|
+
if (!expiry)
|
|
104
|
+
return "";
|
|
105
|
+
const referenceNow = now !== null && now !== void 0 ? now : new Date();
|
|
106
|
+
const msAgo = referenceNow.getTime() - expiry.getTime();
|
|
107
|
+
if (msAgo <= 0)
|
|
108
|
+
return "";
|
|
109
|
+
if (msAgo < MS_PER_DAY)
|
|
110
|
+
return formatHoursMinutes(msAgo, "ago");
|
|
111
|
+
const { months, days } = splitMonthsAndDays(startOfDay(expiry), startOfDay(referenceNow));
|
|
112
|
+
return months > 0
|
|
113
|
+
? `${unit(months, "mo")} ago`
|
|
114
|
+
: `${unit(Math.max(days, 1), "d")} ago`;
|
|
115
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -79,13 +79,16 @@ import StageItem from "./Components/StageProgress/StageItem";
|
|
|
79
79
|
import OrgSwitcher from "./Components/OrgSwitcher/OrgSwitcher";
|
|
80
80
|
import UpgradeButton from "./Components/UpgradeButton/UpgradeButton";
|
|
81
81
|
import PlanPill from "./Components/PlanPill/PlanPill";
|
|
82
|
-
import
|
|
82
|
+
import PlanBadge from "./Components/PlanBadge/PlanBadge";
|
|
83
|
+
import LimitReachedModal from "./Components/LimitReachedModal/LimitReachedModal";
|
|
84
|
+
import { formatPlanElapsed, formatPlanExpiry, formatPlanRemaining, splitMonthsAndDays } from "./Utils/planExpiry";
|
|
85
|
+
import { resolvePlanBadge } from "./Utils/planBadge";
|
|
83
86
|
import UserDetails from "./Components/UserDetails/UserDetails";
|
|
84
87
|
import RolesPermission from "./Components/RolesPermission/RolesPermission";
|
|
85
88
|
import CustomModulesTable from "./Components/CustomModulesTable/CustomModulesTable";
|
|
86
89
|
import SignInActivityTable from "./Components/SignInActivityTable/SignInActivityTable";
|
|
87
90
|
import OrganizationDetails from "./Components/OrganizationDetails/OrganizationDetails";
|
|
88
|
-
export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, ApexPolarChart, ApexLineChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, EmptyState, WorkspaceWindow, WorkspaceTray, WorkspaceTrayPreview, FieldSelectModal, FilePreview, FilePreviewTrigger, FileUpload, FileUploader, FilterSidebar, FormWrapper, LazyWrapper, MoreItems, PdfViewer, ScrollToTop, CopyButton, StageProgress, StageItem, OrgSwitcher, UpgradeButton, PlanPill, formatPlanExpiry, splitMonthsAndDays, UserDetails, RolesPermission, CustomModulesTable, SignInActivityTable, OrganizationDetails, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, Notification, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SelectV2, SearchSelect, SelectSearch, SideBar, Slider, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, OverflowToolTip, useToaster, VerifyEmailOtp, useSidebarPrefs, useIsTruncated, useCustomTheme, ThemesList, debounce, };
|
|
91
|
+
export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, ApexPolarChart, ApexLineChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, EmptyState, WorkspaceWindow, WorkspaceTray, WorkspaceTrayPreview, FieldSelectModal, FilePreview, FilePreviewTrigger, FileUpload, FileUploader, FilterSidebar, FormWrapper, LazyWrapper, MoreItems, PdfViewer, ScrollToTop, CopyButton, StageProgress, StageItem, OrgSwitcher, LimitReachedModal, UpgradeButton, PlanPill, PlanBadge, formatPlanElapsed, formatPlanExpiry, formatPlanRemaining, resolvePlanBadge, splitMonthsAndDays, UserDetails, RolesPermission, CustomModulesTable, SignInActivityTable, OrganizationDetails, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, Notification, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SelectV2, SearchSelect, SelectSearch, SideBar, Slider, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, OverflowToolTip, useToaster, VerifyEmailOtp, useSidebarPrefs, useIsTruncated, useCustomTheme, ThemesList, debounce, };
|
|
89
92
|
export default withTheme;
|
|
90
93
|
export type { UserDetailsProps, UserDetailsLabels, UserListItem, SelectedUserDetail, UserDetailRow, RoleOption, AddUserFormValues, ChangeRoleSubmitPayload, } from "./Components/UserDetails/UserDetailsProps";
|
|
91
94
|
export type { WorkspaceWindowProps, WorkspaceWindowState, WorkspaceTrayProps, WorkspaceTrayItem, WorkspaceTrayPreviewProps, } from "./Components/WorkspaceWindow/WorkspaceWindowProps";
|
|
@@ -109,4 +112,8 @@ export { hexToRgb, hexToRgba, compositeOver, rgbToHex, rgbToHsl, hslToRgb, hexTo
|
|
|
109
112
|
export type { Rgb, Hsl } from "./Theme/tokens/builders/color";
|
|
110
113
|
export type { SelectV2Props, SelectV2Size, OptionProp as SelectV2Option } from "./Components/SelectV2/SelectV2Props";
|
|
111
114
|
export type { PlanPillProps, PlanPillTone } from "./Components/PlanPill/PlanPillProps";
|
|
115
|
+
export type { PlanBadgeProps } from "./Components/PlanBadge/PlanBadgeProps";
|
|
116
|
+
export type { PlanBadgeInput, PlanBadgeResult } from "./Utils/planBadge";
|
|
117
|
+
export type { PlanExpiryInput } from "./Utils/planExpiry";
|
|
118
|
+
export type { LimitReachedModalProps, LimitKind, } from "./Components/LimitReachedModal/LimitReachedModalProps";
|
|
112
119
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":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