@mirantes-micro/foundation-design-system 1.0.24 → 1.0.26

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.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, ChangeEvent } from 'react';
2
+ import React__default, { ReactNode, ChangeEvent, MouseEventHandler, CSSProperties } from 'react';
3
3
  import { QueryClient } from '@tanstack/react-query';
4
4
  import { AxiosInstance } from 'axios';
5
5
 
@@ -21,10 +21,14 @@ interface IMirantesFoundationProviderProps {
21
21
  onOpenCreatePostModal?: () => void;
22
22
  values?: {
23
23
  pageId?: string;
24
+ page?: {};
24
25
  widgetsApi?: string;
25
26
  feedApi?: string;
26
27
  environment?: string;
27
28
  profileApiUrl?: string;
29
+ socketApiUrl?: string;
30
+ chatApiUrl?: string;
31
+ chatForPage?: boolean;
28
32
  mirantesDomain?: string;
29
33
  openCageApiKey?: string;
30
34
  locale?: TLocale;
@@ -36,6 +40,7 @@ interface IMirantesFoundationProviderProps {
36
40
  hostUrl?: string;
37
41
  isDev?: boolean;
38
42
  authedApi?: AxiosInstance;
43
+ uploadFilesApi?: AxiosInstance;
39
44
  authApiUrl?: string;
40
45
  };
41
46
  }
@@ -43,7 +48,10 @@ interface IMirantesFoundationContext {
43
48
  widgetsApi?: string;
44
49
  feedApi?: string;
45
50
  profileApiUrl?: string;
51
+ chatApiUrl?: string;
52
+ chatForPage?: boolean;
46
53
  environment?: string;
54
+ socketApiUrl?: string;
47
55
  mirantesDomain?: string;
48
56
  locale?: TLocale;
49
57
  Link?: LinkComponent;
@@ -55,6 +63,7 @@ interface IMirantesFoundationContext {
55
63
  Notification?: ReactNode;
56
64
  openCageApiKey?: string;
57
65
  authedApi?: AxiosInstance;
66
+ uploadFilesApi?: AxiosInstance;
58
67
  authApiUrl?: string;
59
68
  onOpenCreatePostModal?: (cb?: () => void) => void;
60
69
  }
@@ -86,7 +95,7 @@ type User = {
86
95
  type LinkComponent = (props: CommonLinkProps) => any;
87
96
  type UsePathname = () => string;
88
97
 
89
- declare function MirantesFoundationProvider({ children, Notification, queryClient: reactQueryClient, onOpenCreatePostModal, values: { locale, Link, usePathname, user, isGettingUser, mirantesDomain, environment, feedApi, widgetsApi, hostUrl, isDev, profileApiUrl, isGettingStats, openCageApiKey, pageId, authedApi, authApiUrl, }, }: IMirantesFoundationProviderProps): React__default.JSX.Element;
98
+ declare function MirantesFoundationProvider({ children, Notification, queryClient: reactQueryClient, onOpenCreatePostModal, values: { chatApiUrl, chatForPage, locale, Link, usePathname, user, isGettingUser, mirantesDomain, environment, feedApi, widgetsApi, hostUrl, isDev, profileApiUrl, isGettingStats, openCageApiKey, pageId, authedApi, authApiUrl, socketApiUrl, uploadFilesApi }, }: IMirantesFoundationProviderProps): React__default.JSX.Element;
90
99
 
91
100
  declare function WorkspacePanel(): React__default.JSX.Element;
92
101
 
@@ -252,12 +261,13 @@ type BaseInputProps = {
252
261
  requiredInPlaceholder?: boolean;
253
262
  min?: number;
254
263
  max?: number;
264
+ placeholderColor?: string;
255
265
  };
256
266
  declare const BaseInput: React__default.ForwardRefExoticComponent<BaseInputProps & React__default.RefAttributes<HTMLInputElement>>;
257
267
 
258
268
  declare function CheckBoxInput({ isChecked, onClick, label, disabled, }: {
259
269
  isChecked?: boolean;
260
- onClick?: () => void;
270
+ onClick?: (e: React__default.MouseEvent<HTMLDivElement> | React__default.KeyboardEvent<HTMLDivElement>) => void;
261
271
  label?: string;
262
272
  disabled?: boolean;
263
273
  }): React__default.JSX.Element;
@@ -311,6 +321,25 @@ type ButtonProps = {
311
321
  };
312
322
  declare function Button({ children, className, disabled, isLoading, onClick, type, }: ButtonProps): React__default.JSX.Element;
313
323
 
324
+ interface IMirantesButton extends React.ButtonHTMLAttributes<HTMLButtonElement> {
325
+ type?: "button" | "submit";
326
+ className?: string;
327
+ onClick?: (e?: any) => void;
328
+ onMouseDown?: MouseEventHandler<HTMLButtonElement>;
329
+ onMouseUp?: MouseEventHandler<HTMLButtonElement>;
330
+ label?: string;
331
+ isLoading?: boolean;
332
+ disabled?: boolean;
333
+ leftElement?: ReactNode;
334
+ rightElement?: ReactNode;
335
+ children?: ReactNode;
336
+ style?: CSSProperties;
337
+ id?: string;
338
+ align?: 'center' | 'left' | 'right';
339
+ }
340
+
341
+ declare const MirantesButton: React__default.ForwardRefExoticComponent<IMirantesButton & React__default.RefAttributes<HTMLButtonElement>>;
342
+
314
343
  interface IDropdownProps {
315
344
  trigger: React.ReactNode;
316
345
  options: IDropdownOption[];
@@ -406,4 +435,10 @@ declare const useApiGetPage: (slug?: string) => {
406
435
  isGettingPage: boolean;
407
436
  };
408
437
 
409
- export { AddressAutocompleteInput, BaseInput, Button, CheckBoxInput, ContactsModal, CountryDisplay, CountryInput, CustomDateInput, CustomDrawer, CustomDropdown, CustomSelectInput, DateInput, GradientModal, Header, MirantesFoundationProvider, RadioButtonInput, SalaryInput, Calendar as ScheduleCalendar, Spinner, WorkspacePanel, clearSettingsCookie, closeLogoutChannel, getInitials, getSettingsFromCookie, joinUrlWithPathAndQuery, onLogout, stringToObj, useApiGetPage, useLoadSettings, useMirantesFoundation };
438
+ declare function useSetChatVisibility(): {
439
+ isChatVisible: boolean;
440
+ };
441
+
442
+ declare function ChatView(): React__default.JSX.Element;
443
+
444
+ export { AddressAutocompleteInput, BaseInput, Button, ChatView, CheckBoxInput, ContactsModal, CountryDisplay, CountryInput, CustomDateInput, CustomDrawer, CustomDropdown, CustomSelectInput, DateInput, GradientModal, Header, MirantesButton, MirantesFoundationProvider, RadioButtonInput, SalaryInput, Calendar as ScheduleCalendar, Spinner, WorkspacePanel, clearSettingsCookie, closeLogoutChannel, getInitials, getSettingsFromCookie, joinUrlWithPathAndQuery, onLogout, stringToObj, useApiGetPage, useLoadSettings, useMirantesFoundation, useSetChatVisibility };