prometeo-design-system 2.6.5 → 2.6.6

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.
@@ -1,6 +1,6 @@
1
1
  import { j as d } from "./jsx-runtime-DKDX3adD.js";
2
2
  import { useField as y } from "formik";
3
- import { S as m } from "./Select-B9faRcN1.js";
3
+ import { S as m } from "./Select-D3aU7dXF.js";
4
4
  import { useRef as p, useEffect as g } from "react";
5
5
  function f(e) {
6
6
  return Array.isArray(e) && e.every(
@@ -1,5 +1,5 @@
1
1
  import { j as G } from "./jsx-runtime-DKDX3adD.js";
2
- import { g as i, S as H } from "./Select-B9faRcN1.js";
2
+ import { g as i, S as H } from "./Select-D3aU7dXF.js";
3
3
  import { useState as w, useRef as T, useEffect as h, useMemo as Q, useCallback as X } from "react";
4
4
  function te(e) {
5
5
  const {
@@ -1,9 +1,16 @@
1
1
  import { ReactNode } from 'react';
2
- import { IArea, ICompany } from 'shared-dependencies-tickets';
3
2
  interface ICardProfile {
4
3
  children: ReactNode;
5
4
  dropMenu?: ReactNode;
6
5
  }
6
+ export interface IArea {
7
+ _id: string;
8
+ name: string;
9
+ }
10
+ export interface ICompany {
11
+ _id: string;
12
+ name: string;
13
+ }
7
14
  export interface ISessionLocalStorage {
8
15
  _id: string;
9
16
  name: string;
@@ -1,17 +1,19 @@
1
- export interface DrawerDesktopHandle {
2
- open: () => void;
1
+ export interface DrawerDesktopHandle<TContext = unknown> {
2
+ open: (context?: TContext) => void;
3
3
  close: () => void;
4
4
  isOpen: boolean;
5
+ getContext: () => TContext | null;
5
6
  }
6
- export interface DrawerDesktopProps {
7
+ export interface DrawerDesktopProps<TContext = unknown> {
7
8
  children?: React.ReactNode;
8
9
  direction?: 'left' | 'right';
9
10
  modal?: boolean;
10
11
  className?: string;
11
- onClose?: () => void;
12
+ onClose?: (context?: TContext) => void;
12
13
  defaultOpen?: boolean;
13
14
  attachToParent?: boolean;
14
15
  closeOnOverlayClick?: boolean;
16
+ hideCloseButton?: boolean;
15
17
  }
16
- declare const DrawerDesktop: import('react').ForwardRefExoticComponent<DrawerDesktopProps & import('react').RefAttributes<DrawerDesktopHandle>>;
18
+ declare const DrawerDesktop: import('react').ForwardRefExoticComponent<DrawerDesktopProps<any> & import('react').RefAttributes<DrawerDesktopHandle<any>>>;
17
19
  export default DrawerDesktop;
@@ -1,7 +1,8 @@
1
1
  import { DrawerDesktopHandle } from './DrawerDesktop';
2
- export declare const useDrawerDesktop: () => {
2
+ export declare const useDrawerDesktop: <TContext = unknown>() => {
3
3
  isOpen: () => boolean;
4
- open: () => void;
4
+ open: (context?: TContext) => void;
5
5
  close: () => void;
6
- drawerRef: import('react').RefObject<DrawerDesktopHandle | null>;
6
+ drawerRef: import('react').RefObject<DrawerDesktopHandle<TContext> | null>;
7
+ getContext: () => NonNullable<TContext> | null;
7
8
  };
@@ -4,6 +4,7 @@ export interface IHeader {
4
4
  children?: ReactNode;
5
5
  className?: string;
6
6
  subtitle?: string;
7
+ subtitleClassName?: string;
7
8
  }
8
- declare const _default: import('react').MemoExoticComponent<({ title, subtitle, children, className }: IHeader) => import("react/jsx-runtime").JSX.Element>;
9
+ declare const _default: import('react').MemoExoticComponent<({ title, subtitle, children, className, subtitleClassName }: IHeader) => import("react/jsx-runtime").JSX.Element>;
9
10
  export default _default;
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  export interface CountdownProgressProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ startDate: string | Date;
3
4
  endDate: string | Date;
4
5
  label?: string;
5
6
  }
@@ -0,0 +1,14 @@
1
+ import { weekDay } from './WeekdaysSelector';
2
+ import { default as React } from 'react';
3
+ type CustomFrequency = "daily" | "weekly" | "monthly";
4
+ export type CustomFrequencySettingsValue = {
5
+ interval: number;
6
+ frequency: CustomFrequency;
7
+ weekdays: weekDay[];
8
+ };
9
+ interface CustomSettingsProps {
10
+ value?: CustomFrequencySettingsValue;
11
+ onChange: (value: CustomFrequencySettingsValue) => void;
12
+ }
13
+ declare const CustomFrequencySettings: React.MemoExoticComponent<({ value, onChange }: CustomSettingsProps) => import("react/jsx-runtime").JSX.Element>;
14
+ export default CustomFrequencySettings;
@@ -1,6 +1,12 @@
1
- import { RecurrenceFrequencyType } from './RecurrentDatePicker';
1
+ import { CustomFrequencySettingsValue } from './CustomFrequencySettings';
2
+ import { MonthlySettingsValue } from './MonthlyFrequencySettings';
3
+ import { FrequencySettingsValue, RecurrenceFrequencyType } from './RecurrentDatePicker';
4
+ import { WeeklyFrequencySettingsValue } from './WeeklyFrequencySetting';
5
+ import { YearlyFrequencySettingsValue } from './YearlyFrequencySettings';
2
6
  export interface IFrequencySettingsProps {
3
7
  frequency: RecurrenceFrequencyType;
8
+ frequencySettings?: MonthlySettingsValue | WeeklyFrequencySettingsValue | YearlyFrequencySettingsValue | CustomFrequencySettingsValue;
9
+ onChange: (cb: ((pv: FrequencySettingsValue) => FrequencySettingsValue) | FrequencySettingsValue) => void;
4
10
  }
5
- declare const FrequencySettings: (props: IFrequencySettingsProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const FrequencySettings: import('react').MemoExoticComponent<(props: IFrequencySettingsProps) => import("react/jsx-runtime").JSX.Element>;
6
12
  export default FrequencySettings;
@@ -0,0 +1,29 @@
1
+ type dayOrderType = 'first' | 'second' | 'third' | 'fourth' | 'last';
2
+ type weekDay = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
3
+ export type MonthlySettingsValue = {
4
+ type: 'relative';
5
+ dayOrder: dayOrderType;
6
+ weekDay: weekDay;
7
+ } | {
8
+ type: 'absolute';
9
+ dayOfMonth: number;
10
+ };
11
+ export type MonthlySettingsDelta = {
12
+ kind: 'setType';
13
+ newType: 'relative' | 'absolute';
14
+ } | {
15
+ kind: 'setRelativeDayOrder';
16
+ newDayOrder: dayOrderType;
17
+ } | {
18
+ kind: 'setRelativeWeekDay';
19
+ newWeekDay: weekDay;
20
+ } | {
21
+ kind: 'setAbsoluteDayOfMonth';
22
+ newDayOfMonth: number;
23
+ };
24
+ interface MonthlySettingsProps {
25
+ value?: MonthlySettingsValue;
26
+ onChange: (delta: MonthlySettingsDelta) => void;
27
+ }
28
+ declare const MonthlyFrequencySettings: import('react').MemoExoticComponent<({ value, onChange }: MonthlySettingsProps) => import("react/jsx-runtime").JSX.Element>;
29
+ export default MonthlyFrequencySettings;
@@ -1,7 +1,12 @@
1
+ import { WeeklyFrequencySettingsValue } from './WeeklyFrequencySetting';
2
+ import { MonthlySettingsValue } from './MonthlyFrequencySettings';
3
+ import { YearlyFrequencySettingsValue } from './YearlyFrequencySettings';
4
+ import { CustomFrequencySettingsValue } from './CustomFrequencySettings';
1
5
  export type RecurrenceFrequencyType = "custom" | "weekly" | "monthly" | "yearly";
2
6
  export declare const RecurrenceFrecuencyOptions: {
3
7
  label: string;
4
8
  value: string;
5
9
  }[];
6
- declare const RecurrentDatePicker: () => import("react/jsx-runtime").JSX.Element;
10
+ export type FrequencySettingsValue = WeeklyFrequencySettingsValue | MonthlySettingsValue | YearlyFrequencySettingsValue | CustomFrequencySettingsValue;
11
+ declare const RecurrentDatePicker: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
7
12
  export default RecurrentDatePicker;
@@ -1,11 +1,12 @@
1
+ import { default as React } from 'react';
1
2
  export type weekDay = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
2
3
  type WeekdaySelectorProps = {
3
4
  options?: weekDay[];
4
5
  labelVariant?: 'short' | 'large';
5
- value: weekDay[];
6
+ value?: weekDay[];
6
7
  onChange: (newValue: weekDay[]) => void;
7
8
  label?: string;
8
9
  required?: boolean;
9
10
  };
10
- declare const WeekdaysSelector: (props: WeekdaySelectorProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const WeekdaysSelector: React.MemoExoticComponent<(props: WeekdaySelectorProps) => import("react/jsx-runtime").JSX.Element>;
11
12
  export default WeekdaysSelector;
@@ -0,0 +1,8 @@
1
+ import { weekDay } from './WeekdaysSelector';
2
+ export type WeeklyFrequencySettingsValue = weekDay[];
3
+ interface WeeklyFrequencySettingsProps {
4
+ value?: WeeklyFrequencySettingsValue;
5
+ onChange: (value: WeeklyFrequencySettingsValue) => void;
6
+ }
7
+ declare const WeeklyFrequencySettings: import('react').MemoExoticComponent<({ value, onChange }: WeeklyFrequencySettingsProps) => import("react/jsx-runtime").JSX.Element>;
8
+ export default WeeklyFrequencySettings;
@@ -0,0 +1,10 @@
1
+ export interface YearlyFrequencySettingsValue {
2
+ month: number;
3
+ day?: number;
4
+ }
5
+ interface YearlyFrequencySettingsProps {
6
+ value?: YearlyFrequencySettingsValue;
7
+ onChange: (value: YearlyFrequencySettingsValue) => void;
8
+ }
9
+ declare const YearlyFrequencySettings: import('react').MemoExoticComponent<({ value, onChange }: YearlyFrequencySettingsProps) => import("react/jsx-runtime").JSX.Element>;
10
+ export default YearlyFrequencySettings;