@pedidopago/ui 1.3.1 → 1.3.4

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.
Files changed (113) hide show
  1. package/dist/components/Alert/alert.test.js +8 -8
  2. package/dist/components/Alert/index.d.ts +2 -2
  3. package/dist/components/Alert/index.d.ts.map +1 -1
  4. package/dist/components/Alert/index.js +8 -28
  5. package/dist/components/Alert/styles.d.ts +1 -13
  6. package/dist/components/Alert/styles.d.ts.map +1 -1
  7. package/dist/components/Alert/styles.js +4 -24
  8. package/dist/components/Alert/types.d.ts +6 -23
  9. package/dist/components/Alert/types.d.ts.map +1 -1
  10. package/dist/components/Button/Button.test.js +1 -1
  11. package/dist/components/Button/index.d.ts +3 -4
  12. package/dist/components/Button/index.d.ts.map +1 -1
  13. package/dist/components/Button/index.js +25 -20
  14. package/dist/components/Button/styles.d.ts +3 -3
  15. package/dist/components/Button/styles.d.ts.map +1 -1
  16. package/dist/components/Button/styles.js +42 -43
  17. package/dist/components/Button/types.d.ts +11 -13
  18. package/dist/components/Button/types.d.ts.map +1 -1
  19. package/dist/components/DateInput/DateInput-example.d.ts +2 -2
  20. package/dist/components/DateInput/DateInput-example.d.ts.map +1 -1
  21. package/dist/components/DateInput/DateInput-example.js +10 -15
  22. package/dist/components/DateInput/dateInput.test.js +4 -4
  23. package/dist/components/DateInput/index.d.ts +2 -2
  24. package/dist/components/DateInput/index.d.ts.map +1 -1
  25. package/dist/components/DateInput/index.js +65 -136
  26. package/dist/components/DateInput/styles.d.ts +7 -29
  27. package/dist/components/DateInput/styles.d.ts.map +1 -1
  28. package/dist/components/DateInput/styles.js +15 -19
  29. package/dist/components/DateInput/types.d.ts +7 -14
  30. package/dist/components/DateInput/types.d.ts.map +1 -1
  31. package/dist/components/DatePicker/datepicker.test.js +8 -8
  32. package/dist/components/DatePicker/index.d.ts.map +1 -1
  33. package/dist/components/DatePicker/index.js +4 -8
  34. package/dist/components/DatePicker/types.d.ts +3 -4
  35. package/dist/components/DatePicker/types.d.ts.map +1 -1
  36. package/dist/components/Input/index.js +14 -15
  37. package/dist/components/Input/styles.d.ts +1 -0
  38. package/dist/components/Input/styles.d.ts.map +1 -1
  39. package/dist/components/Input/styles.js +40 -35
  40. package/dist/components/Label/index.d.ts +2 -2
  41. package/dist/components/Label/index.d.ts.map +1 -1
  42. package/dist/components/Label/index.js +12 -23
  43. package/dist/components/Label/label.test.d.ts +2 -0
  44. package/dist/components/Label/label.test.d.ts.map +1 -0
  45. package/dist/components/Label/label.test.js +105 -0
  46. package/dist/components/Label/styles.js +1 -1
  47. package/dist/components/Label/types.d.ts +5 -6
  48. package/dist/components/Label/types.d.ts.map +1 -1
  49. package/dist/components/Modal/ModalExample.d.ts +4 -0
  50. package/dist/components/Modal/ModalExample.d.ts.map +1 -0
  51. package/dist/components/Modal/ModalExample.js +66 -0
  52. package/dist/components/Modal/index.d.ts +1 -1
  53. package/dist/components/Modal/index.d.ts.map +1 -1
  54. package/dist/components/Modal/index.js +11 -13
  55. package/dist/components/Modal/modal.test.js +11 -9
  56. package/dist/components/Modal/styles.d.ts.map +1 -1
  57. package/dist/components/Modal/styles.js +3 -3
  58. package/dist/components/Pagination/index.d.ts.map +1 -1
  59. package/dist/components/Pagination/index.js +23 -10
  60. package/dist/components/Pagination/styles.js +3 -2
  61. package/dist/components/ReactPortal/index.d.ts +8 -0
  62. package/dist/components/ReactPortal/index.d.ts.map +1 -0
  63. package/dist/components/ReactPortal/index.js +58 -0
  64. package/dist/components/ReactPortal/reactPortal.test.d.ts +2 -0
  65. package/dist/components/ReactPortal/reactPortal.test.d.ts.map +1 -0
  66. package/dist/components/ReactPortal/reactPortal.test.js +26 -0
  67. package/dist/components/ReactPortal/utils/createWrapperAndApprendToBody.d.ts +2 -0
  68. package/dist/components/ReactPortal/utils/createWrapperAndApprendToBody.d.ts.map +1 -0
  69. package/dist/components/ReactPortal/utils/createWrapperAndApprendToBody.js +13 -0
  70. package/dist/components/Select/components/OptionsSelect/index.d.ts +4 -0
  71. package/dist/components/Select/components/OptionsSelect/index.d.ts.map +1 -0
  72. package/dist/components/Select/components/OptionsSelect/index.js +91 -0
  73. package/dist/components/Select/components/OptionsSelect/styles.d.ts +265 -0
  74. package/dist/components/Select/components/OptionsSelect/styles.d.ts.map +1 -0
  75. package/dist/components/Select/components/OptionsSelect/styles.js +32 -0
  76. package/dist/components/Select/components/OptionsSelect/types.d.ts +16 -0
  77. package/dist/components/Select/components/OptionsSelect/types.d.ts.map +1 -0
  78. package/dist/components/Select/components/OptionsSelect/types.js +1 -0
  79. package/dist/components/Select/index.d.ts.map +1 -1
  80. package/dist/components/Select/index.js +86 -51
  81. package/dist/components/Select/select.test.js +14 -0
  82. package/dist/components/Select/styles.d.ts +5 -7
  83. package/dist/components/Select/styles.d.ts.map +1 -1
  84. package/dist/components/Select/styles.js +26 -16
  85. package/dist/components/Select/types.d.ts +7 -2
  86. package/dist/components/Select/types.d.ts.map +1 -1
  87. package/dist/components/Table/index.d.ts.map +1 -1
  88. package/dist/components/Table/index.js +13 -3
  89. package/dist/components/Table/styles.d.ts.map +1 -1
  90. package/dist/components/Table/styles.js +12 -9
  91. package/dist/components/Toast/components/Toast.d.ts.map +1 -1
  92. package/dist/components/Toast/components/Toast.js +6 -7
  93. package/dist/components/Toast/contexts/ToastProvider.d.ts.map +1 -1
  94. package/dist/components/Toast/contexts/ToastProvider.js +3 -1
  95. package/dist/components/Toast/toast.test.js +10 -10
  96. package/dist/components/Toast/types.d.ts +8 -15
  97. package/dist/components/Toast/types.d.ts.map +1 -1
  98. package/dist/components/Tooltip/components/TooltipLabel.d.ts +4 -0
  99. package/dist/components/Tooltip/components/TooltipLabel.d.ts.map +1 -0
  100. package/dist/components/Tooltip/components/TooltipLabel.js +59 -0
  101. package/dist/components/Tooltip/index.d.ts +2 -2
  102. package/dist/components/Tooltip/index.d.ts.map +1 -1
  103. package/dist/components/Tooltip/index.js +91 -74
  104. package/dist/components/Tooltip/styles.d.ts +6 -14
  105. package/dist/components/Tooltip/styles.d.ts.map +1 -1
  106. package/dist/components/Tooltip/styles.js +9 -31
  107. package/dist/components/Tooltip/types.d.ts +17 -19
  108. package/dist/components/Tooltip/types.d.ts.map +1 -1
  109. package/dist/components/Typography/styles.d.ts +2 -2
  110. package/dist/index.d.ts +1 -0
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/index.js +9 -0
  113. package/package.json +2 -1
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SelectContainer = exports.OptionsModalList = exports.OptionsModal = exports.OptionPlaceholder = void 0;
6
+ exports.SelectContainer = exports.OptionPlaceholder = exports.Option = void 0;
7
7
 
8
8
  var _react = require("@emotion/react");
9
9
 
@@ -11,30 +11,40 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
11
11
 
12
12
  var _List = _interopRequireDefault(require("../List"));
13
13
 
14
- var _Modal = require("../Modal");
15
-
16
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
14
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
17
15
 
18
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
17
 
20
18
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
21
19
 
22
20
  var SelectContainer = _styled.default.div(function (props) {
23
- return (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n\n width: ", ";\n\n ", "\n\n & > div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n\n border-radius: ", ";\n padding: 0 20px;\n\n width: 100%;\n height: 56px;\n\n position: relative;\n\n cursor: pointer;\n\n color: ", ";\n\n transition: background-color ease;\n transition-duration: ", ";\n\n ", "\n\n ", "\n\n & > label {\n position: absolute;\n left: 20px;\n top: 50%;\n transform: translateY(-50%);\n\n font-size: 1rem;\n font-weight: 500;\n\n color: ", ";\n\n transition: top ease, left ease, color ease;\n transition-duration: ", ";\n\n ", "\n }\n\n // Chevron Down icon\n & > svg {\n flex-shrink: 0;\n\n transform: rotate(0deg);\n\n color: ", ";\n\n transition: transform ease;\n transition-duration: ", ";\n }\n\n & > fieldset {\n border: 2px solid;\n border-color: ", ";\n border-radius: ", ";\n padding: 0 14px;\n\n position: absolute;\n left: 0px;\n right: 0px;\n top: 0px;\n bottom: 0px;\n\n pointer-events: none;\n\n transition: border-color ease;\n transition-duration: ", ";\n\n &:last-of-type {\n border-radius: calc(", " + 2px);\n padding: 0 16px;\n\n border-color: transparent;\n left: -2px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n }\n\n & > legend {\n display: ", ";\n\n line-height: 2px;\n user-select: none;\n padding: 0 4px;\n\n & > span {\n color: transparent;\n }\n }\n }\n }\n\n // Helper text\n & > p {\n margin: 8px 20px;\n\n ", "\n }\n\n & > input {\n appearance: none;\n border: 0;\n\n width: 0px;\n position: absolute;\n opacity: 0;\n pointer-events: none;\n }\n "])), typeof props.width === 'string' ? props.width : typeof props.width === 'number' ? "".concat(props.width, "px") : '100%', !props.disabled && (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &:hover {\n & > div {\n color: ", ";\n\n & > label {\n color: ", ";\n }\n\n & > fieldset {\n &:first-of-type {\n border-color: ", ";\n }\n }\n }\n }\n\n &:focus {\n & > div {\n color: ", ";\n\n & > svg {\n transform: rotate(180deg);\n }\n\n & > fieldset {\n &:first-of-type {\n border-color: ", ";\n }\n &:last-of-type {\n border-color: ", ";\n }\n }\n }\n }\n "])), props.theme.colors.neutral.black, props.theme.colors.neutral.neutral5, props.alert ? props.theme.colors[props.alert].blurred : props.theme.colors.primary.hover, props.theme.colors.neutral.black, props.alert ? props.theme.colors[props.alert].default : props.theme.colors.primary.hover, props.alert ? props.theme.colors[props.alert].blurred : props.theme.colors.primary.disabled), props.theme.borderRadius.default, props.theme.colors.neutral.neutral5, props.theme.transition.speed, props.alert && (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: ", "33;\n "])), props.theme.colors[props.alert].blurred), props.disabled && (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background: ", ";\n cursor: default;\n "])), props.theme.colors.neutral.neutral1), props.theme.colors.neutral.neutral3, props.theme.transition.speed, props.filled && (0, _react.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n left: 20px;\n top: -1px;\n\n font-size: 0.875rem;\n "]))), props.theme.colors.neutral.neutral5, props.theme.transition.speed, props.alert && !props.disabled ? props.theme.colors[props.alert].default : props.theme.colors.neutral.neutral2, props.theme.borderRadius.default, props.theme.transition.speed, props.theme.borderRadius.default, props.filled ? 'block' : 'none', props.disabled && (0, _react.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n "])), props.theme.colors.neutral.neutral3));
21
+ return (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n user-select: none;\n width: ", ";\n height: ", ";\n ", ";\n & > div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n border-radius: ", ";\n padding: 0 ", ";\n width: 100%;\n height: 100%;\n position: relative;\n cursor: pointer;\n color: ", ";\n transition: background-color ease;\n transition-duration: ", ";\n\n ", ";\n\n ", ";\n\n & > label {\n position: absolute;\n left: 20px;\n top: 50%;\n transform: translateY(-50%);\n font-size: 1rem;\n font-weight: 500;\n color: ", ";\n transition: top ease, left ease, color ease;\n transition-duration: ", ";\n\n ", "\n }\n\n // Chevron Down icon\n & > svg {\n flex-shrink: 0;\n transform: rotate(0deg);\n color: ", ";\n transition: transform ease;\n transition-duration: ", ";\n }\n\n & > fieldset {\n border: 2px solid;\n border-color: ", ";\n border-radius: ", ";\n padding: 0 14px;\n position: absolute;\n left: 0px;\n right: 0px;\n top: 0px;\n bottom: 0px;\n pointer-events: none;\n transition: border-color ease;\n transition-duration: ", ";\n\n &:last-of-type {\n border-radius: calc(", " + 2px);\n padding: 0 16px;\n border-color: transparent;\n left: -2px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n }\n\n & > legend {\n display: ", ";\n line-height: 2px;\n user-select: none;\n padding: 0 4px;\n & > span {\n color: transparent;\n }\n }\n }\n }\n\n // Helper text\n & > p {\n margin: 8px 20px;\n\n ", "\n }\n\n & > input {\n appearance: none;\n border: 0;\n width: 0px;\n position: absolute;\n opacity: 0;\n pointer-events: none;\n }\n "])), props.size ? {
22
+ sm: '78px',
23
+ md: '100%'
24
+ }[props.size] : props.width, props.size ? {
25
+ sm: '36px',
26
+ md: '56px'
27
+ }[props.size] : '56px', !props.disabled && (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &:hover {\n & > div {\n color: ", ";\n\n & > label {\n color: ", ";\n }\n\n & > fieldset {\n &:first-of-type {\n border-color: ", ";\n }\n }\n }\n }\n\n &:focus {\n & > div {\n color: ", ";\n\n & > svg {\n transform: rotate(180deg);\n }\n\n & > fieldset {\n &:first-of-type {\n border-color: ", ";\n }\n &:last-of-type {\n border-color: ", ";\n }\n }\n }\n }\n "])), props.theme.colors.neutral.black, props.theme.colors.neutral.neutral5, props.alert ? props.theme.colors[props.alert].blurred : props.theme.colors.primary.hover, props.theme.colors.neutral.black, props.alert ? props.theme.colors[props.alert].default : props.theme.colors.primary.hover, props.alert ? props.theme.colors[props.alert].blurred : props.theme.colors.primary.disabled), props.theme.borderRadius.default, props.size && {
28
+ sm: '16px',
29
+ md: '20px'
30
+ }[props.size], props.theme.colors.neutral.neutral5, props.theme.transition.speed, props.alert && (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: ", "33;\n "])), props.theme.colors[props.alert].blurred), props.disabled && (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background: ", ";\n cursor: default;\n "])), props.theme.colors.neutral.neutral1), props.theme.colors.neutral.neutral3, props.theme.transition.speed, props.filled && (0, _react.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n left: 20px;\n top: -1px;\n font-size: 0.875rem;\n "]))), props.theme.colors.neutral.neutral5, props.theme.transition.speed, props.alert && !props.disabled ? props.theme.colors[props.alert].default : props.theme.colors.neutral.neutral2, props.theme.borderRadius.default, props.theme.transition.speed, props.theme.borderRadius.default, props.filled ? 'block' : 'none', props.disabled && (0, _react.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n "])), props.theme.colors.neutral.neutral3));
24
31
  });
25
32
 
26
33
  exports.SelectContainer = SelectContainer;
27
- var OptionsModal = (0, _styled.default)(_Modal.Modal)(function (_ref) {
28
- var theme = _ref.theme;
29
- return (0, _react.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border: 2px solid ", ";\n box-shadow: none;\n "])), theme.colors.neutral.neutral1);
30
- });
31
- exports.OptionsModal = OptionsModal;
32
- var OptionsModalList = (0, _styled.default)(_List.default)(function () {
33
- return (0, _react.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n border: none;\n "])));
34
+
35
+ var Option = _styled.default.div(function (props) {
36
+ return (0, _react.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n outline: none;\n padding: ", ";\n text-align: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n background: transparent;\n transition: background-color ease;\n transition-duration: ", ";\n cursor: pointer;\n & > svg:first-of-type {\n margin-right: ", ";\n }\n & > svg:last-of-type:not(:first-of-type) {\n margin-left: ", ";\n }\n &:hover,\n &:focus {\n background: ", ";\n }\n "])), {
37
+ sm: '8px',
38
+ md: '16px 32px'
39
+ }[props.sizeSelect || 'md'], {
40
+ sm: 'center',
41
+ md: 'left'
42
+ }[props.sizeSelect || 'md'], props.theme.fontWeight['500'], props.theme.fontSizes.xs, props.theme.colors.neutral.neutral5, props.theme.transition.speed, props.theme.spacing.xxxs, props.theme.spacing.xxxs, props.theme.colors.neutral.neutral1);
34
43
  });
35
- exports.OptionsModalList = OptionsModalList;
36
- var OptionPlaceholder = (0, _styled.default)(_List.default)(function (_ref2) {
37
- var theme = _ref2.theme;
38
- return (0, _react.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme.colors.neutral.neutral3);
44
+
45
+ exports.Option = Option;
46
+ var OptionPlaceholder = (0, _styled.default)(_List.default)(function (_ref) {
47
+ var theme = _ref.theme;
48
+ return (0, _react.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme.colors.neutral.neutral3);
39
49
  });
40
50
  exports.OptionPlaceholder = OptionPlaceholder;
@@ -3,16 +3,21 @@ export interface SelectOption {
3
3
  label: string;
4
4
  value: string;
5
5
  }
6
+ export declare type sizeSelect = 'sm' | 'md';
6
7
  export interface SelectProps {
7
- label: string;
8
+ label?: string;
8
9
  options: SelectOption[];
9
10
  helperText?: string;
10
11
  alert?: SelectAlertType;
12
+ placeholder?: string;
13
+ width?: string;
14
+ sizeSelect?: sizeSelect;
11
15
  }
12
16
  export interface SelectContainerProps {
13
17
  alert?: SelectAlertType;
14
18
  filled: boolean;
15
19
  disabled: boolean;
16
- width?: string | number;
20
+ width?: string;
21
+ size?: sizeSelect;
17
22
  }
18
23
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Select/types.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GACvB,SAAS,GACT,OAAO,GACP,SAAS,GACT,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,mBAAmB,CAAC;AAExB,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Select/types.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GACvB,SAAS,GACT,OAAO,GACP,SAAS,GACT,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,mBAAmB,CAAC;AAExB,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC;AAErC,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAkD,MAAM,OAAO,CAAC;AAsBjG,OAAO,EAAE,WAAW,EAAkB,MAAM,SAAS,CAAC;AAMtD,wBAAgB,KAAK,CAAC,EACpB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,IAAI,EACJ,GAAG,IAAI,EACR,EAAE,WAAW,GAAG,wBAAwB,CAAC,OAAO,CAAC,eA8LjD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAkD,MAAM,OAAO,CAAC;AAsBjG,OAAO,EAAE,WAAW,EAAkB,MAAM,SAAS,CAAC;AAMtD,wBAAgB,KAAK,CAAC,EACpB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,IAAI,EACJ,GAAG,IAAI,EACR,EAAE,WAAW,GAAG,wBAAwB,CAAC,OAAO,CAAC,eAsMjD"}
@@ -206,13 +206,23 @@ function Table(_ref) {
206
206
  }), header.map(function (label) {
207
207
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("th", {
208
208
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
209
- fontSize: "xxs",
209
+ color: "neutral.neutral5",
210
+ fontSize: "xxxs",
210
211
  fontWeight: "600",
211
212
  children: label
212
213
  })
213
214
  }, (0, _GenerateKey.generateKey)());
214
215
  })]
215
- }), haveActions && /*#__PURE__*/(0, _jsxRuntime.jsx)("th", {})]
216
+ }), haveActions && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
217
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("th", {
218
+ children: !selectedRows.length && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
219
+ color: "neutral.neutral5",
220
+ fontSize: "xxxs",
221
+ fontWeight: "600",
222
+ children: "A\xE7\xF5es"
223
+ })
224
+ })
225
+ })]
216
226
  })
217
227
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("tbody", {
218
228
  children: rowsWithKey.map(function (row) {
@@ -229,7 +239,7 @@ function Table(_ref) {
229
239
  }), row.items.map(function (cell) {
230
240
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("td", {
231
241
  children: typeof cell === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
232
- fontSize: "xxs",
242
+ fontSize: "xxxs",
233
243
  fontWeight: "500",
234
244
  children: cell
235
245
  }) : cell
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Table/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,eAAO,MAAM,WAAW;;;uIAsGtB,CAAC;AAEH,eAAO,MAAM,cAAc;;;yGAG1B,CAAC;AAEF,eAAO,MAAM,aAAa;;;0IAoExB,CAAC;AAEH,eAAO,MAAM,eAAe;;;yGAE3B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;0IAiBhC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;yGAsB7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;8HA6B3B,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Table/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,eAAO,MAAM,WAAW;;;uIA0GtB,CAAC;AAEH,eAAO,MAAM,cAAc;;;yGAG1B,CAAC;AAEF,eAAO,MAAM,aAAa;;;0IAmExB,CAAC;AAEH,eAAO,MAAM,eAAe;;;yGAE3B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;0IAiBhC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;yGAiB7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;8HA6B3B,CAAC"}
@@ -17,13 +17,13 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
17
17
 
18
18
  var StyledTable = _styled.default.table(function (props) {
19
19
  var theme = props.theme;
20
- return (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-spacing: 0px;\n\n & > thead {\n & > tr {\n height: 64px;\n\n & > th {\n background: hsla(156, 13%, 92%, 0.5);\n border-top: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n padding-left: 16px;\n padding-right: 16px;\n text-align: left;\n * {\n color: #587169;\n font-size: ", ";\n }\n\n &:first-of-type {\n border-left: 1px solid\n ", ";\n border-radius: 4px 0px 0px 4px;\n }\n\n &:last-child {\n border-right: 1px solid\n ", ";\n border-radius: 0px 4px 4px 0px;\n }\n }\n }\n }\n\n & > tbody {\n tr {\n height: 64px;\n\n &:not(:last-child) {\n & > td {\n border-bottom: 1px solid\n ", ";\n }\n }\n\n &:hover {\n & > td {\n background: ", ";\n\n &:first-of-type {\n border-radius: 4px 0px 0px 4px;\n }\n\n &:last-child {\n border-radius: 0px 4px 4px 0px;\n }\n }\n }\n\n &:focus {\n outline: 2px solid ", ";\n border-radius: 4px;\n }\n\n &[data-selected='true'] {\n & > td {\n background: ", ";\n }\n }\n\n & > td {\n padding-left: 16px;\n padding-right: 16px;\n\n text-align: left;\n\n color: ", ";\n }\n }\n }\n "])), {
21
- dark: theme.colors.neutral.neutral5,
22
- light: theme.colors.neutral.neutral2
20
+ return (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n border-spacing: 0px;\n\n & > thead {\n & > tr {\n height: 64px;\n\n & > th {\n background: ", ";\n border-top: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n padding-left: 16px;\n padding-right: 16px;\n text-align: left;\n\n &:first-of-type {\n border-left: 1px solid\n ", ";\n border-radius: 8px 0px 0px 0px;\n }\n\n &:last-child {\n border-right: 1px solid\n ", ";\n border-radius: 0px 8px 0px 0px;\n }\n }\n }\n }\n\n & > tbody {\n tr {\n height: 64px;\n &:nth-of-type(even) {\n background: ", ";\n }\n &:not(:last-child) {\n & > td {\n border-bottom: 1px solid\n ", ";\n }\n }\n\n &:hover {\n & > td {\n background: ", ";\n\n &:first-of-type {\n border-radius: 4px 0px 0px 4px;\n }\n\n &:last-child {\n border-radius: 0px 4px 4px 0px;\n }\n }\n }\n\n &:focus {\n outline: 2px solid ", ";\n border-radius: 4px;\n }\n\n &[data-selected='true'] {\n & > td {\n background: ", ";\n }\n }\n\n & > td {\n padding-left: 16px;\n padding-right: 16px;\n\n text-align: left;\n\n color: ", ";\n }\n }\n }\n "])), {
21
+ dark: "hsla(156, 13%, 92%, 0.05)",
22
+ light: "hsla(156, 13%, 92%, 0.5)"
23
23
  }[theme.colorMode], {
24
24
  dark: theme.colors.neutral.neutral5,
25
25
  light: theme.colors.neutral.neutral2
26
- }[theme.colorMode], theme.fontSizes.xxxs, {
26
+ }[theme.colorMode], {
27
27
  dark: theme.colors.neutral.neutral5,
28
28
  light: theme.colors.neutral.neutral2
29
29
  }[theme.colorMode], {
@@ -32,6 +32,12 @@ var StyledTable = _styled.default.table(function (props) {
32
32
  }[theme.colorMode], {
33
33
  dark: theme.colors.neutral.neutral5,
34
34
  light: theme.colors.neutral.neutral2
35
+ }[theme.colorMode], {
36
+ dark: "hsla(150, 16%, 97%, 0.02)",
37
+ light: "hsla(150, 16%, 97%, 0.75)"
38
+ }[theme.colorMode], {
39
+ dark: 'hsla(161, 12%, 31%, 0.5)',
40
+ light: theme.colors.neutral.neutral1
35
41
  }[theme.colorMode], {
36
42
  dark: theme.colors.neutral.neutral6,
37
43
  light: theme.colors.neutral.neutral1
@@ -49,7 +55,7 @@ exports.SelectedHeader = SelectedHeader;
49
55
 
50
56
  var ActionsButton = _styled.default.button(function (props) {
51
57
  var theme = props.theme;
52
- return (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n appearance: none;\n font-family: inherit;\n\n display: flex;\n align-items: center;\n gap: 8px;\n\n margin: 0px -2px 0px 0px;\n outline: none;\n border: 2px solid\n ", ";\n padding: 0px 24px;\n\n height: 44px;\n\n white-space: nowrap;\n\n color: ", ";\n background: ", ";\n\n transition: background-color linear ", ";\n\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n\n &:first-of-type {\n color: ", ";\n border-radius: 8px 0px 0px 8px;\n }\n\n &:last-of-type {\n border-radius: 0px 8px 8px 0px;\n }\n\n &:only-child {\n border-radius: 8px;\n }\n\n &:hover,\n &:focus {\n z-index: 1;\n\n border-color: ", ";\n background: ", ";\n }\n\n &:active {\n background: ", ";\n }\n "])), {
58
+ return (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n appearance: none;\n font-family: inherit;\n\n display: flex;\n align-items: center;\n gap: 8px;\n\n margin: 0px -2px 0px 0px;\n outline: none;\n border: 2px solid\n ", ";\n padding: 0px 24px;\n height: 44px;\n\n white-space: nowrap;\n\n color: ", ";\n background: ", ";\n\n transition: background-color linear ", ";\n\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n\n &:first-of-type {\n color: ", ";\n border-radius: 8px 0px 0px 8px;\n }\n\n &:last-of-type {\n border-radius: 0px 8px 8px 0px;\n }\n\n &:only-child {\n border-radius: 8px;\n }\n\n &:hover,\n &:focus {\n z-index: 1;\n\n border-color: ", ";\n background: ", ";\n }\n\n &:active {\n background: ", ";\n }\n "])), {
53
59
  dark: theme.colors.neutral.neutral4,
54
60
  light: theme.colors.neutral.neutral2
55
61
  }[theme.colorMode], theme.colors.neutral.neutral5, {
@@ -85,10 +91,7 @@ var MenuItemContainer = _styled.default.div(_templateObject6 || (_templateObject
85
91
  return props.isOpen ? 'block' : 'none';
86
92
  }, function (_ref) {
87
93
  var theme = _ref.theme;
88
- return {
89
- dark: theme.colors.neutral.neutral6,
90
- light: theme.colors.neutral.neutral1
91
- }[theme.colorMode];
94
+ return theme.colors.neutral.white;
92
95
  }, function (props) {
93
96
  return props.posRight ? props.posRight : 0;
94
97
  }, function (props) {
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/components/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAOtC,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAEhD,QAAA,MAAM,KAAK,EAAE,EAAE,CAAC,WAAW,CA2E1B,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/components/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAOtC,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAEhD,QAAA,MAAM,KAAK,EAAE,EAAE,CAAC,WAAW,CAyE1B,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -23,12 +23,12 @@ var Toast = function Toast(_ref) {
23
23
  var type = _ref.type,
24
24
  close = _ref.close,
25
25
  duration = _ref.duration,
26
- message = _ref.message,
26
+ content = _ref.content,
27
+ icon = _ref.icon,
27
28
  id = _ref.toastId,
28
- buttonTitle = _ref.buttonTitle,
29
- onButtonClick = _ref.onButtonClick,
30
29
  title = _ref.title,
31
- position = _ref.position;
30
+ _ref$position = _ref.position,
31
+ position = _ref$position === void 0 ? 'top-right' : _ref$position;
32
32
  (0, _react.useEffect)(function () {
33
33
  var timer = setTimeout(function () {
34
34
  close(id);
@@ -73,12 +73,11 @@ var Toast = function Toast(_ref) {
73
73
  className: "pp-toast-".concat(position),
74
74
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledToastComponent, {
75
75
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Alert.default, {
76
- message: message,
76
+ content: content,
77
77
  title: title,
78
+ icon: icon,
78
79
  variant: "closable",
79
80
  type: type,
80
- buttonTitle: buttonTitle,
81
- onButtonClick: onButtonClick,
82
81
  onClose: handleCloseButtonClick
83
82
  })
84
83
  })
@@ -1 +1 @@
1
- {"version":3,"file":"ToastProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/contexts/ToastProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,EAAE,EAAyB,MAAM,OAAO,CAAC;AAGjE,OAAO,EAA4B,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAExE,eAAO,MAAM,YAAY,6CAA0C,CAAC;AAEpE,QAAA,MAAM,aAAa,EAAE,EAiCpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ToastProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/contexts/ToastProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,EAAE,EAAyB,MAAM,OAAO,CAAC;AAGjE,OAAO,EAA4B,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAExE,eAAO,MAAM,YAAY,6CAA0C,CAAC;AAEpE,QAAA,MAAM,aAAa,EAAE,EAmCpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -53,9 +53,11 @@ var ToastProvider = function ToastProvider(_ref) {
53
53
  var addToast = function addToast(options) {
54
54
  var toastOptions = {
55
55
  config: _objectSpread(_objectSpread({}, options), {}, {
56
+ icon: options.icon || 'info',
56
57
  duration: options.duration || 5000,
57
58
  type: options.type || 'default',
58
- position: options.position || 'bottom'
59
+ position: options.position || 'bottom',
60
+ onClose: options.onClose || undefined
59
61
  }),
60
62
  id: Math.random().toString(36).substring(2, 9)
61
63
  };
@@ -28,7 +28,7 @@ describe('Toast', function () {
28
28
  it('should it render the toast on the screen', function () {
29
29
  var container = setup({
30
30
  title: 'Toast Title',
31
- message: 'Toast Message',
31
+ content: 'Toast Message',
32
32
  type: 'success'
33
33
  });
34
34
  container.getByText('Show toast').click();
@@ -37,7 +37,7 @@ describe('Toast', function () {
37
37
  it('should it render the toast on position top of the screen', function () {
38
38
  var container = setup({
39
39
  title: 'Toast Title',
40
- message: 'Toast Message',
40
+ content: 'Toast Message',
41
41
  type: 'success',
42
42
  position: 'top'
43
43
  });
@@ -47,7 +47,7 @@ describe('Toast', function () {
47
47
  it('should it render the toast on position top-left of the screen', function () {
48
48
  var container = setup({
49
49
  title: 'Toast Title',
50
- message: 'Toast Message',
50
+ content: 'Toast Message',
51
51
  type: 'success',
52
52
  position: 'top-left'
53
53
  });
@@ -57,7 +57,7 @@ describe('Toast', function () {
57
57
  it('should it render the toast on position top-right of the screen', function () {
58
58
  var container = setup({
59
59
  title: 'Toast Title',
60
- message: 'Toast Message',
60
+ content: 'Toast Message',
61
61
  type: 'success',
62
62
  position: 'top-right'
63
63
  });
@@ -67,7 +67,7 @@ describe('Toast', function () {
67
67
  it('should it render the toast on position bottom of the screen', function () {
68
68
  var container = setup({
69
69
  title: 'Toast Title',
70
- message: 'Toast Message',
70
+ content: 'Toast Message',
71
71
  type: 'success',
72
72
  position: 'bottom'
73
73
  });
@@ -77,7 +77,7 @@ describe('Toast', function () {
77
77
  it('should it render the toast on position bottom-left of the screen', function () {
78
78
  var container = setup({
79
79
  title: 'Toast Title',
80
- message: 'Toast Message',
80
+ content: 'Toast Message',
81
81
  type: 'success',
82
82
  position: 'bottom-left'
83
83
  });
@@ -87,7 +87,7 @@ describe('Toast', function () {
87
87
  it('should it render the toast on position bottom-right of the screen', function () {
88
88
  var container = setup({
89
89
  title: 'Toast Title',
90
- message: 'Toast Message',
90
+ content: 'Toast Message',
91
91
  type: 'success',
92
92
  position: 'bottom-right'
93
93
  });
@@ -99,7 +99,7 @@ describe('Toast', function () {
99
99
 
100
100
  var container = setup({
101
101
  title: 'Toast Title',
102
- message: 'Toast Message',
102
+ content: 'Toast Message',
103
103
  type: 'success'
104
104
  });
105
105
  container.getByText('Show toast').click();
@@ -114,7 +114,7 @@ describe('Toast', function () {
114
114
  var onClose = jest.fn();
115
115
  var container = setup({
116
116
  title: 'Toast Title',
117
- message: 'Toast Message',
117
+ content: 'Toast Message',
118
118
  type: 'success',
119
119
  onClose: onClose
120
120
  });
@@ -128,7 +128,7 @@ describe('Toast', function () {
128
128
  var onClose = jest.fn();
129
129
  var container = setup({
130
130
  title: 'Toast Title',
131
- message: 'Toast Message',
131
+ content: 'Toast Message',
132
132
  type: 'success',
133
133
  onClose: onClose
134
134
  });
@@ -1,28 +1,21 @@
1
+ import { ReactNode } from 'react';
2
+ import { IconName } from '../Icon/types';
1
3
  export declare type IToastConfig = {
2
4
  title: string;
3
- message: string;
5
+ content: ReactNode;
4
6
  position?: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right';
5
7
  type?: 'default' | 'success' | 'warning' | 'error' | 'critical';
6
- buttonTitle?: string;
7
- onButtonClick?: () => void;
8
8
  duration?: number;
9
- onClose?: (id: string) => void;
10
- };
11
- export declare type IToastConfigOnList = {
12
- title: string;
13
- message: string;
14
- position: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right';
15
- type: 'default' | 'success' | 'warning' | 'error' | 'critical';
16
- buttonTitle?: string;
17
- onButtonClick?: () => void;
18
- duration: number;
9
+ icon?: IconName;
19
10
  onClose?: (id: string) => void;
20
11
  };
21
12
  export declare type IToastList = {
22
13
  id: string;
23
- config: IToastConfigOnList;
14
+ config: Required<Omit<IToastConfig, 'onClose'>> & {
15
+ onClose?: (id: string) => void;
16
+ };
24
17
  };
25
- export declare type Toast = IToastConfigOnList & {
18
+ export declare type Toast = IToastConfig & {
26
19
  toastId: string;
27
20
  close: (id: string) => void;
28
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/types.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,cAAc,CAAC;IACxF,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,cAAc,CAAC;IACvF,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,kBAAkB,CAAC;CAC5B,CAAC;AAEF,oBAAY,KAAK,GAAG,kBAAkB,GAAG;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,GAAG,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IACrC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,oBAAY,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,cAAc,CAAC;IACxF,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC,GAAG;QAChD,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;KAChC,CAAC;CACH,CAAC;AAEF,oBAAY,KAAK,GAAG,YAAY,GAAG;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,GAAG,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IACrC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { TooltipLabelProps } from '../types';
3
+ export declare function TooltipLabel({ tooltipPositions, handleRepositionTooltip, animationDuration, ...rest }: TooltipLabelProps): JSX.Element;
4
+ //# sourceMappingURL=TooltipLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TooltipLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/components/TooltipLabel.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,wBAAgB,YAAY,CAAC,EAC3B,gBAAgB,EAChB,uBAAuB,EACvB,iBAAuB,EACvB,GAAG,IAAI,EACR,EAAE,iBAAiB,eAgCnB"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TooltipLabel = TooltipLabel;
7
+
8
+ var _react = require("react");
9
+
10
+ var _styles = require("../styles");
11
+
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+
14
+ var _excluded = ["tooltipPositions", "handleRepositionTooltip", "animationDuration"];
15
+
16
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
+
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
+
20
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+
22
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
23
+
24
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25
+
26
+ function TooltipLabel(_ref) {
27
+ var tooltipPositions = _ref.tooltipPositions,
28
+ handleRepositionTooltip = _ref.handleRepositionTooltip,
29
+ _ref$animationDuratio = _ref.animationDuration,
30
+ animationDuration = _ref$animationDuratio === void 0 ? 0.2 : _ref$animationDuratio,
31
+ rest = _objectWithoutProperties(_ref, _excluded);
32
+
33
+ var labelRef = (0, _react.useRef)(null);
34
+ var animations = {
35
+ enter: {
36
+ opacity: 1
37
+ },
38
+ exit: {
39
+ opacity: 0
40
+ }
41
+ };
42
+ (0, _react.useEffect)(function () {
43
+ if (labelRef.current) {
44
+ handleRepositionTooltip(labelRef.current);
45
+ }
46
+ }, []);
47
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledTooltipLabel, _objectSpread(_objectSpread({
48
+ ref: labelRef,
49
+ initial: animations.exit,
50
+ animate: animations.enter,
51
+ exit: animations.exit,
52
+ transition: {
53
+ duration: animationDuration
54
+ },
55
+ style: tooltipPositions
56
+ }, rest), {}, {
57
+ children: rest.label
58
+ }));
59
+ }
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { IInputProps } from './types';
3
- declare const Tooltip: FC<IInputProps>;
2
+ import { TooltipProps } from './types';
3
+ declare const Tooltip: FC<TooltipProps>;
4
4
  export default Tooltip;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -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;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,WAAW,CAoF5B,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAoB,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAuF7B,CAAC;AAEF,eAAe,OAAO,CAAC"}