@mirantes-micro/foundation-design-system 1.0.7 → 1.0.9

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 +53 -4
  2. package/dist/index.js +73 -30
  3. package/package.json +116 -113
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { ReactNode, ChangeEvent } from 'react';
3
3
  import { QueryClient } from '@tanstack/react-query';
4
+ import { AxiosInstance } from 'axios';
4
5
 
5
6
  declare function Spinner({ className }: {
6
7
  className?: string;
@@ -34,6 +35,8 @@ interface IMirantesFoundationProviderProps {
34
35
  isGettingStats?: boolean;
35
36
  hostUrl?: string;
36
37
  isDev?: boolean;
38
+ authedApi?: AxiosInstance;
39
+ authApiUrl?: string;
37
40
  };
38
41
  }
39
42
  interface IMirantesFoundationContext {
@@ -51,6 +54,8 @@ interface IMirantesFoundationContext {
51
54
  isGettingStats?: boolean;
52
55
  Notification?: ReactNode;
53
56
  openCageApiKey?: string;
57
+ authedApi?: AxiosInstance;
58
+ authApiUrl?: string;
54
59
  onOpenCreatePostModal?: (cb?: () => void) => void;
55
60
  }
56
61
  type CommonLinkProps = {
@@ -81,7 +86,7 @@ type User = {
81
86
  type LinkComponent = (props: CommonLinkProps) => any;
82
87
  type UsePathname = () => string;
83
88
 
84
- declare function MirantesFoundationProvider({ children, Notification, queryClient: reactQueryClient, onOpenCreatePostModal, values: { locale, Link, usePathname, user, isGettingUser, mirantesDomain, environment, feedApi, widgetsApi, hostUrl, isDev, profileApiUrl, isGettingStats, openCageApiKey, pageId }, }: IMirantesFoundationProviderProps): React__default.JSX.Element;
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;
85
90
 
86
91
  declare function WorkspacePanel(): React__default.JSX.Element;
87
92
 
@@ -280,14 +285,17 @@ type Option = {
280
285
  type CustomSelectInputProps = {
281
286
  options: Option[];
282
287
  value?: string;
283
- onChange?: (value: string) => void;
288
+ onChange?: (id: string) => void;
284
289
  placeholder?: string;
285
290
  className?: string;
286
291
  enableSearch?: boolean;
287
292
  floattable?: boolean;
288
293
  required?: boolean;
294
+ showCheck?: boolean;
295
+ label?: string;
296
+ error?: string;
289
297
  };
290
- declare function CustomSelectInput({ options, value, onChange, placeholder, className, enableSearch, floattable, required, }: CustomSelectInputProps): React$1.JSX.Element;
298
+ declare function CustomSelectInput({ options, value, onChange, placeholder, className, enableSearch, floattable, required, showCheck, label, error, }: CustomSelectInputProps): React$1.JSX.Element;
291
299
 
292
300
  type ButtonProps = {
293
301
  children: React__default.ReactNode;
@@ -323,4 +331,45 @@ declare function ContactsModal({ onClose, slug, }: {
323
331
  slug?: string;
324
332
  }): React__default.JSX.Element;
325
333
 
326
- export { AddressAutocompleteInput, BaseInput, Button, CheckBoxInput, ContactsModal, CountryDisplay, CountryInput, CustomDateInput, CustomDrawer, CustomDropdown, CustomSelectInput, DateInput, GradientModal, Header, MirantesFoundationProvider, RadioButtonInput, SalaryInput, Calendar as ScheduleCalendar, Spinner, WorkspacePanel, closeLogoutChannel, getInitials, joinUrlWithPathAndQuery, onLogout, stringToObj, useMirantesFoundation };
334
+ interface IUserVisibilitySettings {
335
+ userId?: string;
336
+ profileViewMode?: EProfileViewMode;
337
+ profilePublic?: boolean;
338
+ profilePictureScope?: EPictureVisibility;
339
+ followingVisibility?: EFollowingVisibility;
340
+ notifyMentionsInMedia?: boolean;
341
+ allowMentions?: boolean;
342
+ }
343
+ declare enum EProfileViewMode {
344
+ professional = "PROFESSIONAL_IDENTITY",
345
+ sector = "SECTOR_IDENTIFICATION",
346
+ confidential = "CONFIDENTIAL_MODE"
347
+ }
348
+ declare enum EPictureVisibility {
349
+ contacts = "CONTACTS",
350
+ network = "NETWORK",
351
+ public = "PUBLIC"
352
+ }
353
+ declare enum EFollowingVisibility {
354
+ me = "ONLY_ME",
355
+ contacts = "CONTACTS",
356
+ all = "EVERYONE"
357
+ }
358
+
359
+ type Settings = {
360
+ language: {
361
+ interface: string;
362
+ content: string;
363
+ };
364
+ theme: string;
365
+ feed: {
366
+ preference: string;
367
+ };
368
+ profile: IUserVisibilitySettings;
369
+ };
370
+ declare const useLoadSettings: () => {
371
+ getSettings: () => Settings | null;
372
+ clearSettings: () => void;
373
+ };
374
+
375
+ export { AddressAutocompleteInput, BaseInput, Button, CheckBoxInput, ContactsModal, CountryDisplay, CountryInput, CustomDateInput, CustomDrawer, CustomDropdown, CustomSelectInput, DateInput, GradientModal, Header, MirantesFoundationProvider, RadioButtonInput, SalaryInput, Calendar as ScheduleCalendar, Spinner, WorkspacePanel, closeLogoutChannel, getInitials, joinUrlWithPathAndQuery, onLogout, stringToObj, useLoadSettings, useMirantesFoundation };