@mirantes-micro/foundation-design-system 1.2.229 → 1.2.230

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 (3) hide show
  1. package/dist/index.d.ts +12 -16
  2. package/dist/index.js +195 -196
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, JSX, ChangeEvent, KeyboardEvent, FocusEvent } from 'react';
2
+ import React__default, { ReactNode, JSX, RefObject, InputHTMLAttributes, ChangeEvent, KeyboardEvent, FocusEvent } from 'react';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { QueryClient } from '@tanstack/react-query';
5
5
  import { AxiosInstance } from 'axios';
6
+ import { Socket } from 'socket.io-client';
6
7
  import * as zustand from 'zustand';
7
8
  import * as zustand_middleware from 'zustand/middleware';
8
9
 
@@ -16,7 +17,7 @@ declare function stringToObj<T>(inputString: string, separator: string): T | und
16
17
 
17
18
  declare function getInitials(fullName: string): string;
18
19
 
19
- type TLocale = "pt" | "en" | "fr";
20
+ type TLocale = 'pt' | 'en' | 'fr';
20
21
  interface IMirantesFoundationProviderProps {
21
22
  children: ReactNode;
22
23
  Notification?: ReactNode;
@@ -85,6 +86,7 @@ interface IMirantesFoundationContext {
85
86
  chatForPage?: boolean;
86
87
  environment?: string;
87
88
  socketApiUrl?: string;
89
+ socketRef?: RefObject<Socket | null>;
88
90
  mirantesDomain?: string;
89
91
  hostUrl?: string;
90
92
  locale?: TLocale;
@@ -152,7 +154,7 @@ type User$3 = {
152
154
  type LinkComponent = (props: CommonLinkProps) => any;
153
155
  type UsePathname = () => string;
154
156
 
155
- declare function MirantesFoundationProvider({ children, Notification, queryClient, onOpenCreatePostModal, commentComponents, pageTriggerComponents, openCreateJobModal, values: { chatApiUrl, chatForPage, locale, Link, usePathname, user, isGettingUser, mirantesDomain, environment, feedApi, searchApi, widgetsApi, hostUrl, assetsApiUrl, isDev, profileApiUrl, analyticsApiUrl, isGettingStats, openCageApiKey, pageId, authedApi, authApiUrl, socketApiUrl, uploadFilesApi, page, ocpSubscriptionKey, billingApiUrl, multicaixaExpressUrl, stripeKey, isPageFeed, community, isCommunityFeed }, }: IMirantesFoundationProviderProps): React__default.JSX.Element;
157
+ declare function MirantesFoundationProvider({ children, Notification, queryClient, onOpenCreatePostModal, commentComponents, pageTriggerComponents, openCreateJobModal, values: { chatApiUrl, chatForPage, locale, Link, usePathname, user, isGettingUser, mirantesDomain, environment, feedApi, searchApi, widgetsApi, hostUrl, assetsApiUrl, isDev, profileApiUrl, analyticsApiUrl, isGettingStats, openCageApiKey, pageId, authedApi, authApiUrl, socketApiUrl, uploadFilesApi, page, ocpSubscriptionKey, billingApiUrl, multicaixaExpressUrl, stripeKey, isPageFeed, community, isCommunityFeed, }, }: IMirantesFoundationProviderProps): React__default.JSX.Element;
156
158
 
157
159
  declare function WorkspacePanel(): React__default.JSX.Element;
158
160
 
@@ -320,7 +322,7 @@ interface CalendarProps {
320
322
  }
321
323
  declare function Calendar({ onMarkAsUnavailable, isModalOpen, onClose, calendarCardClassName, }: CalendarProps): React__default.JSX.Element;
322
324
 
323
- type BaseInputProps = {
325
+ interface BaseInputProps extends InputHTMLAttributes<HTMLInputElement> {
324
326
  placeholder: string;
325
327
  value: string;
326
328
  onChange: (e: ChangeEvent<HTMLInputElement>) => void;
@@ -330,20 +332,11 @@ type BaseInputProps = {
330
332
  leftIcon?: React__default.ReactNode;
331
333
  label?: string;
332
334
  error?: string;
333
- disabled?: boolean;
334
- type?: string;
335
- name?: string;
336
- id?: string;
337
- className?: string;
338
- children?: React__default.ReactNode;
339
335
  wrapperClassName?: string;
340
- required?: boolean;
341
336
  inputClassName?: string;
342
337
  requiredInPlaceholder?: boolean;
343
- min?: number;
344
- max?: number;
345
338
  placeholderColor?: string;
346
- };
339
+ }
347
340
  declare const BaseInput: React__default.ForwardRefExoticComponent<BaseInputProps & React__default.RefAttributes<HTMLInputElement>>;
348
341
 
349
342
  declare function CheckBoxInput({ isChecked, onClick, label, disabled, }: {
@@ -356,12 +349,15 @@ declare function CheckBoxInput({ isChecked, onClick, label, disabled, }: {
356
349
  type CustomDrawerProps = {
357
350
  children: React__default.ReactNode;
358
351
  footer?: React__default.ReactNode;
352
+ title?: React__default.ReactNode;
359
353
  onClose: () => void;
360
354
  className?: string;
361
355
  isOpen?: boolean;
362
356
  hideCloseBlock?: boolean;
357
+ direction?: 'bottom' | 'right' | 'left';
358
+ hiddenInMobileArticle?: boolean;
363
359
  };
364
- declare function CustomDrawer({ children, footer, onClose, className, isOpen, hideCloseBlock, }: CustomDrawerProps): React__default.JSX.Element;
360
+ declare function CustomDrawer({ children, footer, title, onClose, className, isOpen, hideCloseBlock, direction, hiddenInMobileArticle, }: CustomDrawerProps): React__default.JSX.Element | null;
365
361
 
366
362
  declare function RadioButtonInput({ label, isSelected, onSelect, }: {
367
363
  label?: string;
@@ -377,7 +373,7 @@ type Option = {
377
373
  type CustomSelectInputProps = {
378
374
  options: Option[];
379
375
  value?: string;
380
- onChange?: (option: Option) => void;
376
+ onChange?: (option: Option | null) => void;
381
377
  placeholder?: string;
382
378
  className?: string;
383
379
  enableSearch?: boolean;