plataforma-fundacao-componentes 2.25.3 → 2.25.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.
@@ -1,10 +1,14 @@
1
- import React from 'react';
1
+ import React, { CSSProperties, ReactNode } from 'react';
2
2
  import './Title.scss';
3
3
  interface TitleProps {
4
4
  children: any;
5
5
  showBackButton?: boolean;
6
6
  onBackClick?: (event?: any) => void;
7
- rightElement?: React.ReactNode;
7
+ oneLineTitle?: boolean;
8
+ rightElement?: ReactNode;
9
+ hideRightElementXS?: boolean;
10
+ align?: CSSProperties['alignItems'];
11
+ flexWrap?: CSSProperties['flexWrap'];
8
12
  }
9
13
  declare function Title(props: TitleProps): React.JSX.Element;
10
14
  declare namespace Title {
@@ -1,23 +1,45 @@
1
- declare namespace _default {
2
- export const title: string;
3
- export { Title as component };
4
- }
1
+ import React, { ComponentProps } from 'react';
2
+ import Title from './Title';
3
+ declare const _default: {
4
+ title: string;
5
+ component: typeof Title;
6
+ argTypes: {
7
+ align: {
8
+ options: string[];
9
+ type: string;
10
+ };
11
+ };
12
+ };
5
13
  export default _default;
6
- export function FirstExample(args: any): React.JSX.Element;
7
- export namespace FirstExample {
8
- export namespace args {
9
- export const children: string;
10
- }
11
- }
12
- export function BackExample(args: any): React.JSX.Element;
13
- export namespace BackExample {
14
- export namespace args_1 {
15
- const children_1: string;
16
- export { children_1 as children };
17
- export const showBackButton: boolean;
18
- }
19
- export { args_1 as args };
20
- }
21
- export function RightElementExample(args: any): React.JSX.Element;
22
- import Title from "./Title";
23
- import React from "react";
14
+ export declare const FirstExample: {
15
+ (args: ComponentProps<typeof Title>): React.JSX.Element;
16
+ args: {
17
+ children: string;
18
+ };
19
+ };
20
+ export declare const BackExample: {
21
+ (args: ComponentProps<typeof Title>): React.JSX.Element;
22
+ args: {
23
+ children: string;
24
+ showBackButton: boolean;
25
+ };
26
+ };
27
+ export declare const RightElementExample: {
28
+ (args: ComponentProps<typeof Title>): React.JSX.Element;
29
+ args: {
30
+ showBackButton: boolean;
31
+ oneLineTitle: boolean;
32
+ hideRightElementsXS: boolean;
33
+ children: string;
34
+ };
35
+ };
36
+ export declare const RightElementExampleTwoElements: {
37
+ (args: ComponentProps<typeof Title>): React.JSX.Element;
38
+ args: {
39
+ showBackButton: boolean;
40
+ oneLineTitle: boolean;
41
+ hideRightElementXS: boolean;
42
+ align: string;
43
+ children: string;
44
+ };
45
+ };
package/dist/index.css CHANGED
@@ -7468,41 +7468,47 @@ nav.component-tabs {
7468
7468
  width: 100%;
7469
7469
  position: relative;
7470
7470
  display: flex;
7471
- align-items: center;
7472
- justify-content: space-between; }
7471
+ align-items: flex-start;
7472
+ justify-content: space-between;
7473
+ flex-flow: row wrap;
7474
+ -moz-column-break-inside: avoid;
7475
+ break-inside: avoid; }
7473
7476
  .component-title .component-title-wrapper {
7474
7477
  display: flex;
7475
7478
  align-items: center;
7476
- flex: 1 1 100%;
7477
- min-width: 0; }
7478
- .component-title .component-title-icon {
7479
- display: flex;
7480
- align-items: center;
7481
- margin-right: 12px;
7482
- margin-top: 2px; }
7483
- .component-title .component-title-text {
7484
- -webkit-user-select: none;
7485
- -moz-user-select: none;
7486
- user-select: none;
7487
- color: #323c32;
7488
- font-size: 26px;
7489
- font-weight: 700; }
7490
- @media screen and (max-width: 767.98px) {
7491
- .component-title .component-title-text {
7492
- font-size: 22px; } }
7493
- @media screen and (max-width: 575.98px) {
7494
- .component-title .component-title-text {
7495
- font-size: 20px; } }
7496
- .component-title .component-title-text.ellipsis {
7479
+ justify-content: flex-start;
7480
+ max-width: 100%;
7481
+ flex: 1 4 auto; }
7482
+ .component-title .component-title-wrapper .component-title-icon {
7483
+ display: flex;
7484
+ align-items: center;
7485
+ margin-right: 12px;
7486
+ margin-top: 2px; }
7487
+ .component-title .component-title-wrapper .component-title-text {
7488
+ -webkit-user-select: none;
7489
+ -moz-user-select: none;
7490
+ user-select: none;
7491
+ color: #323c32;
7492
+ font-size: 26px;
7493
+ font-weight: 700;
7497
7494
  overflow: hidden;
7498
- text-overflow: ellipsis;
7499
- width: calc(100% - 48px);
7500
- white-space: nowrap; }
7495
+ max-width: 100%;
7496
+ text-overflow: ellipsis; }
7497
+ .component-title .component-title-wrapper .component-title-text.one-line-title {
7498
+ white-space: nowrap; }
7501
7499
  @media screen and (max-width: 767.98px) {
7502
- .component-title .component-title-text.ellipsis {
7503
- white-space: pre-wrap; } }
7500
+ .component-title .component-title-wrapper .component-title-text {
7501
+ font-size: 22px; } }
7502
+ @media screen and (max-width: 575.98px) {
7503
+ .component-title .component-title-wrapper .component-title-text {
7504
+ font-size: 20px; } }
7505
+ .component-title .component-title-right-element {
7506
+ display: flex;
7507
+ flex: 1 1 auto;
7508
+ align-items: center;
7509
+ justify-content: flex-end; }
7504
7510
  @media screen and (max-width: 575.98px) {
7505
- .component-title .component-title-right-element {
7511
+ .component-title.hide-right-xs .component-title-right-element {
7506
7512
  display: none;
7507
7513
  visibility: hidden; } }
7508
7514
 
package/dist/index.js CHANGED
@@ -11612,7 +11612,11 @@ TextEditor.defaultProps = {
11612
11612
  var rootClassName$2F = 'component-title';
11613
11613
  function Title(props) {
11614
11614
  return React$1__default.createElement("div", {
11615
- className: rootClassName$2F
11615
+ className: getMergedClassNames([rootClassName$2F, props.hideRightElementXS ? 'hide-right-xs' : '']),
11616
+ style: {
11617
+ alignItems: props.align,
11618
+ flexWrap: props.flexWrap
11619
+ }
11616
11620
  }, React$1__default.createElement("div", {
11617
11621
  className: rootClassName$2F + "-wrapper"
11618
11622
  }, props.showBackButton ? React$1__default.createElement("div", {
@@ -11621,7 +11625,7 @@ function Title(props) {
11621
11625
  icon: React$1__default.createElement(ArrowLeftIcon, null),
11622
11626
  onClick: props.onBackClick
11623
11627
  })) : undefined, React$1__default.createElement("div", {
11624
- className: getMergedClassNames([rootClassName$2F + "-text", props.rightElement ? 'ellipsis' : ''])
11628
+ className: getMergedClassNames([rootClassName$2F + "-text", props.oneLineTitle ? 'one-line-title' : ''])
11625
11629
  }, props.children)), props.rightElement ? React$1__default.createElement("div", {
11626
11630
  className: rootClassName$2F + "-right-element"
11627
11631
  }, props.rightElement) : undefined);