@visio-io/design-system 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/index.cjs.js +52 -25
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.es.js +4795 -1795
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/dist/types/components/CountCard/CountCard.d.ts +13 -0
  7. package/dist/types/components/CountCard/CountCard.stories.d.ts +16 -0
  8. package/dist/types/components/CountCard/index.d.ts +2 -0
  9. package/dist/types/components/FilterButton/FilterButton.d.ts +2 -0
  10. package/dist/types/components/FilterButton/FilterButton.stories.d.ts +13 -0
  11. package/dist/types/components/FilterButton/handlers.d.ts +3 -0
  12. package/dist/types/components/FilterButton/index.d.ts +2 -0
  13. package/dist/types/components/FilterButton/types.d.ts +5 -0
  14. package/dist/types/components/GoogleMap/GoogleMap.stories.d.ts +12 -0
  15. package/dist/types/components/GoogleMap/components/GoogleMap.d.ts +5 -0
  16. package/dist/types/components/GoogleMap/components/MapContent.d.ts +6 -0
  17. package/dist/types/components/GoogleMap/components/MapMarkers.d.ts +5 -0
  18. package/dist/types/components/GoogleMap/context/GoogleMapContext.d.ts +11 -0
  19. package/dist/types/components/GoogleMap/index.d.ts +6 -0
  20. package/dist/types/components/GoogleMap/types.d.ts +36 -0
  21. package/dist/types/components/MapSpot/MapSpot.d.ts +5 -0
  22. package/dist/types/components/MapSpot/MapSpot.stories.d.ts +11 -0
  23. package/dist/types/components/MapSpot/index.d.ts +2 -0
  24. package/dist/types/components/NotFoundContent/NotFoundContent.d.ts +5 -0
  25. package/dist/types/components/NotFoundContent/NotFoundContent.stories.d.ts +9 -0
  26. package/dist/types/components/NotFoundContent/index.d.ts +2 -0
  27. package/dist/types/components/NotFoundContent/types.d.ts +27 -0
  28. package/dist/types/components/SearchBar/SearchBar.d.ts +2 -0
  29. package/dist/types/components/SearchBar/SearchBar.stories.d.ts +16 -0
  30. package/dist/types/components/SearchBar/handlers.d.ts +4 -0
  31. package/dist/types/components/SearchBar/index.d.ts +2 -0
  32. package/dist/types/components/SearchBar/searchBarTheme.d.ts +25 -0
  33. package/dist/types/components/SearchBar/types.d.ts +10 -0
  34. package/dist/types/components/SearchBar/utils.d.ts +8 -0
  35. package/dist/types/components/SidebarMenu/SidebarMenu.d.ts +5 -0
  36. package/dist/types/components/SidebarMenu/SidebarMenu.stories.d.ts +8 -0
  37. package/dist/types/components/SidebarMenu/index.d.ts +2 -0
  38. package/dist/types/components/SidebarMenu/types.d.ts +25 -0
  39. package/dist/types/components/SidebarMenu/useSidebarMenu.d.ts +19 -0
  40. package/dist/types/components/ZoomControls/ZoomControls.d.ts +2 -0
  41. package/dist/types/components/ZoomControls/ZoomControls.stories.d.ts +8 -0
  42. package/dist/types/components/ZoomControls/handlers.d.ts +3 -0
  43. package/dist/types/components/ZoomControls/index.d.ts +2 -0
  44. package/dist/types/components/ZoomControls/types.d.ts +14 -0
  45. package/dist/types/components/index.d.ts +17 -0
  46. package/dist/types/index.d.ts +2 -0
  47. package/dist/types/styles/tokens/spacing.d.ts +1 -0
  48. package/dist/types/theme/VisioThemeProvider.d.ts +18 -0
  49. package/dist/types/theme/theme.d.ts +1 -0
  50. package/package.json +8 -2
  51. package/src/styles/tokens/spacing.ts +1 -0
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .button{transition:all .2s ease-in-out}.button:disabled{cursor:not-allowed}.borderRadiusNone{border-radius:0}.borderRadiusSmall{border-radius:4px}.borderRadiusMedium{border-radius:8px}.borderRadiusLarge{border-radius:16px}.borderRadiusRound{border-radius:50px}._button_1x96v_1{transition:all .2s ease-in-out}._button_1x96v_1:disabled{cursor:not-allowed}._borderRadiusNone_1x96v_8{border-radius:0}._borderRadiusSmall_1x96v_12{border-radius:4px}._borderRadiusMedium_1x96v_16{border-radius:8px}._borderRadiusLarge_1x96v_20{border-radius:16px}._borderRadiusRound_1x96v_24{border-radius:50px}
1
+ ._button_1x96v_1{transition:all .2s ease-in-out}._button_1x96v_1:disabled{cursor:not-allowed}._borderRadiusNone_1x96v_8{border-radius:0}._borderRadiusSmall_1x96v_12{border-radius:4px}._borderRadiusMedium_1x96v_16{border-radius:8px}._borderRadiusLarge_1x96v_20{border-radius:16px}._borderRadiusRound_1x96v_24{border-radius:50px}._filterButton_1w15j_1{border-radius:50px;text-transform:none;padding:16px 24px;font-size:16px;font-family:Roboto,sans-serif;font-weight:400;white-space:nowrap;min-height:56px;height:100%;display:flex;align-items:center;justify-content:center;border-color:#e1bee7;background-color:#fff;color:#49454f;box-shadow:0 1px 3px #0000001a}[data-mui-color-scheme=dark] ._filterButton_1w15j_1{border-color:#ce93d8;background-color:#1e1e1e;color:#ffffffde;box-shadow:0 1px 3px #0000004d}._filterButton_1w15j_1:hover{border-color:#ce93d8;background-color:#fff;box-shadow:0 2px 4px #00000026}[data-mui-color-scheme=dark] ._filterButton_1w15j_1:hover{border-color:#ba68c8;background-color:#2c2c2e;box-shadow:0 2px 4px #0006}._filterButton_1w15j_1:active{box-shadow:0 1px 2px #0000001a}[data-mui-color-scheme=dark] ._filterButton_1w15j_1:active{box-shadow:0 1px 2px #0000004d}._container_1hyey_1{display:flex;gap:8px;-webkit-user-select:none;user-select:none}._card_1hyey_7{display:flex;height:32px;justify-content:center;align-items:center;border-radius:8px;border:1px solid;padding:6px 16px 6px 8px;gap:8px}._icon_1hyey_18{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:18px;height:18px}._icon_1hyey_18 svg{display:block;width:18px;height:18px}._text_1hyey_32{text-align:center;font-style:normal;white-space:nowrap}._container_tr03y_1{display:inline-flex;justify-content:center;align-items:center;gap:8px;-webkit-user-select:none;user-select:none}._zoomButton_tr03y_9{display:flex;width:40px;height:40px;flex-direction:column;justify-content:center;align-items:center;border-radius:100px!important;border:none!important}._icon_tr03y_20{width:24px!important;height:24px!important}._googleMap_j4y4m_1{width:100%;height:100%;min-height:400px;border-radius:8px;overflow:hidden;position:relative}._container_j4y4m_10{width:100%;min-height:400px;height:400px;position:relative;margin:0;padding:0;border-radius:8px;overflow:hidden}._errorContainer_j4y4m_21{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:400px;padding:20px;text-align:center;color:#d32f2f}._loadingContainer_j4y4m_33{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:400px}._mapSpot_m5paz_1{width:30px;height:30px;border-radius:100px;background-color:#79747e;display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;transition:transform .2s ease,box-shadow .2s ease}._mapSpot_m5paz_1:hover{transform:scale(1.1);box-shadow:0 2px 8px #0003}._mapSpot_m5paz_1:active{transform:scale(1.05);box-shadow:0 1px 4px #0000004d}._mapSpot_m5paz_1:focus{outline:2px solid rgba(121,116,126,.5);outline-offset:2px}._count_m5paz_26{color:#fff;font-size:14px;font-weight:600;line-height:1;text-align:center}._searchBar_9glzl_1 .MuiOutlinedInput-root{border-radius:28px;padding-left:0;padding-right:0}._searchBar_9glzl_1 .MuiOutlinedInput-root fieldset,._searchBar_9glzl_1 .MuiOutlinedInput-root:hover fieldset,._searchBar_9glzl_1 .MuiOutlinedInput-root._Mui-focused_9glzl_12 fieldset{border:none}._searchBar_9glzl_1 input::-webkit-contacts-auto-fill-button,._searchBar_9glzl_1 input::-webkit-credentials-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}._searchBar_9glzl_1 input:-webkit-autofill,._searchBar_9glzl_1 input:-webkit-autofill:hover,._searchBar_9glzl_1 input:-webkit-autofill:focus,._searchBar_9glzl_1 input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px transparent inset!important;box-shadow:0 0 0 30px transparent inset!important;-webkit-text-fill-color:inherit!important;transition:background-color 5000s ease-in-out 0s}._searchBar_9glzl_1 input::-webkit-list-button,._searchBar_9glzl_1 input::-webkit-calendar-picker-indicator{display:none!important}._searchBar_9glzl_1 .MuiInputBase-input{padding:16px 19px;font-family:Roboto,sans-serif;font-size:16px}._searchBar_9glzl_1 .MuiInputBase-input::placeholder{opacity:1}._searchBar_9glzl_1 .MuiInputAdornment-root{margin:0}._searchBar_9glzl_1 .MuiInputAdornment-root svg{display:block}._searchBar_9glzl_1 .MuiInputAdornment-positionStart{margin-right:0}._searchBar_9glzl_1 .MuiInputAdornment-positionEnd{margin-left:0}._startIconContainer_9glzl_60{display:flex;align-items:center;justify-content:center;padding:16px 0 16px 19px;margin:0}._startIconContainer_9glzl_60 svg{display:block}._endIconContainer_9glzl_74{display:flex!important;align-items:center;justify-content:center;padding-right:19px;padding-left:0;margin:0;transition:transform .15s ease-in-out;-webkit-user-select:none;user-select:none;min-width:18px;min-height:18px;position:relative;z-index:1}._endIconContainer_9glzl_74 svg{display:block!important;width:18px!important;height:18px!important;transition:transform .15s ease-in-out;flex-shrink:0}._endIconContainer_9glzl_74:hover{opacity:.8}._endIconContainer_9glzl_74:active{transform:scale(.95)}._endIconContainer_9glzl_74:active svg{transform:scale(.9)}._endIconContainer_9glzl_74._clicked_9glzl_104{animation:_clickEffect_9glzl_1 .2s ease-in-out}._defaultIcon_9glzl_108{width:18px;height:18px}@keyframes _clickEffect_9glzl_1{0%{transform:scale(1)}50%{transform:scale(.85)}to{transform:scale(1)}}._container_1mb8b_1{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:24px}._iconWrapper_1mb8b_11{position:relative;margin-bottom:16px}._icon_1mb8b_11{font-size:180px!important;opacity:.8}._title_1mb8b_21{font-weight:700;background:linear-gradient(135deg,#667eea,#764ba2);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;line-height:1}._subtitle_1mb8b_30{font-weight:600}._description_1mb8b_34{max-width:400px}._button_1mb8b_38{margin-top:16px;padding:12px 32px;border-radius:8px;background-color:#667eea}._button_1mb8b_38:hover{background-color:#5a6fd6}
@@ -0,0 +1,13 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
+ export interface CountItem {
4
+ label: string;
5
+ count: number;
6
+ icon?: ReactNode;
7
+ }
8
+ export interface CountCardProps {
9
+ items: CountItem[];
10
+ className?: string;
11
+ sx?: SxProps<Theme>;
12
+ }
13
+ export declare const CountCard: ({ items, className, sx }: CountCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { CountCard } from './CountCard';
3
+ import '../../styles/index.scss';
4
+ declare const meta: Meta<typeof CountCard>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof CountCard>;
7
+ export declare const Default: Story;
8
+ export declare const SingleItem: Story;
9
+ export declare const TwoItems: Story;
10
+ export declare const ThreeItems: Story;
11
+ export declare const WithoutIcons: Story;
12
+ export declare const LargeNumbers: Story;
13
+ export declare const WithZero: Story;
14
+ export declare const InContext: Story;
15
+ export declare const MultipleCards: Story;
16
+ export declare const CustomStyles: Story;
@@ -0,0 +1,2 @@
1
+ export { CountCard } from './CountCard';
2
+ export type { CountCardProps, CountItem } from './CountCard';
@@ -0,0 +1,2 @@
1
+ import { FilterButtonProps } from './types';
2
+ export declare const FilterButton: import("react").ForwardRefExoticComponent<Omit<FilterButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,13 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { FilterButton } from './FilterButton';
3
+ import '../../styles/index.scss';
4
+ declare const meta: Meta<typeof FilterButton>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof FilterButton>;
7
+ export declare const Default: Story;
8
+ export declare const CustomText: Story;
9
+ export declare const States: Story;
10
+ export declare const WithIcon: Story;
11
+ export declare const Interactive: Story;
12
+ export declare const InContext: Story;
13
+ export declare const MultipleButtons: Story;
@@ -0,0 +1,3 @@
1
+ import { MouseEvent } from 'react';
2
+ import { FilterButtonProps } from './types';
3
+ export declare const createFilterButtonClickHandler: (onClick?: FilterButtonProps["onClick"]) => ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
@@ -0,0 +1,2 @@
1
+ export { FilterButton } from './FilterButton';
2
+ export type { FilterButtonProps } from './types';
@@ -0,0 +1,5 @@
1
+ import { ButtonProps as MuiButtonProps } from '@mui/material';
2
+ import { MouseEvent } from 'react';
3
+ export interface FilterButtonProps extends Omit<MuiButtonProps, 'variant' | 'sx' | 'onClick'> {
4
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
5
+ }
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { GoogleMap } from './components/GoogleMap';
3
+ import '../../styles/index.scss';
4
+ declare const meta: Meta<typeof GoogleMap>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof GoogleMap>;
7
+ export declare const Default: Story;
8
+ export declare const WithMarkers: Story;
9
+ export declare const DarkTheme: Story;
10
+ export declare const CustomZoom: Story;
11
+ export declare const CustomCenter: Story;
12
+ export declare const NotConfigured: Story;
@@ -0,0 +1,5 @@
1
+ import { GoogleMapProps } from '../types';
2
+ export declare const GoogleMap: {
3
+ ({ center, zoom, className, children, apiKey, mapId, themeMode, options, onLoad, onError, }: GoogleMapProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,6 @@
1
+ export declare const MapContent: {
2
+ ({ children }: {
3
+ children?: React.ReactNode;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,5 @@
1
+ import { MapMarkersProps } from '../types';
2
+ export declare const MapMarkers: {
3
+ ({ spots, onSpotClick, zoomLevel }: MapMarkersProps): import("react/jsx-runtime").JSX.Element | null;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,11 @@
1
+ export interface GoogleMapContextValue {
2
+ isLoaded: boolean;
3
+ map: google.maps.Map | null;
4
+ zoomToPosition: (position: {
5
+ lat: number;
6
+ lng: number;
7
+ }, zoomLevel?: number) => void;
8
+ }
9
+ declare const GoogleMapContext: import("react").Context<GoogleMapContextValue | undefined>;
10
+ export declare const useGoogleMapContext: () => GoogleMapContextValue;
11
+ export { GoogleMapContext };
@@ -0,0 +1,6 @@
1
+ export { GoogleMap } from './components/GoogleMap';
2
+ export { MapMarkers } from './components/MapMarkers';
3
+ export { MapContent } from './components/MapContent';
4
+ export type { GoogleMapProps, MapSpotData, MapMarkersProps, MapSpotProps } from './types';
5
+ export { useGoogleMapContext } from './context/GoogleMapContext';
6
+ export type { GoogleMapContextValue } from './context/GoogleMapContext';
@@ -0,0 +1,36 @@
1
+ import { ReactNode } from 'react';
2
+ import { SxProps, Theme } from '@mui/material';
3
+ export interface GoogleMapProps {
4
+ center?: {
5
+ lat: number;
6
+ lng: number;
7
+ };
8
+ zoom?: number;
9
+ options?: google.maps.MapOptions;
10
+ className?: string;
11
+ children?: ReactNode;
12
+ onLoad?: (map: google.maps.Map) => void;
13
+ onError?: (error: Error) => void;
14
+ apiKey?: string;
15
+ mapId?: string;
16
+ themeMode?: 'light' | 'dark';
17
+ }
18
+ export interface MapSpotData {
19
+ lat: number;
20
+ lng: number;
21
+ count: number;
22
+ id: string | number;
23
+ addressText?: string;
24
+ }
25
+ export interface MapMarkersProps {
26
+ spots: MapSpotData[];
27
+ onSpotClick?: (spot: MapSpotData) => void;
28
+ zoomLevel?: number;
29
+ }
30
+ export interface MapSpotProps {
31
+ count: number;
32
+ addressText?: string;
33
+ className?: string;
34
+ onClick?: () => void;
35
+ sx?: SxProps<Theme>;
36
+ }
@@ -0,0 +1,5 @@
1
+ import { MapSpotProps } from '../GoogleMap/types';
2
+ export declare const MapSpot: {
3
+ ({ count, addressText, className, onClick, sx }: MapSpotProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,11 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { MapSpot } from './MapSpot';
3
+ import '../../styles/index.scss';
4
+ declare const meta: Meta<typeof MapSpot>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof MapSpot>;
7
+ export declare const Default: Story;
8
+ export declare const WithTooltip: Story;
9
+ export declare const LargeNumber: Story;
10
+ export declare const Multiple: Story;
11
+ export declare const Interactive: Story;
@@ -0,0 +1,2 @@
1
+ export { MapSpot } from './MapSpot';
2
+ export type { MapSpotProps } from '../GoogleMap/types';
@@ -0,0 +1,5 @@
1
+ import { NotFoundContentProps } from './types';
2
+ export declare const NotFoundContent: {
3
+ ({ onGoHome, buttonText, title, description, errorCode, className, }: NotFoundContentProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { NotFoundContent } from './NotFoundContent';
3
+ import '../../styles/index.scss';
4
+ declare const meta: Meta<typeof NotFoundContent>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof NotFoundContent>;
7
+ export declare const Default: Story;
8
+ export declare const WithoutButton: Story;
9
+ export declare const Customized: Story;
@@ -0,0 +1,2 @@
1
+ export { NotFoundContent } from './NotFoundContent';
2
+ export type { NotFoundContentProps } from './types';
@@ -0,0 +1,27 @@
1
+ export interface NotFoundContentProps {
2
+ /**
3
+ * Handler chamado quando o botão "Voltar para o início" é clicado
4
+ * Se não fornecido, o botão não será exibido
5
+ */
6
+ onGoHome?: () => void;
7
+ /**
8
+ * Texto do botão (padrão: "Voltar para o início")
9
+ */
10
+ buttonText?: string;
11
+ /**
12
+ * Título da página (padrão: "Página não encontrada")
13
+ */
14
+ title?: string;
15
+ /**
16
+ * Descrição da página (padrão: "Desculpe, a página que você está procurando não existe ou foi movida para outro endereço.")
17
+ */
18
+ description?: string;
19
+ /**
20
+ * Código de erro (padrão: "404")
21
+ */
22
+ errorCode?: string;
23
+ /**
24
+ * Classe CSS adicional
25
+ */
26
+ className?: string;
27
+ }
@@ -0,0 +1,2 @@
1
+ import { SearchBarProps } from './types';
2
+ export declare const SearchBar: import("react").ForwardRefExoticComponent<Omit<SearchBarProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { SearchBar } from './SearchBar';
3
+ import '../../styles/index.scss';
4
+ declare const meta: Meta<typeof SearchBar>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof SearchBar>;
7
+ export declare const Default: Story;
8
+ export declare const CustomPlaceholder: Story;
9
+ export declare const WithStartIcon: Story;
10
+ export declare const WithEndIconClick: Story;
11
+ export declare const WithCustomEndIcon: Story;
12
+ export declare const Controlled: Story;
13
+ export declare const States: Story;
14
+ export declare const FullWidth: Story;
15
+ export declare const InContext: Story;
16
+ export declare const WithClear: Story;
@@ -0,0 +1,4 @@
1
+ import { ChangeEvent } from 'react';
2
+ import { SearchBarProps } from './types';
3
+ export declare const createEndIconClickHandler: (onEndIconClick?: SearchBarProps["onEndIconClick"]) => () => void;
4
+ export declare const createChangeHandler: (onChange?: SearchBarProps["onChange"]) => (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
@@ -0,0 +1,2 @@
1
+ export { SearchBar } from './SearchBar';
2
+ export type { SearchBarProps } from './types';
@@ -0,0 +1,25 @@
1
+ import { Theme } from '@mui/material';
2
+ export interface SearchBarThemeColors {
3
+ backgroundColor: string;
4
+ textColor: string;
5
+ iconColor: string;
6
+ }
7
+ export interface SearchBarThemeConfig {
8
+ borderRadius: string;
9
+ padding: {
10
+ horizontal: string;
11
+ vertical: string;
12
+ };
13
+ iconSize: {
14
+ width: number;
15
+ height: number;
16
+ };
17
+ animation: {
18
+ clickDuration: number;
19
+ transitionDuration: string;
20
+ };
21
+ }
22
+ export declare const searchBarLightColors: SearchBarThemeColors;
23
+ export declare const searchBarDarkColors: SearchBarThemeColors;
24
+ export declare const searchBarThemeConfig: SearchBarThemeConfig;
25
+ export declare const getSearchBarThemeColors: (theme: Theme) => SearchBarThemeColors;
@@ -0,0 +1,10 @@
1
+ import { TextFieldProps as MuiTextFieldProps } from '@mui/material';
2
+ import { ReactNode, ChangeEvent } from 'react';
3
+ export interface SearchBarProps extends Omit<MuiTextFieldProps, 'variant' | 'InputProps' | 'InputLabelProps' | 'onChange'> {
4
+ startIcon?: ReactNode;
5
+ endIcon?: ReactNode;
6
+ onEndIconClick?: () => void;
7
+ placeholder?: string;
8
+ value?: string;
9
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
10
+ }
@@ -0,0 +1,8 @@
1
+ import { Theme, SxProps } from '@mui/material';
2
+ import { ReactElement } from 'react';
3
+ import { SearchBarProps } from './types';
4
+ export declare const getDefaultEndIcon: (iconColor: string) => ReactElement;
5
+ export declare const getFinalEndIcon: (endIcon: SearchBarProps["endIcon"], iconColor: string) => ReactElement;
6
+ export declare const getBaseStyles: (currentTheme: Theme) => SxProps<Theme>;
7
+ export declare const combineSxStyles: (theme: Theme, sx?: SearchBarProps["sx"]) => SxProps<Theme>;
8
+ export declare const getIconColor: (theme: Theme) => string;
@@ -0,0 +1,5 @@
1
+ import { SidebarMenuProps } from './types';
2
+ export declare const SidebarMenu: {
3
+ ({ items, isExpanded, className, onClick }: SidebarMenuProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { SidebarMenu } from './SidebarMenu';
3
+ declare const meta: Meta<typeof SidebarMenu>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SidebarMenu>;
6
+ export declare const Expanded: Story;
7
+ export declare const Collapsed: Story;
8
+ export declare const InContainer: Story;
@@ -0,0 +1,2 @@
1
+ export { SidebarMenu } from './SidebarMenu';
2
+ export type { SidebarMenuProps, SidebarMenuItem, SidebarMenuSubItem } from './types';
@@ -0,0 +1,25 @@
1
+ import { MouseEvent, ReactNode } from 'react';
2
+ export type SidebarMenuSubItem = {
3
+ id: string;
4
+ label: string;
5
+ active?: boolean;
6
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
7
+ };
8
+ export type SidebarMenuItem = {
9
+ id: string;
10
+ icon: ReactNode;
11
+ label: string;
12
+ active?: boolean;
13
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
14
+ trailingIcon?: ReactNode;
15
+ submenu?: SidebarMenuSubItem[];
16
+ };
17
+ export interface SidebarMenuProps {
18
+ items: SidebarMenuItem[];
19
+ isExpanded?: boolean;
20
+ className?: string;
21
+ onClick?: (selection: {
22
+ item: SidebarMenuItem;
23
+ subItem?: SidebarMenuSubItem;
24
+ }) => void;
25
+ }
@@ -0,0 +1,19 @@
1
+ import { SidebarMenuItem, SidebarMenuProps, SidebarMenuSubItem } from './types';
2
+ type UseSidebarMenuParams = Pick<SidebarMenuProps, 'items' | 'isExpanded' | 'onClick'>;
3
+ export declare const useSidebarMenu: ({ items, isExpanded, onClick }: UseSidebarMenuParams) => {
4
+ selectedItemId: string | null;
5
+ selectedSubItemId: string | null;
6
+ expandedItemId: string | null;
7
+ submenuAnchorEl: HTMLElement | null;
8
+ submenuItem: SidebarMenuItem | undefined;
9
+ submenuItems: SidebarMenuSubItem[];
10
+ getIsItemActive: (item: SidebarMenuItem) => boolean;
11
+ getIsSubItemActive: (subItem: SidebarMenuSubItem) => boolean;
12
+ shouldShowSubmenu: (item: SidebarMenuItem) => boolean;
13
+ handleItemClick: (item: SidebarMenuItem, event: React.MouseEvent<HTMLElement>) => void;
14
+ handleSubItemClick: (item: SidebarMenuItem, subItem: SidebarMenuSubItem, event: React.MouseEvent<HTMLElement>, options?: {
15
+ closeMenu?: boolean;
16
+ }) => void;
17
+ closeSubmenu: () => void;
18
+ };
19
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ZoomControlsProps } from './types';
2
+ export declare const ZoomControls: ({ map, className, sx, zoomIncrement, minZoom, fallbackZoom, onFullscreen, }: ZoomControlsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { ZoomControls } from './ZoomControls';
3
+ import '../../styles/index.scss';
4
+ declare const meta: Meta<typeof ZoomControls>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof ZoomControls>;
7
+ export declare const Default: Story;
8
+ export declare const WithoutMap: Story;
@@ -0,0 +1,3 @@
1
+ import { ZoomControlsMap, ZoomControlsProps } from './types';
2
+ export declare const createZoomInHandler: (map: ZoomControlsMap | null | undefined, zoomIncrement?: NonNullable<ZoomControlsProps["zoomIncrement"]>, fallbackZoom?: NonNullable<ZoomControlsProps["fallbackZoom"]>) => () => void;
3
+ export declare const createZoomOutHandler: (map: ZoomControlsMap | null | undefined, zoomIncrement?: NonNullable<ZoomControlsProps["zoomIncrement"]>, minZoom?: NonNullable<ZoomControlsProps["minZoom"]>, fallbackZoom?: NonNullable<ZoomControlsProps["fallbackZoom"]>) => () => void;
@@ -0,0 +1,2 @@
1
+ export { ZoomControls } from './ZoomControls';
2
+ export type { ZoomControlsProps, ZoomControlsMap } from './types';
@@ -0,0 +1,14 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ export interface ZoomControlsMap {
3
+ getZoom: () => number | null | undefined;
4
+ setZoom: (zoom: number) => void;
5
+ }
6
+ export interface ZoomControlsProps {
7
+ map?: ZoomControlsMap | null;
8
+ className?: string;
9
+ sx?: SxProps<Theme>;
10
+ zoomIncrement?: number;
11
+ minZoom?: number;
12
+ fallbackZoom?: number;
13
+ onFullscreen?: () => void;
14
+ }
@@ -1,2 +1,19 @@
1
1
  export { Button } from "./Button/Button";
2
2
  export type { ButtonProps } from "./Button/types";
3
+ export { FilterButton } from "./FilterButton";
4
+ export type { FilterButtonProps } from "./FilterButton/types";
5
+ export { CountCard } from "./CountCard";
6
+ export type { CountCardProps, CountItem } from "./CountCard";
7
+ export { ZoomControls } from "./ZoomControls";
8
+ export type { ZoomControlsProps, ZoomControlsMap } from "./ZoomControls/types";
9
+ export { GoogleMap, MapMarkers, MapContent } from "./GoogleMap";
10
+ export type { GoogleMapProps, MapSpotData, MapMarkersProps, MapSpotProps } from "./GoogleMap/types";
11
+ export { useGoogleMapContext } from "./GoogleMap/context/GoogleMapContext";
12
+ export type { GoogleMapContextValue } from "./GoogleMap/context/GoogleMapContext";
13
+ export { MapSpot } from "./MapSpot";
14
+ export { SearchBar } from "./SearchBar";
15
+ export type { SearchBarProps } from "./SearchBar/types";
16
+ export { NotFoundContent } from "./NotFoundContent";
17
+ export type { NotFoundContentProps } from "./NotFoundContent/types";
18
+ export { SidebarMenu } from "./SidebarMenu";
19
+ export type { SidebarMenuProps, SidebarMenuItem, SidebarMenuSubItem } from "./SidebarMenu/types";
@@ -1,4 +1,6 @@
1
1
  import "./styles/index.scss";
2
2
  export { lightTheme, darkTheme, spacingScale } from "./theme/theme";
3
+ export { VisioThemeProvider, useVisioTheme } from "./theme/VisioThemeProvider";
4
+ export type { VisioThemeMode, VisioThemeProviderProps } from "./theme/VisioThemeProvider";
3
5
  export * from "./components";
4
6
  export * from "./styles/tokens";
@@ -6,4 +6,5 @@ export declare const spacingTokens: {
6
6
  readonly lg: 16;
7
7
  readonly xl: 24;
8
8
  readonly xxl: 32;
9
+ readonly xxxl: 64;
9
10
  };
@@ -0,0 +1,18 @@
1
+ import { lightTheme } from './theme';
2
+ export type VisioThemeMode = 'light' | 'dark';
3
+ type VisioThemeContextValue = {
4
+ mode: VisioThemeMode;
5
+ setMode: (mode: VisioThemeMode) => void;
6
+ toggleMode: () => void;
7
+ theme: typeof lightTheme;
8
+ };
9
+ export type VisioThemeProviderProps = {
10
+ children: React.ReactNode;
11
+ defaultMode?: VisioThemeMode;
12
+ mode?: VisioThemeMode;
13
+ onModeChange?: (mode: VisioThemeMode) => void;
14
+ enableCssBaseline?: boolean;
15
+ };
16
+ export declare const VisioThemeProvider: ({ children, defaultMode, mode, onModeChange, enableCssBaseline, }: VisioThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const useVisioTheme: () => VisioThemeContextValue;
18
+ export {};
@@ -30,4 +30,5 @@ export declare const spacingScale: {
30
30
  readonly lg: 16;
31
31
  readonly xl: 24;
32
32
  readonly xxl: 32;
33
+ readonly xxxl: 64;
33
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visio-io/design-system",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Visio Design System",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -36,6 +36,7 @@
36
36
  "@emotion/react": "^11.0.0",
37
37
  "@emotion/styled": "^11.0.0",
38
38
  "@mui/material": "^5.0.0",
39
+ "@vis.gl/react-google-maps": "^1.0.0",
39
40
  "react": "^19.0.0",
40
41
  "react-dom": "^19.0.0"
41
42
  },
@@ -45,14 +46,19 @@
45
46
  "@storybook/addon-essentials": "^8.4.0",
46
47
  "@storybook/react": "^8.4.0",
47
48
  "@storybook/react-vite": "^8.4.0",
48
- "storybook": "^8.4.0",
49
+ "@types/google.maps": "^3.58.1",
50
+ "@types/node": "^25.0.9",
49
51
  "@types/react": "^19.0.0",
50
52
  "@types/react-dom": "^19.0.0",
51
53
  "@vitejs/plugin-react": "^4.3.0",
52
54
  "sass": "^1.77.0",
55
+ "storybook": "^8.4.0",
53
56
  "typescript": "^5.6.0",
54
57
  "vite": "^5.4.0"
55
58
  },
59
+ "dependencies": {
60
+ "@mui/icons-material": "^7.3.7"
61
+ },
56
62
  "scripts": {
57
63
  "dev": "storybook dev -p 6006",
58
64
  "build": "vite build && tsc -p tsconfig.build.json",
@@ -6,4 +6,5 @@ export const spacingTokens = {
6
6
  lg: 16,
7
7
  xl: 24,
8
8
  xxl: 32,
9
+ xxxl: 64,
9
10
  } as const;