@producteca/producteca-ui-kit 1.13.6 → 1.14.0
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/components/button/button.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/inputs/datePicker/datePicker.d.ts +5 -0
- package/dist/components/inputs/datePicker/datePickerCustomStyles.d.ts +8 -0
- package/dist/components/inputs/datePicker/datePickerTypes.d.ts +15 -0
- package/dist/components/inputs/datePicker/datePickerUtils.d.ts +68 -0
- package/dist/components/inputs/datePicker/index.d.ts +3 -0
- package/dist/components/inputs/formField/textInput.d.ts +1 -1
- package/dist/components/inputs/index.d.ts +1 -0
- package/dist/components/patterns/index.d.ts +1 -1
- package/dist/components/{patterns/tooltip → tooltip}/index.d.ts +1 -1
- package/dist/components/{patterns/tooltip → tooltip}/tooltip.d.ts +4 -2
- package/dist/locales/es.d.ts +39 -0
- package/dist/producteca-ui-kit.es.js +42644 -13752
- package/dist/producteca-ui-kit.umd.js +202 -96
- package/dist/style.css +1 -1
- package/dist/{components/inputs/formField → validators}/errorMessage.d.ts +1 -1
- package/dist/validators/index.d.ts +1 -0
- package/dist/validators/validation.d.ts +1 -1
- package/package.json +8 -6
- /package/dist/components/{patterns/tooltip → tooltip}/overflowChecker.d.ts +0 -0
|
@@ -5,7 +5,7 @@ interface ButtonProps {
|
|
|
5
5
|
outline?: boolean;
|
|
6
6
|
size?: 'sm' | 'md' | 'lg';
|
|
7
7
|
type?: 'submit' | 'button' | 'reset';
|
|
8
|
-
variant?: 'primary' | 'secondary' | 'success' | 'error' | 'link';
|
|
8
|
+
variant?: 'primary' | 'secondary' | 'success' | 'error' | 'link' | 'tooltip-link';
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
className?: string;
|
|
11
11
|
onClick?: () => void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DatePickerProps } from './datePickerTypes';
|
|
3
|
+
|
|
4
|
+
export declare const DatePickerInput: React.FC<DatePickerProps>;
|
|
5
|
+
export declare const DatePicker: ({ label, rightAdornment, ...props }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
|
|
3
|
+
export declare const datePickerLayoutStyles: SxProps<Theme>;
|
|
4
|
+
export declare const datePickerInputStyles: SxProps<Theme>;
|
|
5
|
+
export declare const datePickerDayStyles: SxProps<Theme>;
|
|
6
|
+
export declare const datePickerDigitalClockStyles: SxProps<Theme>;
|
|
7
|
+
export declare const datePickerYearStyles: SxProps<Theme>;
|
|
8
|
+
export declare const datePickerPopperStyles: SxProps<Theme>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormFieldProps } from '../formField/formField';
|
|
2
|
+
import { InputValue } from '../../../validators';
|
|
3
|
+
|
|
4
|
+
export interface DatePickerSpecificProps {
|
|
5
|
+
value?: InputValue;
|
|
6
|
+
minDate?: InputValue;
|
|
7
|
+
maxDate?: InputValue;
|
|
8
|
+
format?: string;
|
|
9
|
+
size?: "md" | "lg";
|
|
10
|
+
}
|
|
11
|
+
type UnusedFormFieldProps = 'max' | 'min' | 'isClearable' | 'leftIcon' | 'rightIcon' | 'type' | 'inputRef' | 'children';
|
|
12
|
+
type OverriddenFormFieldProps = 'value' | 'size';
|
|
13
|
+
export interface DatePickerProps extends Omit<FormFieldProps, UnusedFormFieldProps | OverriddenFormFieldProps>, DatePickerSpecificProps {
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { TextField } from '@mui/material';
|
|
2
|
+
import { default as dayjs, Dayjs } from 'dayjs';
|
|
3
|
+
import { InputValue } from '../../../validators';
|
|
4
|
+
import { default as React } from 'react';
|
|
5
|
+
|
|
6
|
+
export declare const ActionComponent: React.FC<{
|
|
7
|
+
showClearIcon: boolean;
|
|
8
|
+
onClear?: () => void;
|
|
9
|
+
onOpen?: () => void;
|
|
10
|
+
}>;
|
|
11
|
+
export type PickerType = 'date' | 'dateTime' | 'time' | 'year';
|
|
12
|
+
export declare const getPickerTypeFromFormat: (format?: string) => PickerType;
|
|
13
|
+
export declare const getFinalFormat: (format?: string) => string;
|
|
14
|
+
export declare const getPlaceholderByFormat: (format?: string, customPlaceholder?: string) => string;
|
|
15
|
+
export declare const convertToDate: (val: InputValue, format: string) => Dayjs | null;
|
|
16
|
+
export declare const getPickerProps: ({ currentValue, finalFormat, onChange, disabled, minDate, maxDate, placeholder, name, otherProps, onClear, onOpen, onClose, open, }: {
|
|
17
|
+
currentValue: InputValue;
|
|
18
|
+
finalFormat: string;
|
|
19
|
+
onChange: (date: Dayjs | null) => void;
|
|
20
|
+
open: boolean;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
minDate?: InputValue;
|
|
23
|
+
maxDate?: InputValue;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
onClear?: () => void;
|
|
27
|
+
onOpen?: () => void;
|
|
28
|
+
onClose?: () => void;
|
|
29
|
+
otherProps: any;
|
|
30
|
+
}) => {
|
|
31
|
+
open: boolean;
|
|
32
|
+
value: dayjs.Dayjs | null;
|
|
33
|
+
onAccept: (date: Dayjs | null) => void;
|
|
34
|
+
onClose: (() => void) | undefined;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
minDate: dayjs.Dayjs | undefined;
|
|
37
|
+
maxDate: dayjs.Dayjs | undefined;
|
|
38
|
+
format: string;
|
|
39
|
+
slots: {
|
|
40
|
+
textField: typeof TextField;
|
|
41
|
+
};
|
|
42
|
+
slotProps: {
|
|
43
|
+
textField: {
|
|
44
|
+
placeholder: string;
|
|
45
|
+
name: string | undefined;
|
|
46
|
+
onClick: (() => void) | undefined;
|
|
47
|
+
variant: "outlined";
|
|
48
|
+
fullWidth: boolean;
|
|
49
|
+
className: string;
|
|
50
|
+
sx: import('@mui/material').SxProps<import('@mui/material').Theme>;
|
|
51
|
+
InputProps: {
|
|
52
|
+
style: {
|
|
53
|
+
cursor: string;
|
|
54
|
+
};
|
|
55
|
+
endAdornment: import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
layout: {
|
|
59
|
+
sx: {};
|
|
60
|
+
};
|
|
61
|
+
day: {
|
|
62
|
+
sx: import('@mui/material').SxProps<import('@mui/material').Theme>;
|
|
63
|
+
};
|
|
64
|
+
popper: {
|
|
65
|
+
sx: import('@mui/material').SxProps<import('@mui/material').Theme>;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -17,7 +17,7 @@ export interface TextInputProps {
|
|
|
17
17
|
leftIcon?: React.ReactNode;
|
|
18
18
|
rightIcon?: React.ReactNode;
|
|
19
19
|
isValid?: (value: InputValue) => boolean;
|
|
20
|
-
type?: 'text' | 'number' | 'password' | undefined;
|
|
20
|
+
type?: 'text' | 'number' | 'password' | 'date' | undefined;
|
|
21
21
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
22
22
|
input?: ReduxFormInput;
|
|
23
23
|
inputRef?: React.RefObject<HTMLInputElement>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { OverflowChecker } from './overflowChecker';
|
|
2
2
|
export { WithTooltip, WithOverflowTooltip } from './tooltip';
|
|
3
|
-
export type { WithTooltipProps, CombinedTooltipProps, TooltipPlacement, BaseTooltipProps } from './tooltip';
|
|
3
|
+
export type { WithTooltipProps, CombinedTooltipProps, TooltipPlacement, BaseTooltipProps, TooltipTrigger, } from './tooltip';
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
3
|
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
4
|
+
export type TooltipTrigger = 'hover' | 'click';
|
|
4
5
|
export interface BaseTooltipProps {
|
|
5
|
-
content?: string;
|
|
6
|
+
content?: string | React.ReactNode;
|
|
6
7
|
placement?: TooltipPlacement;
|
|
7
8
|
arrow?: boolean;
|
|
8
9
|
maxWidth?: number | string;
|
|
10
|
+
trigger?: TooltipTrigger;
|
|
9
11
|
}
|
|
10
12
|
export interface WithTooltipProps extends BaseTooltipProps {
|
|
11
13
|
children: React.ReactElement;
|
|
12
14
|
}
|
|
13
|
-
export declare const WithTooltip: ({ children, content, placement, arrow, maxWidth, ...otherProps }: WithTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const WithTooltip: ({ children, content, placement, arrow, maxWidth, trigger, ...otherProps }: WithTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
16
|
export interface CombinedTooltipProps extends BaseTooltipProps {
|
|
15
17
|
children: React.ReactElement;
|
|
16
18
|
}
|
package/dist/locales/es.d.ts
CHANGED
|
@@ -32,6 +32,11 @@ declare const _default: {
|
|
|
32
32
|
overflowDescription: string;
|
|
33
33
|
componentDescription: string;
|
|
34
34
|
maxWidthDescription: string;
|
|
35
|
+
clickToSee: string;
|
|
36
|
+
clickableTitle: string;
|
|
37
|
+
clickableDescription: string;
|
|
38
|
+
bulletPoint: string;
|
|
39
|
+
linkText: string;
|
|
35
40
|
};
|
|
36
41
|
description: {
|
|
37
42
|
checkboxInputReduxFormExample: string;
|
|
@@ -107,5 +112,39 @@ declare const _default: {
|
|
|
107
112
|
running: string;
|
|
108
113
|
alert: string;
|
|
109
114
|
};
|
|
115
|
+
datePicker: {
|
|
116
|
+
name: string;
|
|
117
|
+
value: string;
|
|
118
|
+
size: string;
|
|
119
|
+
disabled: string;
|
|
120
|
+
required: string;
|
|
121
|
+
noErrors: string;
|
|
122
|
+
placeholder: string;
|
|
123
|
+
label: string;
|
|
124
|
+
format: string;
|
|
125
|
+
minDate: string;
|
|
126
|
+
maxDate: string;
|
|
127
|
+
rightAdornment: string;
|
|
128
|
+
meta: string;
|
|
129
|
+
isValid: string;
|
|
130
|
+
input: string;
|
|
131
|
+
onChange: string;
|
|
132
|
+
selectDate: string;
|
|
133
|
+
dateLabel: string;
|
|
134
|
+
selectADate: string;
|
|
135
|
+
requiredDate: string;
|
|
136
|
+
requiredField: string;
|
|
137
|
+
dateAndTime: string;
|
|
138
|
+
dateWithLimits: string;
|
|
139
|
+
onlyFutureDates: string;
|
|
140
|
+
customFormat: string;
|
|
141
|
+
yearSelector: string;
|
|
142
|
+
timeSelector: string;
|
|
143
|
+
timeSelectorWithSeconds: string;
|
|
144
|
+
dateTimeSelector: string;
|
|
145
|
+
selectYear: string;
|
|
146
|
+
selectTime: string;
|
|
147
|
+
selectDateTime: string;
|
|
148
|
+
};
|
|
110
149
|
};
|
|
111
150
|
export default _default;
|