@mohasinac/appkit 2.7.22 → 2.7.24

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.
Files changed (51) hide show
  1. package/dist/client.d.ts +4 -0
  2. package/dist/client.js +3 -0
  3. package/dist/features/auth/consent-otp.js +8 -8
  4. package/dist/features/auth/permissions/constants.d.ts +1 -1
  5. package/dist/features/auth/permissions/constants.js +2 -0
  6. package/dist/features/before-after/messages/en.json +7 -7
  7. package/dist/features/collections/messages/en.json +9 -9
  8. package/dist/features/consultation/messages/en.json +24 -24
  9. package/dist/features/contact/email.js +179 -179
  10. package/dist/features/corporate/messages/en.json +25 -25
  11. package/dist/features/loyalty/messages/en.json +18 -18
  12. package/dist/features/media/messages/en.json +63 -63
  13. package/dist/features/pre-orders/messages/en.json +12 -12
  14. package/dist/features/site-settings/components/ActionPermissionsManager.d.ts +7 -0
  15. package/dist/features/site-settings/components/ActionPermissionsManager.js +99 -0
  16. package/dist/features/site-settings/components/NavPermissionsManager.d.ts +18 -0
  17. package/dist/features/site-settings/components/NavPermissionsManager.js +33 -0
  18. package/dist/features/whatsapp-bot/messages/en.json +6 -6
  19. package/dist/index.d.ts +4 -0
  20. package/dist/index.js +3 -0
  21. package/dist/next/routing/route-map.d.ts +4 -0
  22. package/dist/next/routing/route-map.js +2 -0
  23. package/dist/styles.css +21 -21
  24. package/dist/tailwind-utilities.css +1 -1
  25. package/dist/tokens/tokens.css +436 -436
  26. package/dist/ui/components/ActiveFilterChips.style.css +66 -66
  27. package/dist/ui/components/AvatarDisplay.style.css +46 -46
  28. package/dist/ui/components/BackgroundRenderer.style.css +31 -31
  29. package/dist/ui/components/Breadcrumb.style.css +60 -60
  30. package/dist/ui/components/CountdownDisplay.style.css +4 -4
  31. package/dist/ui/components/Div.style.css +6 -6
  32. package/dist/ui/components/EmptyState.style.css +28 -28
  33. package/dist/ui/components/FlowDiagram.style.css +77 -77
  34. package/dist/ui/components/FormGrid.style.css +32 -32
  35. package/dist/ui/components/ImageGallery.style.css +163 -163
  36. package/dist/ui/components/ImageLightbox.style.css +58 -58
  37. package/dist/ui/components/ItemRow.style.css +33 -33
  38. package/dist/ui/components/Layout.style.css +229 -229
  39. package/dist/ui/components/Menu.style.css +6 -6
  40. package/dist/ui/components/NavigationLoader.style.css +19 -19
  41. package/dist/ui/components/ResponsiveView.style.css +69 -69
  42. package/dist/ui/components/RoleBadge.style.css +7 -7
  43. package/dist/ui/components/SectionTabs.style.css +164 -164
  44. package/dist/ui/components/Semantic.style.css +14 -14
  45. package/dist/ui/components/SkipToMain.style.css +34 -34
  46. package/dist/ui/components/SortDropdown.style.css +12 -12
  47. package/dist/ui/components/StatusBadge.style.css +5 -5
  48. package/dist/ui/components/UnsavedChangesModal.style.css +33 -33
  49. package/dist/ui/components/ViewToggle.style.css +50 -50
  50. package/dist/ui/components/index.style.css +78 -78
  51. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
- {
2
- "loyalty": {
3
- "title": "HC Coins",
4
- "balance": "Your Coin Balance",
5
- "earn": "Earn Coins",
6
- "redeem": "Redeem Coins",
7
- "history": "Coin History",
8
- "noHistory": "No coin transactions yet.",
9
- "earnedFor": "Earned for order",
10
- "redeemedFor": "Redeemed on order",
11
- "adminGrant": "Admin grant",
12
- "refund": "Refund",
13
- "coinsEarned": "{coins} coins earned",
14
- "coinsRedeemed": "{coins} coins redeemed",
15
- "worthRupees": "Worth ₹{amount}",
16
- "minRequired": "Minimum {min} coins required to redeem",
17
- "notActive": "Loyalty program is currently inactive"
18
- }
1
+ {
2
+ "loyalty": {
3
+ "title": "HC Coins",
4
+ "balance": "Your Coin Balance",
5
+ "earn": "Earn Coins",
6
+ "redeem": "Redeem Coins",
7
+ "history": "Coin History",
8
+ "noHistory": "No coin transactions yet.",
9
+ "earnedFor": "Earned for order",
10
+ "redeemedFor": "Redeemed on order",
11
+ "adminGrant": "Admin grant",
12
+ "refund": "Refund",
13
+ "coinsEarned": "{coins} coins earned",
14
+ "coinsRedeemed": "{coins} coins redeemed",
15
+ "worthRupees": "Worth ₹{amount}",
16
+ "minRequired": "Minimum {min} coins required to redeem",
17
+ "notActive": "Loyalty program is currently inactive"
18
+ }
19
19
  }
@@ -1,63 +1,63 @@
1
- {
2
- "mediaEditor": {
3
- "cropTitle": "Crop Image",
4
- "cropInstruction": "Drag to reposition. Use the zoom slider or +/- keys to zoom.",
5
- "cropPreviewAlt": "Preview",
6
- "cropZoom": "Zoom",
7
- "cropZoomIn": "Zoom in",
8
- "cropZoomOut": "Zoom out",
9
- "cropWarningTitle": "Low zoom",
10
- "cropWarningMessage": "Zoom in for better quality.",
11
- "cropPosition": "Position",
12
- "cropReset": "Reset",
13
- "cropSave": "Save Crop",
14
- "cropCancel": "Cancel",
15
- "trimTitle": "Trim Video",
16
- "trimInstruction": "Set the start and end times, then click Trim.",
17
- "trimStart": "Start",
18
- "trimEnd": "End",
19
- "trimDuration": "Duration: {duration}s",
20
- "trimQuality": "Quality",
21
- "trimQualityLow": "Low",
22
- "trimQualityMedium": "Medium",
23
- "trimQualityHigh": "High",
24
- "trimSave": "Trim Video",
25
- "trimSkip": "Skip",
26
- "trimming": "Trimming\u2026",
27
- "thumbnailTitle": "Select Thumbnail",
28
- "thumbnailInstruction": "Seek to the frame you want to use as the thumbnail.",
29
- "thumbnailCapture": "Use This Frame",
30
- "thumbnailSkip": "Skip",
31
- "thumbnailCapturing": "Capturing\u2026",
32
- "thumbnailUploading": "Uploading\u2026",
33
- "cropSuccess": "Image cropped",
34
- "trimSuccess": "Video trimmed",
35
- "thumbnailSuccess": "Thumbnail saved",
36
- "cropError": "Failed to crop image",
37
- "trimError": "Failed to trim video",
38
- "thumbnailError": "Failed to capture thumbnail",
39
- "editImage": "Edit / Crop",
40
- "editVideo": "Trim / Thumbnail"
41
- },
42
- "camera": {
43
- "takePhoto": "Take Photo",
44
- "startRecording": "Start Recording",
45
- "stopRecording": "Stop Recording",
46
- "flipCamera": "Flip Camera",
47
- "switchToCamera": "Use Camera",
48
- "switchToUpload": "Upload File",
49
- "cameraError": "Camera unavailable",
50
- "permissionDenied": "Camera permission denied. Please allow access in your browser settings.",
51
- "notSupported": "Camera is not supported on this device",
52
- "starting": "Starting camera..."
53
- },
54
- "upload": {
55
- "change": "Change",
56
- "remove": "Remove",
57
- "clickToUpload": "Click to upload",
58
- "uploading": "Uploading\u2026",
59
- "uploadingProgress": "Uploading {progress}%\u2026",
60
- "replaceFile": "Replace file",
61
- "chooseFile": "Choose file to upload"
62
- }
63
- }
1
+ {
2
+ "mediaEditor": {
3
+ "cropTitle": "Crop Image",
4
+ "cropInstruction": "Drag to reposition. Use the zoom slider or +/- keys to zoom.",
5
+ "cropPreviewAlt": "Preview",
6
+ "cropZoom": "Zoom",
7
+ "cropZoomIn": "Zoom in",
8
+ "cropZoomOut": "Zoom out",
9
+ "cropWarningTitle": "Low zoom",
10
+ "cropWarningMessage": "Zoom in for better quality.",
11
+ "cropPosition": "Position",
12
+ "cropReset": "Reset",
13
+ "cropSave": "Save Crop",
14
+ "cropCancel": "Cancel",
15
+ "trimTitle": "Trim Video",
16
+ "trimInstruction": "Set the start and end times, then click Trim.",
17
+ "trimStart": "Start",
18
+ "trimEnd": "End",
19
+ "trimDuration": "Duration: {duration}s",
20
+ "trimQuality": "Quality",
21
+ "trimQualityLow": "Low",
22
+ "trimQualityMedium": "Medium",
23
+ "trimQualityHigh": "High",
24
+ "trimSave": "Trim Video",
25
+ "trimSkip": "Skip",
26
+ "trimming": "Trimming\u2026",
27
+ "thumbnailTitle": "Select Thumbnail",
28
+ "thumbnailInstruction": "Seek to the frame you want to use as the thumbnail.",
29
+ "thumbnailCapture": "Use This Frame",
30
+ "thumbnailSkip": "Skip",
31
+ "thumbnailCapturing": "Capturing\u2026",
32
+ "thumbnailUploading": "Uploading\u2026",
33
+ "cropSuccess": "Image cropped",
34
+ "trimSuccess": "Video trimmed",
35
+ "thumbnailSuccess": "Thumbnail saved",
36
+ "cropError": "Failed to crop image",
37
+ "trimError": "Failed to trim video",
38
+ "thumbnailError": "Failed to capture thumbnail",
39
+ "editImage": "Edit / Crop",
40
+ "editVideo": "Trim / Thumbnail"
41
+ },
42
+ "camera": {
43
+ "takePhoto": "Take Photo",
44
+ "startRecording": "Start Recording",
45
+ "stopRecording": "Stop Recording",
46
+ "flipCamera": "Flip Camera",
47
+ "switchToCamera": "Use Camera",
48
+ "switchToUpload": "Upload File",
49
+ "cameraError": "Camera unavailable",
50
+ "permissionDenied": "Camera permission denied. Please allow access in your browser settings.",
51
+ "notSupported": "Camera is not supported on this device",
52
+ "starting": "Starting camera..."
53
+ },
54
+ "upload": {
55
+ "change": "Change",
56
+ "remove": "Remove",
57
+ "clickToUpload": "Click to upload",
58
+ "uploading": "Uploading\u2026",
59
+ "uploadingProgress": "Uploading {progress}%\u2026",
60
+ "replaceFile": "Replace file",
61
+ "chooseFile": "Choose file to upload"
62
+ }
63
+ }
@@ -1,13 +1,13 @@
1
- {
2
- "preorders": {
3
- "title": "Pre-orders",
4
- "subtitle": "Reserve yours before it arrives",
5
- "badge": "Pre-order",
6
- "shipsOn": "Ships {date}",
7
- "shippingSoon": "Shipping soon",
8
- "shipped": "Shipped",
9
- "empty": "No pre-orders available right now.",
10
- "reserveNow": "Reserve now",
11
- "depositRequired": "Deposit required: ₹{amount}"
12
- }
1
+ {
2
+ "preorders": {
3
+ "title": "Pre-orders",
4
+ "subtitle": "Reserve yours before it arrives",
5
+ "badge": "Pre-order",
6
+ "shipsOn": "Ships {date}",
7
+ "shippingSoon": "Shipping soon",
8
+ "shipped": "Shipped",
9
+ "empty": "No pre-orders available right now.",
10
+ "reserveNow": "Reserve now",
11
+ "depositRequired": "Deposit required: ₹{amount}"
12
+ }
13
13
  }
@@ -0,0 +1,7 @@
1
+ export interface ActionPermissionsManagerProps {
2
+ initialConfig: Record<string, {
3
+ enabled: boolean;
4
+ }>;
5
+ onUpdate: (actionId: string, enabled: boolean) => Promise<void>;
6
+ }
7
+ export declare function ActionPermissionsManager({ initialConfig, onUpdate }: ActionPermissionsManagerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,99 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState, useTransition, useMemo } from "react";
4
+ import { Toggle, Text, Div, Stack, Input } from "../../../ui";
5
+ import { ACTION_META, ACTION_ID } from "../../products/constants/action-defs";
6
+ import { useToast } from "../../../ui";
7
+ const CATEGORY_LABELS = {
8
+ "buy-now": "Public CTA",
9
+ "add-to-cart": "Public CTA",
10
+ "add-to-wishlist": "Public CTA",
11
+ "remove-from-wishlist": "Public CTA",
12
+ "make-offer": "Public CTA",
13
+ "share": "Public CTA",
14
+ "compare": "Public CTA",
15
+ "place-bid": "Auction CTA",
16
+ "buy-now-auction": "Auction CTA",
17
+ "watch-auction": "Auction CTA",
18
+ "unwatch-auction": "Auction CTA",
19
+ "reserve-now": "Pre-order CTA",
20
+ "cancel-reservation": "Pre-order CTA",
21
+ "checkout": "Checkout",
22
+ "enter-prize-draw": "Prize Draw",
23
+ "enter-raffle": "Raffle",
24
+ "report-listing": "Moderation",
25
+ "follow-store": "Social",
26
+ "write-review": "Reviews",
27
+ "message-seller": "Messaging",
28
+ "become-seller": "Seller",
29
+ "request-payout": "Seller",
30
+ "respond-to-review": "Seller",
31
+ "cancel-order": "Orders",
32
+ "request-return": "Orders",
33
+ "reorder": "Orders",
34
+ "track-order": "Orders",
35
+ "edit-profile": "Account",
36
+ "add-address": "Account",
37
+ "edit-address": "Account",
38
+ "delete-address": "Account",
39
+ "change-password": "Account",
40
+ "delete-account": "Account",
41
+ };
42
+ const CATEGORY_COLORS = {
43
+ "Public CTA": "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",
44
+ "Auction CTA": "bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300",
45
+ "Pre-order CTA": "bg-indigo-100 text-indigo-800 dark:bg-indigo-900/30 dark:text-indigo-300",
46
+ "Checkout": "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",
47
+ "Prize Draw": "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300",
48
+ "Raffle": "bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300",
49
+ "Moderation": "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",
50
+ "Social": "bg-pink-100 text-pink-800 dark:bg-pink-900/30 dark:text-pink-300",
51
+ "Reviews": "bg-teal-100 text-teal-800 dark:bg-teal-900/30 dark:text-teal-300",
52
+ "Messaging": "bg-cyan-100 text-cyan-800 dark:bg-cyan-900/30 dark:text-cyan-300",
53
+ "Seller": "bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",
54
+ "Orders": "bg-lime-100 text-lime-800 dark:bg-lime-900/30 dark:text-lime-300",
55
+ "Account": "bg-zinc-100 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",
56
+ };
57
+ const ALL_ACTION_IDS = Object.values(ACTION_ID);
58
+ export function ActionPermissionsManager({ initialConfig, onUpdate }) {
59
+ const { showToast } = useToast();
60
+ const [config, setConfig] = useState(initialConfig);
61
+ const [search, setSearch] = useState("");
62
+ const [, startTransition] = useTransition();
63
+ const filteredActions = useMemo(() => {
64
+ const q = search.toLowerCase();
65
+ return ALL_ACTION_IDS.filter((id) => {
66
+ if (!q)
67
+ return true;
68
+ const meta = ACTION_META[id];
69
+ return (id.includes(q) ||
70
+ meta.label.toLowerCase().includes(q) ||
71
+ (CATEGORY_LABELS[id] ?? "").toLowerCase().includes(q));
72
+ });
73
+ }, [search]);
74
+ const handleToggle = (actionId, enabled) => {
75
+ const prev = config;
76
+ setConfig((c) => ({ ...c, [actionId]: { enabled } }));
77
+ startTransition(async () => {
78
+ try {
79
+ await onUpdate(actionId, enabled);
80
+ showToast(`"${ACTION_META[actionId]?.label}" ${enabled ? "enabled" : "disabled"}.`, "success");
81
+ }
82
+ catch {
83
+ setConfig(prev);
84
+ showToast("Failed to update action config. Please try again.", "error");
85
+ }
86
+ });
87
+ };
88
+ const isEnabled = (id) => config[id]?.enabled ?? ACTION_META[id]?.defaultEnabled ?? true;
89
+ return (_jsxs(Stack, { gap: "md", children: [_jsxs(Div, { className: "flex items-center gap-3", children: [_jsx(Input, { placeholder: "Search actions\u2026", value: search, onChange: (e) => setSearch(e.target.value), className: "h-9 max-w-sm text-sm" }), _jsxs(Text, { className: "text-sm text-zinc-500 dark:text-zinc-400", children: [filteredActions.length, " action", filteredActions.length !== 1 ? "s" : ""] })] }), _jsx(Div, { className: "overflow-hidden rounded-xl border border-zinc-200 dark:border-slate-700", children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { children: _jsxs("tr", { className: "border-b border-zinc-200 bg-zinc-50 dark:border-slate-700 dark:bg-slate-800", children: [_jsx("th", { className: "px-4 py-3 text-left font-semibold text-zinc-700 dark:text-zinc-300", children: "Action" }), _jsx("th", { className: "px-4 py-3 text-left font-semibold text-zinc-700 dark:text-zinc-300", children: "Category" }), _jsx("th", { className: "px-4 py-3 text-left font-semibold text-zinc-700 dark:text-zinc-300", children: "Auth" }), _jsx("th", { className: "px-4 py-3 text-left font-semibold text-zinc-700 dark:text-zinc-300", children: "Permission" }), _jsx("th", { className: "px-4 py-3 text-right font-semibold text-zinc-700 dark:text-zinc-300", children: "Enabled" })] }) }), _jsx("tbody", { children: filteredActions.map((id, idx) => {
90
+ const meta = ACTION_META[id];
91
+ const enabled = isEnabled(id);
92
+ const category = CATEGORY_LABELS[id] ?? "Other";
93
+ const categoryColor = CATEGORY_COLORS[category] ?? CATEGORY_COLORS["Account"];
94
+ return (_jsxs("tr", { className: [
95
+ idx % 2 === 0 ? "bg-white dark:bg-slate-900" : "bg-zinc-50/50 dark:bg-slate-800/50",
96
+ !enabled ? "opacity-60" : "",
97
+ ].join(" "), children: [_jsx("td", { className: "px-4 py-3", children: _jsxs(Div, { children: [_jsx(Text, { className: "font-medium text-zinc-900 dark:text-zinc-100", children: meta.label }), _jsx(Text, { className: "text-xs text-zinc-400 dark:text-zinc-500", children: id })] }) }), _jsx("td", { className: "px-4 py-3", children: _jsx("span", { className: `inline-block rounded-full px-2 py-0.5 text-xs font-medium ${categoryColor}`, children: category }) }), _jsx("td", { className: "px-4 py-3", children: meta.requiresAuth ? (_jsx("span", { className: "inline-block rounded-full bg-amber-100 px-2 py-0.5 text-xs font-medium text-amber-800 dark:bg-amber-900/30 dark:text-amber-300", children: "Auth required" })) : (_jsx(Text, { className: "text-xs text-zinc-400", children: "\u2014" })) }), _jsx("td", { className: "px-4 py-3", children: meta.requiredPermission ? (_jsx("code", { className: "rounded bg-zinc-100 px-1.5 py-0.5 text-xs text-zinc-700 dark:bg-slate-700 dark:text-zinc-300", children: meta.requiredPermission })) : (_jsx(Text, { className: "text-xs text-zinc-400", children: "\u2014" })) }), _jsx("td", { className: "px-4 py-3 text-right", children: _jsx(Toggle, { checked: enabled, onChange: (v) => handleToggle(id, v), "aria-label": `Toggle ${meta.label}` }) })] }, id));
98
+ }) })] }) })] }));
99
+ }
@@ -0,0 +1,18 @@
1
+ export interface NavItem {
2
+ id?: string;
3
+ label: string;
4
+ href: string;
5
+ requiredPermission?: string;
6
+ }
7
+ export interface NavGroup {
8
+ groupLabel: string;
9
+ items: NavItem[];
10
+ }
11
+ export interface NavPermissionsManagerProps {
12
+ initialConfig: Record<string, {
13
+ enabled: boolean;
14
+ }>;
15
+ navGroups: NavGroup[];
16
+ onUpdate: (navId: string, enabled: boolean) => Promise<void>;
17
+ }
18
+ export declare function NavPermissionsManager({ initialConfig, navGroups, onUpdate, }: NavPermissionsManagerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState, useTransition } from "react";
4
+ import { Toggle, Text, Div, Stack } from "../../../ui";
5
+ import { useToast } from "../../../ui";
6
+ export function NavPermissionsManager({ initialConfig, navGroups, onUpdate, }) {
7
+ const { showToast } = useToast();
8
+ const [config, setConfig] = useState(initialConfig);
9
+ const [, startTransition] = useTransition();
10
+ const handleToggle = (navId, label, enabled) => {
11
+ const prev = config;
12
+ setConfig((c) => ({ ...c, [navId]: { enabled } }));
13
+ startTransition(async () => {
14
+ try {
15
+ await onUpdate(navId, enabled);
16
+ showToast(`"${label}" ${enabled ? "enabled" : "disabled"}.`, "success");
17
+ }
18
+ catch {
19
+ setConfig(prev);
20
+ showToast("Failed to update nav config. Please try again.", "error");
21
+ }
22
+ });
23
+ };
24
+ const isEnabled = (id) => config[id]?.enabled ?? true;
25
+ return (_jsx(Stack, { gap: "lg", children: navGroups.map((group) => (_jsxs(Div, { children: [_jsx(Text, { className: "mb-3 text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: group.groupLabel }), _jsx(Div, { className: "overflow-hidden rounded-xl border border-zinc-200 dark:border-slate-700", children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { children: _jsxs("tr", { className: "border-b border-zinc-200 bg-zinc-50 dark:border-slate-700 dark:bg-slate-800", children: [_jsx("th", { className: "px-4 py-3 text-left font-semibold text-zinc-700 dark:text-zinc-300", children: "Nav Item" }), _jsx("th", { className: "px-4 py-3 text-left font-semibold text-zinc-700 dark:text-zinc-300", children: "Route" }), _jsx("th", { className: "px-4 py-3 text-left font-semibold text-zinc-700 dark:text-zinc-300", children: "Permission" }), _jsx("th", { className: "px-4 py-3 text-right font-semibold text-zinc-700 dark:text-zinc-300", children: "Enabled" })] }) }), _jsx("tbody", { children: group.items.map((item, idx) => {
26
+ const hasId = !!item.id;
27
+ const enabled = hasId ? isEnabled(item.id) : true;
28
+ return (_jsxs("tr", { className: [
29
+ idx % 2 === 0 ? "bg-white dark:bg-slate-900" : "bg-zinc-50/50 dark:bg-slate-800/50",
30
+ !enabled ? "opacity-60" : "",
31
+ ].join(" "), children: [_jsx("td", { className: "px-4 py-3", children: _jsxs(Div, { children: [_jsx(Text, { className: "font-medium text-zinc-900 dark:text-zinc-100", children: item.label }), item.id && (_jsx(Text, { className: "text-xs text-zinc-400 dark:text-zinc-500", children: item.id }))] }) }), _jsx("td", { className: "px-4 py-3", children: _jsx("code", { className: "text-xs text-zinc-500 dark:text-zinc-400", children: item.href }) }), _jsx("td", { className: "px-4 py-3", children: item.requiredPermission ? (_jsx("code", { className: "rounded bg-zinc-100 px-1.5 py-0.5 text-xs text-zinc-700 dark:bg-slate-700 dark:text-zinc-300", children: item.requiredPermission })) : (_jsx(Text, { className: "text-xs text-zinc-400", children: "\u2014" })) }), _jsx("td", { className: "px-4 py-3 text-right", children: hasId ? (_jsx(Toggle, { checked: enabled, onChange: (v) => handleToggle(item.id, item.label, v), "aria-label": `Toggle ${item.label}` })) : (_jsx(Text, { className: "text-xs text-zinc-400 italic", children: "Legacy \u2014 always visible" })) })] }, item.href));
32
+ }) })] }) })] }, group.groupLabel))) }));
33
+ }
@@ -1,7 +1,7 @@
1
- {
2
- "whatsappBot": {
3
- "chatNow": "Chat on WhatsApp",
4
- "orderViaWhatsapp": "Order via WhatsApp",
5
- "supportViaWhatsapp": "Contact support"
6
- }
1
+ {
2
+ "whatsappBot": {
3
+ "chatNow": "Chat on WhatsApp",
4
+ "orderViaWhatsapp": "Order via WhatsApp",
5
+ "supportViaWhatsapp": "Contact support"
6
+ }
7
7
  }
package/dist/index.d.ts CHANGED
@@ -3054,3 +3054,7 @@ export { TABLE_KEYS, VIEW_MODE } from "./constants/table-keys";
3054
3054
  export type { TableKey, ViewMode } from "./constants/table-keys";
3055
3055
  export { SIEVE_OP, SIEVE_PIPE_OPS, sieveFilter, sieveMultiEq, expandSieveParam, sieveAnd, } from "./utils/sieve-builder";
3056
3056
  export type { SieveOp } from "./utils/sieve-builder";
3057
+ export { ActionPermissionsManager } from "./features/site-settings/components/ActionPermissionsManager";
3058
+ export type { ActionPermissionsManagerProps } from "./features/site-settings/components/ActionPermissionsManager";
3059
+ export { NavPermissionsManager } from "./features/site-settings/components/NavPermissionsManager";
3060
+ export type { NavPermissionsManagerProps, NavGroup as NavPermissionsGroup, NavItem as NavPermissionsItem } from "./features/site-settings/components/NavPermissionsManager";
package/dist/index.js CHANGED
@@ -5499,3 +5499,6 @@ export { SORT_DIR, sortBy } from "./constants/sort";
5499
5499
  export { TABLE_KEYS, VIEW_MODE } from "./constants/table-keys";
5500
5500
  // ── Sieve query builder ───────────────────────────────────────────────────────
5501
5501
  export { SIEVE_OP, SIEVE_PIPE_OPS, sieveFilter, sieveMultiEq, expandSieveParam, sieveAnd, } from "./utils/sieve-builder";
5502
+ // [CLIENT-ONLY] — Admin panel components for action/nav permission management.
5503
+ export { ActionPermissionsManager } from "./features/site-settings/components/ActionPermissionsManager";
5504
+ export { NavPermissionsManager } from "./features/site-settings/components/NavPermissionsManager";
@@ -238,6 +238,8 @@ export declare const DEFAULT_ROUTE_MAP: {
238
238
  readonly SUPPORT_TICKET_BY_ID: (id: string) => string;
239
239
  readonly SCAMMERS: "/admin/scammers";
240
240
  readonly SCAMMER_BY_ID: (id: string) => string;
241
+ readonly SETTINGS_ACTIONS: "/admin/settings/actions";
242
+ readonly SETTINGS_NAVIGATION: "/admin/settings/navigation";
241
243
  };
242
244
  readonly DEMO: {
243
245
  readonly SEED: "/demo/seed";
@@ -475,6 +477,8 @@ export declare const ROUTES: {
475
477
  readonly SUPPORT_TICKET_BY_ID: (id: string) => string;
476
478
  readonly SCAMMERS: "/admin/scammers";
477
479
  readonly SCAMMER_BY_ID: (id: string) => string;
480
+ readonly SETTINGS_ACTIONS: "/admin/settings/actions";
481
+ readonly SETTINGS_NAVIGATION: "/admin/settings/navigation";
478
482
  };
479
483
  readonly DEMO: {
480
484
  readonly SEED: "/demo/seed";
@@ -229,6 +229,8 @@ export const DEFAULT_ROUTE_MAP = {
229
229
  SUPPORT_TICKET_BY_ID: (id) => `/admin/support-tickets/${id}`,
230
230
  SCAMMERS: "/admin/scammers",
231
231
  SCAMMER_BY_ID: (id) => `/admin/scammers/${id}`,
232
+ SETTINGS_ACTIONS: "/admin/settings/actions",
233
+ SETTINGS_NAVIGATION: "/admin/settings/navigation",
232
234
  },
233
235
  DEMO: {
234
236
  SEED: "/demo/seed",
package/dist/styles.css CHANGED
@@ -1,21 +1,21 @@
1
- /*
2
- * @mohasinac/appkit/styles
3
- *
4
- * Full stylesheet — design tokens + all UI component styles.
5
- *
6
- * Import once in your app root (e.g. app/globals.css or app/layout.tsx):
7
- *
8
- * @import "@mohasinac/appkit/styles";
9
- *
10
- * or in a layout component:
11
- *
12
- * import "@mohasinac/appkit/styles";
13
- *
14
- * To import only the design tokens:
15
- *
16
- * @import "@mohasinac/appkit/tokens";
17
- */
18
-
19
- @import "./tokens/tokens.css";
20
- @import "./ui/components/index.style.css";
21
- @import "./tailwind-utilities.css";
1
+ /*
2
+ * @mohasinac/appkit/styles
3
+ *
4
+ * Full stylesheet — design tokens + all UI component styles.
5
+ *
6
+ * Import once in your app root (e.g. app/globals.css or app/layout.tsx):
7
+ *
8
+ * @import "@mohasinac/appkit/styles";
9
+ *
10
+ * or in a layout component:
11
+ *
12
+ * import "@mohasinac/appkit/styles";
13
+ *
14
+ * To import only the design tokens:
15
+ *
16
+ * @import "@mohasinac/appkit/tokens";
17
+ */
18
+
19
+ @import "./tokens/tokens.css";
20
+ @import "./ui/components/index.style.css";
21
+ @import "./tailwind-utilities.css";