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.
@@ -1,9 +1,11 @@
1
1
  import { Placement } from '@floating-ui/react';
2
- import React, { ReactNode } from 'react';
2
+ import React, { HTMLAttributes, ReactNode } from 'react';
3
+ import './TooltipElement.scss';
3
4
  export interface iTooltip {
4
5
  label?: ReactNode;
5
6
  placement?: Placement;
6
7
  fallbackPlacements?: Placement[];
7
8
  children?: ReactNode;
9
+ wrapperProps?: HTMLAttributes<HTMLDivElement>;
8
10
  }
9
- export default function TooltipElement({ label, placement, fallbackPlacements, children, }: iTooltip): React.JSX.Element;
11
+ export default function TooltipElement({ label, placement, fallbackPlacements, wrapperProps, children, }: iTooltip): React.JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { CSSProperties, HTMLAttributes } from 'react';
2
+ import './Typography.scss';
2
3
  export interface TypographyProps extends HTMLAttributes<HTMLElement> {
3
4
  variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body' | 'caption' | 'small';
4
5
  focus?: boolean;
@@ -22,6 +22,7 @@ export declare const Default: {
22
22
  color: string;
23
23
  children: string;
24
24
  focus: boolean;
25
+ format: boolean;
25
26
  };
26
27
  };
27
28
  export declare const Formatted: {
package/dist/index.css CHANGED
@@ -8810,7 +8810,7 @@ nav.component-tabs {
8810
8810
  widthMd: 991.98px;
8811
8811
  widthLg: 1199.98px; }
8812
8812
 
8813
- .tooltip {
8813
+ .tooltip-element-tooltip {
8814
8814
  z-index: 989;
8815
8815
  display: flex;
8816
8816
  align-items: center;
@@ -8824,10 +8824,10 @@ nav.component-tabs {
8824
8824
  font-size: 16px;
8825
8825
  line-height: 24px;
8826
8826
  border-radius: 8px; }
8827
- .tooltip .label {
8827
+ .tooltip-element-tooltip .tooltip-element-label {
8828
8828
  max-width: 300px; }
8829
8829
 
8830
- .reference {
8830
+ .tooltip-element-reference {
8831
8831
  display: flex;
8832
8832
  align-items: center;
8833
8833
  width: -moz-fit-content;
@@ -8860,21 +8860,21 @@ nav.component-tabs {
8860
8860
  widthMd: 991.98px;
8861
8861
  widthLg: 1199.98px; }
8862
8862
 
8863
- .tp {
8863
+ .typography-tp {
8864
8864
  margin: 0;
8865
8865
  padding: 0;
8866
8866
  font-weight: 300;
8867
8867
  display: block;
8868
8868
  text-align: start; }
8869
- .tp.focus {
8869
+ .typography-tp.typography-focus {
8870
8870
  font-weight: 500; }
8871
- .tp.primary {
8871
+ .typography-tp.primary {
8872
8872
  color: #3fa110; }
8873
- .tp.primary-dark {
8873
+ .typography-tp.primary-dark {
8874
8874
  color: #33820d; }
8875
- .tp.secondary {
8875
+ .typography-tp.secondary {
8876
8876
  color: #fefefe; }
8877
- .tp.default {
8877
+ .typography-tp.default {
8878
8878
  color: #323c32; }
8879
8879
 
8880
8880
  .caption.tp {
package/dist/index.js CHANGED
@@ -12806,12 +12806,15 @@ var LeftControlWithLabel = function LeftControlWithLabel(_ref) {
12806
12806
  }), props.label));
12807
12807
  };
12808
12808
 
12809
+ var rootClassName$2$ = 'tooltip-element';
12809
12810
  function TooltipElement(_ref) {
12810
12811
  var label = _ref.label,
12811
12812
  _ref$placement = _ref.placement,
12812
12813
  placement = _ref$placement === void 0 ? 'top' : _ref$placement,
12813
12814
  _ref$fallbackPlacemen = _ref.fallbackPlacements,
12814
12815
  fallbackPlacements = _ref$fallbackPlacemen === void 0 ? ['right', 'left', 'bottom'] : _ref$fallbackPlacemen,
12816
+ _ref$wrapperProps = _ref.wrapperProps,
12817
+ wrapperProps = _ref$wrapperProps === void 0 ? {} : _ref$wrapperProps,
12815
12818
  children = _ref.children;
12816
12819
  var arrowRef = React.useRef(null);
12817
12820
  var _useState = React.useState(false),
@@ -12862,14 +12865,14 @@ function TooltipElement(_ref) {
12862
12865
  isMounted = _useTransitionStyles.isMounted,
12863
12866
  transitionStyles = _useTransitionStyles.styles;
12864
12867
  return React__default.createElement(React.Fragment, null, React__default.createElement("div", Object.assign({
12865
- className: undefined.reference,
12868
+ className: rootClassName$2$ + "-reference",
12866
12869
  ref: refs.setReference
12867
- }, getReferenceProps), children), React__default.createElement(react.FloatingPortal, null, isMounted && React__default.createElement("div", Object.assign({
12868
- className: undefined.tooltip,
12870
+ }, getReferenceProps(wrapperProps)), children), React__default.createElement(react.FloatingPortal, null, isMounted && React__default.createElement("div", Object.assign({
12871
+ className: rootClassName$2$ + "-tooltip",
12869
12872
  ref: refs.setFloating,
12870
12873
  style: _extends({}, floatingStyles, transitionStyles)
12871
12874
  }, getFloatingProps()), React__default.createElement("span", {
12872
- className: undefined.label
12875
+ className: rootClassName$2$ + "-label"
12873
12876
  }, label), React__default.createElement(react.FloatingArrow, {
12874
12877
  ref: arrowRef,
12875
12878
  context: context,
@@ -12878,6 +12881,7 @@ function TooltipElement(_ref) {
12878
12881
  }
12879
12882
 
12880
12883
  var _excluded$k = ["className", "variant", "color", "focus", "style", "alignment", "format", "dangerouslySetInnerHTML", "children"];
12884
+ var rootClassName$30 = 'typography';
12881
12885
  var Typography = React.forwardRef(function (_ref, ref) {
12882
12886
  var _ref$className = _ref.className,
12883
12887
  className = _ref$className === void 0 ? '' : _ref$className,
@@ -12897,7 +12901,7 @@ var Typography = React.forwardRef(function (_ref, ref) {
12897
12901
  dangerouslySetInnerHTML = _ref.dangerouslySetInnerHTML,
12898
12902
  children = _ref.children,
12899
12903
  props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
12900
- var classNames = useMergedClassNames([undefined.tp, focus ? undefined.focus : '', undefined[color], undefined[variant], className]);
12904
+ var classNames = useMergedClassNames([rootClassName$30 + "-tp", focus ? rootClassName$30 + "-focus" : '', color, variant, className]);
12901
12905
  var tag = React.useMemo(function () {
12902
12906
  switch (variant) {
12903
12907
  case 'body':
@@ -43961,7 +43965,7 @@ function useHTMLShare() {
43961
43965
  };
43962
43966
  }
43963
43967
 
43964
- var rootClassName$2$ = 'comp-modal-manager';
43968
+ var rootClassName$31 = 'comp-modal-manager';
43965
43969
  var maskRootClassName$1 = 'component-modal-mask';
43966
43970
  var hackFocus$1 = function hackFocus() {
43967
43971
  var tmp = document.createElement('input');
@@ -44029,13 +44033,13 @@ function useModalManager() {
44029
44033
  return [React__default.createElement(React__default.Fragment, {
44030
44034
  key: 1
44031
44035
  }, React__default.createElement(reactTransitionGroup.TransitionGroup, {
44032
- className: rootClassName$2$ + "-modals"
44036
+ className: rootClassName$31 + "-modals"
44033
44037
  }, arrayOfModal.map(function (obj) {
44034
44038
  var _obj$props2, _obj$props3;
44035
44039
  var ModalComponent = React__default.createElement(obj.component, obj.props);
44036
44040
  return React__default.createElement(reactTransitionGroup.CSSTransition, {
44037
44041
  timeout: 300,
44038
- classNames: rootClassName$2$ + "-mask",
44042
+ classNames: rootClassName$31 + "-mask",
44039
44043
  key: (_obj$props2 = obj.props) === null || _obj$props2 === void 0 ? void 0 : _obj$props2.modalKey,
44040
44044
  unmountOnExit: true
44041
44045
  }, React__default.createElement(ModalMask, {
@@ -44306,7 +44310,7 @@ function useTimeElapsed(timeLeftInSeconds, callBackZero) {
44306
44310
  return timeToReturn;
44307
44311
  }
44308
44312
 
44309
- var rootClassName$30 = 'comp-toast-manager';
44313
+ var rootClassName$32 = 'comp-toast-manager';
44310
44314
  var count$1 = 0;
44311
44315
  function useToastManager(props) {
44312
44316
  var _props$max;
@@ -44351,17 +44355,17 @@ function useToastManager(props) {
44351
44355
  toastsRef.current = [];
44352
44356
  }, []);
44353
44357
  var classNames = React.useMemo(function () {
44354
- return getMergedClassNames([rootClassName$30 + "-toasts", rootClassName$30 + "-" + verticalPosition, rootClassName$30 + "-" + horizontalPosition, reverse ? rootClassName$30 + "-reverse" : '', animateSize ? rootClassName$30 + "-animate-size" : '']);
44358
+ return getMergedClassNames([rootClassName$32 + "-toasts", rootClassName$32 + "-" + verticalPosition, rootClassName$32 + "-" + horizontalPosition, reverse ? rootClassName$32 + "-reverse" : '', animateSize ? rootClassName$32 + "-animate-size" : '']);
44355
44359
  }, [reverse, animateSize, horizontalPosition, verticalPosition]);
44356
44360
  React.useLayoutEffect(function () {
44357
- var wrapper = document.querySelector("." + rootClassName$30 + "-toasts");
44361
+ var wrapper = document.querySelector("." + rootClassName$32 + "-toasts");
44358
44362
  if (wrapper && wrapper.childElementCount > 0) {
44359
44363
  var somaDasAlturas = 0;
44360
44364
  if (verticalPosition === 'top' && !reverse) {
44361
44365
  somaDasAlturas = 12;
44362
44366
  for (var i = 0; i < wrapper.children.length; i++) {
44363
44367
  var el = wrapper.children[i];
44364
- if (!el.classList.contains(rootClassName$30 + "-toast-exit")) {
44368
+ if (!el.classList.contains(rootClassName$32 + "-toast-exit")) {
44365
44369
  el.style.transform = "translateY(" + somaDasAlturas + "px)";
44366
44370
  somaDasAlturas += el.getBoundingClientRect().height + 12;
44367
44371
  }
@@ -44369,7 +44373,7 @@ function useToastManager(props) {
44369
44373
  } else if (verticalPosition === 'top') {
44370
44374
  for (var _i = wrapper.children.length - 1; _i >= 0; _i--) {
44371
44375
  var _el = wrapper.children[_i];
44372
- if (!_el.classList.contains(rootClassName$30 + "-toast-exit")) {
44376
+ if (!_el.classList.contains(rootClassName$32 + "-toast-exit")) {
44373
44377
  somaDasAlturas += _el.getBoundingClientRect().height + 12;
44374
44378
  _el.style.transform = "translateY(" + somaDasAlturas + "px)";
44375
44379
  }
@@ -44377,7 +44381,7 @@ function useToastManager(props) {
44377
44381
  } else if (verticalPosition === 'bottom' && !reverse) {
44378
44382
  for (var _i2 = 0; _i2 < wrapper.children.length; _i2++) {
44379
44383
  var _el2 = wrapper.children[_i2];
44380
- if (!_el2.classList.contains(rootClassName$30 + "-toast-exit")) {
44384
+ if (!_el2.classList.contains(rootClassName$32 + "-toast-exit")) {
44381
44385
  somaDasAlturas += _el2.getBoundingClientRect().height + 12;
44382
44386
  _el2.style.transform = "translateY(-" + somaDasAlturas + "px)";
44383
44387
  }
@@ -44386,7 +44390,7 @@ function useToastManager(props) {
44386
44390
  somaDasAlturas = 12;
44387
44391
  for (var _i3 = wrapper.children.length - 1; _i3 >= 0; _i3--) {
44388
44392
  var _el3 = wrapper.children[_i3];
44389
- if (!_el3.classList.contains(rootClassName$30 + "-toast-exit")) {
44393
+ if (!_el3.classList.contains(rootClassName$32 + "-toast-exit")) {
44390
44394
  _el3.style.transform = "translateY(-" + somaDasAlturas + "px)";
44391
44395
  somaDasAlturas += _el3.getBoundingClientRect().height + 12;
44392
44396
  }
@@ -44401,11 +44405,11 @@ function useToastManager(props) {
44401
44405
  }, arrayOfToast.map(function (toast) {
44402
44406
  return React__default.createElement(reactTransitionGroup.CSSTransition, {
44403
44407
  timeout: 300,
44404
- classNames: rootClassName$30 + "-toast",
44408
+ classNames: rootClassName$32 + "-toast",
44405
44409
  key: toast.id,
44406
44410
  unmountOnExit: true
44407
44411
  }, React__default.createElement("div", {
44408
- className: rootClassName$30 + "-toastzin"
44412
+ className: rootClassName$32 + "-toastzin"
44409
44413
  }, React__default.createElement(Toast, {
44410
44414
  theme: toast.theme,
44411
44415
  label: toast.label,