plataforma-fundacao-componentes 2.26.4 → 2.26.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.
- package/dist/components/tooltipElement/TooltipElement.d.ts +4 -2
- package/dist/components/typography/Typography.d.ts +1 -0
- package/dist/components/typography/Typography.stories.d.ts +1 -0
- package/dist/index.css +9 -9
- package/dist/index.js +21 -17
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +21 -17
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -12820,12 +12820,15 @@ var LeftControlWithLabel = function LeftControlWithLabel(_ref) {
|
|
|
12820
12820
|
}), props.label));
|
|
12821
12821
|
};
|
|
12822
12822
|
|
|
12823
|
+
var rootClassName$2$ = 'tooltip-element';
|
|
12823
12824
|
function TooltipElement(_ref) {
|
|
12824
12825
|
var label = _ref.label,
|
|
12825
12826
|
_ref$placement = _ref.placement,
|
|
12826
12827
|
placement = _ref$placement === void 0 ? 'top' : _ref$placement,
|
|
12827
12828
|
_ref$fallbackPlacemen = _ref.fallbackPlacements,
|
|
12828
12829
|
fallbackPlacements = _ref$fallbackPlacemen === void 0 ? ['right', 'left', 'bottom'] : _ref$fallbackPlacemen,
|
|
12830
|
+
_ref$wrapperProps = _ref.wrapperProps,
|
|
12831
|
+
wrapperProps = _ref$wrapperProps === void 0 ? {} : _ref$wrapperProps,
|
|
12829
12832
|
children = _ref.children;
|
|
12830
12833
|
var arrowRef = useRef(null);
|
|
12831
12834
|
var _useState = useState(false),
|
|
@@ -12876,14 +12879,14 @@ function TooltipElement(_ref) {
|
|
|
12876
12879
|
isMounted = _useTransitionStyles.isMounted,
|
|
12877
12880
|
transitionStyles = _useTransitionStyles.styles;
|
|
12878
12881
|
return React.createElement(Fragment$1, null, React.createElement("div", Object.assign({
|
|
12879
|
-
className:
|
|
12882
|
+
className: rootClassName$2$ + "-reference",
|
|
12880
12883
|
ref: refs.setReference
|
|
12881
|
-
}, getReferenceProps), children), React.createElement(FloatingPortal, null, isMounted && React.createElement("div", Object.assign({
|
|
12882
|
-
className:
|
|
12884
|
+
}, getReferenceProps(wrapperProps)), children), React.createElement(FloatingPortal, null, isMounted && React.createElement("div", Object.assign({
|
|
12885
|
+
className: rootClassName$2$ + "-tooltip",
|
|
12883
12886
|
ref: refs.setFloating,
|
|
12884
12887
|
style: _extends({}, floatingStyles, transitionStyles)
|
|
12885
12888
|
}, getFloatingProps()), React.createElement("span", {
|
|
12886
|
-
className:
|
|
12889
|
+
className: rootClassName$2$ + "-label"
|
|
12887
12890
|
}, label), React.createElement(FloatingArrow, {
|
|
12888
12891
|
ref: arrowRef,
|
|
12889
12892
|
context: context,
|
|
@@ -12892,6 +12895,7 @@ function TooltipElement(_ref) {
|
|
|
12892
12895
|
}
|
|
12893
12896
|
|
|
12894
12897
|
var _excluded$k = ["className", "variant", "color", "focus", "style", "alignment", "format", "dangerouslySetInnerHTML", "children"];
|
|
12898
|
+
var rootClassName$30 = 'typography';
|
|
12895
12899
|
var Typography = forwardRef(function (_ref, ref) {
|
|
12896
12900
|
var _ref$className = _ref.className,
|
|
12897
12901
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
@@ -12911,7 +12915,7 @@ var Typography = forwardRef(function (_ref, ref) {
|
|
|
12911
12915
|
dangerouslySetInnerHTML = _ref.dangerouslySetInnerHTML,
|
|
12912
12916
|
children = _ref.children,
|
|
12913
12917
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
12914
|
-
var classNames = useMergedClassNames([
|
|
12918
|
+
var classNames = useMergedClassNames([rootClassName$30 + "-tp", focus ? rootClassName$30 + "-focus" : '', color, variant, className]);
|
|
12915
12919
|
var tag = useMemo(function () {
|
|
12916
12920
|
switch (variant) {
|
|
12917
12921
|
case 'body':
|
|
@@ -43975,7 +43979,7 @@ function useHTMLShare() {
|
|
|
43975
43979
|
};
|
|
43976
43980
|
}
|
|
43977
43981
|
|
|
43978
|
-
var rootClassName$
|
|
43982
|
+
var rootClassName$31 = 'comp-modal-manager';
|
|
43979
43983
|
var maskRootClassName$1 = 'component-modal-mask';
|
|
43980
43984
|
var hackFocus$1 = function hackFocus() {
|
|
43981
43985
|
var tmp = document.createElement('input');
|
|
@@ -44043,13 +44047,13 @@ function useModalManager() {
|
|
|
44043
44047
|
return [React.createElement(React.Fragment, {
|
|
44044
44048
|
key: 1
|
|
44045
44049
|
}, React.createElement(TransitionGroup, {
|
|
44046
|
-
className: rootClassName$
|
|
44050
|
+
className: rootClassName$31 + "-modals"
|
|
44047
44051
|
}, arrayOfModal.map(function (obj) {
|
|
44048
44052
|
var _obj$props2, _obj$props3;
|
|
44049
44053
|
var ModalComponent = React.createElement(obj.component, obj.props);
|
|
44050
44054
|
return React.createElement(CSSTransition, {
|
|
44051
44055
|
timeout: 300,
|
|
44052
|
-
classNames: rootClassName$
|
|
44056
|
+
classNames: rootClassName$31 + "-mask",
|
|
44053
44057
|
key: (_obj$props2 = obj.props) === null || _obj$props2 === void 0 ? void 0 : _obj$props2.modalKey,
|
|
44054
44058
|
unmountOnExit: true
|
|
44055
44059
|
}, React.createElement(ModalMask, {
|
|
@@ -44320,7 +44324,7 @@ function useTimeElapsed(timeLeftInSeconds, callBackZero) {
|
|
|
44320
44324
|
return timeToReturn;
|
|
44321
44325
|
}
|
|
44322
44326
|
|
|
44323
|
-
var rootClassName$
|
|
44327
|
+
var rootClassName$32 = 'comp-toast-manager';
|
|
44324
44328
|
var count$1 = 0;
|
|
44325
44329
|
function useToastManager(props) {
|
|
44326
44330
|
var _props$max;
|
|
@@ -44365,17 +44369,17 @@ function useToastManager(props) {
|
|
|
44365
44369
|
toastsRef.current = [];
|
|
44366
44370
|
}, []);
|
|
44367
44371
|
var classNames = useMemo(function () {
|
|
44368
|
-
return getMergedClassNames([rootClassName$
|
|
44372
|
+
return getMergedClassNames([rootClassName$32 + "-toasts", rootClassName$32 + "-" + verticalPosition, rootClassName$32 + "-" + horizontalPosition, reverse ? rootClassName$32 + "-reverse" : '', animateSize ? rootClassName$32 + "-animate-size" : '']);
|
|
44369
44373
|
}, [reverse, animateSize, horizontalPosition, verticalPosition]);
|
|
44370
44374
|
useLayoutEffect(function () {
|
|
44371
|
-
var wrapper = document.querySelector("." + rootClassName$
|
|
44375
|
+
var wrapper = document.querySelector("." + rootClassName$32 + "-toasts");
|
|
44372
44376
|
if (wrapper && wrapper.childElementCount > 0) {
|
|
44373
44377
|
var somaDasAlturas = 0;
|
|
44374
44378
|
if (verticalPosition === 'top' && !reverse) {
|
|
44375
44379
|
somaDasAlturas = 12;
|
|
44376
44380
|
for (var i = 0; i < wrapper.children.length; i++) {
|
|
44377
44381
|
var el = wrapper.children[i];
|
|
44378
|
-
if (!el.classList.contains(rootClassName$
|
|
44382
|
+
if (!el.classList.contains(rootClassName$32 + "-toast-exit")) {
|
|
44379
44383
|
el.style.transform = "translateY(" + somaDasAlturas + "px)";
|
|
44380
44384
|
somaDasAlturas += el.getBoundingClientRect().height + 12;
|
|
44381
44385
|
}
|
|
@@ -44383,7 +44387,7 @@ function useToastManager(props) {
|
|
|
44383
44387
|
} else if (verticalPosition === 'top') {
|
|
44384
44388
|
for (var _i = wrapper.children.length - 1; _i >= 0; _i--) {
|
|
44385
44389
|
var _el = wrapper.children[_i];
|
|
44386
|
-
if (!_el.classList.contains(rootClassName$
|
|
44390
|
+
if (!_el.classList.contains(rootClassName$32 + "-toast-exit")) {
|
|
44387
44391
|
somaDasAlturas += _el.getBoundingClientRect().height + 12;
|
|
44388
44392
|
_el.style.transform = "translateY(" + somaDasAlturas + "px)";
|
|
44389
44393
|
}
|
|
@@ -44391,7 +44395,7 @@ function useToastManager(props) {
|
|
|
44391
44395
|
} else if (verticalPosition === 'bottom' && !reverse) {
|
|
44392
44396
|
for (var _i2 = 0; _i2 < wrapper.children.length; _i2++) {
|
|
44393
44397
|
var _el2 = wrapper.children[_i2];
|
|
44394
|
-
if (!_el2.classList.contains(rootClassName$
|
|
44398
|
+
if (!_el2.classList.contains(rootClassName$32 + "-toast-exit")) {
|
|
44395
44399
|
somaDasAlturas += _el2.getBoundingClientRect().height + 12;
|
|
44396
44400
|
_el2.style.transform = "translateY(-" + somaDasAlturas + "px)";
|
|
44397
44401
|
}
|
|
@@ -44400,7 +44404,7 @@ function useToastManager(props) {
|
|
|
44400
44404
|
somaDasAlturas = 12;
|
|
44401
44405
|
for (var _i3 = wrapper.children.length - 1; _i3 >= 0; _i3--) {
|
|
44402
44406
|
var _el3 = wrapper.children[_i3];
|
|
44403
|
-
if (!_el3.classList.contains(rootClassName$
|
|
44407
|
+
if (!_el3.classList.contains(rootClassName$32 + "-toast-exit")) {
|
|
44404
44408
|
_el3.style.transform = "translateY(-" + somaDasAlturas + "px)";
|
|
44405
44409
|
somaDasAlturas += _el3.getBoundingClientRect().height + 12;
|
|
44406
44410
|
}
|
|
@@ -44415,11 +44419,11 @@ function useToastManager(props) {
|
|
|
44415
44419
|
}, arrayOfToast.map(function (toast) {
|
|
44416
44420
|
return React.createElement(CSSTransition, {
|
|
44417
44421
|
timeout: 300,
|
|
44418
|
-
classNames: rootClassName$
|
|
44422
|
+
classNames: rootClassName$32 + "-toast",
|
|
44419
44423
|
key: toast.id,
|
|
44420
44424
|
unmountOnExit: true
|
|
44421
44425
|
}, React.createElement("div", {
|
|
44422
|
-
className: rootClassName$
|
|
44426
|
+
className: rootClassName$32 + "-toastzin"
|
|
44423
44427
|
}, React.createElement(Toast, {
|
|
44424
44428
|
theme: toast.theme,
|
|
44425
44429
|
label: toast.label,
|