@fayz-ai/ui 0.18.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/derive.d.ts +1 -9
- package/dist/analytics/derive.d.ts.map +1 -1
- package/dist/chunk-AIUHVTVK.js +205 -0
- package/dist/chunk-AIUHVTVK.js.map +1 -0
- package/dist/{chunk-OBIU37AX.js → chunk-EGHEU3U5.js} +156 -48
- package/dist/chunk-EGHEU3U5.js.map +1 -0
- package/dist/{chunk-3OVZ5JJQ.js → chunk-GLRLWBBF.js} +4 -3
- package/dist/chunk-GLRLWBBF.js.map +1 -0
- package/dist/{chunk-ZLPYNHXH.js → chunk-MBGTFL4I.js} +3 -3
- package/dist/{chunk-ZLPYNHXH.js.map → chunk-MBGTFL4I.js.map} +1 -1
- package/dist/{chunk-AASANYXN.js → chunk-OB2ULDBD.js} +6 -4
- package/dist/chunk-OB2ULDBD.js.map +1 -0
- package/dist/{chunk-Z2ITFPGL.js → chunk-OYH7CEMB.js} +609 -173
- package/dist/chunk-OYH7CEMB.js.map +1 -0
- package/dist/{chunk-DFOAKWYB.js → chunk-P3YTL3MF.js} +140 -16
- package/dist/chunk-P3YTL3MF.js.map +1 -0
- package/dist/dashboard/index.js +2 -2
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -25
- package/dist/index.js.map +1 -1
- package/dist/layout/AppShell.d.ts +9 -1
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/ModulePage.d.ts +13 -0
- package/dist/layout/ModulePage.d.ts.map +1 -1
- package/dist/layout/SaveBar.d.ts +10 -1
- package/dist/layout/SaveBar.d.ts.map +1 -1
- package/dist/layout/Sidebar.d.ts +7 -1
- package/dist/layout/Sidebar.d.ts.map +1 -1
- package/dist/layout/Takeover.d.ts +31 -0
- package/dist/layout/Takeover.d.ts.map +1 -0
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +3 -3
- package/dist/lib/error-message.d.ts +2 -0
- package/dist/lib/error-message.d.ts.map +1 -0
- package/dist/primitives/brand-marks.d.ts +11 -0
- package/dist/primitives/brand-marks.d.ts.map +1 -0
- package/dist/primitives/button.d.ts +1 -1
- package/dist/primitives/dot-badge.d.ts +27 -0
- package/dist/primitives/dot-badge.d.ts.map +1 -0
- package/dist/primitives/draft-commit-bar.d.ts +27 -0
- package/dist/primitives/draft-commit-bar.d.ts.map +1 -0
- package/dist/primitives/filter-check-list.d.ts +65 -0
- package/dist/primitives/filter-check-list.d.ts.map +1 -0
- package/dist/primitives/header-tabs.d.ts +35 -0
- package/dist/primitives/header-tabs.d.ts.map +1 -1
- package/dist/primitives/image-drop.d.ts.map +1 -1
- package/dist/primitives/index.d.ts +6 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +4 -4
- package/dist/primitives/list-chrome.d.ts +5 -1
- package/dist/primitives/list-chrome.d.ts.map +1 -1
- package/dist/primitives/list-view.d.ts.map +1 -1
- package/dist/primitives/mini-calendar.d.ts +36 -0
- package/dist/primitives/mini-calendar.d.ts.map +1 -0
- package/dist/primitives/multi-select.d.ts +21 -0
- package/dist/primitives/multi-select.d.ts.map +1 -0
- package/dist/primitives/page-actions.d.ts.map +1 -1
- package/dist/primitives/refresh-button.d.ts.map +1 -1
- package/dist/primitives/row-actions.d.ts.map +1 -1
- package/dist/primitives/select.d.ts.map +1 -1
- package/dist/primitives/stock-entry-form.d.ts +52 -0
- package/dist/primitives/stock-entry-form.d.ts.map +1 -0
- package/dist/styles.css +124 -0
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.cjs.map +1 -1
- package/dist/tailwind.js +1 -1
- package/dist/tailwind.js.map +1 -1
- package/dist/wizard/index.js +2 -2
- package/dist/wizard/useWizard.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-3OVZ5JJQ.js.map +0 -1
- package/dist/chunk-4GK6IHOI.js +0 -177
- package/dist/chunk-4GK6IHOI.js.map +0 -1
- package/dist/chunk-AASANYXN.js.map +0 -1
- package/dist/chunk-DFOAKWYB.js.map +0 -1
- package/dist/chunk-OBIU37AX.js.map +0 -1
- package/dist/chunk-Z2ITFPGL.js.map +0 -1
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import type { AnalyticsCardDef, AnalyticsMeasure, AnalyticsResult, AnalyticsRow, AnalyticsSummary, AnalyticsFormat, AnalyticsGrain } from '@fayz-ai/core';
|
|
2
|
-
|
|
3
|
-
* A readable message out of anything a data layer throws.
|
|
4
|
-
*
|
|
5
|
-
* Supabase/PostgREST reject with a PLAIN OBJECT ({message, details, hint,
|
|
6
|
-
* code}), not an Error — so the usual `err instanceof Error ? err.message :
|
|
7
|
-
* String(err)` renders the literal text "[object Object]" and hides the one
|
|
8
|
-
* piece of information the user needed.
|
|
9
|
-
*/
|
|
10
|
-
export declare function errorMessage(err: unknown): string;
|
|
2
|
+
export { errorMessage } from '../lib/error-message';
|
|
11
3
|
/**
|
|
12
4
|
* True when the failure is "the analytics engine was never installed" rather
|
|
13
5
|
* than "this query is wrong" — a missing function, view or schema-cache entry.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive.d.ts","sourceRoot":"","sources":["../../src/analytics/derive.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EACjE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAClD,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"derive.d.ts","sourceRoot":"","sources":["../../src/analytics/derive.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EACjE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAClD,MAAM,eAAe,CAAA;AActB,OAAO,EAAE,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AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,GAAG,SAAS,EAAE,MAAM,SAAU,GAAG,MAAM,CAWxG;AAMD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,YAAY,EAAE,EACpB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,eAAe,GAAG,SAAS,EACnC,QAAQ,CAAC,EAAE,iBAAiB,EAC5B,KAAK,CAAC,EAAE,MAAM,GACb,YAAY,EAAE,CAYhB;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,CAOtE;AAED,iEAAiE;AACjE,wBAAgB,WAAW,CAAC,IAAI,EAAE,gBAAgB,8CAMjD;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,YAAY,EAAE,EACpB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,cAAc,GAAG,SAAS,EACjC,MAAM,SAAU,GACf,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAYxC;AAED,gFAAgF;AAChF,wBAAgB,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAGhG"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Zap, XCircle, X, Wrench, Workflow, Wheat, Warehouse, Wallet, UtensilsCrossed, Upload, WandSparkles, Utensils, UsersRound, Users, UserX, UserPlus, UserCog, UserCheck, User, Truck, Trophy, TrendingUp, TrendingDown, TreePalm, ToggleLeft, Timer, Ticket, Target, Tags, TableProperties, Tag, Store, Star, Sparkles, Soup, Smartphone, SlidersHorizontal, Sigma, ShoppingCart, ShoppingBag, ShieldCheck, Shield, Settings, Send, Search, ScanLine, Scale, Ruler, RotateCw, RotateCcw, Repeat, Receipt, Radio, Puzzle, PlusCircle, Plus, Plug, PieChart, Phone, Percent, Pencil, PawPrint, PartyPopper, Palette, PackageCheck, Package, Newspaper, Music, MousePointerClick, MoreHorizontal, Mic, MessageSquare, MessageCircle, Megaphone, MapPin, Map, Mail, LogIn, Lock, ListPlus, ListMusic, ListChecks, List, Link, LineChart, LeafyGreen, Leaf, LayoutTemplate, LayoutDashboard, Layers, Landmark, Instagram, Inbox, Images, Image, Home, FolderTree, Hourglass, Heart, Handshake, HandCoins, GraduationCap, Globe, GlassWater, Gift, Gauge, FolderOpen, Flame, Filter, FileText, FileDown, FileCheck2, Eye, ExternalLink, Egg, DoorOpen, DollarSign, Dog, Disc3, Database, CreditCard, CookingPot, Contact, Compass, Command, Clock3, Clock, ClipboardList, ClipboardCheck, Clapperboard, CircleDollarSign, CircleCheck, Circle, ChevronsUpDown, ChevronDown, ChefHat, CheckSquare, CheckCircle, Check, Cat, Camera, CalendarX, CalendarRange, CalendarPlus, CalendarDays, CalendarClock, CalendarCheck2, CalendarCheck, Calendar, Building2, Briefcase, Boxes, Box, BookOpenCheck, BookOpen, Bike, Bell, Beer, BarChart3, Banknote, Ban, BadgeDollarSign, Award, ArrowUpRight, ArrowUpCircle, ArrowLeftRight, ArrowDownRight, ArrowDownCircle, Apple, AlertTriangle, Activity } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
// src/primitives/brand-marks.tsx
|
|
6
|
+
var ChefControlMark = React.forwardRef(
|
|
7
|
+
function ChefControlMark2(props, ref) {
|
|
8
|
+
return (
|
|
9
|
+
// The viewBox is the symbol's ink box, not the 1080 square of the source
|
|
10
|
+
// file: cropped, the hat centres in a tile instead of floating in padding.
|
|
11
|
+
/* @__PURE__ */ jsx("svg", { ref, viewBox: "140.2 147.83 799.59 784.35", fill: "currentColor", "aria-hidden": true, ...props, children: /* @__PURE__ */ jsx("path", { d: "M871.42,305.72c-8.6-6.71-17.86-12.68-27.66-17.78-25.93-13.54-55.59-21.23-87.13-21.23-8.66,0-17.18.58-25.51,1.7-33.22-70.59-106.31-120.58-191.12-120.58s-157.93,49.99-191.12,120.61h-.03c-8.33-1.15-16.85-1.73-25.51-1.73-32.62,0-63.27,8.24-89.79,22.68-9.74,5.27-18.94,11.41-27.45,18.27-40.27,32.41-65.9,81.19-65.9,135.73,0,93.23,74.89,169.64,169.82,176.21,3.88,33.85,5.91,68.69,5.91,104.24,0,45.93-3.38,90.64-9.77,133.6-2,13.45-4.3,26.71-6.87,39.79,13.5-3.43,27.27-6.6,41.25-9.42,62.07-12.68,128.53-19.54,197.6-19.54s135.5,6.86,197.57,19.54c13.98,2.82,27.75,5.96,41.25,9.42-2.57-13.08-4.87-26.33-6.87-39.79-6.39-42.96-9.77-87.67-9.77-133.6,0-35.47,2-70.21,5.89-104.01,96.69-4.84,173.58-82,173.58-176.44,0-55.64-26.67-105.28-68.37-137.66ZM771.38,570.43c-4.87.51-9.77.75-14.76.75-8.36,0-16.55-.72-24.52-2.09-1.94,12.64-3.64,25.42-5.11,38.35-4.03,35.73-6.12,72.47-6.12,110.02,0,44.3,2.93,173.01,8.48,214.69-60.25-12.28-124.5-18.91-191.2-18.91s-130.99,6.63-191.24,18.94c5.56-41.67,8.48-170.42,8.48-214.71,0-37.34-2.09-73.9-6.06-109.45-1.43-12.93-3.14-25.72-5.11-38.35-6.81,1.02-13.8,1.52-20.88,1.52-6.27,0-12.46-.39-18.52-1.19-71.03-9.08-125.94-69.78-125.94-143.29,0-42.06,17.95-79.91,46.63-106.31,8.54-7.88,18.04-14.73,28.32-20.37,20.64-11.35,44.33-17.8,69.51-17.8,4.24,0,8.42.18,12.55.54,13.2,1.13,25.87,4.03,37.82,8.48,3.2-12.7,7.83-24.79,13.68-36.17,28.47-55.29,86.12-93.11,152.61-93.11s124.11,37.82,152.58,93.11c5.85,11.38,10.49,23.48,13.68,36.17,11.92-4.45,24.61-7.35,37.82-8.48,4.12-.36,8.3-.54,12.55-.54,24.07,0,46.75,5.88,66.7,16.28,10.34,5.41,19.95,12.01,28.62,19.66,30.14,26.47,49.17,65.3,49.17,108.55,0,74.8-56.87,136.36-129.73,143.74Z" }) })
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
var BRAND_MARKS = {
|
|
16
|
+
ChefControlMark
|
|
17
|
+
};
|
|
18
|
+
var registry = {
|
|
19
|
+
Activity,
|
|
20
|
+
AlertTriangle,
|
|
21
|
+
Apple,
|
|
22
|
+
ArrowDownCircle,
|
|
23
|
+
ArrowDownRight,
|
|
24
|
+
ArrowLeftRight,
|
|
25
|
+
ArrowUpCircle,
|
|
26
|
+
ArrowUpRight,
|
|
27
|
+
Award,
|
|
28
|
+
BadgeDollarSign,
|
|
29
|
+
Ban,
|
|
30
|
+
Banknote,
|
|
31
|
+
BarChart3,
|
|
32
|
+
Beer,
|
|
33
|
+
Bell,
|
|
34
|
+
Bike,
|
|
35
|
+
BookOpen,
|
|
36
|
+
BookOpenCheck,
|
|
37
|
+
Box,
|
|
38
|
+
Boxes,
|
|
39
|
+
Briefcase,
|
|
40
|
+
Building2,
|
|
41
|
+
Calendar,
|
|
42
|
+
CalendarCheck,
|
|
43
|
+
CalendarCheck2,
|
|
44
|
+
CalendarClock,
|
|
45
|
+
CalendarDays,
|
|
46
|
+
CalendarPlus,
|
|
47
|
+
CalendarRange,
|
|
48
|
+
CalendarX,
|
|
49
|
+
Camera,
|
|
50
|
+
Cat,
|
|
51
|
+
Check,
|
|
52
|
+
CheckCircle,
|
|
53
|
+
CheckSquare,
|
|
54
|
+
ChefHat,
|
|
55
|
+
ChevronDown,
|
|
56
|
+
ChevronsUpDown,
|
|
57
|
+
Circle,
|
|
58
|
+
CircleCheck,
|
|
59
|
+
CircleDollarSign,
|
|
60
|
+
Clapperboard,
|
|
61
|
+
ClipboardCheck,
|
|
62
|
+
ClipboardList,
|
|
63
|
+
Clock,
|
|
64
|
+
Clock3,
|
|
65
|
+
Command,
|
|
66
|
+
Compass,
|
|
67
|
+
Contact,
|
|
68
|
+
CookingPot,
|
|
69
|
+
CreditCard,
|
|
70
|
+
Database,
|
|
71
|
+
Disc3,
|
|
72
|
+
Dog,
|
|
73
|
+
DollarSign,
|
|
74
|
+
DoorOpen,
|
|
75
|
+
Egg,
|
|
76
|
+
ExternalLink,
|
|
77
|
+
Eye,
|
|
78
|
+
FileCheck2,
|
|
79
|
+
FileDown,
|
|
80
|
+
FileText,
|
|
81
|
+
Filter,
|
|
82
|
+
Flame,
|
|
83
|
+
FolderOpen,
|
|
84
|
+
Gauge,
|
|
85
|
+
Gift,
|
|
86
|
+
GlassWater,
|
|
87
|
+
Globe,
|
|
88
|
+
GraduationCap,
|
|
89
|
+
HandCoins,
|
|
90
|
+
Handshake,
|
|
91
|
+
Heart,
|
|
92
|
+
Hourglass,
|
|
93
|
+
FolderTree,
|
|
94
|
+
Home,
|
|
95
|
+
Image,
|
|
96
|
+
Images,
|
|
97
|
+
Inbox,
|
|
98
|
+
Instagram,
|
|
99
|
+
Landmark,
|
|
100
|
+
Layers,
|
|
101
|
+
LayoutDashboard,
|
|
102
|
+
LayoutTemplate,
|
|
103
|
+
Leaf,
|
|
104
|
+
LeafyGreen,
|
|
105
|
+
LineChart,
|
|
106
|
+
Link,
|
|
107
|
+
List,
|
|
108
|
+
ListChecks,
|
|
109
|
+
ListMusic,
|
|
110
|
+
ListPlus,
|
|
111
|
+
Lock,
|
|
112
|
+
LogIn,
|
|
113
|
+
Mail,
|
|
114
|
+
Map,
|
|
115
|
+
MapPin,
|
|
116
|
+
Megaphone,
|
|
117
|
+
MessageCircle,
|
|
118
|
+
MessageSquare,
|
|
119
|
+
Mic,
|
|
120
|
+
MoreHorizontal,
|
|
121
|
+
MousePointerClick,
|
|
122
|
+
Music,
|
|
123
|
+
Newspaper,
|
|
124
|
+
Package,
|
|
125
|
+
PackageCheck,
|
|
126
|
+
Palette,
|
|
127
|
+
PartyPopper,
|
|
128
|
+
PawPrint,
|
|
129
|
+
Pencil,
|
|
130
|
+
Percent,
|
|
131
|
+
Phone,
|
|
132
|
+
PieChart,
|
|
133
|
+
Plug,
|
|
134
|
+
Plus,
|
|
135
|
+
PlusCircle,
|
|
136
|
+
Puzzle,
|
|
137
|
+
Radio,
|
|
138
|
+
Receipt,
|
|
139
|
+
Repeat,
|
|
140
|
+
RotateCcw,
|
|
141
|
+
RotateCw,
|
|
142
|
+
Ruler,
|
|
143
|
+
Scale,
|
|
144
|
+
ScanLine,
|
|
145
|
+
Search,
|
|
146
|
+
Send,
|
|
147
|
+
Settings,
|
|
148
|
+
Shield,
|
|
149
|
+
ShieldCheck,
|
|
150
|
+
ShoppingBag,
|
|
151
|
+
ShoppingCart,
|
|
152
|
+
Sigma,
|
|
153
|
+
SlidersHorizontal,
|
|
154
|
+
Smartphone,
|
|
155
|
+
Soup,
|
|
156
|
+
Sparkles,
|
|
157
|
+
Star,
|
|
158
|
+
Store,
|
|
159
|
+
Tag,
|
|
160
|
+
TableProperties,
|
|
161
|
+
Tags,
|
|
162
|
+
Target,
|
|
163
|
+
Ticket,
|
|
164
|
+
Timer,
|
|
165
|
+
ToggleLeft,
|
|
166
|
+
TreePalm,
|
|
167
|
+
TrendingDown,
|
|
168
|
+
TrendingUp,
|
|
169
|
+
Trophy,
|
|
170
|
+
Truck,
|
|
171
|
+
User,
|
|
172
|
+
UserCheck,
|
|
173
|
+
UserCog,
|
|
174
|
+
UserPlus,
|
|
175
|
+
UserX,
|
|
176
|
+
Users,
|
|
177
|
+
UsersRound,
|
|
178
|
+
Utensils,
|
|
179
|
+
WandSparkles,
|
|
180
|
+
Upload,
|
|
181
|
+
UtensilsCrossed,
|
|
182
|
+
Wallet,
|
|
183
|
+
Warehouse,
|
|
184
|
+
Wheat,
|
|
185
|
+
Workflow,
|
|
186
|
+
Wrench,
|
|
187
|
+
X,
|
|
188
|
+
XCircle,
|
|
189
|
+
Zap,
|
|
190
|
+
// The family's own product marks, resolvable by the same string names the
|
|
191
|
+
// app registry stores — a product that HAS a mark should never be drawn by a
|
|
192
|
+
// stand-in glyph in the launcher.
|
|
193
|
+
...BRAND_MARKS
|
|
194
|
+
};
|
|
195
|
+
function registerIcons(icons) {
|
|
196
|
+
Object.assign(registry, icons);
|
|
197
|
+
}
|
|
198
|
+
function getLucideIcon(name) {
|
|
199
|
+
return registry[name];
|
|
200
|
+
}
|
|
201
|
+
var ICON_MAP = registry;
|
|
202
|
+
|
|
203
|
+
export { BRAND_MARKS, ChefControlMark, ICON_MAP, getLucideIcon, registerIcons };
|
|
204
|
+
//# sourceMappingURL=chunk-AIUHVTVK.js.map
|
|
205
|
+
//# sourceMappingURL=chunk-AIUHVTVK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/primitives/brand-marks.tsx","../src/icons.ts"],"names":["ChefControlMark"],"mappings":";;;;;AA+BO,IAAM,eAAA,GAAwB,KAAA,CAAA,UAAA;AAAA,EACnC,SAASA,gBAAAA,CAAgB,KAAA,EAAO,GAAA,EAAK;AACnC,IAAA;AAAA;AAAA;AAAA,sBAGE,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAU,OAAA,EAAQ,8BAA6B,IAAA,EAAK,cAAA,EAAe,aAAA,EAAW,IAAA,EAAE,GAAG,KAAA,EACtF,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,2mDAA0mD,CAAA,EACpnD;AAAA;AAAA,EAEJ;AACF;AAGO,IAAM,WAAA,GAA0C;AAAA,EACrD;AACF;ACZA,IAAM,QAAA,GAAuC;AAAA,EAC3C,QAAA;AAAA,EAAU,aAAA;AAAA,EAAe,KAAA;AAAA,EAAO,eAA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,IAAA;AAAA,EAAM,KAAA;AAAA,EAAO,GAAA;AAAA,EAC3G,eAAA;AAAA,EAAiB,IAAA;AAAA,EAAM,MAAA;AAAA,EAAQ,MAAA;AAAA,EAAQ,KAAA;AAAA,EAAO,UAAA;AAAA,EAAY,QAAA;AAAA,EAAU,YAAA;AAAA,EAAc,UAAA;AAAA,EAAY,MAAA;AAAA,EAAQ,KAAA;AAAA,EACtG,IAAA;AAAA,EAAM,SAAA;AAAA,EAAW,OAAA;AAAA,EAAS,QAAA;AAAA,EAAU,KAAA;AAAA,EAAO,KAAA;AAAA,EAAO,UAAA;AAAA,EAAY,QAAA;AAAA,EAAU,YAAA;AAAA,EACxE,MAAA;AAAA,EAAQ,eAAA;AAAA,EAAiB,MAAA;AAAA,EAAQ,SAAA;AAAA,EAAW,KAAA;AAAA,EAAO,QAAA;AAAA,EAAU,MAAA;AAAA,EAAQ,CAAA;AAAA,EAAG,OAAA;AAAA,EACxE,GAAA;AAAA;AAAA;AAAA;AAAA,EAIA,GAAG;AACL,CAAA;AAGO,SAAS,cAAc,KAAA,EAAyC;AACrE,EAAA,MAAA,CAAO,MAAA,CAAO,UAAU,KAAK,CAAA;AAC/B;AAGO,SAAS,cAAc,IAAA,EAAsC;AAClE,EAAA,OAAO,SAAS,IAAI,CAAA;AACtB;AAGO,IAAM,QAAA,GAAW","file":"chunk-AIUHVTVK.js","sourcesContent":["import * as React from 'react'\nimport type { LucideIcon } from 'lucide-react'\n\n// ---------------------------------------------------------------------------\n// The Control family's own product marks.\n//\n// Every other tile in the app switcher is a lucide glyph named by a row in\n// `app.apps`, which is fine for a product that has no mark of its own. It is\n// not fine for one that does: ChefControl's symbol has weight hierarchy — thin\n// crown, heavy base, the same contrast as the logotype beside it — and lucide's\n// `ChefHat` draws the same object at constant stroke. The launcher is where a\n// product is recognised rather than read, so the row that shows a stand-in is\n// the row that says \"this app has no brand\".\n//\n// They live in the registry rather than in each app because the switcher lists\n// SIBLINGS: StoreControl draws the Chef row too, and a mark that only the app\n// itself owns would leave the same product looking like two different products\n// depending on which window you opened the menu from.\n//\n// `fill=\"currentColor\"` and no stroke: the tile decides the ink (see AppMark),\n// the same way a surface decides the colour of the text beside it — one drawing\n// for the gold tile, the rail and the login card, with no per-surface file and\n// no `filter: invert`, which chews the anti-aliased edge.\n// ---------------------------------------------------------------------------\n\n/**\n * Typed as a lucide icon so it can sit in the same registry: the props a mark\n * actually reads are `className` and `style`, and the stroke props the callers\n * pass mean nothing to a filled path — harmless, and not worth a second\n * resolver to avoid.\n */\nexport const ChefControlMark = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(\n function ChefControlMark(props, ref) {\n return (\n // The viewBox is the symbol's ink box, not the 1080 square of the source\n // file: cropped, the hat centres in a tile instead of floating in padding.\n <svg ref={ref} viewBox=\"140.2 147.83 799.59 784.35\" fill=\"currentColor\" aria-hidden {...props}>\n <path d=\"M871.42,305.72c-8.6-6.71-17.86-12.68-27.66-17.78-25.93-13.54-55.59-21.23-87.13-21.23-8.66,0-17.18.58-25.51,1.7-33.22-70.59-106.31-120.58-191.12-120.58s-157.93,49.99-191.12,120.61h-.03c-8.33-1.15-16.85-1.73-25.51-1.73-32.62,0-63.27,8.24-89.79,22.68-9.74,5.27-18.94,11.41-27.45,18.27-40.27,32.41-65.9,81.19-65.9,135.73,0,93.23,74.89,169.64,169.82,176.21,3.88,33.85,5.91,68.69,5.91,104.24,0,45.93-3.38,90.64-9.77,133.6-2,13.45-4.3,26.71-6.87,39.79,13.5-3.43,27.27-6.6,41.25-9.42,62.07-12.68,128.53-19.54,197.6-19.54s135.5,6.86,197.57,19.54c13.98,2.82,27.75,5.96,41.25,9.42-2.57-13.08-4.87-26.33-6.87-39.79-6.39-42.96-9.77-87.67-9.77-133.6,0-35.47,2-70.21,5.89-104.01,96.69-4.84,173.58-82,173.58-176.44,0-55.64-26.67-105.28-68.37-137.66ZM771.38,570.43c-4.87.51-9.77.75-14.76.75-8.36,0-16.55-.72-24.52-2.09-1.94,12.64-3.64,25.42-5.11,38.35-4.03,35.73-6.12,72.47-6.12,110.02,0,44.3,2.93,173.01,8.48,214.69-60.25-12.28-124.5-18.91-191.2-18.91s-130.99,6.63-191.24,18.94c5.56-41.67,8.48-170.42,8.48-214.71,0-37.34-2.09-73.9-6.06-109.45-1.43-12.93-3.14-25.72-5.11-38.35-6.81,1.02-13.8,1.52-20.88,1.52-6.27,0-12.46-.39-18.52-1.19-71.03-9.08-125.94-69.78-125.94-143.29,0-42.06,17.95-79.91,46.63-106.31,8.54-7.88,18.04-14.73,28.32-20.37,20.64-11.35,44.33-17.8,69.51-17.8,4.24,0,8.42.18,12.55.54,13.2,1.13,25.87,4.03,37.82,8.48,3.2-12.7,7.83-24.79,13.68-36.17,28.47-55.29,86.12-93.11,152.61-93.11s124.11,37.82,152.58,93.11c5.85,11.38,10.49,23.48,13.68,36.17,11.92-4.45,24.61-7.35,37.82-8.48,4.12-.36,8.3-.54,12.55-.54,24.07,0,46.75,5.88,66.7,16.28,10.34,5.41,19.95,12.01,28.62,19.66,30.14,26.47,49.17,65.3,49.17,108.55,0,74.8-56.87,136.36-129.73,143.74Z\" />\n </svg>\n )\n },\n) as unknown as LucideIcon\n\n/** Registry entries, by the name `app.apps.icon` carries for these products. */\nexport const BRAND_MARKS: Record<string, LucideIcon> = {\n ChefControlMark,\n}\n","import type { LucideIcon } from 'lucide-react'\nimport { BRAND_MARKS } from './primitives/brand-marks'\nimport {\n Activity, AlertTriangle, Apple, ArrowDownCircle, ArrowDownRight, ArrowLeftRight, ArrowUpCircle, ArrowUpRight,\n Award, BadgeDollarSign, Ban, Banknote, BarChart3, Beer, Bell, Bike, BookOpen,\n BookOpenCheck, Box, Boxes, Briefcase, Building2, Calendar, CalendarCheck, CalendarCheck2,\n CalendarClock, CalendarDays, CalendarPlus, CalendarRange, CalendarX, Camera, Cat, Check, CheckCircle,\n CheckSquare, ChefHat, ChevronDown, ChevronsUpDown, Circle, CircleCheck, CircleDollarSign, Clapperboard,\n ClipboardCheck, ClipboardList,\n Clock, Clock3, Command, Compass, Contact, CookingPot, CreditCard, Database, Disc3, Dog,\n DollarSign, DoorOpen, Egg, ExternalLink, Eye, FileCheck2, FileDown,\n FileText, Filter, Flame, FolderOpen, Gauge, Gift, GlassWater, Globe, GraduationCap, HandCoins, Handshake, Heart, Hourglass,\n FolderTree, Home, Image, Images, Inbox, Instagram, Landmark, Layers, LayoutDashboard, LayoutTemplate,\n Leaf, LeafyGreen, LineChart, Link, List, ListChecks, ListMusic, ListPlus, Lock, LogIn,\n Mail, Map, MapPin, Megaphone, MessageCircle, MessageSquare, Mic, MoreHorizontal,\n MousePointerClick, Music, Newspaper, Package, PackageCheck, Palette, PartyPopper, PawPrint,\n Pencil, Percent, Phone, PieChart, Plug, Plus, PlusCircle, Puzzle, Radio,\n Receipt, Repeat, RotateCcw, RotateCw, Ruler, Scale, ScanLine, Search, Send, Settings, Shield,\n ShieldCheck, ShoppingBag, ShoppingCart, Sigma, SlidersHorizontal, Smartphone, Soup, Sparkles, Star, Store, Tag,\n TableProperties, Tags, Target, Ticket, Timer, ToggleLeft, TreePalm, TrendingDown, TrendingUp, Trophy, Truck,\n User, UserCheck, UserCog, UserPlus, UserX, Users, UsersRound, Utensils, WandSparkles,\n Upload, UtensilsCrossed, Wallet, Warehouse, Wheat, Workflow, Wrench, X, XCircle,\n Zap,\n} from 'lucide-react'\n\n// ---------------------------------------------------------------------------\n// Central lucide icon registry. The SDK's manifest-driven surfaces resolve\n// icons by string name; a namespace import (`import * as LucideIcons`) defeats\n// tree-shaking and drags all ~1,500 icons (~500 KB min) into every bundle, so\n// the SDK ships this curated set instead — the union of every icon name the\n// SDK, plugins, and app templates reference. Apps using names outside the set\n// call registerIcons({ Name: Component }) with their own named imports.\n// ---------------------------------------------------------------------------\n\nconst registry: Record<string, LucideIcon> = {\n Activity, AlertTriangle, Apple, ArrowDownCircle, ArrowDownRight, ArrowLeftRight, ArrowUpCircle, ArrowUpRight,\n Award, BadgeDollarSign, Ban, Banknote, BarChart3, Beer, Bell, Bike, BookOpen,\n BookOpenCheck, Box, Boxes, Briefcase, Building2, Calendar, CalendarCheck, CalendarCheck2,\n CalendarClock, CalendarDays, CalendarPlus, CalendarRange, CalendarX, Camera, Cat, Check, CheckCircle,\n CheckSquare, ChefHat, ChevronDown, ChevronsUpDown, Circle, CircleCheck, CircleDollarSign, Clapperboard,\n ClipboardCheck, ClipboardList,\n Clock, Clock3, Command, Compass, Contact, CookingPot, CreditCard, Database, Disc3, Dog,\n DollarSign, DoorOpen, Egg, ExternalLink, Eye, FileCheck2, FileDown,\n FileText, Filter, Flame, FolderOpen, Gauge, Gift, GlassWater, Globe, GraduationCap, HandCoins, Handshake, Heart, Hourglass,\n FolderTree, Home, Image, Images, Inbox, Instagram, Landmark, Layers, LayoutDashboard, LayoutTemplate,\n Leaf, LeafyGreen, LineChart, Link, List, ListChecks, ListMusic, ListPlus, Lock, LogIn,\n Mail, Map, MapPin, Megaphone, MessageCircle, MessageSquare, Mic, MoreHorizontal,\n MousePointerClick, Music, Newspaper, Package, PackageCheck, Palette, PartyPopper, PawPrint,\n Pencil, Percent, Phone, PieChart, Plug, Plus, PlusCircle, Puzzle, Radio,\n Receipt, Repeat, RotateCcw, RotateCw, Ruler, Scale, ScanLine, Search, Send, Settings, Shield,\n ShieldCheck, ShoppingBag, ShoppingCart, Sigma, SlidersHorizontal, Smartphone, Soup, Sparkles, Star, Store, Tag,\n TableProperties, Tags, Target, Ticket, Timer, ToggleLeft, TreePalm, TrendingDown, TrendingUp, Trophy, Truck,\n User, UserCheck, UserCog, UserPlus, UserX, Users, UsersRound, Utensils, WandSparkles,\n Upload, UtensilsCrossed, Wallet, Warehouse, Wheat, Workflow, Wrench, X, XCircle,\n Zap,\n // The family's own product marks, resolvable by the same string names the\n // app registry stores — a product that HAS a mark should never be drawn by a\n // stand-in glyph in the launcher.\n ...BRAND_MARKS,\n}\n\n/** Add or override icons resolvable by string name (e.g. from app manifests). */\nexport function registerIcons(icons: Record<string, LucideIcon>): void {\n Object.assign(registry, icons)\n}\n\n/** Resolve a lucide icon by name; undefined when not registered. */\nexport function getLucideIcon(name: string): LucideIcon | undefined {\n return registry[name]\n}\n\n/** The registered icon map (live reference — do not mutate directly). */\nexport const ICON_MAP = registry\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useHasPageHeaderHost, usePageHeader, PageTitlePortal, useLayoutStore, useHasPageHeaderBack, useRegisterPageActions, usePageHeaderClaimed, usePageTitleSlotHost, useHasPageHeaderOutlet, useHasPageActions, usePageHeaderHost } from './chunk-HKGTF2YA.js';
|
|
2
2
|
import { cn } from './chunk-OKZ6WQB3.js';
|
|
3
|
-
import { ICON_MAP } from './chunk-
|
|
3
|
+
import { ICON_MAP } from './chunk-AIUHVTVK.js';
|
|
4
4
|
import * as React2 from 'react';
|
|
5
5
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
6
6
|
import { X, Loader2, ArrowLeft, Search, Bell, PanelLeft, PanelLeftClose, Menu, Crown, ChevronDown, ChevronRight, ChevronLeft, ExternalLink, CreditCard, Sparkles, Home, Plus, UserCog, Settings, LogOut } from 'lucide-react';
|
|
@@ -208,16 +208,16 @@ function useBackHandler(onBack) {
|
|
|
208
208
|
};
|
|
209
209
|
}, [api]);
|
|
210
210
|
}
|
|
211
|
-
function useSaveBar({ dirty, saving = false, onSave, onDiscard, message, saveLabel, discardLabel }) {
|
|
211
|
+
function useSaveBar({ dirty, alwaysVisible, saving = false, onSave, onDiscard, message, saveLabel, discardLabel }) {
|
|
212
212
|
const api = React2.useContext(SaveBarApiContext);
|
|
213
213
|
React2.useEffect(() => {
|
|
214
214
|
if (api) api.handlers.current = { onSave, onDiscard };
|
|
215
215
|
});
|
|
216
216
|
React2.useEffect(() => {
|
|
217
217
|
if (!api) return;
|
|
218
|
-
api.setState({ visible: dirty, saving, message, saveLabel, discardLabel });
|
|
218
|
+
api.setState({ visible: dirty || !!alwaysVisible, dirty, saving, message, saveLabel, discardLabel });
|
|
219
219
|
return () => api.setState((s) => ({ ...s, visible: false }));
|
|
220
|
-
}, [api, dirty, saving, message, saveLabel, discardLabel]);
|
|
220
|
+
}, [api, dirty, alwaysVisible, saving, message, saveLabel, discardLabel]);
|
|
221
221
|
}
|
|
222
222
|
function SaveBar({ className }) {
|
|
223
223
|
const state = React2.useContext(SaveBarStateContext);
|
|
@@ -821,6 +821,7 @@ function Sidebar({
|
|
|
821
821
|
topContent,
|
|
822
822
|
identity,
|
|
823
823
|
navTop,
|
|
824
|
+
beforeNav,
|
|
824
825
|
footerContent,
|
|
825
826
|
borderless,
|
|
826
827
|
userMenuSlot,
|
|
@@ -965,7 +966,7 @@ function Sidebar({
|
|
|
965
966
|
Here it reads as what it is — a field — and says which key opens it.
|
|
966
967
|
Clicking it opens the same palette ⌘K does; it is a button, not an
|
|
967
968
|
input, because typing happens there. */
|
|
968
|
-
/* @__PURE__ */ jsx("div", { className: "px-2 pb-2 pt-2", children: /* @__PURE__ */ jsxs(
|
|
969
|
+
/* @__PURE__ */ jsx("div", { className: cn("px-2 pb-2 pt-2", collapsed && "flex justify-center"), children: /* @__PURE__ */ jsxs(
|
|
969
970
|
"button",
|
|
970
971
|
{
|
|
971
972
|
onClick: () => setCommandPaletteOpen(true),
|
|
@@ -995,6 +996,7 @@ function Sidebar({
|
|
|
995
996
|
}
|
|
996
997
|
) })
|
|
997
998
|
),
|
|
999
|
+
beforeNav && /* @__PURE__ */ jsx("div", { className: cn("px-2 pb-1 empty:hidden", collapsed && "flex justify-center"), children: withCollapsed(beforeNav, collapsed) }),
|
|
998
1000
|
/* @__PURE__ */ jsxs(
|
|
999
1001
|
"nav",
|
|
1000
1002
|
{
|
|
@@ -1049,17 +1051,21 @@ function Sidebar({
|
|
|
1049
1051
|
/* @__PURE__ */ jsx(
|
|
1050
1052
|
"div",
|
|
1051
1053
|
{
|
|
1052
|
-
className: cn("py-2 pr-2", !borderless && "border-t border-sidebar-border"),
|
|
1054
|
+
className: cn("py-2", collapsed ? "px-2" : "pr-2", !borderless && "border-t border-sidebar-border"),
|
|
1053
1055
|
style: drawer ? { paddingBottom: "calc(0.5rem + env(safe-area-inset-bottom))" } : void 0,
|
|
1054
1056
|
children: /* @__PURE__ */ jsxs("div", { className: cn(
|
|
1055
1057
|
"flex items-center rounded-button",
|
|
1056
|
-
collapsed ? "flex-col gap-1" : "gap-1"
|
|
1058
|
+
collapsed ? "flex-col justify-center gap-1" : "gap-1"
|
|
1057
1059
|
), children: [
|
|
1058
|
-
userMenuSlot,
|
|
1060
|
+
withCollapsed(userMenuSlot, collapsed),
|
|
1059
1061
|
!collapsed && /* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
1060
|
-
notificationSlot ?? /* @__PURE__ */ jsxs(
|
|
1062
|
+
withCollapsed(notificationSlot, collapsed) ?? /* @__PURE__ */ jsxs(
|
|
1061
1063
|
"button",
|
|
1062
1064
|
{
|
|
1065
|
+
...collapsed ? flyout.rowProps({
|
|
1066
|
+
key: "notifications",
|
|
1067
|
+
label: unreadCount > 0 ? `Notifica\xE7\xF5es (${unreadCount})` : "Notifica\xE7\xF5es"
|
|
1068
|
+
}) : {},
|
|
1063
1069
|
className: "fz-tap relative inline-flex shrink-0 items-center justify-center rounded-button p-2 text-sidebar-muted transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground",
|
|
1064
1070
|
"aria-label": unreadCount > 0 ? `${unreadCount} unread notifications` : "Notifications",
|
|
1065
1071
|
children: [
|
|
@@ -1072,6 +1078,7 @@ function Sidebar({
|
|
|
1072
1078
|
"button",
|
|
1073
1079
|
{
|
|
1074
1080
|
onClick: onToggle,
|
|
1081
|
+
...collapsed ? flyout.rowProps({ key: "expand-sidebar", label: "Expandir menu" }) : {},
|
|
1075
1082
|
className: "fz-tap inline-flex shrink-0 items-center justify-center rounded-button p-2 text-sidebar-muted transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground",
|
|
1076
1083
|
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
1077
1084
|
title: collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
@@ -1385,8 +1392,10 @@ function SidebarLayout({
|
|
|
1385
1392
|
sidebarTopContent,
|
|
1386
1393
|
sidebarIdentity,
|
|
1387
1394
|
sidebarNavTop,
|
|
1395
|
+
sidebarBeforeNav,
|
|
1388
1396
|
sidebarFooterContent,
|
|
1389
1397
|
frame,
|
|
1398
|
+
immersive,
|
|
1390
1399
|
currentPath,
|
|
1391
1400
|
pageTitle,
|
|
1392
1401
|
pageBack,
|
|
@@ -1442,6 +1451,7 @@ function SidebarLayout({
|
|
|
1442
1451
|
topContent: sidebarTopContent,
|
|
1443
1452
|
identity: sidebarIdentity,
|
|
1444
1453
|
navTop: sidebarNavTop,
|
|
1454
|
+
beforeNav: sidebarBeforeNav,
|
|
1445
1455
|
footerContent: sidebarFooterContent,
|
|
1446
1456
|
borderless: frame,
|
|
1447
1457
|
userMenuSlot,
|
|
@@ -1465,15 +1475,21 @@ function SidebarLayout({
|
|
|
1465
1475
|
// chrome between them made the assistant read as a separate window
|
|
1466
1476
|
// parked next to the app rather than as a column of it — the rail's own
|
|
1467
1477
|
// left border is then the single seam between the two.
|
|
1468
|
-
frame && (railOpen ? "md:rounded-r-none md:border-r-0" : "md:mr-2")
|
|
1478
|
+
frame && (railOpen ? "md:rounded-r-none md:border-r-0" : "md:mr-2"),
|
|
1479
|
+
immersive && "md:overflow-hidden"
|
|
1469
1480
|
), children: [
|
|
1470
1481
|
/* @__PURE__ */ jsx("div", { ref: setPageRailSlot, className: "flex shrink-0 empty:hidden" }),
|
|
1471
1482
|
/* @__PURE__ */ jsxs("div", { className: "relative flex min-w-0 flex-1 flex-col overflow-hidden", children: [
|
|
1472
1483
|
/* @__PURE__ */ jsxs("div", { className: cn(
|
|
1473
|
-
"flex
|
|
1484
|
+
"flex shrink-0 items-center justify-between gap-3 px-4 py-2",
|
|
1485
|
+
"min-h-14 border-b border-border",
|
|
1474
1486
|
// …unless the page put its actions in it. Hiding the bar on mobile
|
|
1475
1487
|
// used to hide the only "Novo" the screen had.
|
|
1476
|
-
mobileHeader !== "minimal" && !hasPageActions && "hidden md:flex"
|
|
1488
|
+
mobileHeader !== "minimal" && !hasPageActions && "hidden md:flex",
|
|
1489
|
+
// Immersive pages draw their own window bar. Keeping ours would be two
|
|
1490
|
+
// bars stating one thing — but only on desktop: on a phone this band
|
|
1491
|
+
// is where the hamburger lives, and the page's bar sits under it.
|
|
1492
|
+
immersive && "md:hidden"
|
|
1477
1493
|
), children: [
|
|
1478
1494
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
1479
1495
|
!barOwnsNav && /* @__PURE__ */ jsx(
|
|
@@ -1515,6 +1531,7 @@ function SidebarLayout({
|
|
|
1515
1531
|
topContent: sidebarTopContent,
|
|
1516
1532
|
identity: sidebarIdentity,
|
|
1517
1533
|
navTop: sidebarNavTop,
|
|
1534
|
+
beforeNav: sidebarBeforeNav,
|
|
1518
1535
|
footerContent: sidebarFooterContent,
|
|
1519
1536
|
userMenuSlot,
|
|
1520
1537
|
notificationSlot,
|
|
@@ -1843,12 +1860,14 @@ function AppShell({
|
|
|
1843
1860
|
sidebarTopContent,
|
|
1844
1861
|
sidebarIdentity,
|
|
1845
1862
|
sidebarNavTop,
|
|
1863
|
+
sidebarBeforeNav,
|
|
1846
1864
|
sidebarFooterContent,
|
|
1847
1865
|
bottomNav,
|
|
1848
1866
|
onBottomNavAction,
|
|
1849
1867
|
onAssistantToggle,
|
|
1850
1868
|
assistantOpen,
|
|
1851
1869
|
mobileHeader = "minimal",
|
|
1870
|
+
immersive = false,
|
|
1852
1871
|
userMenuSlot,
|
|
1853
1872
|
drawerUserMenuSlot,
|
|
1854
1873
|
notificationSlot,
|
|
@@ -1909,8 +1928,10 @@ function AppShell({
|
|
|
1909
1928
|
sidebarTopContent,
|
|
1910
1929
|
sidebarIdentity,
|
|
1911
1930
|
sidebarNavTop,
|
|
1931
|
+
sidebarBeforeNav,
|
|
1912
1932
|
sidebarFooterContent,
|
|
1913
1933
|
frame: contentFrame,
|
|
1934
|
+
immersive,
|
|
1914
1935
|
currentPath,
|
|
1915
1936
|
pageTitle,
|
|
1916
1937
|
pageBack,
|
|
@@ -2132,33 +2153,54 @@ function HeaderTabs({
|
|
|
2132
2153
|
children: tabs.map((tab) => {
|
|
2133
2154
|
const active = tab.value === value;
|
|
2134
2155
|
const Icon = tab.icon;
|
|
2135
|
-
|
|
2136
|
-
"
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
"aria-selected": active,
|
|
2141
|
-
onClick: () => onChange(tab.value),
|
|
2142
|
-
className: cn(
|
|
2143
|
-
"relative flex shrink-0 items-center gap-1.5 whitespace-nowrap text-sm transition-colors",
|
|
2144
|
-
// Filled: the row owns the band's height and the underline sits on
|
|
2145
|
-
// its bottom edge. Otherwise the underline trails the label by 6px.
|
|
2146
|
-
fill ? "h-full" : "pb-1.5",
|
|
2147
|
-
active ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
2148
|
-
),
|
|
2149
|
-
children: [
|
|
2150
|
-
Icon ? /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4 shrink-0" }) : null,
|
|
2151
|
-
/* @__PURE__ */ jsx("span", { children: tab.label }),
|
|
2152
|
-
tab.count != null && /* @__PURE__ */ jsx("span", { className: cn(
|
|
2153
|
-
"ml-0.5 rounded-full px-1.5 text-[11px] tabular-nums",
|
|
2154
|
-
active ? "bg-muted text-foreground" : "bg-muted/70 text-muted-foreground"
|
|
2155
|
-
), children: tab.count }),
|
|
2156
|
-
tab.badge,
|
|
2157
|
-
active && /* @__PURE__ */ jsx("span", { className: "absolute inset-x-0 bottom-0 h-0.5 rounded-full bg-foreground" })
|
|
2158
|
-
]
|
|
2159
|
-
},
|
|
2160
|
-
tab.value
|
|
2156
|
+
const box = cn(
|
|
2157
|
+
"relative flex shrink-0 items-center gap-1.5 whitespace-nowrap text-sm transition-colors",
|
|
2158
|
+
fill ? "h-full" : "pb-1.5",
|
|
2159
|
+
active ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground",
|
|
2160
|
+
tab.dim && "opacity-50 hover:opacity-100"
|
|
2161
2161
|
);
|
|
2162
|
+
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2163
|
+
Icon ? /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4 shrink-0" }) : null,
|
|
2164
|
+
/* @__PURE__ */ jsx("span", { children: tab.label }),
|
|
2165
|
+
tab.count != null && /* @__PURE__ */ jsx("span", { className: cn(
|
|
2166
|
+
"ml-0.5 rounded-full px-1.5 text-[11px] tabular-nums",
|
|
2167
|
+
active ? "bg-muted text-foreground" : "bg-muted/70 text-muted-foreground"
|
|
2168
|
+
), children: tab.count }),
|
|
2169
|
+
tab.badge
|
|
2170
|
+
] });
|
|
2171
|
+
const underline = active ? /* @__PURE__ */ jsx("span", { className: "absolute inset-x-0 bottom-0 h-0.5 rounded-full bg-foreground" }) : null;
|
|
2172
|
+
if (!tab.trailing) {
|
|
2173
|
+
return /* @__PURE__ */ jsxs(
|
|
2174
|
+
"button",
|
|
2175
|
+
{
|
|
2176
|
+
type: "button",
|
|
2177
|
+
role: "tab",
|
|
2178
|
+
"aria-selected": active,
|
|
2179
|
+
onClick: () => onChange(tab.value),
|
|
2180
|
+
className: box,
|
|
2181
|
+
children: [
|
|
2182
|
+
inner,
|
|
2183
|
+
underline
|
|
2184
|
+
]
|
|
2185
|
+
},
|
|
2186
|
+
tab.value
|
|
2187
|
+
);
|
|
2188
|
+
}
|
|
2189
|
+
return /* @__PURE__ */ jsxs("div", { className: box, children: [
|
|
2190
|
+
/* @__PURE__ */ jsx(
|
|
2191
|
+
"button",
|
|
2192
|
+
{
|
|
2193
|
+
type: "button",
|
|
2194
|
+
role: "tab",
|
|
2195
|
+
"aria-selected": active,
|
|
2196
|
+
onClick: () => onChange(tab.value),
|
|
2197
|
+
className: "flex items-center gap-1.5 whitespace-nowrap",
|
|
2198
|
+
children: inner
|
|
2199
|
+
}
|
|
2200
|
+
),
|
|
2201
|
+
tab.trailing,
|
|
2202
|
+
underline
|
|
2203
|
+
] }, tab.value);
|
|
2162
2204
|
})
|
|
2163
2205
|
}
|
|
2164
2206
|
);
|
|
@@ -2173,11 +2215,56 @@ function PageTabs({ actions, className, ...props }) {
|
|
|
2173
2215
|
),
|
|
2174
2216
|
children: [
|
|
2175
2217
|
/* @__PURE__ */ jsx(HeaderTabs, { ...props, className: "-mb-px" }),
|
|
2176
|
-
actions && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-2 pb-1.5", children: actions })
|
|
2218
|
+
actions && /* @__PURE__ */ jsx("div", { className: "ml-auto flex shrink-0 items-center gap-2 pb-1.5", children: actions })
|
|
2177
2219
|
]
|
|
2178
2220
|
}
|
|
2179
2221
|
);
|
|
2180
2222
|
}
|
|
2223
|
+
var SIZE = {
|
|
2224
|
+
sm: { container: "h-[26px]", segment: "px-2.5 text-xs" },
|
|
2225
|
+
md: { container: "h-[30px]", segment: "px-3 text-sm" }
|
|
2226
|
+
};
|
|
2227
|
+
function SegmentedControl({
|
|
2228
|
+
options,
|
|
2229
|
+
value,
|
|
2230
|
+
onChange,
|
|
2231
|
+
size = "sm",
|
|
2232
|
+
className,
|
|
2233
|
+
...rest
|
|
2234
|
+
}) {
|
|
2235
|
+
const items = options.map((o) => typeof o === "string" ? { value: o, label: o } : o);
|
|
2236
|
+
return /* @__PURE__ */ jsx(
|
|
2237
|
+
"div",
|
|
2238
|
+
{
|
|
2239
|
+
role: "tablist",
|
|
2240
|
+
"aria-label": rest["aria-label"],
|
|
2241
|
+
className: cn(
|
|
2242
|
+
"inline-flex items-center rounded-button border border-border bg-card p-0.5 shadow-button",
|
|
2243
|
+
SIZE[size].container,
|
|
2244
|
+
className
|
|
2245
|
+
),
|
|
2246
|
+
children: items.map((item) => {
|
|
2247
|
+
const active = item.value === value;
|
|
2248
|
+
return /* @__PURE__ */ jsx(
|
|
2249
|
+
"button",
|
|
2250
|
+
{
|
|
2251
|
+
type: "button",
|
|
2252
|
+
role: "tab",
|
|
2253
|
+
"aria-selected": active,
|
|
2254
|
+
onClick: () => onChange(item.value),
|
|
2255
|
+
className: cn(
|
|
2256
|
+
"flex h-full items-center rounded-button font-semibold transition-colors",
|
|
2257
|
+
SIZE[size].segment,
|
|
2258
|
+
active ? "bg-foreground text-background" : "text-muted-foreground hover:bg-muted/60"
|
|
2259
|
+
),
|
|
2260
|
+
children: item.label
|
|
2261
|
+
},
|
|
2262
|
+
item.value
|
|
2263
|
+
);
|
|
2264
|
+
})
|
|
2265
|
+
}
|
|
2266
|
+
);
|
|
2267
|
+
}
|
|
2181
2268
|
var NavTransitionContext = React2.createContext("slide");
|
|
2182
2269
|
function NavTransitionProvider({ value, children }) {
|
|
2183
2270
|
return /* @__PURE__ */ jsx(NavTransitionContext.Provider, { value, children });
|
|
@@ -2268,7 +2355,7 @@ function RailNavItem({ item }) {
|
|
|
2268
2355
|
] });
|
|
2269
2356
|
}
|
|
2270
2357
|
function defaultChildOf(item) {
|
|
2271
|
-
const kids = item.children ?? [];
|
|
2358
|
+
const kids = (item.children ?? []).filter((c) => c.kind !== "action");
|
|
2272
2359
|
return kids.find((c) => c.defaultChild) ?? kids.find((c) => /(^|-)list$/i.test(c.id)) ?? kids.find((c) => !/(^|-)(new|novo|nova|create)$/i.test(c.id)) ?? kids[0];
|
|
2273
2360
|
}
|
|
2274
2361
|
function MobileTabs({ nav }) {
|
|
@@ -2323,8 +2410,9 @@ function MobileTabs({ nav }) {
|
|
|
2323
2410
|
}) }),
|
|
2324
2411
|
expandedId && (() => {
|
|
2325
2412
|
const item = nav.find((n) => n.id === expandedId);
|
|
2326
|
-
|
|
2327
|
-
|
|
2413
|
+
const shown = (item?.children ?? []).filter((c) => c.kind !== "action");
|
|
2414
|
+
if (shown.length < 2) return null;
|
|
2415
|
+
return /* @__PURE__ */ jsx("div", { className: "flex gap-1 px-2 pb-2 animate-in fade-in-0 slide-in-from-top-1", children: shown.map((child) => /* @__PURE__ */ jsxs(
|
|
2328
2416
|
"button",
|
|
2329
2417
|
{
|
|
2330
2418
|
type: "button",
|
|
@@ -2456,8 +2544,8 @@ function ShellSubpageHeader({
|
|
|
2456
2544
|
}
|
|
2457
2545
|
function ModuleHeader({ nav }) {
|
|
2458
2546
|
function defaultChild(item) {
|
|
2459
|
-
const
|
|
2460
|
-
return
|
|
2547
|
+
const kids2 = (item.children ?? []).filter((c) => c.kind !== "action");
|
|
2548
|
+
return kids2.find((c) => /list/i.test(c.id) || /^list$/i.test(c.label)) ?? kids2[kids2.length - 1];
|
|
2461
2549
|
}
|
|
2462
2550
|
const activeItem = nav.find((item) => item.active || item.children?.some((c) => c.active));
|
|
2463
2551
|
const tabs = nav.map((item) => ({
|
|
@@ -2475,7 +2563,27 @@ function ModuleHeader({ nav }) {
|
|
|
2475
2563
|
if (hasChildren) defaultChild(item)?.onClick?.();
|
|
2476
2564
|
else item.onClick?.();
|
|
2477
2565
|
};
|
|
2478
|
-
|
|
2566
|
+
const kids = (activeItem?.children ?? []).filter((c) => c.kind !== "action");
|
|
2567
|
+
const activeKid = kids.find((c) => c.active)?.id ?? kids[0]?.id;
|
|
2568
|
+
const childControl = kids.length > 1 ? /* @__PURE__ */ jsx(
|
|
2569
|
+
SegmentedControl,
|
|
2570
|
+
{
|
|
2571
|
+
size: "sm",
|
|
2572
|
+
"aria-label": activeItem?.label,
|
|
2573
|
+
options: kids.map((c) => ({ value: c.id, label: c.label })),
|
|
2574
|
+
value: activeKid ?? "",
|
|
2575
|
+
onChange: (id) => kids.find((c) => c.id === id)?.onClick?.()
|
|
2576
|
+
}
|
|
2577
|
+
) : void 0;
|
|
2578
|
+
return /* @__PURE__ */ jsx(
|
|
2579
|
+
PageTabs,
|
|
2580
|
+
{
|
|
2581
|
+
tabs,
|
|
2582
|
+
value: activeItem?.id ?? nav[0]?.id ?? "",
|
|
2583
|
+
onChange,
|
|
2584
|
+
actions: childControl
|
|
2585
|
+
}
|
|
2586
|
+
);
|
|
2479
2587
|
}
|
|
2480
2588
|
function ModulePage({ title: _title, subtitle, nav, children, className, headerAction, showHeader = true, sidebarFooter, navVariant, viewKey, direction }) {
|
|
2481
2589
|
const ctxVariant = useModuleLayout();
|
|
@@ -2508,6 +2616,6 @@ function ModulePage({ title: _title, subtitle, nav, children, className, headerA
|
|
|
2508
2616
|
] });
|
|
2509
2617
|
}
|
|
2510
2618
|
|
|
2511
|
-
export { AppShell, BackStyleProvider, HeaderTabs, ModuleLayoutProvider, ModulePage, NavTransitionProvider, PageHeader, PageHeaderActions, PageHeaderCrumb, PageRail, PageTabs, PageTransition, RailNavItem, SaveBar, SaveBarProvider, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SubpageHeader, Topbar, bottomNavReachesAll, useBackHandler, useBackStyle, useCrossModuleBack, useModuleHeaderActionsSlot, useModuleHeaderSlot, useModuleLayout, useNavTransition, useRailRow, useSaveBar, useSaveBarVisible };
|
|
2512
|
-
//# sourceMappingURL=chunk-
|
|
2513
|
-
//# sourceMappingURL=chunk-
|
|
2619
|
+
export { AppShell, BackStyleProvider, HeaderTabs, ModuleLayoutProvider, ModulePage, NavTransitionProvider, PageHeader, PageHeaderActions, PageHeaderCrumb, PageRail, PageTabs, PageTransition, RailNavItem, SaveBar, SaveBarProvider, SegmentedControl, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SubpageHeader, Topbar, bottomNavReachesAll, useBackHandler, useBackStyle, useCrossModuleBack, useModuleHeaderActionsSlot, useModuleHeaderSlot, useModuleLayout, useNavTransition, useRailRow, useSaveBar, useSaveBarVisible };
|
|
2620
|
+
//# sourceMappingURL=chunk-EGHEU3U5.js.map
|
|
2621
|
+
//# sourceMappingURL=chunk-EGHEU3U5.js.map
|