@pedidopago/ui 1.5.4 → 1.5.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.
- package/dist/components/Button/styles.d.ts.map +1 -1
- package/dist/components/Button/styles.js +29 -12
- package/dist/components/DateInput/types.d.ts +1 -1
- package/dist/components/DateInput/types.d.ts.map +1 -1
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +9 -4
- package/dist/components/Tooltip/styles.d.ts.map +1 -1
- package/dist/components/Tooltip/styles.js +1 -1
- package/dist/components/Tooltip/types.d.ts +1 -0
- package/dist/components/Tooltip/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,eAAO,MAAM,eAAe;;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,eAAO,MAAM,eAAe;;;mIA4I3B,CAAC;AAEF,eAAO,MAAM,aAAa;;;yGAKzB,CAAC;AAEF,eAAO,MAAM,WAAW;;;yGAIvB,CAAC"}
|
|
@@ -19,27 +19,44 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
19
19
|
|
|
20
20
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
21
|
|
|
22
|
-
var ButtonContainer = _styled.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-family: inherit;\n font-weight: ", ";\n font-size: ", ";\n border-radius: 8px;\n border: 0px;\n cursor: pointer;\n padding
|
|
22
|
+
var ButtonContainer = _styled.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-family: inherit;\n font-weight: ", ";\n font-size: ", ";\n border-radius: 8px;\n border: 0px;\n cursor: pointer;\n padding: ", ";\n\n --button-brightness: brightness(0.85);\n\n transition: all 0.15s ease-in-out;\n\n color: ", ";\n\n background-color: ", ";\n\n width: ", ";\n\n &:disabled {\n filter: opacity(0.5);\n cursor: default;\n pointer-events: none;\n }\n\n ", "\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n"])), function (_ref) {
|
|
23
23
|
var theme = _ref.theme;
|
|
24
24
|
return theme.fontWeight[600];
|
|
25
25
|
}, function (_ref2) {
|
|
26
26
|
var theme = _ref2.theme;
|
|
27
27
|
return theme.fontSizes.xs;
|
|
28
28
|
}, function (_ref3) {
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
var size = _ref3.size;
|
|
30
|
+
|
|
31
|
+
switch (size) {
|
|
32
|
+
case 'xs':
|
|
33
|
+
return '4px 8px';
|
|
34
|
+
|
|
35
|
+
case 'sm':
|
|
36
|
+
return '8px 16px';
|
|
37
|
+
|
|
38
|
+
case 'md':
|
|
39
|
+
return '12px 24px';
|
|
40
|
+
|
|
41
|
+
case 'lg':
|
|
42
|
+
return '16px 32px';
|
|
43
|
+
|
|
44
|
+
case 'xl':
|
|
45
|
+
return '20px 40px';
|
|
46
|
+
|
|
47
|
+
default:
|
|
48
|
+
return '12px 24px';
|
|
49
|
+
}
|
|
34
50
|
}, function (_ref4) {
|
|
35
51
|
var theme = _ref4.theme,
|
|
52
|
+
textColor = _ref4.textColor,
|
|
36
53
|
bgColor = _ref4.bgColor;
|
|
37
|
-
|
|
54
|
+
var baseColor = (0, _invertColor.invertColor)(textColor || bgColor || theme.colors.primary.default, true);
|
|
55
|
+
return textColor !== null && textColor !== void 0 ? textColor : baseColor;
|
|
38
56
|
}, function (_ref5) {
|
|
39
57
|
var theme = _ref5.theme,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return theme.buttonSize.md;
|
|
58
|
+
bgColor = _ref5.bgColor;
|
|
59
|
+
return bgColor !== null && bgColor !== void 0 ? bgColor : theme.colors.primary.default;
|
|
43
60
|
}, function (_ref6) {
|
|
44
61
|
var fullWidth = _ref6.fullWidth;
|
|
45
62
|
|
|
@@ -64,10 +81,10 @@ var ButtonContainer = _styled.default.button(_templateObject || (_templateObject
|
|
|
64
81
|
return (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: transparent;\n color: ", ";\n border: 3px ", " solid;\n box-shadow: none;\n &:is(&:hover, &:focus):not(:disabled) {\n filter: var(--button-brightness);\n }\n "])), textColor || bgColor || theme.colors.primary.default, bgColor || textColor || theme.colors.primary.default);
|
|
65
82
|
|
|
66
83
|
case 'ghost':
|
|
67
|
-
return (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n
|
|
84
|
+
return (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: transparent;\n color: ", ";\n &:is(&:hover, &:focus):not(:disabled) {\n filter: var(--button-brightness);\n }\n "])), bgColor || textColor || theme.colors.primary.default);
|
|
68
85
|
|
|
69
86
|
case 'link':
|
|
70
|
-
return (0, _react.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
|
|
87
|
+
return (0, _react.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n text-decoration: underline;\n background-color: transparent;\n color: ", ";\n &:is(&:hover, &:focus):not(:disabled) {\n filter: var(--button-brightness);\n }\n "])), bgColor || textColor || theme.colors.primary.default);
|
|
71
88
|
}
|
|
72
89
|
}, function (_ref8) {
|
|
73
90
|
var theme = _ref8.theme;
|
|
@@ -3,7 +3,7 @@ import { DatePickerProps } from '../DatePicker/types';
|
|
|
3
3
|
import { InputAlertTypes } from '../Input/types';
|
|
4
4
|
export declare type ValueDate = Date | [Date, Date] | number | [number, number];
|
|
5
5
|
export interface DateInputProps extends DatePickerProps {
|
|
6
|
-
onChange?: (value: ValueDate) =>
|
|
6
|
+
onChange?: (value: ValueDate) => void;
|
|
7
7
|
label?: string;
|
|
8
8
|
placeholder?: string;
|
|
9
9
|
helperText?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,oBAAY,SAAS,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAExE,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,oBAAY,SAAS,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAExE,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC3C,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CAC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAWxD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAWxD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CA4I7B,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -23,7 +23,7 @@ var _styles = require("./styles");
|
|
|
23
23
|
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
|
|
26
|
-
var _excluded = ["position", "offset", "maxWidth"];
|
|
26
|
+
var _excluded = ["position", "offset", "maxWidth", "disabled"];
|
|
27
27
|
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
29
|
|
|
@@ -56,6 +56,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
56
56
|
offset = _ref$offset === void 0 ? 10 : _ref$offset,
|
|
57
57
|
_ref$maxWidth = _ref.maxWidth,
|
|
58
58
|
maxWidth = _ref$maxWidth === void 0 ? 250 : _ref$maxWidth,
|
|
59
|
+
disabled = _ref.disabled,
|
|
59
60
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
60
61
|
|
|
61
62
|
var _useState = (0, _react.useState)(false),
|
|
@@ -152,11 +153,15 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
152
153
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.TooltipWrapper, {
|
|
153
154
|
ref: tooltipContentRef,
|
|
154
155
|
onMouseEnter: function onMouseEnter() {
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
if (!disabled) {
|
|
157
|
+
refreshTooltipPosition(position);
|
|
158
|
+
setShowTooltip(true);
|
|
159
|
+
}
|
|
157
160
|
},
|
|
158
161
|
onMouseLeave: function onMouseLeave() {
|
|
159
|
-
|
|
162
|
+
if (!disabled) {
|
|
163
|
+
setShowTooltip(false);
|
|
164
|
+
}
|
|
160
165
|
},
|
|
161
166
|
children: [props.children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReactPortal.ReactPortal, {
|
|
162
167
|
wrapperId: "tooltip-portal",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/styles.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA8B7B,CAAC;AAEH,eAAO,MAAM,cAAc;;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/styles.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA8B7B,CAAC;AAEH,eAAO,MAAM,cAAc;;;yGAAe,CAAC;AAE3C,eAAO,MAAM,cAAc;;UAI1B,CAAC"}
|
|
@@ -26,7 +26,7 @@ var StyledTooltipLabel = (0, _styled.default)(_framerMotion.motion.div)(function
|
|
|
26
26
|
});
|
|
27
27
|
exports.StyledTooltipLabel = StyledTooltipLabel;
|
|
28
28
|
|
|
29
|
-
var TooltipWrapper = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["
|
|
29
|
+
var TooltipWrapper = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
|
|
30
30
|
|
|
31
31
|
exports.TooltipWrapper = TooltipWrapper;
|
|
32
32
|
var ViewMoreButton = (0, _styled.default)(_Button.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: fit-content;\n margin-right: auto;\n text-decoration: underline;\n"])));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,oBAAY,YAAY,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE/D,oBAAY,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,oBAAY,YAAY,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE/D,oBAAY,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,oBAAY,iBAAiB,GAAG,YAAY,GAAG;IAC7C,gBAAgB,EAAE;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,uBAAuB,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3D,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CACtD,CAAC"}
|