@true-engineering/true-react-common-ui-kit 3.0.0-alpha.11 → 3.0.0-alpha.13
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/LICENSE +201 -201
- package/dist/components/Flag/augment.d.ts +1 -1
- package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.styles.d.ts +1 -1
- package/dist/components/Icon/complexIcons/augment.d.ts +1 -1
- package/dist/true-react-common-ui-kit.js +67 -61
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +67 -61
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/dist/vite-env.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/AddButton/AddButton.stories.tsx +21 -21
- package/src/components/Colors/Colors.stories.tsx +7 -7
- package/src/components/DateInput/constants.ts +2 -2
- package/src/components/Flag/augment.d.ts +1 -1
- package/src/components/FlexibleTable/FlexibleTable.tsx +4 -3
- package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.styles.ts +4 -0
- package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +7 -6
- package/src/components/Icon/complexIcons/augment.d.ts +1 -1
- package/src/components/Icon/complexIcons/avatarGreen.svg +57 -57
- package/src/components/Icon/complexIcons/index.ts +1 -1
- package/src/components/MoreMenu/MoreMenu.stories.tsx +46 -46
- package/src/components/NumberInput/index.ts +1 -1
- package/src/components/PhoneInput/types.ts +16 -16
- package/src/components/ScrollIntoViewIfNeeded/index.ts +1 -1
- package/src/components/Select/constants.ts +2 -2
- package/src/components/Select/types.ts +1 -1
- package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +58 -58
- package/src/components/ThemedPreloader/components/DefaultPreloader/index.ts +1 -1
- package/src/components/Tooltip/types.ts +1 -1
- package/src/helpers/popper-helpers.ts +17 -17
- package/src/hooks/use-is-mounted.ts +15 -15
- package/src/vite-env.d.ts +1 -1
|
@@ -4096,63 +4096,63 @@
|
|
|
4096
4096
|
tweakStyles
|
|
4097
4097
|
]);
|
|
4098
4098
|
};
|
|
4099
|
-
const avatarGreen = ` <svg
|
|
4100
|
-
width="100%"
|
|
4101
|
-
height="100%"
|
|
4102
|
-
viewBox="0 0 32 32"
|
|
4103
|
-
fill="none"
|
|
4104
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4105
|
-
|
|
4106
|
-
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED"
|
|
4107
|
-
<mask
|
|
4108
|
-
id="mask0_0_12744"
|
|
4109
|
-
style="mask-type: 'alpha';"
|
|
4110
|
-
maskUnits="userSpaceOnUse"
|
|
4111
|
-
x="0"
|
|
4112
|
-
y="0"
|
|
4113
|
-
width="32"
|
|
4114
|
-
height="32"
|
|
4115
|
-
|
|
4116
|
-
<circle cx="16" cy="16" r="16" fill="white"
|
|
4117
|
-
</mask
|
|
4118
|
-
<g mask="url(#mask0_0_12744)"
|
|
4119
|
-
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)"
|
|
4120
|
-
<mask
|
|
4121
|
-
id="mask1_0_12744"
|
|
4122
|
-
style="mask-type: 'alpha';"
|
|
4123
|
-
maskUnits="userSpaceOnUse"
|
|
4124
|
-
x="3"
|
|
4125
|
-
y="16"
|
|
4126
|
-
width="26"
|
|
4127
|
-
height="26"
|
|
4128
|
-
|
|
4129
|
-
<circle cx="16" cy="29" r="13" fill="white"
|
|
4130
|
-
</mask
|
|
4131
|
-
<g mask="url(#mask1_0_12744)"
|
|
4132
|
-
<ellipse
|
|
4133
|
-
cx="16"
|
|
4134
|
-
cy="17.5"
|
|
4135
|
-
rx="6"
|
|
4136
|
-
ry="7.5"
|
|
4137
|
-
fill="#505F79"
|
|
4138
|
-
fill-opacity="0.204983"
|
|
4139
|
-
|
|
4140
|
-
</g
|
|
4141
|
-
</g
|
|
4142
|
-
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white"
|
|
4143
|
-
<defs
|
|
4144
|
-
<linearGradient
|
|
4145
|
-
id="paint0_linear_0_12744"
|
|
4146
|
-
x1="13.347"
|
|
4147
|
-
y1="46.279"
|
|
4148
|
-
x2="33.5318"
|
|
4149
|
-
y2="30.8088"
|
|
4150
|
-
gradientUnits="userSpaceOnUse"
|
|
4151
|
-
|
|
4152
|
-
<stop stop-color="#ABD229"
|
|
4153
|
-
<stop offset="1" stop-color="#9CD03F"
|
|
4154
|
-
</linearGradient
|
|
4155
|
-
</defs
|
|
4099
|
+
const avatarGreen = ` <svg\r
|
|
4100
|
+
width="100%"\r
|
|
4101
|
+
height="100%"\r
|
|
4102
|
+
viewBox="0 0 32 32"\r
|
|
4103
|
+
fill="none"\r
|
|
4104
|
+
xmlns="http://www.w3.org/2000/svg"\r
|
|
4105
|
+
>\r
|
|
4106
|
+
<circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />\r
|
|
4107
|
+
<mask\r
|
|
4108
|
+
id="mask0_0_12744"\r
|
|
4109
|
+
style="mask-type: 'alpha';"\r
|
|
4110
|
+
maskUnits="userSpaceOnUse"\r
|
|
4111
|
+
x="0"\r
|
|
4112
|
+
y="0"\r
|
|
4113
|
+
width="32"\r
|
|
4114
|
+
height="32"\r
|
|
4115
|
+
>\r
|
|
4116
|
+
<circle cx="16" cy="16" r="16" fill="white" />\r
|
|
4117
|
+
</mask>\r
|
|
4118
|
+
<g mask="url(#mask0_0_12744)">\r
|
|
4119
|
+
<circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />\r
|
|
4120
|
+
<mask\r
|
|
4121
|
+
id="mask1_0_12744"\r
|
|
4122
|
+
style="mask-type: 'alpha';"\r
|
|
4123
|
+
maskUnits="userSpaceOnUse"\r
|
|
4124
|
+
x="3"\r
|
|
4125
|
+
y="16"\r
|
|
4126
|
+
width="26"\r
|
|
4127
|
+
height="26"\r
|
|
4128
|
+
>\r
|
|
4129
|
+
<circle cx="16" cy="29" r="13" fill="white" />\r
|
|
4130
|
+
</mask>\r
|
|
4131
|
+
<g mask="url(#mask1_0_12744)">\r
|
|
4132
|
+
<ellipse\r
|
|
4133
|
+
cx="16"\r
|
|
4134
|
+
cy="17.5"\r
|
|
4135
|
+
rx="6"\r
|
|
4136
|
+
ry="7.5"\r
|
|
4137
|
+
fill="#505F79"\r
|
|
4138
|
+
fill-opacity="0.204983"\r
|
|
4139
|
+
/>\r
|
|
4140
|
+
</g>\r
|
|
4141
|
+
</g>\r
|
|
4142
|
+
<ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />\r
|
|
4143
|
+
<defs>\r
|
|
4144
|
+
<linearGradient\r
|
|
4145
|
+
id="paint0_linear_0_12744"\r
|
|
4146
|
+
x1="13.347"\r
|
|
4147
|
+
y1="46.279"\r
|
|
4148
|
+
x2="33.5318"\r
|
|
4149
|
+
y2="30.8088"\r
|
|
4150
|
+
gradientUnits="userSpaceOnUse"\r
|
|
4151
|
+
>\r
|
|
4152
|
+
<stop stop-color="#ABD229" />\r
|
|
4153
|
+
<stop offset="1" stop-color="#9CD03F" />\r
|
|
4154
|
+
</linearGradient>\r
|
|
4155
|
+
</defs>\r
|
|
4156
4156
|
</svg>`;
|
|
4157
4157
|
var complexIcons = {
|
|
4158
4158
|
avatar: avatarGreen
|
|
@@ -21959,6 +21959,9 @@
|
|
|
21959
21959
|
active: {},
|
|
21960
21960
|
editable: {
|
|
21961
21961
|
cursor: "pointer"
|
|
21962
|
+
},
|
|
21963
|
+
clickable: {
|
|
21964
|
+
cursor: "pointer"
|
|
21962
21965
|
}
|
|
21963
21966
|
});
|
|
21964
21967
|
function _array_like_to_array$9(arr, len) {
|
|
@@ -22116,7 +22119,7 @@
|
|
|
22116
22119
|
if (uniqueField !== void 0) {
|
|
22117
22120
|
onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(item[uniqueField]);
|
|
22118
22121
|
}
|
|
22119
|
-
if (expandableRowComponent
|
|
22122
|
+
if (trueReactPlatformHelpers.isNotEmpty(expandableRowComponent)) {
|
|
22120
22123
|
var newNestedComponent = expandableRowComponent(item, true, closeNestedComponent);
|
|
22121
22124
|
if (!nestedComponent.isOpen && newNestedComponent !== null) {
|
|
22122
22125
|
updateNestedComponent(newNestedComponent);
|
|
@@ -22129,10 +22132,11 @@
|
|
|
22129
22132
|
}
|
|
22130
22133
|
};
|
|
22131
22134
|
var items = enabledColumns !== null && enabledColumns !== void 0 ? enabledColumns : Object.keys(item);
|
|
22135
|
+
var _obj;
|
|
22132
22136
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
22133
22137
|
children: [
|
|
22134
22138
|
/* @__PURE__ */ jsx("tr", _object_spread_props$f(_object_spread$g({
|
|
22135
|
-
className: clsx(classes.root,
|
|
22139
|
+
className: clsx(classes.root, (_obj = {}, _define_property$h(_obj, classes.active, isActive), _define_property$h(_obj, classes.editable, trueReactPlatformHelpers.isNotEmpty(onRowClick) || trueReactPlatformHelpers.isNotEmpty(onRowHover)), _define_property$h(_obj, classes.clickable, trueReactPlatformHelpers.isNotEmpty(onRowClick) || trueReactPlatformHelpers.isNotEmpty(expandableRowComponent)), _obj)),
|
|
22136
22140
|
onMouseEnter: function(e) {
|
|
22137
22141
|
if (uniqueField !== void 0 && onRowHover !== void 0) {
|
|
22138
22142
|
e.stopPropagation();
|
|
@@ -22297,6 +22301,7 @@
|
|
|
22297
22301
|
currentComponentName: "FlexibleTable"
|
|
22298
22302
|
});
|
|
22299
22303
|
var _useState = _sliced_to_array$8(React.useState(false), 2), isHorizontallyScrolled = _useState[0], setIsHorizontallyScrolled = _useState[1];
|
|
22304
|
+
var _useState1 = _sliced_to_array$8(React.useState(false), 2), hasScrollBar = _useState1[0], setHasScrollBar = _useState1[1];
|
|
22300
22305
|
var observer = React.useRef();
|
|
22301
22306
|
var scrollRef = React.useRef(null);
|
|
22302
22307
|
var ref = refForScroll !== null && refForScroll !== void 0 ? refForScroll : scrollRef;
|
|
@@ -22327,6 +22332,7 @@
|
|
|
22327
22332
|
if (scrollContainer === null || !isHorizontallyScrollable || !isFirstColumnSticky) {
|
|
22328
22333
|
return;
|
|
22329
22334
|
}
|
|
22335
|
+
setHasScrollBar(hasHorizontalScrollBar(scrollContainer));
|
|
22330
22336
|
var scrollHandler = function(e) {
|
|
22331
22337
|
setIsHorizontallyScrolled(e.target.scrollLeft > 0);
|
|
22332
22338
|
};
|
|
@@ -22335,7 +22341,7 @@
|
|
|
22335
22341
|
return scrollContainer.removeEventListener("scroll", scrollHandler);
|
|
22336
22342
|
};
|
|
22337
22343
|
}, [
|
|
22338
|
-
|
|
22344
|
+
ref
|
|
22339
22345
|
]);
|
|
22340
22346
|
var _activeRows_includes;
|
|
22341
22347
|
return /* @__PURE__ */ jsx("div", _object_spread_props$e(_object_spread$f({
|
|
@@ -22343,7 +22349,7 @@
|
|
|
22343
22349
|
className: clsx(_define_property$g({}, classes.scroll, isHorizontallyScrollable))
|
|
22344
22350
|
}, addDataAttributes({
|
|
22345
22351
|
scrolled: isHorizontallyScrolled ? true : void 0,
|
|
22346
|
-
scrollable: isHorizontallyScrollable &&
|
|
22352
|
+
scrollable: isHorizontallyScrollable && hasScrollBar ? true : void 0
|
|
22347
22353
|
})), {
|
|
22348
22354
|
children: /* @__PURE__ */ jsxs("table", _object_spread_props$e(_object_spread$f({
|
|
22349
22355
|
className: classes.root
|