refactor(shared): consolidate shared components imports into shared/ui
This commit is contained in:
parent
e234aa9d4a
commit
bcf9b15634
36 changed files with 28 additions and 105 deletions
|
|
@ -8,8 +8,7 @@ import { BottomNav } from '../shell/BottomNav';
|
||||||
import { CommandPalette } from '../shell/CommandPalette';
|
import { CommandPalette } from '../shell/CommandPalette';
|
||||||
import { QuickActionsModal } from '../shell/QuickActionsModal';
|
import { QuickActionsModal } from '../shell/QuickActionsModal';
|
||||||
import { NotificationsDrawer } from '../shell/NotificationsDrawer';
|
import { NotificationsDrawer } from '../shell/NotificationsDrawer';
|
||||||
import { Drawer } from '../../shared/components/Drawer';
|
import { Drawer, Button } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
|
|
||||||
export const AppShell: React.FC = () => {
|
export const AppShell: React.FC = () => {
|
||||||
const {
|
const {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useDemoStore } from '../../mock/store';
|
import { useDemoStore } from '../../mock/store';
|
||||||
import { Drawer } from '../../shared/components/Drawer';
|
import { Drawer, Button } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { Bell, AlertTriangle, AlertCircle, CheckCircle2, Info, Check, Trash2 } from 'lucide-react';
|
import { Bell, AlertTriangle, AlertCircle, CheckCircle2, Info, Check, Trash2 } from 'lucide-react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useDemoStore } from '../../mock/store';
|
import { useDemoStore } from '../../mock/store';
|
||||||
import { Modal } from '../../shared/components/Modal';
|
import { Modal, Button, Input } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { Input } from '../../shared/components/Input';
|
|
||||||
import {
|
import {
|
||||||
ShoppingBag,
|
ShoppingBag,
|
||||||
Calendar,
|
Calendar,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useDemoStore } from '../../mock/store';
|
import { useDemoStore } from '../../mock/store';
|
||||||
import { Button } from '../../shared/components/Button';
|
import { Button, Badge } from '../../shared/ui';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
|
||||||
import {
|
import {
|
||||||
Sparkles,
|
Sparkles,
|
||||||
Send,
|
Send,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { useDemoStore } from '../../mock/store';
|
||||||
import { BUSINESS_PROFILES } from '../../core/profiles/profiles';
|
import { BUSINESS_PROFILES } from '../../core/profiles/profiles';
|
||||||
import { SYSTEM_ROLES } from '../../core/permissions/types';
|
import { SYSTEM_ROLES } from '../../core/permissions/types';
|
||||||
import { SYSTEM_MODULES } from '../../core/modules/registry';
|
import { SYSTEM_MODULES } from '../../core/modules/registry';
|
||||||
import { Button } from '../../shared/components/Button';
|
import { Button } from '../../shared/ui';
|
||||||
import {
|
import {
|
||||||
Search,
|
Search,
|
||||||
Plus,
|
Plus,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, MaturityBadge, Modal, useToast } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { Modal } from '../../shared/components/Modal';
|
|
||||||
import { useToast } from '../../shared/ui/useToast';
|
|
||||||
import {
|
import {
|
||||||
Sparkles,
|
Sparkles,
|
||||||
Bot,
|
Bot,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { StatCard } from '../../shared/components/StatCard';
|
import { StatCard, Badge, MaturityBadge } from '../../shared/ui';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { formatCurrency, formatNumber } from '../../shared/utils/formatters';
|
import { formatCurrency, formatNumber } from '../../shared/utils/formatters';
|
||||||
import {
|
import {
|
||||||
XAxis,
|
XAxis,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, MaturityBadge, Button } from '../../shared/ui';
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { CAPABILITIES_LIST } from '../../core/capabilities/types';
|
import { CAPABILITIES_LIST } from '../../core/capabilities/types';
|
||||||
import { useDemoStore } from '../../mock/store';
|
import { useDemoStore } from '../../mock/store';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, MaturityBadge, Modal, useToast } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { Modal } from '../../shared/components/Modal';
|
|
||||||
import { useToast } from '../../shared/ui/useToast';
|
|
||||||
import {
|
import {
|
||||||
ArrowDown,
|
ArrowDown,
|
||||||
Play,
|
Play,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
import React, { useState, useMemo } from 'react';
|
import React, { useState, useMemo } from 'react';
|
||||||
import { useLocation, useNavigate } from 'react-router-dom';
|
import { useLocation, useNavigate } from 'react-router-dom';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, MaturityBadge, useToast } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { useToast } from '../../shared/ui/useToast';
|
|
||||||
import {
|
import {
|
||||||
Globe,
|
Globe,
|
||||||
Smartphone,
|
Smartphone,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { INITIAL_CONVERSATIONS, ConversationItem } from '../../mock/mockData';
|
import { INITIAL_CONVERSATIONS, ConversationItem } from '../../mock/mockData';
|
||||||
import { mockApi } from '../../mock/mockApi';
|
import { mockApi } from '../../mock/mockApi';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, MaturityBadge, useToast } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { useToast } from '../../shared/ui/useToast';
|
|
||||||
import {
|
import {
|
||||||
Send,
|
Send,
|
||||||
Search,
|
Search,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useDemoStore } from '../../mock/store';
|
import { useDemoStore } from '../../mock/store';
|
||||||
import { StatCard } from '../../shared/components/StatCard';
|
import { StatCard, Button, Badge, MaturityBadge } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { Badge } from '../../shared/components/Badge';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { formatCurrency } from '../../shared/utils/formatters';
|
import { formatCurrency } from '../../shared/utils/formatters';
|
||||||
import {
|
import {
|
||||||
TrendingUp,
|
TrendingUp,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { INITIAL_EMPLOYEES, EmployeeEntity } from '../../mock/mockData';
|
import { INITIAL_EMPLOYEES, EmployeeEntity } from '../../mock/mockData';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, MaturityBadge, Modal, useToast } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { Modal } from '../../shared/components/Modal';
|
|
||||||
import { useToast } from '../../shared/ui/useToast';
|
|
||||||
import {
|
import {
|
||||||
Clock,
|
Clock,
|
||||||
Star,
|
Star,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { INITIAL_TICKETS, TicketEntity } from '../../mock/mockData';
|
import { INITIAL_TICKETS, TicketEntity } from '../../mock/mockData';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, MaturityBadge, Modal, useToast } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { Modal } from '../../shared/components/Modal';
|
|
||||||
import { useToast } from '../../shared/ui/useToast';
|
|
||||||
import {
|
import {
|
||||||
AlertCircle,
|
AlertCircle,
|
||||||
Clock,
|
Clock,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,5 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, StatCard, MaturityBadge, Modal, useToast } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { StatCard } from '../../shared/components/StatCard';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { Modal } from '../../shared/components/Modal';
|
|
||||||
import { useToast } from '../../shared/ui/useToast';
|
|
||||||
import { formatCurrency } from '../../shared/utils/formatters';
|
import { formatCurrency } from '../../shared/utils/formatters';
|
||||||
import {
|
import {
|
||||||
Sparkles,
|
Sparkles,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useDemoStore } from '../../mock/store';
|
import { useDemoStore } from '../../mock/store';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { Car, Clock, Plus } from 'lucide-react';
|
import { Car, Clock, Plus } from 'lucide-react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useDemoStore, BookingSlot } from '../../mock/store';
|
import { useDemoStore, BookingSlot } from '../../mock/store';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { formatCurrency } from '../../shared/utils/formatters';
|
import { formatCurrency } from '../../shared/utils/formatters';
|
||||||
import { Clock, Plus } from 'lucide-react';
|
import { Clock, Plus } from 'lucide-react';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useDemoStore, DeliveryItem } from '../../mock/store';
|
import { useDemoStore, DeliveryItem } from '../../mock/store';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { formatCurrency } from '../../shared/utils/formatters';
|
import { formatCurrency } from '../../shared/utils/formatters';
|
||||||
import {
|
import {
|
||||||
Truck,
|
Truck,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useDemoStore } from '../../mock/store';
|
import { useDemoStore } from '../../mock/store';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, MaturityBadge, Modal, useToast } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { Modal } from '../../shared/components/Modal';
|
|
||||||
import { useToast } from '../../shared/ui/useToast';
|
|
||||||
import { formatCurrency } from '../../shared/utils/formatters';
|
import { formatCurrency } from '../../shared/utils/formatters';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { Users, Clock, Utensils, Calendar, Printer } from 'lucide-react';
|
import { Users, Clock, Utensils, Calendar, Printer } from 'lucide-react';
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { useDemoStore, KdsTicket } from '../../mock/store';
|
import { useDemoStore, KdsTicket } from '../../mock/store';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, MaturityBadge, useToast } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { useToast } from '../../shared/ui/useToast';
|
|
||||||
import {
|
import {
|
||||||
Clock,
|
Clock,
|
||||||
CheckCircle2,
|
CheckCircle2,
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,7 @@ import { BaysView } from './BaysView';
|
||||||
import { InventoryModule } from '../inventory/InventoryModule';
|
import { InventoryModule } from '../inventory/InventoryModule';
|
||||||
import { SalesModule } from '../sales/SalesModule';
|
import { SalesModule } from '../sales/SalesModule';
|
||||||
import { INITIAL_CATALOG } from '../../mock/mockData';
|
import { INITIAL_CATALOG } from '../../mock/mockData';
|
||||||
import { Button } from '../../shared/components/Button';
|
import { Button, Badge, MaturityBadge } from '../../shared/ui';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { formatCurrency } from '../../shared/utils/formatters';
|
import { formatCurrency } from '../../shared/utils/formatters';
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,7 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useDemoStore, PosCartItem } from '../../mock/store';
|
import { useDemoStore, PosCartItem } from '../../mock/store';
|
||||||
import { INITIAL_CATALOG } from '../../mock/mockData';
|
import { INITIAL_CATALOG } from '../../mock/mockData';
|
||||||
import { Button } from '../../shared/components/Button';
|
import { Button, Badge, MaturityBadge, Modal, useToast } from '../../shared/ui';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { Modal } from '../../shared/components/Modal';
|
|
||||||
import { useToast } from '../../shared/ui/useToast';
|
|
||||||
import { formatCurrency } from '../../shared/utils/formatters';
|
import { formatCurrency } from '../../shared/utils/formatters';
|
||||||
import {
|
import {
|
||||||
Search,
|
Search,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, StatCard, Modal, Input } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { StatCard } from '../../shared/components/StatCard';
|
|
||||||
import { Modal } from '../../shared/components/Modal';
|
|
||||||
import { Input } from '../../shared/components/Input';
|
|
||||||
import { formatCurrency } from '../../shared/utils/formatters';
|
import { formatCurrency } from '../../shared/utils/formatters';
|
||||||
import {
|
import {
|
||||||
Truck,
|
Truck,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { INITIAL_RECIPES, RecipeItem } from '../../mock/mockData';
|
import { INITIAL_RECIPES, RecipeItem } from '../../mock/mockData';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, Modal } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { formatCurrency } from '../../shared/utils/formatters';
|
import { formatCurrency } from '../../shared/utils/formatters';
|
||||||
import { ChefHat } from 'lucide-react';
|
import { ChefHat } from 'lucide-react';
|
||||||
import { Modal } from '../../shared/components/Modal';
|
|
||||||
|
|
||||||
export const RecipesView: React.FC = () => {
|
export const RecipesView: React.FC = () => {
|
||||||
const [recipes] = useState<RecipeItem[]>(INITIAL_RECIPES);
|
const [recipes] = useState<RecipeItem[]>(INITIAL_RECIPES);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useDemoStore, WorkOrder } from '../../mock/store';
|
import { useDemoStore, WorkOrder } from '../../mock/store';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, Button, Modal } from '../../shared/ui';
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { Modal } from '../../shared/components/Modal';
|
|
||||||
import { formatCurrency } from '../../shared/utils/formatters';
|
import { formatCurrency } from '../../shared/utils/formatters';
|
||||||
import { Car, Plus } from 'lucide-react';
|
import { Car, Plus } from 'lucide-react';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,7 @@ import { useDemoStore } from '../../mock/store';
|
||||||
import { CAPABILITIES_LIST } from '../../core/capabilities/types';
|
import { CAPABILITIES_LIST } from '../../core/capabilities/types';
|
||||||
import { BUSINESS_PROFILES } from '../../core/profiles/profiles';
|
import { BUSINESS_PROFILES } from '../../core/profiles/profiles';
|
||||||
import { SYSTEM_ROLES, SystemRoleId } from '../../core/permissions/types';
|
import { SYSTEM_ROLES, SystemRoleId } from '../../core/permissions/types';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, MaturityBadge, Button, useToast } from '../../shared/ui';
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { useToast } from '../../shared/ui/useToast';
|
|
||||||
import {
|
import {
|
||||||
exportDatabaseSnapshot,
|
exportDatabaseSnapshot,
|
||||||
importDatabaseSnapshot,
|
importDatabaseSnapshot,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { INITIAL_TASKS, TaskEntity } from '../../mock/mockData';
|
import { INITIAL_TASKS, TaskEntity } from '../../mock/mockData';
|
||||||
import { Badge } from '../../shared/components/Badge';
|
import { Badge, MaturityBadge, Button, Modal } from '../../shared/ui';
|
||||||
import { MaturityBadge } from '../../shared/ui/MaturityBadge';
|
|
||||||
import { Button } from '../../shared/components/Button';
|
|
||||||
import { Modal } from '../../shared/components/Modal';
|
|
||||||
import {
|
import {
|
||||||
Clock,
|
Clock,
|
||||||
Plus,
|
Plus,
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export { Badge, type BadgeProps } from '../ui/Badge';
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export { Button, type ButtonProps } from '../ui/Button';
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export { Drawer, type DrawerProps } from '../ui/Drawer';
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export { EmptyState, type EmptyStateProps } from '../ui/EmptyState';
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export { Input, type InputProps } from '../ui/Input';
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export { MaturityBadge, type MaturityBadgeProps, type MaturityLevel } from '../ui/MaturityBadge';
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export { Modal, type ModalProps } from '../ui/Modal';
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export { StatCard, type StatCardProps } from '../ui/StatCard';
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue