@pedidopago/ui 1.5.4 → 1.5.5

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 +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;;;mIAoI3B,CAAC;AAEF,eAAO,MAAM,aAAa;;;yGAKzB,CAAC;AAEF,eAAO,MAAM,WAAW;;;yGAIvB,CAAC"}
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;;;mIAgI3B,CAAC;AAEF,eAAO,MAAM,aAAa;;;yGAKzB,CAAC;AAEF,eAAO,MAAM,WAAW;;;yGAIvB,CAAC"}
@@ -19,7 +19,7 @@ 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-inline: 24px;\n --button-brightness: brightness(0.85);\n\n transition: all 0.15s ease-in-out;\n\n color: ", ";\n\n background-color: ", ";\n\n min-height: ", ";\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) {
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\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) {
@@ -36,12 +36,7 @@ var ButtonContainer = _styled.default.button(_templateObject || (_templateObject
36
36
  bgColor = _ref4.bgColor;
37
37
  return bgColor !== null && bgColor !== void 0 ? bgColor : theme.colors.primary.default;
38
38
  }, function (_ref5) {
39
- var theme = _ref5.theme,
40
- size = _ref5.size;
41
- if (size) return theme.buttonSize[size];
42
- return theme.buttonSize.md;
43
- }, function (_ref6) {
44
- var fullWidth = _ref6.fullWidth;
39
+ var fullWidth = _ref5.fullWidth;
45
40
 
46
41
  if (fullWidth) {
47
42
  if (_typeof(fullWidth) === 'object' && fullWidth !== undefined) {
@@ -50,18 +45,18 @@ var ButtonContainer = _styled.default.button(_templateObject || (_templateObject
50
45
 
51
46
  return '100%';
52
47
  }
53
- }, function (_ref7) {
54
- var theme = _ref7.theme,
55
- variant = _ref7.variant,
56
- textColor = _ref7.textColor,
57
- bgColor = _ref7.bgColor;
48
+ }, function (_ref6) {
49
+ var theme = _ref6.theme,
50
+ variant = _ref6.variant,
51
+ textColor = _ref6.textColor,
52
+ bgColor = _ref6.bgColor;
58
53
 
59
54
  switch (variant) {
60
55
  case 'solid':
61
- return (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &:is(&:hover, &:focus):not(:disabled) {\n box-shadow: inset 0 0 40px 40px rgba(0, 0, 0, 0.08);\n }\n "])));
56
+ return (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 0.875rem 2rem;\n &:is(&:hover, &:focus):not(:disabled) {\n box-shadow: inset 0 0 40px 40px rgba(0, 0, 0, 0.08);\n }\n "])));
62
57
 
63
58
  case 'outline':
64
- 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);
59
+ return (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 0.875rem 2rem;\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
60
 
66
61
  case 'ghost':
67
62
  return (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding-inline: 0;\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);
@@ -69,44 +64,44 @@ var ButtonContainer = _styled.default.button(_templateObject || (_templateObject
69
64
  case 'link':
70
65
  return (0, _react.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-inline: 0;\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
66
  }
72
- }, function (_ref8) {
73
- var theme = _ref8.theme;
67
+ }, function (_ref7) {
68
+ var theme = _ref7.theme;
74
69
  return theme.breakpoints.sm;
75
- }, function (_ref9) {
76
- var fullWidth = _ref9.fullWidth;
70
+ }, function (_ref8) {
71
+ var fullWidth = _ref8.fullWidth;
77
72
 
78
73
  if (_typeof(fullWidth) === 'object') {
79
74
  var widthWasNotSet = fullWidth.sm === undefined;
80
75
  if (widthWasNotSet) return;
81
76
  return fullWidth.sm ? '100%' : 'fit-content';
82
77
  }
83
- }, function (_ref10) {
84
- var theme = _ref10.theme;
78
+ }, function (_ref9) {
79
+ var theme = _ref9.theme;
85
80
  return theme.breakpoints.md;
86
- }, function (_ref11) {
87
- var fullWidth = _ref11.fullWidth;
81
+ }, function (_ref10) {
82
+ var fullWidth = _ref10.fullWidth;
88
83
 
89
84
  if (_typeof(fullWidth) === 'object') {
90
85
  var widthWasNotSet = fullWidth.md === undefined;
91
86
  if (widthWasNotSet) return;
92
87
  return fullWidth.md ? '100%' : 'fit-content';
93
88
  }
94
- }, function (_ref12) {
95
- var theme = _ref12.theme;
89
+ }, function (_ref11) {
90
+ var theme = _ref11.theme;
96
91
  return theme.breakpoints.lg;
97
- }, function (_ref13) {
98
- var fullWidth = _ref13.fullWidth;
92
+ }, function (_ref12) {
93
+ var fullWidth = _ref12.fullWidth;
99
94
 
100
95
  if (_typeof(fullWidth) === 'object') {
101
96
  var widthWasNotSet = fullWidth.lg === undefined;
102
97
  if (widthWasNotSet) return;
103
98
  return fullWidth.lg ? '100%' : 'fit-content';
104
99
  }
105
- }, function (_ref14) {
106
- var theme = _ref14.theme;
100
+ }, function (_ref13) {
101
+ var theme = _ref13.theme;
107
102
  return theme.breakpoints.xl;
108
- }, function (_ref15) {
109
- var fullWidth = _ref15.fullWidth;
103
+ }, function (_ref14) {
104
+ var fullWidth = _ref14.fullWidth;
110
105
 
111
106
  if (_typeof(fullWidth) === 'object') {
112
107
  var widthWasNotSet = fullWidth.xl === undefined;
@@ -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) => 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,SAAS,CAAC;IAC3C,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
+ {"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,CAuI7B,CAAC;AAEF,eAAe,OAAO,CAAC"}
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
- refreshTooltipPosition(position);
156
- setShowTooltip(true);
156
+ if (!disabled) {
157
+ refreshTooltipPosition(position);
158
+ setShowTooltip(true);
159
+ }
157
160
  },
158
161
  onMouseLeave: function onMouseLeave() {
159
- setShowTooltip(false);
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",
@@ -11,6 +11,7 @@ export declare type TooltipProps = {
11
11
  offset?: number;
12
12
  animationDuration?: number;
13
13
  minWidth?: number;
14
+ disabled?: boolean;
14
15
  };
15
16
  export declare type TooltipLabelProps = TooltipProps & {
16
17
  tooltipPositions: {
@@ -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;CACnB,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,C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
  {
2
2
  "name": "@pedidopago/ui",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "Quick build beatiful Pedido Pago apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",