prometeo-design-system 2.6.0 → 2.6.2
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/CheckBox.es.js +27 -24
- package/dist/DatePicker.es.js +276 -272
- package/dist/DrawerMobile.es.js +87 -87
- package/dist/FAButton.d.ts +4 -0
- package/dist/FAButton.es.js +60 -0
- package/dist/HelperComponent-8ErmQ_n9.js +24 -0
- package/dist/Input-r2N9xkjM.js +280 -0
- package/dist/Input.es.js +1 -1
- package/dist/InputFormik.es.js +136 -93
- package/dist/InputFormikV2.d.ts +6 -0
- package/dist/InputFormikV2.es.js +29 -0
- package/dist/RadioButton.d.ts +2 -0
- package/dist/RadioButton.es.js +77 -0
- package/dist/RadioButtonFormik.d.ts +2 -0
- package/dist/RadioButtonFormik.es.js +30 -0
- package/dist/{Select-B5hkJ8Oy.js → Select-IAQKEfnq.js} +9 -8
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/SelectSearch.es.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +34 -0
- package/dist/components/Drawer/DrawerMobile.d.ts +1 -1
- package/dist/components/InputFormik/InputFormik.d.ts +2 -1
- package/dist/components/InputFormik/InputFormikV2.d.ts +1 -0
- package/dist/components/RadioButton/RadioButton.d.ts +12 -0
- package/dist/components/RadioButtonFormik/RadioButtonFormik.d.ts +8 -0
- package/dist/components/RecurrentDatePicker/FrequencySettings.d.ts +6 -0
- package/dist/components/RecurrentDatePicker/PreviewCalendar.d.ts +2 -0
- package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +7 -0
- package/dist/components/RecurrentDatePicker/WeekdaysSelector.d.ts +11 -0
- package/dist/exports/RadioButton.d.ts +1 -0
- package/dist/exports/RadioButtonFormik.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/pages/RecurrentDatePicker.page.d.ts +2 -0
- package/dist/preview/RadioButtonPreview.d.ts +2 -0
- package/dist/preview/RecurrentDatePickerPreview.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +286 -354
- package/package.json +9 -1
- package/src/styles/intellisense.css +1 -0
- package/dist/Input-DHdy-pWf.js +0 -295
- package/dist/components/Select copy/Select.d.ts +0 -71
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { FastField as i } from "formik";
|
|
3
|
+
import { memo as s } from "react";
|
|
4
|
+
import { RadioButton as u } from "./RadioButton.es.js";
|
|
5
|
+
const c = ({
|
|
6
|
+
field: o,
|
|
7
|
+
form: t,
|
|
8
|
+
value: r,
|
|
9
|
+
// Este es el valor que representa ESTE radio button específico
|
|
10
|
+
...m
|
|
11
|
+
}) => {
|
|
12
|
+
const n = t.getFieldMeta(o.name), a = n.touched && n.error;
|
|
13
|
+
return /* @__PURE__ */ e.jsx(
|
|
14
|
+
u,
|
|
15
|
+
{
|
|
16
|
+
...m,
|
|
17
|
+
name: o.name,
|
|
18
|
+
value: r,
|
|
19
|
+
checked: o.value === r,
|
|
20
|
+
onChange: o.onChange,
|
|
21
|
+
onBlur: o.onBlur,
|
|
22
|
+
errorComponent: n.error,
|
|
23
|
+
variant: a ? "error" : "default"
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}, d = s(c), B = (o) => /* @__PURE__ */ e.jsx(i, { name: o.name, children: ({ field: t, form: r }) => /* @__PURE__ */ e.jsx(d, { ...o, field: t, form: r }) });
|
|
27
|
+
B.displayName = "RadioButtonFormik";
|
|
28
|
+
export {
|
|
29
|
+
B as RadioButtonFormik
|
|
30
|
+
};
|
|
@@ -5,7 +5,8 @@ import we, { memo as F, useState as ue, useRef as V, useMemo as Y, useCallback a
|
|
|
5
5
|
import _e from "./Spinner.es.js";
|
|
6
6
|
import { createPortal as Re } from "react-dom";
|
|
7
7
|
import { u as We } from "./useDragScroll-CHN9OMwn.js";
|
|
8
|
-
import { u as Be,
|
|
8
|
+
import { u as Be, I as Ke } from "./Input-r2N9xkjM.js";
|
|
9
|
+
import { H as Ue } from "./HelperComponent-8ErmQ_n9.js";
|
|
9
10
|
import Fe from "./CheckBox.es.js";
|
|
10
11
|
import { Skeleton as Se } from "./Skeleton.es.js";
|
|
11
12
|
const qe = {
|
|
@@ -475,20 +476,20 @@ function Ve(e) {
|
|
|
475
476
|
inputSearchPlaceholder: z?.inputSearchPlaceholder
|
|
476
477
|
}
|
|
477
478
|
),
|
|
478
|
-
(fe || ae) && /* @__PURE__ */ l.jsx(
|
|
479
|
-
|
|
479
|
+
/* @__PURE__ */ l.jsx("div", { className: "min-h-6", children: (fe || ae) && /* @__PURE__ */ l.jsx(
|
|
480
|
+
Ue,
|
|
480
481
|
{
|
|
481
482
|
ref: S,
|
|
482
483
|
variant: Q,
|
|
483
|
-
className: "
|
|
484
|
+
className: "absolute bottom-0 ",
|
|
484
485
|
children: fe || ae
|
|
485
486
|
}
|
|
486
|
-
)
|
|
487
|
+
) })
|
|
487
488
|
]
|
|
488
489
|
}
|
|
489
490
|
);
|
|
490
491
|
}
|
|
491
|
-
const Je = F(Ve, (e, t) => e.value === t.value && e.options === t.options && e.isLoading === t.isLoading && e.disabled === t.disabled && e.errorComponent === t.errorComponent && e.helperComponent === t.helperComponent && e.variant === t.variant && e.label === t.label && e.id === t.id && e.name === t.name && e.placeholder === t.placeholder && e.dropdownOptions?.controledSearchValue === t.dropdownOptions?.controledSearchValue && e.dropdownOptions?.isLoading === t.dropdownOptions?.isLoading),
|
|
492
|
+
const Je = F(Ve, (e, t) => e.value === t.value && e.options === t.options && e.isLoading === t.isLoading && e.disabled === t.disabled && e.errorComponent === t.errorComponent && e.helperComponent === t.helperComponent && e.variant === t.variant && e.label === t.label && e.id === t.id && e.name === t.name && e.placeholder === t.placeholder && e.dropdownOptions?.controledSearchValue === t.dropdownOptions?.controledSearchValue && e.dropdownOptions?.isLoading === t.dropdownOptions?.isLoading), ut = Je;
|
|
492
493
|
function Qe({
|
|
493
494
|
isOpen: e,
|
|
494
495
|
options: t,
|
|
@@ -665,7 +666,7 @@ function Qe({
|
|
|
665
666
|
},
|
|
666
667
|
children: [
|
|
667
668
|
!le && /* @__PURE__ */ l.jsx(
|
|
668
|
-
|
|
669
|
+
Ke,
|
|
669
670
|
{
|
|
670
671
|
name: "",
|
|
671
672
|
label: "",
|
|
@@ -792,6 +793,6 @@ const Oe = F(({ selectedOptions: e, placeholder: t, onRemoveOption: i, displayMo
|
|
|
792
793
|
] }), (e, t) => e.selectedOptions === t.selectedOptions);
|
|
793
794
|
Oe.displayName = "DefaultSelectionDisplay";
|
|
794
795
|
export {
|
|
795
|
-
|
|
796
|
+
ut as S,
|
|
796
797
|
E as g
|
|
797
798
|
};
|
package/dist/Select.es.js
CHANGED
package/dist/SelectFormik.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as d } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { useField as y } from "formik";
|
|
3
|
-
import { S as m } from "./Select-
|
|
3
|
+
import { S as m } from "./Select-IAQKEfnq.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(
|
package/dist/SelectSearch.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as G } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
-
import { g as i, S as H } from "./Select-
|
|
2
|
+
import { g as i, S as H } from "./Select-IAQKEfnq.js";
|
|
3
3
|
import { useState as w, useRef as T, useEffect as m, useMemo as Q, useCallback as X } from "react";
|
|
4
4
|
function te(e) {
|
|
5
5
|
const {
|
|
@@ -46,3 +46,37 @@ interface DatePickerMultipleProps extends DatePickerBaseProps {
|
|
|
46
46
|
export type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps | DatePickerMultipleProps;
|
|
47
47
|
declare const DatePicker: (props: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
48
|
export default DatePicker;
|
|
49
|
+
interface CalendarProps {
|
|
50
|
+
min?: number;
|
|
51
|
+
max?: number;
|
|
52
|
+
excludeDisabled?: boolean;
|
|
53
|
+
endMonth?: Date;
|
|
54
|
+
startMonth?: Date;
|
|
55
|
+
readonly?: boolean;
|
|
56
|
+
className?: string;
|
|
57
|
+
required?: boolean;
|
|
58
|
+
hideFooter?: boolean;
|
|
59
|
+
applyLabel?: string;
|
|
60
|
+
cancelLabel?: string;
|
|
61
|
+
onApply?: () => void;
|
|
62
|
+
onCancel?: () => void;
|
|
63
|
+
numberOfMonths?: number;
|
|
64
|
+
hideOutsideDays?: boolean;
|
|
65
|
+
style?: React.CSSProperties;
|
|
66
|
+
showActionButtons?: boolean;
|
|
67
|
+
header?: string | React.ReactNode;
|
|
68
|
+
footer?: string | React.ReactNode;
|
|
69
|
+
mode: "single" | "range" | "multiple";
|
|
70
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
71
|
+
selected: Date | DateRange | Date[] | undefined;
|
|
72
|
+
displayValue: Date | DateRange | Date[] | undefined;
|
|
73
|
+
onSelect?: (value: Date | DateRange | Date[]) => void;
|
|
74
|
+
calendarPosition?: {
|
|
75
|
+
top: number;
|
|
76
|
+
bottom: number;
|
|
77
|
+
left: number;
|
|
78
|
+
right: number;
|
|
79
|
+
};
|
|
80
|
+
disabledDates?: boolean | Matcher[] | Date | Date[] | DateRange | DateBefore | DateAfter | DateInterval | DayOfWeek | ((date: Date) => boolean);
|
|
81
|
+
}
|
|
82
|
+
export declare const Calendar: import('react').MemoExoticComponent<(props: CalendarProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface DrawerMobileProps<TContext = unknown> {
|
|
3
|
-
children?: React.ReactNode;
|
|
3
|
+
children?: React.ReactNode | ((context: TContext | null) => React.ReactNode);
|
|
4
4
|
defaultOpen?: boolean;
|
|
5
5
|
onClose?: (context: TContext | null) => void;
|
|
6
6
|
snap?: string | number | null;
|
|
@@ -3,7 +3,7 @@ export type LabelVariant = "default" | "static";
|
|
|
3
3
|
export interface IInputFormik {
|
|
4
4
|
label: string;
|
|
5
5
|
icon?: ReactNode;
|
|
6
|
-
iconPosition?:
|
|
6
|
+
iconPosition?: "left" | "right";
|
|
7
7
|
className?: string;
|
|
8
8
|
containerClassName?: string;
|
|
9
9
|
id?: string;
|
|
@@ -17,6 +17,7 @@ export interface IInputFormik {
|
|
|
17
17
|
onEmptied?: () => void;
|
|
18
18
|
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
19
19
|
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
20
|
+
innerRef?: React.Ref<HTMLInputElement>;
|
|
20
21
|
}
|
|
21
22
|
declare const InputFormik: (props: IInputFormik) => import("react/jsx-runtime").JSX.Element;
|
|
22
23
|
export default InputFormik;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InputProps } from '../../index';
|
|
2
2
|
export interface IInputFormikV2 extends Omit<InputProps, 'onChange' | 'form'> {
|
|
3
|
+
innerRef?: React.Ref<HTMLInputElement>;
|
|
3
4
|
}
|
|
4
5
|
declare const InputFormik: (props: IInputFormikV2) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default InputFormik;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ComponentVariant } from '../Shared/types';
|
|
3
|
+
export interface RadioButtonProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
4
|
+
label?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
errorComponent?: React.ReactNode | string;
|
|
7
|
+
helperComponent?: React.ReactNode | string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
variant?: ComponentVariant;
|
|
10
|
+
}
|
|
11
|
+
declare const RadioButton: React.NamedExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
|
|
12
|
+
export default RadioButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RadioButtonProps } from '../RadioButton/RadioButton';
|
|
2
|
+
export interface RadioButtonFormikProps extends Omit<RadioButtonProps, 'onChange' | 'form'> {
|
|
3
|
+
}
|
|
4
|
+
declare const RadioButtonFormik: {
|
|
5
|
+
(props: RadioButtonFormikProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export default RadioButtonFormik;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RecurrenceFrequencyType } from './RecurrentDatePicker';
|
|
2
|
+
export interface IFrequencySettingsProps {
|
|
3
|
+
frequency: RecurrenceFrequencyType;
|
|
4
|
+
}
|
|
5
|
+
declare const FrequencySettings: (props: IFrequencySettingsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default FrequencySettings;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type RecurrenceFrequencyType = "custom" | "weekly" | "monthly" | "yearly";
|
|
2
|
+
export declare const RecurrenceFrecuencyOptions: {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}[];
|
|
6
|
+
declare const RecurrentDatePicker: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default RecurrentDatePicker;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type weekDay = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
2
|
+
type WeekdaySelectorProps = {
|
|
3
|
+
options?: weekDay[];
|
|
4
|
+
labelVariant?: 'short' | 'large';
|
|
5
|
+
value: weekDay[];
|
|
6
|
+
onChange: (newValue: weekDay[]) => void;
|
|
7
|
+
label?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const WeekdaysSelector: (props: WeekdaySelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default WeekdaysSelector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RadioButton } from '../components/RadioButton/RadioButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RadioButtonFormik } from '../components/RadioButtonFormik/RadioButtonFormik';
|
package/dist/index.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ export { toastpyrion } from './components/Toaster/Toaster';
|
|
|
39
39
|
export { default as SelectSearch } from './components/SelectSearch/SelectSearch';
|
|
40
40
|
export { default as FAButton } from './components/FAB/FAButton';
|
|
41
41
|
export { default as InputFormikV2 } from './components/InputFormik/InputFormikV2';
|
|
42
|
+
export { default as RadioButtonFormik } from './components/RadioButtonFormik/RadioButtonFormik';
|
|
43
|
+
export { default as RadioButton } from './components/RadioButton/RadioButton';
|
|
42
44
|
export * from './components/Sidebar';
|
|
43
45
|
export { SecondaryBar } from './components/Sidebar/SecondaryBar/SecondaryBar';
|
|
44
46
|
export { Badge } from './components/Sidebar/components/badge';
|
|
@@ -103,4 +105,6 @@ export type { SelectOptionType } from './components/Select/Select';
|
|
|
103
105
|
export type { BaseSelectSearchProps as SelectSearchProps } from './components/SelectSearch/SelectSearch';
|
|
104
106
|
export type { FAButtonProps } from './components/FAB/FAButton';
|
|
105
107
|
export type { IInputFormikV2 } from './components/InputFormik/InputFormikV2';
|
|
108
|
+
export type { RadioButtonProps } from './components/RadioButton/RadioButton';
|
|
109
|
+
export type { RadioButtonFormikProps } from './components/RadioButtonFormik/RadioButtonFormik';
|
|
106
110
|
export { Icons } from './Icons/Icons';
|