@visio-io/design-system 1.8.26 → 1.8.28
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/index.cjs.js +131 -92
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +44914 -21154
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/ActionButton/ActionButton.d.ts +2 -0
- package/dist/types/components/ActionButton/ActionButton.stories.d.ts +15 -0
- package/dist/types/components/ActionButton/index.d.ts +2 -0
- package/dist/types/components/ActionButton/types.d.ts +16 -0
- package/dist/types/components/EventCompatibility/EventCompatibility.d.ts +2 -0
- package/dist/types/components/EventCompatibility/EventCompatibility.stories.d.ts +8 -0
- package/dist/types/components/EventCompatibility/index.d.ts +2 -0
- package/dist/types/components/EventCompatibility/types.d.ts +5 -0
- package/dist/types/components/EventDetailsLayout/EventDetailsLayout.d.ts +2 -0
- package/dist/types/components/EventDetailsLayout/EventDetailsLayout.stories.d.ts +8 -0
- package/dist/types/components/EventDetailsLayout/index.d.ts +2 -0
- package/dist/types/components/EventDetailsLayout/types.d.ts +11 -0
- package/dist/types/components/EventLocation/EventLocation.d.ts +2 -0
- package/dist/types/components/EventLocation/EventLocation.stories.d.ts +8 -0
- package/dist/types/components/EventLocation/index.d.ts +2 -0
- package/dist/types/components/EventLocation/types.d.ts +26 -0
- package/dist/types/components/EventPersonInfo/EventPersonInfo.d.ts +2 -0
- package/dist/types/components/EventPersonInfo/EventPersonInfo.stories.d.ts +7 -0
- package/dist/types/components/EventPersonInfo/index.d.ts +2 -0
- package/dist/types/components/EventPersonInfo/types.d.ts +11 -0
- package/dist/types/components/EventPhotoComparison/EventPhotoComparison.d.ts +2 -0
- package/dist/types/components/EventPhotoComparison/EventPhotoComparison.stories.d.ts +8 -0
- package/dist/types/components/EventPhotoComparison/index.d.ts +2 -0
- package/dist/types/components/EventPhotoComparison/types.d.ts +7 -0
- package/dist/types/components/EventVideoPreview/EventVideoPreview.d.ts +2 -0
- package/dist/types/components/EventVideoPreview/EventVideoPreview.stories.d.ts +7 -0
- package/dist/types/components/EventVideoPreview/index.d.ts +2 -0
- package/dist/types/components/EventVideoPreview/types.d.ts +10 -0
- package/dist/types/components/FormDatePicker/FormDatePicker.d.ts +7 -0
- package/dist/types/components/FormDatePicker/FormDatePicker.stories.d.ts +14 -0
- package/dist/types/components/FormDatePicker/index.d.ts +2 -0
- package/dist/types/components/FormDatePicker/types.d.ts +63 -0
- package/dist/types/components/FormSection/FormSection.d.ts +5 -0
- package/dist/types/components/FormSection/FormSection.stories.d.ts +9 -0
- package/dist/types/components/FormSection/index.d.ts +2 -0
- package/dist/types/components/FormSection/types.d.ts +29 -0
- package/dist/types/components/FormTagSelect/FormTagSelect.d.ts +6 -0
- package/dist/types/components/FormTagSelect/FormTagSelect.stories.d.ts +10 -0
- package/dist/types/components/FormTagSelect/index.d.ts +2 -0
- package/dist/types/components/FormTagSelect/types.d.ts +21 -0
- package/dist/types/components/GoogleMap/components/GoogleMap.d.ts +1 -1
- package/dist/types/components/GoogleMap/components/MapMarkers.d.ts +1 -1
- package/dist/types/components/GoogleMap/types.d.ts +6 -1
- package/dist/types/components/Icons/index.d.ts +11 -0
- package/dist/types/components/ImageWithFallback/ImageWithFallback.d.ts +2 -0
- package/dist/types/components/ImageWithFallback/index.d.ts +2 -0
- package/dist/types/components/ImageWithFallback/types.d.ts +9 -0
- package/dist/types/components/LoadingScreen/LoadingOrb.d.ts +6 -0
- package/dist/types/components/LoadingScreen/LoadingScreen.d.ts +5 -0
- package/dist/types/components/LoadingScreen/LoadingScreen.stories.d.ts +10 -0
- package/dist/types/components/LoadingScreen/index.d.ts +2 -0
- package/dist/types/components/LoadingScreen/types.d.ts +8 -0
- package/dist/types/components/MapSpot/MapSpot.d.ts +1 -1
- package/dist/types/components/PhotoUpload/PhotoUpload.d.ts +6 -0
- package/dist/types/components/PhotoUpload/PhotoUpload.stories.d.ts +9 -0
- package/dist/types/components/PhotoUpload/index.d.ts +2 -0
- package/dist/types/components/PhotoUpload/types.d.ts +46 -0
- package/dist/types/components/TagBadge/TagBadge.d.ts +5 -0
- package/dist/types/components/TagBadge/TagBadge.stories.d.ts +9 -0
- package/dist/types/components/TagBadge/index.d.ts +2 -0
- package/dist/types/components/TagBadge/types.d.ts +7 -0
- package/dist/types/components/VideoPlayer/useVideoPlayer.d.ts +2 -1
- package/dist/types/components/index.d.ts +30 -2
- package/package.json +5 -3
- package/src/styles/tokens/css-variables.scss +13 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ActionButton } from './ActionButton';
|
|
3
|
+
import '../../styles/index.scss';
|
|
4
|
+
declare const meta: Meta<typeof ActionButton>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof ActionButton>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Variants: Story;
|
|
9
|
+
export declare const VariantsWithIcon: Story;
|
|
10
|
+
export declare const Shapes: Story;
|
|
11
|
+
export declare const SizesRound: Story;
|
|
12
|
+
export declare const SizesSquare: Story;
|
|
13
|
+
export declare const States: Story;
|
|
14
|
+
export declare const FilledStates: Story;
|
|
15
|
+
export declare const UseCaseFormActions: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode, MouseEvent } from 'react';
|
|
2
|
+
import { ButtonProps as MuiButtonProps } from '@mui/material';
|
|
3
|
+
export type ActionButtonVariant = 'filled' | 'tonal' | 'outline' | 'elevated' | 'text';
|
|
4
|
+
export type ActionButtonSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
5
|
+
export type ActionButtonShape = 'round' | 'square';
|
|
6
|
+
export interface ActionButtonProps extends Omit<MuiButtonProps, 'variant' | 'size' | 'color' | 'type' | 'startIcon' | 'endIcon' | 'onClick'> {
|
|
7
|
+
variant?: ActionButtonVariant;
|
|
8
|
+
size?: ActionButtonSize;
|
|
9
|
+
shape?: ActionButtonShape;
|
|
10
|
+
type?: 'button' | 'submit' | 'reset';
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
loadingText?: string;
|
|
13
|
+
startIcon?: ReactNode;
|
|
14
|
+
endIcon?: ReactNode;
|
|
15
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { EventCompatibility } from './EventCompatibility';
|
|
3
|
+
declare const meta: Meta<typeof EventCompatibility>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const HighScore: Story;
|
|
7
|
+
export declare const MediumScore: Story;
|
|
8
|
+
export declare const LowScore: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { EventDetailsLayout } from './EventDetailsLayout';
|
|
3
|
+
declare const meta: Meta<typeof EventDetailsLayout>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Loading: Story;
|
|
8
|
+
export declare const Error: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface EventDetailsLayoutProps extends Omit<BoxProps, 'children'> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
headerTitle: string;
|
|
6
|
+
dateLabel?: string;
|
|
7
|
+
time?: string;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
isError?: boolean;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { EventLocation } from './EventLocation';
|
|
3
|
+
declare const meta: Meta<typeof EventLocation>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithCustomMap: Story;
|
|
8
|
+
export declare const NoNearbyEvents: Story;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface NearbyEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
spotId?: string;
|
|
6
|
+
spotName: string;
|
|
7
|
+
cameraName: string;
|
|
8
|
+
timestamp: string;
|
|
9
|
+
address: string;
|
|
10
|
+
type: 'before' | 'after';
|
|
11
|
+
}
|
|
12
|
+
export interface EventLocationProps extends BoxProps {
|
|
13
|
+
address?: string | null;
|
|
14
|
+
mapContent?: ReactNode;
|
|
15
|
+
cameraCount?: number;
|
|
16
|
+
spotCount?: number;
|
|
17
|
+
nearbyAfterEvents?: NearbyEvent[];
|
|
18
|
+
nearbyBeforeEvents?: NearbyEvent[];
|
|
19
|
+
sentinelAfterRef?: (node: HTMLElement | null) => void;
|
|
20
|
+
sentinelBeforeRef?: (node: HTMLElement | null) => void;
|
|
21
|
+
isFetchingMoreAfter?: boolean;
|
|
22
|
+
isFetchingMoreBefore?: boolean;
|
|
23
|
+
onHoverSpot?: (spotId: string | null) => void;
|
|
24
|
+
onSelectEvent?: (eventId: string | null, spotId: string | null) => void;
|
|
25
|
+
selectedEventId?: string | null;
|
|
26
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { EventPersonInfo } from './EventPersonInfo';
|
|
3
|
+
declare const meta: Meta<typeof EventPersonInfo>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const MinimalData: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
export interface EventPersonInfoProps extends BoxProps {
|
|
3
|
+
name: string;
|
|
4
|
+
interestLabel?: string | null;
|
|
5
|
+
document?: string | null;
|
|
6
|
+
documentLabel?: string;
|
|
7
|
+
birthDate?: string | null;
|
|
8
|
+
age?: number | null;
|
|
9
|
+
typeLabel?: string | null;
|
|
10
|
+
onViewProfile?: () => void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { EventPhotoComparison } from './EventPhotoComparison';
|
|
3
|
+
declare const meta: Meta<typeof EventPhotoComparison>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const WithPhotos: Story;
|
|
7
|
+
export declare const NoPhotos: Story;
|
|
8
|
+
export declare const PartialPhotos: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { EventVideoPreview } from './EventVideoPreview';
|
|
3
|
+
declare const meta: Meta<typeof EventVideoPreview>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const WithVideoPlayer: Story;
|
|
7
|
+
export declare const Unavailable: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface EventVideoPreviewProps extends BoxProps {
|
|
4
|
+
cameraLabel?: string;
|
|
5
|
+
videoPlayer?: ReactNode;
|
|
6
|
+
onViewVideo?: () => void;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
cropUrl?: string | null;
|
|
9
|
+
cameraId?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import 'dayjs/locale/pt-br';
|
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
|
3
|
+
import { FormDatePickerProps } from './types';
|
|
4
|
+
export declare const FormDatePicker: {
|
|
5
|
+
<TFieldValues extends FieldValues = FieldValues>({ control, name, label, helperText, required, fullWidth, disabled, className, format, minDate, maxDate, disableFuture, disablePast, }: FormDatePickerProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FormDatePicker } from './FormDatePicker';
|
|
3
|
+
import '../../styles/index.scss';
|
|
4
|
+
declare const meta: Meta<typeof FormDatePicker>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof FormDatePicker>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Required: Story;
|
|
9
|
+
export declare const DisableFuture: Story;
|
|
10
|
+
export declare const WithPrefilledValue: Story;
|
|
11
|
+
export declare const Disabled: Story;
|
|
12
|
+
export declare const WithMinMaxDate: Story;
|
|
13
|
+
export declare const DateRange: Story;
|
|
14
|
+
export declare const AllVariations: Story;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { Dayjs } from 'dayjs';
|
|
3
|
+
/**
|
|
4
|
+
* Props do componente FormDatePicker
|
|
5
|
+
*
|
|
6
|
+
* @template TFieldValues - Tipo do formulário (inferido do schema Zod)
|
|
7
|
+
*/
|
|
8
|
+
export interface FormDatePickerProps<TFieldValues extends FieldValues> {
|
|
9
|
+
/**
|
|
10
|
+
* Instância do control do React Hook Form
|
|
11
|
+
*/
|
|
12
|
+
control: Control<TFieldValues>;
|
|
13
|
+
/**
|
|
14
|
+
* Nome do campo no formulário (tipado com Path para autocomplete)
|
|
15
|
+
*/
|
|
16
|
+
name: Path<TFieldValues>;
|
|
17
|
+
/**
|
|
18
|
+
* Label do campo
|
|
19
|
+
*/
|
|
20
|
+
label: string;
|
|
21
|
+
/**
|
|
22
|
+
* Texto de ajuda exibido abaixo do input (não sobrescreve erros)
|
|
23
|
+
*/
|
|
24
|
+
helperText?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Marca o campo como obrigatório visualmente (asterisco no label)
|
|
27
|
+
*/
|
|
28
|
+
required?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Ocupar largura total do container
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
fullWidth?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Desabilita o campo
|
|
36
|
+
*/
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Classe CSS adicional
|
|
40
|
+
*/
|
|
41
|
+
className?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Formato de exibição da data
|
|
44
|
+
* @default "DD/MM/YYYY"
|
|
45
|
+
*/
|
|
46
|
+
format?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Data mínima selecionável
|
|
49
|
+
*/
|
|
50
|
+
minDate?: Dayjs;
|
|
51
|
+
/**
|
|
52
|
+
* Data máxima selecionável
|
|
53
|
+
*/
|
|
54
|
+
maxDate?: Dayjs;
|
|
55
|
+
/**
|
|
56
|
+
* Desabilita datas futuras (útil para data de nascimento)
|
|
57
|
+
*/
|
|
58
|
+
disableFuture?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Desabilita datas passadas
|
|
61
|
+
*/
|
|
62
|
+
disablePast?: boolean;
|
|
63
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FormSection } from './FormSection';
|
|
3
|
+
import '../../styles/index.scss';
|
|
4
|
+
declare const meta: Meta<typeof FormSection>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof FormSection>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const MultipleSections: Story;
|
|
9
|
+
export declare const Empty: Story;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* Props do componente FormSection
|
|
5
|
+
*
|
|
6
|
+
* Card container com título para agrupar campos de formulário.
|
|
7
|
+
*/
|
|
8
|
+
export interface FormSectionProps {
|
|
9
|
+
/**
|
|
10
|
+
* Título exibido no topo da seção
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* Subtítulo exibido abaixo do título
|
|
15
|
+
*/
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Conteúdo da seção (geralmente campos de formulário)
|
|
19
|
+
*/
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Classe CSS adicional
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Estilos MUI adicionais
|
|
27
|
+
*/
|
|
28
|
+
sx?: SxProps<Theme>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldValues } from "react-hook-form";
|
|
2
|
+
import { FormTagSelectProps } from "./types";
|
|
3
|
+
export declare const FormTagSelect: {
|
|
4
|
+
<TFieldValues extends FieldValues = FieldValues>({ control, name, label, options, placeholder, helperText, required, fullWidth, disabled, onCreate, onManage, className, }: FormTagSelectProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FormTagSelect } from './FormTagSelect';
|
|
3
|
+
declare const meta: Meta<typeof FormTagSelect>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Empty: Story;
|
|
7
|
+
export declare const WithPreselected: Story;
|
|
8
|
+
export declare const WithCreateAndManage: Story;
|
|
9
|
+
export declare const WithManageOnly: Story;
|
|
10
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
export interface TagOption {
|
|
3
|
+
id: string | number;
|
|
4
|
+
label: string;
|
|
5
|
+
colorLight: string;
|
|
6
|
+
colorDark: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FormTagSelectProps<TFieldValues extends FieldValues = FieldValues> {
|
|
9
|
+
control: Control<TFieldValues>;
|
|
10
|
+
name: Path<TFieldValues>;
|
|
11
|
+
label?: string;
|
|
12
|
+
options: TagOption[];
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
helperText?: string;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
onCreate?: (label: string) => Promise<void> | void;
|
|
19
|
+
onManage?: () => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GoogleMapProps } from '../types';
|
|
2
2
|
export declare const GoogleMap: {
|
|
3
|
-
({ center, zoom, className, children, apiKey, mapId, themeMode, options, onLoad, onError, }: GoogleMapProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ center, zoom, className, containerStyle, children, apiKey, mapId, themeMode, options, onLoad, onError, }: GoogleMapProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MapMarkersProps } from '../types';
|
|
2
2
|
export declare const MapMarkers: {
|
|
3
|
-
({ spots, onSpotClick, onCameraClick, zoomLevel, selectedZoomLevel, selectedSpotId, selectedSpot, selectedCameraId, hoveredSpotId, hoveredCameraId, animateOnClick, disableClick, expandAll }: MapMarkersProps): import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
({ spots, onSpotClick, onCameraClick, zoomLevel, selectedZoomLevel, selectedSpotId, selectedSpot, selectedCameraId, hoveredSpotId, hoveredCameraId, animateOnClick, disableClick, expandAll, markedSpotId }: MapMarkersProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
import { type SxProps, type Theme } from '@mui/material';
|
|
3
3
|
export interface GoogleMapProps {
|
|
4
4
|
center?: {
|
|
@@ -8,6 +8,7 @@ export interface GoogleMapProps {
|
|
|
8
8
|
zoom?: number;
|
|
9
9
|
options?: google.maps.MapOptions;
|
|
10
10
|
className?: string;
|
|
11
|
+
containerStyle?: CSSProperties;
|
|
11
12
|
children?: ReactNode;
|
|
12
13
|
onLoad?: (map: google.maps.Map) => void;
|
|
13
14
|
onError?: (error: Error) => void;
|
|
@@ -63,6 +64,8 @@ export interface MapMarkersProps {
|
|
|
63
64
|
selectedZoomLevel?: number;
|
|
64
65
|
/** Id do spot selecionado (legado). Preferir selectedSpot quando disponível. */
|
|
65
66
|
selectedSpotId?: string | number;
|
|
67
|
+
/** Id do spot marcado permanentemente com a cor terciária (sem expandir) */
|
|
68
|
+
markedSpotId?: string | number;
|
|
66
69
|
/** Spot selecionado (novo formato). Se definido, prevalece sobre selectedSpotId para isSelected. */
|
|
67
70
|
selectedSpot?: MapSpotData | null;
|
|
68
71
|
/** Id da câmera selecionada para destacar visualmente no MapSpot */
|
|
@@ -82,6 +85,8 @@ export interface MapSpotProps {
|
|
|
82
85
|
currentZoom?: number;
|
|
83
86
|
isSelected?: boolean;
|
|
84
87
|
selectedCameraId?: string;
|
|
88
|
+
/** Marca o spot com a cor terciária permanentemente, sem expandir nem remover ícones */
|
|
89
|
+
isMarked?: boolean;
|
|
85
90
|
/** Destaca o background do spot com cor de seleção sem mostrar linhas de rotação */
|
|
86
91
|
isHighlighted?: boolean;
|
|
87
92
|
/** Destaca uma câmera específica quando o spot está selecionado (hover da lista) */
|
|
@@ -16,3 +16,14 @@ export { default as LightModeIcon } from "../../assets/icons/light_mode.svg?reac
|
|
|
16
16
|
export { default as DarkModeIcon } from "../../assets/icons/dark_mode.svg?react";
|
|
17
17
|
export { default as NotificationsIcon } from "../../assets/icons/notifications.svg?react";
|
|
18
18
|
export { default as PersonIcon } from "../../assets/icons/person.svg?react";
|
|
19
|
+
export { default as UploadIcon } from "../../assets/icons/upload.svg?react";
|
|
20
|
+
export { default as EditIcon } from "../../assets/icons/edit.svg?react";
|
|
21
|
+
export { default as DeleteIcon } from "../../assets/icons/delete.svg?react";
|
|
22
|
+
export { default as LoadingFrame1 } from "../../assets/icons/loading-1.svg?react";
|
|
23
|
+
export { default as LoadingFrame2 } from "../../assets/icons/loading-2.svg?react";
|
|
24
|
+
export { default as LoadingFrame3 } from "../../assets/icons/loading-3.svg?react";
|
|
25
|
+
export { default as LoadingFrame4 } from "../../assets/icons/loading-4.svg?react";
|
|
26
|
+
export { default as LoadingFrame5 } from "../../assets/icons/loading-5.svg?react";
|
|
27
|
+
export { default as LoadingFrame6 } from "../../assets/icons/loading-6.svg?react";
|
|
28
|
+
export { default as LoadingFrame7 } from "../../assets/icons/loading-7.svg?react";
|
|
29
|
+
export { default as VisioLogoIcon } from "../../assets/icons/visio-logo.svg?react";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ImgHTMLAttributes } from 'react';
|
|
2
|
+
export interface ImageWithFallbackProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src'> {
|
|
3
|
+
src?: string | null;
|
|
4
|
+
alt?: string;
|
|
5
|
+
/** Shorthand to set both width and height to the same value */
|
|
6
|
+
size?: number | string;
|
|
7
|
+
/** Custom fallback image URL. Defaults to the built-in broken image asset */
|
|
8
|
+
fallbackSrc?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { LoadingScreen } from './LoadingScreen';
|
|
3
|
+
import '../../styles/index.scss';
|
|
4
|
+
declare const meta: Meta<typeof LoadingScreen>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof LoadingScreen>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const WithoutWarning: Story;
|
|
9
|
+
export declare const TitleOnly: Story;
|
|
10
|
+
export declare const OrbOnly: Story;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MapSpotProps } from '../GoogleMap/types';
|
|
2
2
|
export declare const MapSpot: {
|
|
3
|
-
({ count, addressText, cameras, currentZoom, isSelected, selectedCameraId, isHighlighted, highlightedCameraId, disableClick, className, onClick, onCameraClick, sx }: MapSpotProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ count, addressText, cameras, currentZoom, isSelected, selectedCameraId, isMarked, isHighlighted, highlightedCameraId, disableClick, className, onClick, onCameraClick, sx }: MapSpotProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { PhotoUploadProps } from './types';
|
|
3
|
+
export declare const PhotoUpload: {
|
|
4
|
+
<TFieldValues extends FieldValues = FieldValues>({ control, name, label, accept, maxSizeInMB, helperText, required, disabled, className, }: PhotoUploadProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { PhotoUpload } from './PhotoUpload';
|
|
3
|
+
import '../../styles/index.scss';
|
|
4
|
+
declare const meta: Meta<typeof PhotoUpload>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof PhotoUpload>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Required: Story;
|
|
9
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
/**
|
|
3
|
+
* Props do componente PhotoUpload
|
|
4
|
+
*
|
|
5
|
+
* Input de upload de foto com preview, integrado ao React Hook Form.
|
|
6
|
+
*/
|
|
7
|
+
export interface PhotoUploadProps<TFieldValues extends FieldValues = FieldValues> {
|
|
8
|
+
/**
|
|
9
|
+
* Instância do control do React Hook Form
|
|
10
|
+
*/
|
|
11
|
+
control: Control<TFieldValues>;
|
|
12
|
+
/**
|
|
13
|
+
* Nome do campo no formulário (tipado com Path para autocomplete)
|
|
14
|
+
*/
|
|
15
|
+
name: Path<TFieldValues>;
|
|
16
|
+
/**
|
|
17
|
+
* Label exibido acima da área de upload
|
|
18
|
+
*/
|
|
19
|
+
label?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Tipos de arquivo aceitos
|
|
22
|
+
* @default 'image/jpeg,image/png'
|
|
23
|
+
*/
|
|
24
|
+
accept?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Tamanho máximo do arquivo em MB
|
|
27
|
+
* @default 5
|
|
28
|
+
*/
|
|
29
|
+
maxSizeInMB?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Texto de ajuda exibido abaixo do upload
|
|
32
|
+
*/
|
|
33
|
+
helperText?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Marca o campo como obrigatório visualmente
|
|
36
|
+
*/
|
|
37
|
+
required?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Desabilitar o upload
|
|
40
|
+
*/
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Classe CSS adicional
|
|
44
|
+
*/
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|