@mw-kit/mw-ui 1.7.41 → 1.7.43
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/interfaces.d.ts +1 -1
- package/dist/components/Input/components/DateIntervalPicker/interfaces.d.ts +5 -1
- package/dist/components/Input/components/Phone/interfaces.d.ts +3 -0
- package/dist/index.js +18 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +18 -8
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ export interface StyledButtonProps extends React.ButtonHTMLAttributes<HTMLButton
|
|
|
9
9
|
/**
|
|
10
10
|
* Specifies if the button style is solid, bordered or text only.
|
|
11
11
|
*/
|
|
12
|
-
appearance: 'solid' | 'bordered' | 'link' | '
|
|
12
|
+
appearance: 'solid' | 'bordered' | 'link' | 'borderless';
|
|
13
13
|
/**
|
|
14
14
|
* Define the color of button.
|
|
15
15
|
*/
|
|
@@ -8,10 +8,14 @@ export interface DateIntervalPickerProps extends React.HTMLAttributes<HTMLInputE
|
|
|
8
8
|
value: Value;
|
|
9
9
|
setValue: (value: Value) => void;
|
|
10
10
|
getLabel?: (value: Value) => string;
|
|
11
|
+
center?: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
11
15
|
max?: Date;
|
|
12
16
|
min?: Date;
|
|
13
17
|
only?: IntervalType;
|
|
14
|
-
calendar?: Omit<AbsoluteIntervalCalendarProps, 'initialValue' | 'onSubmit' | 'invalid' | 'open'>;
|
|
18
|
+
calendar?: Omit<AbsoluteIntervalCalendarProps, 'initialValue' | 'onSubmit' | 'invalid' | 'open' | 'center'>;
|
|
15
19
|
}
|
|
16
20
|
export interface Variation {
|
|
17
21
|
label: (prev: [Date, Date]) => string;
|
|
@@ -24,6 +24,9 @@ export interface PhoneProps extends Omit<InputProps, 'type' | 'mask' | 'placehol
|
|
|
24
24
|
type: 'phone';
|
|
25
25
|
setValue: (value: string) => void;
|
|
26
26
|
value?: string;
|
|
27
|
+
placeholder?: Partial<{
|
|
28
|
+
[k in keyof Countries]: string;
|
|
29
|
+
}>;
|
|
27
30
|
}
|
|
28
31
|
export interface Details {
|
|
29
32
|
country: Country;
|
package/dist/index.js
CHANGED
|
@@ -13698,7 +13698,7 @@ var Button = styled__default.button(_templateObject$e || (_templateObject$e = _t
|
|
|
13698
13698
|
var appearance = _ref4.appearance,
|
|
13699
13699
|
color = _ref4.color,
|
|
13700
13700
|
theme = _ref4.theme;
|
|
13701
|
-
var bgColor = ['bordered', 'link', '
|
|
13701
|
+
var bgColor = ['bordered', 'link', 'borderless'].includes(appearance) ? 'transparent' : theme.getColor(color || 'blue');
|
|
13702
13702
|
var borderColor = appearance !== 'bordered' ? bgColor : theme.getColor(color || 'blue');
|
|
13703
13703
|
return styled.css(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n border: 1px solid ", ";\n "])), bgColor, borderColor);
|
|
13704
13704
|
}, function (_ref5) {
|
|
@@ -13708,7 +13708,7 @@ var Button = styled__default.button(_templateObject$e || (_templateObject$e = _t
|
|
|
13708
13708
|
theme = _ref5.theme;
|
|
13709
13709
|
if (loading) return 'transparent';
|
|
13710
13710
|
|
|
13711
|
-
if (['link', '
|
|
13711
|
+
if (['link', 'borderless'].includes(appearance)) {
|
|
13712
13712
|
return color ? theme.colors[color] : theme.getColor('greyishBlue', 50);
|
|
13713
13713
|
}
|
|
13714
13714
|
|
|
@@ -13722,7 +13722,7 @@ var Button = styled__default.button(_templateObject$e || (_templateObject$e = _t
|
|
|
13722
13722
|
loading = _ref6.loading,
|
|
13723
13723
|
theme = _ref6.theme;
|
|
13724
13724
|
|
|
13725
|
-
if (['bordered', 'link', '
|
|
13725
|
+
if (['bordered', 'link', 'borderless'].includes(appearance)) {
|
|
13726
13726
|
return styled.css(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n opacity: 0.3;\n pointer-events: none;\n "])));
|
|
13727
13727
|
}
|
|
13728
13728
|
|
|
@@ -13738,7 +13738,7 @@ var Button = styled__default.button(_templateObject$e || (_templateObject$e = _t
|
|
|
13738
13738
|
|
|
13739
13739
|
if (appearance === 'bordered') {
|
|
13740
13740
|
return styled.css(_templateObject6$7 || (_templateObject6$7 = _taggedTemplateLiteralLoose(["\n color: ", ";\n border: 1px solid ", ";\n "])), theme.getColor(color || 'blue', 70), theme.getColor(color || 'blue', 70));
|
|
13741
|
-
} else if (['link', '
|
|
13741
|
+
} else if (['link', 'borderless'].includes(appearance)) {
|
|
13742
13742
|
return styled.css(_templateObject7$7 || (_templateObject7$7 = _taggedTemplateLiteralLoose(["\n color: ", ";\n "])), theme.colors.blue);
|
|
13743
13743
|
}
|
|
13744
13744
|
|
|
@@ -13752,7 +13752,7 @@ var Button = styled__default.button(_templateObject$e || (_templateObject$e = _t
|
|
|
13752
13752
|
return styled.css(_templateObject9$6 || (_templateObject9$6 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n "])), theme.getColor('iceWhite'));
|
|
13753
13753
|
}
|
|
13754
13754
|
|
|
13755
|
-
if (['link', '
|
|
13755
|
+
if (['link', 'borderless'].includes(appearance)) {
|
|
13756
13756
|
return styled.css(_templateObject10$5 || (_templateObject10$5 = _taggedTemplateLiteralLoose(["\n color: ", ";\n "])), theme.getColor('blue', 50));
|
|
13757
13757
|
}
|
|
13758
13758
|
|
|
@@ -15262,13 +15262,14 @@ var Component = React__default.forwardRef(function (props, ref) {
|
|
|
15262
15262
|
var v = inputValue.replace(/\D+/g, '').substring(0, country.charLimit);
|
|
15263
15263
|
setValue(country.ddi + " " + v);
|
|
15264
15264
|
}, [inputValue]);
|
|
15265
|
+
var placeholder = props.placeholder && props.placeholder[country.iso] ? props.placeholder[country.iso] : country.placeholder;
|
|
15265
15266
|
return React__default.createElement(RelativeContainer$3, {
|
|
15266
15267
|
ref: useOnClickOut(function () {
|
|
15267
15268
|
return setOpen(false);
|
|
15268
15269
|
})
|
|
15269
15270
|
}, React__default.createElement(Input$1, Object.assign({}, props, {
|
|
15270
15271
|
type: 'text',
|
|
15271
|
-
placeholder:
|
|
15272
|
+
placeholder: placeholder,
|
|
15272
15273
|
mask: mask,
|
|
15273
15274
|
value: inputValue,
|
|
15274
15275
|
setValue: setInputValue,
|
|
@@ -16166,6 +16167,10 @@ var LabelText$1 = styled__default.label(_templateObject11$5 || (_templateObject1
|
|
|
16166
16167
|
});
|
|
16167
16168
|
|
|
16168
16169
|
var Component$1 = React__default.forwardRef(function (props, ref) {
|
|
16170
|
+
var center = props.center || {
|
|
16171
|
+
x: 50,
|
|
16172
|
+
y: 50
|
|
16173
|
+
};
|
|
16169
16174
|
var value = parse(props.value);
|
|
16170
16175
|
|
|
16171
16176
|
var _useState = React.useState(null),
|
|
@@ -16319,6 +16324,10 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
|
|
|
16319
16324
|
close: function close() {
|
|
16320
16325
|
return setOpen(null);
|
|
16321
16326
|
},
|
|
16327
|
+
center: center,
|
|
16328
|
+
references: {
|
|
16329
|
+
bottom: '35px'
|
|
16330
|
+
},
|
|
16322
16331
|
options: [{
|
|
16323
16332
|
label: 'Hoje',
|
|
16324
16333
|
onClick: function onClick() {
|
|
@@ -16350,6 +16359,7 @@ var Component$1 = React__default.forwardRef(function (props, ref) {
|
|
|
16350
16359
|
itemSpacing: 's3',
|
|
16351
16360
|
bordered: true
|
|
16352
16361
|
}), React__default.createElement(Calendar, Object.assign({}, props.calendar || {}, {
|
|
16362
|
+
center: center,
|
|
16353
16363
|
type: 'interval',
|
|
16354
16364
|
absolute: true,
|
|
16355
16365
|
open: open === 'calendar',
|
|
@@ -18053,7 +18063,7 @@ var ConfirmDelete = function ConfirmDelete(props) {
|
|
|
18053
18063
|
color: 'greyishBlue',
|
|
18054
18064
|
inverted: true,
|
|
18055
18065
|
footer: [{
|
|
18056
|
-
appearance: '
|
|
18066
|
+
appearance: 'borderless',
|
|
18057
18067
|
content: 'Cancelar',
|
|
18058
18068
|
onClick: cancelAction
|
|
18059
18069
|
}, {
|
|
@@ -18131,7 +18141,7 @@ var Audit = function Audit(props) {
|
|
|
18131
18141
|
color: 'greyishBlue',
|
|
18132
18142
|
inverted: true,
|
|
18133
18143
|
footer: [{
|
|
18134
|
-
appearance: '
|
|
18144
|
+
appearance: 'borderless',
|
|
18135
18145
|
content: 'Cancelar',
|
|
18136
18146
|
onClick: cancelAction
|
|
18137
18147
|
}, {
|