linear-react-components-ui 1.1.6-beta.0 → 1.1.6-beta.2
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/lib/assets/styles/icon.scss +31 -4
- package/lib/assets/styles/textContent.scss +9 -0
- package/lib/checkbox/index.d.ts +2 -2
- package/lib/checkbox/index.js +6 -5
- package/lib/checkbox/types.d.ts +1 -1
- package/lib/dialog/base/Content.js +3 -4
- package/lib/drawer/Content.js +1 -1
- package/lib/drawer/Header.js +1 -1
- package/lib/icons/helper.js +1 -1
- package/lib/icons/index.d.ts +3 -2
- package/lib/icons/index.js +10 -3
- package/lib/icons/types.d.ts +22 -9
- package/lib/index.d.ts +1 -0
- package/lib/inputs/file/File.d.ts +1 -1
- package/lib/inputs/file/File.js +4 -2
- package/lib/menus/float/types.d.ts +1 -1
- package/lib/menus/sidenav/types.d.ts +1 -1
- package/lib/textContent/index.d.ts +8 -0
- package/lib/textContent/index.js +30 -0
- package/package.json +4 -3
|
@@ -1,15 +1,42 @@
|
|
|
1
|
+
@import "colors.scss";
|
|
2
|
+
|
|
1
3
|
/*
|
|
2
4
|
* Caso altere o nome da classe, deverá pesquisar em todo projeto se existe
|
|
3
5
|
* algum lugar que esta sobescrevendo
|
|
4
6
|
*/
|
|
5
|
-
.icon-component {
|
|
6
|
-
margin: 0px 2px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
7
|
.icon-component-container {
|
|
10
8
|
display: inline-flex;
|
|
11
9
|
place-self: center;
|
|
12
10
|
padding: 2px;
|
|
13
11
|
border-radius: 99999px;
|
|
14
12
|
pointer-events: fill;
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.icon-component {
|
|
17
|
+
margin: 0px 2px;
|
|
18
|
+
&:not([fill]) {
|
|
19
|
+
fill: #676464;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&[data-color-style="primary"] {
|
|
23
|
+
fill: $primary-color
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&[data-color-style="success"] {
|
|
27
|
+
fill: $success-color
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&[data-color-style="info"] {
|
|
31
|
+
fill: $info-color
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&[data-color-style="warning"] {
|
|
35
|
+
fill: $warning-color
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&[data-color-style="danger"] {
|
|
39
|
+
fill: $danger-color
|
|
40
|
+
}
|
|
15
41
|
}
|
|
42
|
+
|
package/lib/checkbox/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
1
2
|
import { ICheckBoxProps } from './types.js';
|
|
2
|
-
import 'react';
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
|
|
@@ -8,6 +8,6 @@ import '../@types/Position.js';
|
|
|
8
8
|
* o componente Field dentro do componente Form, pois o mesmo leva em consideração o tipo do
|
|
9
9
|
* componente para gerar propriedades customizadas.
|
|
10
10
|
*/
|
|
11
|
-
declare const CheckBox:
|
|
11
|
+
declare const CheckBox: React__default.ForwardRefExoticComponent<ICheckBoxProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
12
12
|
|
|
13
13
|
export { CheckBox as default };
|
package/lib/checkbox/index.js
CHANGED
|
@@ -21,7 +21,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
21
21
|
* componente para gerar propriedades customizadas.
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
const CheckBox = _ref => {
|
|
24
|
+
const CheckBox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
25
25
|
let {
|
|
26
26
|
name,
|
|
27
27
|
required,
|
|
@@ -30,7 +30,7 @@ const CheckBox = _ref => {
|
|
|
30
30
|
onChange,
|
|
31
31
|
autofocus,
|
|
32
32
|
hint,
|
|
33
|
-
id =
|
|
33
|
+
id = undefined,
|
|
34
34
|
gridLayout,
|
|
35
35
|
checked = false,
|
|
36
36
|
disabled,
|
|
@@ -46,6 +46,7 @@ const CheckBox = _ref => {
|
|
|
46
46
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible];
|
|
47
47
|
const [onDenied] = (0, _react.useState)((0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr));
|
|
48
48
|
const inputRef = (0, _react.useRef)(null);
|
|
49
|
+
(0, _react.useImperativeHandle)(ref, () => inputRef.current, [inputRef.current]);
|
|
49
50
|
(0, _react.useEffect)(() => {
|
|
50
51
|
setIsChecked(checked);
|
|
51
52
|
}, [checked]);
|
|
@@ -78,8 +79,7 @@ const CheckBox = _ref => {
|
|
|
78
79
|
onClick: !shouldDisable() && !skeletonize ? () => setIsChecked(!isChecked) : undefined,
|
|
79
80
|
tabIndex: -1,
|
|
80
81
|
role: "checkbox",
|
|
81
|
-
"aria-checked": "false"
|
|
82
|
-
onKeyPress: undefined
|
|
82
|
+
"aria-checked": "false"
|
|
83
83
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
84
84
|
id: id || undefined,
|
|
85
85
|
ref: r => {
|
|
@@ -113,5 +113,6 @@ const CheckBox = _ref => {
|
|
|
113
113
|
customClass: "-withinput",
|
|
114
114
|
cols: gridLayout
|
|
115
115
|
}, renderInput()) : renderInput();
|
|
116
|
-
};
|
|
116
|
+
});
|
|
117
|
+
CheckBox.displayName = 'CheckBox';
|
|
117
118
|
var _default = exports.default = CheckBox;
|
package/lib/checkbox/types.d.ts
CHANGED
|
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
require("../../assets/styles/dialog.scss");
|
|
9
|
-
function
|
|
10
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
10
|
const Content = _ref => {
|
|
12
11
|
let {
|
|
13
12
|
children,
|
|
@@ -17,6 +16,6 @@ const Content = _ref => {
|
|
|
17
16
|
id: "modal-dialog-content",
|
|
18
17
|
className: "dialog-content",
|
|
19
18
|
style: styleForContent
|
|
20
|
-
},
|
|
19
|
+
}, children);
|
|
21
20
|
};
|
|
22
21
|
var _default = exports.default = Content;
|
package/lib/drawer/Content.js
CHANGED
|
@@ -21,6 +21,6 @@ const Content = _ref => {
|
|
|
21
21
|
return hideContent ? /*#__PURE__*/_react.default.createElement(_noPermission.default, null) : /*#__PURE__*/_react.default.createElement("div", {
|
|
22
22
|
className: "drawerbody",
|
|
23
23
|
style: style
|
|
24
|
-
},
|
|
24
|
+
}, children);
|
|
25
25
|
};
|
|
26
26
|
var _default = exports.default = Content;
|
package/lib/drawer/Header.js
CHANGED
|
@@ -24,7 +24,7 @@ const getIcon = (titleIcon, icon) => {
|
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
25
25
|
"data-testid": "icon-header",
|
|
26
26
|
className: "icon-header"
|
|
27
|
-
}, icon || /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
27
|
+
}, icon || titleIcon && /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
28
28
|
name: titleIcon,
|
|
29
29
|
color: "#000",
|
|
30
30
|
size: 24
|
package/lib/icons/helper.js
CHANGED
|
@@ -575,7 +575,7 @@ var _default = exports.default = {
|
|
|
575
575
|
},
|
|
576
576
|
cash3: {
|
|
577
577
|
viewbox: '0 0 17 16',
|
|
578
|
-
paths: ['9h1v1h-1v-1z', 'M0 6v9h17v-9h-17zM3 14h-2v-2h1v1h1v1zM3 8h-1v1h-1v-2h2v1zM10.5 10c0.276 0 0.5 0.224 0.5 0.5v2c0 0.276-0.224 0.5-0.5 0.5h-1.5v0.5c0 0.276-0.224 0.5-0.5 0.5s-0.5-0.224-0.5-0.5v-0.5h-1.5c-0.276 0-0.5-0.224-0.5-0.5s0.224-0.5 0.5-0.5h1.5v-1h-1.5c-0.276 0-0.5-0.224-0.5-0.5v-2c0-0.276 0.224-0.5 0.5-0.5h1.5v-0.5c0-0.276 0.224-0.5 0.5-0.5s0.5 0.224 0.5 0.5v0.5h1.5c0.276 0 0.5 0.224 0.5 0.5s-0.224 0.5-0.5 0.5h-1.5v1h1.5zM16 14h-2v-1h1v-1h1v2zM16 9h-1v-1h-1v-1h2v2z', 'M9 11h1v1h-1v-1z', 'M1 4h15v1.5h-15v-1.5z', 'M2 2h13v1.5h-13v-1.5z']
|
|
578
|
+
paths: ['M7 9h1v1h-1v-1z', 'M0 6v9h17v-9h-17zM3 14h-2v-2h1v1h1v1zM3 8h-1v1h-1v-2h2v1zM10.5 10c0.276 0 0.5 0.224 0.5 0.5v2c0 0.276-0.224 0.5-0.5 0.5h-1.5v0.5c0 0.276-0.224 0.5-0.5 0.5s-0.5-0.224-0.5-0.5v-0.5h-1.5c-0.276 0-0.5-0.224-0.5-0.5s0.224-0.5 0.5-0.5h1.5v-1h-1.5c-0.276 0-0.5-0.224-0.5-0.5v-2c0-0.276 0.224-0.5 0.5-0.5h1.5v-0.5c0-0.276 0.224-0.5 0.5-0.5s0.5 0.224 0.5 0.5v0.5h1.5c0.276 0 0.5 0.224 0.5 0.5s-0.224 0.5-0.5 0.5h-1.5v1h1.5zM16 14h-2v-1h1v-1h1v2zM16 9h-1v-1h-1v-1h2v2z', 'M9 11h1v1h-1v-1z', 'M1 4h15v1.5h-15v-1.5z', 'M2 2h13v1.5h-13v-1.5z']
|
|
579
579
|
},
|
|
580
580
|
wallet: {
|
|
581
581
|
viewbox: '0 0 17 16',
|
package/lib/icons/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconProps } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../@types/PointerEvents.js';
|
|
4
4
|
import '../@types/SizePixels.js';
|
|
5
5
|
import '../@types/Icon.js';
|
|
6
6
|
import './helper.js';
|
|
7
7
|
import '../@types/Position.js';
|
|
8
|
+
import '../@types/ColorStyles.js';
|
|
8
9
|
|
|
9
10
|
declare const _default: {
|
|
10
|
-
(props:
|
|
11
|
+
(props: IconProps): JSX.Element;
|
|
11
12
|
displayName: string;
|
|
12
13
|
};
|
|
13
14
|
|
package/lib/icons/index.js
CHANGED
|
@@ -24,17 +24,23 @@ const Icon = _ref => {
|
|
|
24
24
|
disabled = false,
|
|
25
25
|
customClass = '',
|
|
26
26
|
customClassForContainer = '',
|
|
27
|
-
|
|
27
|
+
colorStyle = 'default',
|
|
28
|
+
color,
|
|
29
|
+
viewBox,
|
|
28
30
|
pointerEvents = 'none',
|
|
29
31
|
targetRef,
|
|
30
32
|
tooltip
|
|
31
33
|
} = _ref;
|
|
34
|
+
const isUsingColorStyle = colorStyle !== 'default';
|
|
35
|
+
const colorFromProp = isUsingColorStyle || !color ? undefined : color;
|
|
32
36
|
const refSvg = (0, _react.useRef)(null);
|
|
37
|
+
const viewBoxFromIconOrSvgStrcut = name ? listIcon[name].viewbox : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.viewbox;
|
|
33
38
|
const getPaths = () => name ? listIcon[name].paths : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.paths;
|
|
34
39
|
const getSvg = () => {
|
|
35
40
|
var _getPaths;
|
|
36
41
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
37
42
|
"data-testid": "icon",
|
|
43
|
+
"data-color-style": colorStyle,
|
|
38
44
|
onClick: () => {
|
|
39
45
|
if (onClick && !disabled) onClick();
|
|
40
46
|
},
|
|
@@ -43,8 +49,8 @@ const Icon = _ref => {
|
|
|
43
49
|
},
|
|
44
50
|
width: "".concat(size, "px"),
|
|
45
51
|
height: "".concat(size, "px"),
|
|
46
|
-
fill: disabled ? disabledIconColor :
|
|
47
|
-
viewBox:
|
|
52
|
+
fill: disabled ? disabledIconColor : colorFromProp,
|
|
53
|
+
viewBox: viewBox || viewBoxFromIconOrSvgStrcut,
|
|
48
54
|
className: "icon-component ".concat(customClass),
|
|
49
55
|
pointerEvents: pointerEvents,
|
|
50
56
|
style: style
|
|
@@ -54,6 +60,7 @@ const Icon = _ref => {
|
|
|
54
60
|
key: value
|
|
55
61
|
})));
|
|
56
62
|
};
|
|
63
|
+
if (color && colorStyle !== 'default') throw new Error('Expected only one of the two properties: colorStyle or color');
|
|
57
64
|
if (!name && !svgStruct) throw new Error('One of the "name" and "svgStruct" props must be filled');
|
|
58
65
|
if (!visible) return null;
|
|
59
66
|
if (!tooltip) return getSvg();
|
package/lib/icons/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { PointerEvents } from '../@types/PointerEvents.js';
|
|
|
3
3
|
import { SizePixels } from '../@types/SizePixels.js';
|
|
4
4
|
import { IconNames } from '../@types/Icon.js';
|
|
5
5
|
import { Position } from '../@types/Position.js';
|
|
6
|
+
import { ColorStyles } from '../@types/ColorStyles.js';
|
|
6
7
|
import './helper.js';
|
|
7
8
|
|
|
8
9
|
type ListIconType = {
|
|
@@ -11,26 +12,38 @@ type ListIconType = {
|
|
|
11
12
|
paths: Array<string>;
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
|
-
|
|
15
|
+
type SvgStruct = {
|
|
16
|
+
viewbox: string;
|
|
17
|
+
paths: Array<string>;
|
|
18
|
+
};
|
|
19
|
+
type BaseIconProps = {
|
|
15
20
|
size?: SizePixels;
|
|
16
|
-
color?: string;
|
|
17
21
|
customClass?: string;
|
|
18
22
|
customClassForContainer?: string;
|
|
19
23
|
style?: CSSProperties;
|
|
20
24
|
visible?: boolean;
|
|
21
25
|
disabled?: boolean;
|
|
22
26
|
pointerEvents?: PointerEvents;
|
|
23
|
-
name?: IconNames;
|
|
24
27
|
viewBox?: string;
|
|
25
|
-
svgStruct?: {
|
|
26
|
-
viewbox: string;
|
|
27
|
-
paths: Array<string>;
|
|
28
|
-
};
|
|
29
28
|
onClick?: () => void;
|
|
30
29
|
tooltipPosition?: Exclude<Position, 'center'>;
|
|
31
30
|
tooltipWidth?: string | number;
|
|
32
31
|
tooltip?: string;
|
|
33
32
|
targetRef?: (ref: HTMLDivElement) => void;
|
|
34
|
-
}
|
|
33
|
+
};
|
|
34
|
+
type ColorProps = ({
|
|
35
|
+
colorStyle?: ColorStyles | 'default';
|
|
36
|
+
color?: null;
|
|
37
|
+
} | {
|
|
38
|
+
color?: string;
|
|
39
|
+
colorStyle?: undefined;
|
|
40
|
+
});
|
|
41
|
+
type IconProps = BaseIconProps & ColorProps & ({
|
|
42
|
+
name: IconNames;
|
|
43
|
+
svgStruct?: null;
|
|
44
|
+
} | {
|
|
45
|
+
svgStruct: SvgStruct;
|
|
46
|
+
name?: null;
|
|
47
|
+
});
|
|
35
48
|
|
|
36
|
-
export {
|
|
49
|
+
export { IconProps, ListIconType };
|
package/lib/index.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ import '../../@types/PermissionAttr.js';
|
|
|
8
8
|
import '../../internals/types.js';
|
|
9
9
|
import '../../@types/Position.js';
|
|
10
10
|
|
|
11
|
-
declare const File: ({ applyDragDrop, defaultFiles, gridLayout, ...rest }: IFileProps) => JSX.Element;
|
|
11
|
+
declare const File: ({ applyDragDrop, defaultFiles, gridLayout, onBtnClickRemove: onBtnClickRemoveProp, ...rest }: Omit<IFileProps, 'onBtnClickInsert'>) => JSX.Element;
|
|
12
12
|
|
|
13
13
|
export { File as default };
|
package/lib/inputs/file/File.js
CHANGED
|
@@ -9,7 +9,7 @@ var _DefaultFile = _interopRequireDefault(require("./DefaultFile"));
|
|
|
9
9
|
var _DragDropFile = _interopRequireDefault(require("./DragDropFile"));
|
|
10
10
|
var _gridlayout = _interopRequireDefault(require("../../gridlayout"));
|
|
11
11
|
var _helpers = require("./helpers");
|
|
12
|
-
const _excluded = ["applyDragDrop", "defaultFiles", "gridLayout"];
|
|
12
|
+
const _excluded = ["applyDragDrop", "defaultFiles", "gridLayout", "onBtnClickRemove"];
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -20,7 +20,8 @@ const File = _ref => {
|
|
|
20
20
|
let {
|
|
21
21
|
applyDragDrop = false,
|
|
22
22
|
defaultFiles,
|
|
23
|
-
gridLayout
|
|
23
|
+
gridLayout,
|
|
24
|
+
onBtnClickRemove: onBtnClickRemoveProp
|
|
24
25
|
} = _ref,
|
|
25
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
27
|
const inputFileRef = (0, _react.useRef)(null);
|
|
@@ -33,6 +34,7 @@ const File = _ref => {
|
|
|
33
34
|
if (inputFileRef.current) {
|
|
34
35
|
inputFileRef.current.value = '';
|
|
35
36
|
}
|
|
37
|
+
if (onBtnClickRemoveProp) onBtnClickRemoveProp();
|
|
36
38
|
};
|
|
37
39
|
(0, _react.useEffect)(() => {
|
|
38
40
|
if (inputFileRef !== null && inputFileRef !== void 0 && inputFileRef.current && defaultFiles) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface TextContentProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
4
|
+
as?: 'span' | 'strong' | 'p';
|
|
5
|
+
}
|
|
6
|
+
declare const TextContent: React__default.ForwardRefExoticComponent<TextContentProps & React__default.RefAttributes<HTMLElement>>;
|
|
7
|
+
|
|
8
|
+
export { TextContent as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
require("../assets/styles/textContent.scss");
|
|
9
|
+
const _excluded = ["as", "children", "className"];
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
const TextContent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
16
|
+
let {
|
|
17
|
+
as: Comp = 'span',
|
|
18
|
+
children,
|
|
19
|
+
className
|
|
20
|
+
} = _ref,
|
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
const typedRef = ref;
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(Comp, _extends({
|
|
24
|
+
ref: typedRef,
|
|
25
|
+
className: "text-content-component ".concat(className),
|
|
26
|
+
"data-textcontent": Comp
|
|
27
|
+
}, props), children);
|
|
28
|
+
});
|
|
29
|
+
TextContent.displayName = 'TextContent';
|
|
30
|
+
var _default = exports.default = TextContent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linear-react-components-ui",
|
|
3
|
-
"version": "1.1.6-beta.
|
|
3
|
+
"version": "1.1.6-beta.2",
|
|
4
4
|
"description": "Linear Sistemas ReactJs Components",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.cjs",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@types/react-dom": "18.0.5",
|
|
45
45
|
"attach-dom-events": "1.0.0",
|
|
46
46
|
"browserslist": "4.23.0",
|
|
47
|
+
"esbuild": "0.21.5",
|
|
47
48
|
"history": "5.0.0",
|
|
48
49
|
"imask": "6.4.3",
|
|
49
50
|
"init": "0.1.2",
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"@types/lodash": "4.14.191",
|
|
73
74
|
"@types/node": "17.0.45",
|
|
74
75
|
"@types/react": "18.0.26",
|
|
75
|
-
"@types/react-dev-utils": "
|
|
76
|
+
"@types/react-dev-utils": "9.0.11",
|
|
76
77
|
"@types/react-dom": "18.0.5",
|
|
77
78
|
"@types/react-router-dom": "5.3.3",
|
|
78
79
|
"@types/react-syntax-highlighter": "15.5.6",
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
"@types/uuid": "8.3.4",
|
|
81
82
|
"@typescript-eslint/eslint-plugin": "6.21.0",
|
|
82
83
|
"@typescript-eslint/parser": "6.21.0",
|
|
83
|
-
"babel-eslint": "
|
|
84
|
+
"babel-eslint": "10.1.0",
|
|
84
85
|
"babel-jest": "29.7.0",
|
|
85
86
|
"babel-loader": "9.1.3",
|
|
86
87
|
"babel-polyfill": "6.26.0",
|