labsense-ui-kit 1.3.33 → 1.3.35
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.
|
@@ -153,7 +153,7 @@ export { default as Notifications } from './Notifications';
|
|
|
153
153
|
export { default as OpenBin } from './OpenBin';
|
|
154
154
|
export { default as OpenBook } from './OpenBook';
|
|
155
155
|
export { default as Out } from './Out';
|
|
156
|
-
export { default as OpenEye } from './
|
|
156
|
+
export { default as OpenEye } from './OpenEye';
|
|
157
157
|
export { default as PasswordLock } from './PasswordLock';
|
|
158
158
|
export { default as Pause } from './Pause';
|
|
159
159
|
export { default as PeopleAnalytics } from './PeopleAnalytics';
|
package/dist/index.js
CHANGED
|
@@ -3820,6 +3820,26 @@ var Out = function Out(_ref) {
|
|
|
3820
3820
|
}));
|
|
3821
3821
|
};
|
|
3822
3822
|
|
|
3823
|
+
var OpenEye = function OpenEye(_ref) {
|
|
3824
|
+
var size = _ref.size,
|
|
3825
|
+
color = _ref.color,
|
|
3826
|
+
weight = _ref.weight;
|
|
3827
|
+
return React__default.createElement("svg", {
|
|
3828
|
+
width: size,
|
|
3829
|
+
height: size,
|
|
3830
|
+
strokeWidth: weight,
|
|
3831
|
+
viewBox: '0 0 14 10',
|
|
3832
|
+
fill: 'none',
|
|
3833
|
+
xmlns: 'http://www.w3.org/2000/svg'
|
|
3834
|
+
}, React__default.createElement("path", {
|
|
3835
|
+
d: 'M6.99995 9.10156C6.16323 9.10156 5.29917 8.89375 4.42964 8.48633C3.74878 8.16641 3.06245 7.72344 2.3898 7.16836C1.25503 6.23047 0.555029 5.30078 0.524951 5.2625C0.407373 5.10664 0.407373 4.89336 0.524951 4.7375C0.555029 4.69922 1.25503 3.76953 2.3898 2.83164C3.06245 2.27656 3.74878 1.83359 4.42964 1.51367C5.29917 1.10625 6.16323 0.898438 6.99995 0.898438C7.83667 0.898438 8.70073 1.10625 9.57026 1.51367C10.2511 1.83359 10.9375 2.27656 11.6101 2.83164C12.7449 3.76953 13.4476 4.69922 13.475 4.7375C13.5925 4.89336 13.5925 5.10664 13.475 5.2625C13.4449 5.30078 12.7449 6.23047 11.6101 7.16836C10.9375 7.72344 10.2511 8.16641 9.57026 8.48633C8.70073 8.89375 7.83667 9.10156 6.99995 9.10156ZM1.43823 5C2.12456 5.81211 4.39136 8.22656 6.99995 8.22656C9.61401 8.22656 11.8753 5.81211 12.5617 5C11.8753 4.18789 9.60854 1.77344 6.99995 1.77344C4.38589 1.77344 2.12456 4.18789 1.43823 5Z',
|
|
3836
|
+
fill: color
|
|
3837
|
+
}), React__default.createElement("path", {
|
|
3838
|
+
d: 'M7 6.96875C5.91445 6.96875 5.03125 6.08555 5.03125 5C5.03125 3.91445 5.91445 3.03125 7 3.03125C8.08555 3.03125 8.96875 3.91445 8.96875 5C8.96875 6.08555 8.08555 6.96875 7 6.96875ZM7 3.90625C6.3957 3.90625 5.90625 4.3957 5.90625 5C5.90625 5.6043 6.3957 6.09375 7 6.09375C7.6043 6.09375 8.09375 5.6043 8.09375 5C8.09375 4.3957 7.6043 3.90625 7 3.90625Z',
|
|
3839
|
+
fill: color
|
|
3840
|
+
}));
|
|
3841
|
+
};
|
|
3842
|
+
|
|
3823
3843
|
var PasswordLock = function PasswordLock(_ref) {
|
|
3824
3844
|
var size = _ref.size,
|
|
3825
3845
|
color = _ref.color,
|
|
@@ -5862,7 +5882,7 @@ var IconSVGs = {
|
|
|
5862
5882
|
OpenBin: OpenBin,
|
|
5863
5883
|
OpenBook: OpenBook,
|
|
5864
5884
|
Out: Out,
|
|
5865
|
-
OpenEye:
|
|
5885
|
+
OpenEye: OpenEye,
|
|
5866
5886
|
PasswordLock: PasswordLock,
|
|
5867
5887
|
Pause: Pause,
|
|
5868
5888
|
PeopleAnalytics: PeopleAnalytics,
|
|
@@ -8219,7 +8239,9 @@ var SelectOption = function SelectOption(_ref37) {
|
|
|
8219
8239
|
allowDeselect = _ref37$allowDeselect === void 0 ? true : _ref37$allowDeselect,
|
|
8220
8240
|
titleRightNode = _ref37.titleRightNode,
|
|
8221
8241
|
_ref37$dropDownPositi = _ref37.dropDownPosition,
|
|
8222
|
-
dropDownPosition = _ref37$dropDownPositi === void 0 ? 'left' : _ref37$dropDownPositi
|
|
8242
|
+
dropDownPosition = _ref37$dropDownPositi === void 0 ? 'left' : _ref37$dropDownPositi,
|
|
8243
|
+
_ref37$allowCustomVal = _ref37.allowCustomValue,
|
|
8244
|
+
allowCustomValue = _ref37$allowCustomVal === void 0 ? false : _ref37$allowCustomVal;
|
|
8223
8245
|
var themeColors = useTheme();
|
|
8224
8246
|
var _useState = React.useState(false),
|
|
8225
8247
|
dropUp = _useState[0],
|
|
@@ -8230,7 +8252,7 @@ var SelectOption = function SelectOption(_ref37) {
|
|
|
8230
8252
|
var _useState3 = React.useState(''),
|
|
8231
8253
|
searchTerm = _useState3[0],
|
|
8232
8254
|
setSearchTerm = _useState3[1];
|
|
8233
|
-
var showSearchBox = searchBox && options.length > 5;
|
|
8255
|
+
var showSearchBox = searchBox && (options.length > 5 || allowCustomValue);
|
|
8234
8256
|
var toggleDropdown = function toggleDropdown() {
|
|
8235
8257
|
var refToUse = (positionRef === null || positionRef === void 0 ? void 0 : positionRef.current) || dropdownRef.current;
|
|
8236
8258
|
if (refToUse) {
|
|
@@ -8278,6 +8300,21 @@ var SelectOption = function SelectOption(_ref37) {
|
|
|
8278
8300
|
var filteredOptions = searchTerm ? options.filter(function (option) {
|
|
8279
8301
|
return option.label.toLowerCase().includes(searchTerm.toLowerCase());
|
|
8280
8302
|
}) : options;
|
|
8303
|
+
var normalizedSearch = searchTerm.trim();
|
|
8304
|
+
var isCustomValue = allowCustomValue && normalizedSearch.length > 0 && !options.some(function (opt) {
|
|
8305
|
+
return opt.label.toLowerCase() === normalizedSearch.toLowerCase();
|
|
8306
|
+
});
|
|
8307
|
+
var handleCustomValueSelect = function handleCustomValueSelect() {
|
|
8308
|
+
var Event = {
|
|
8309
|
+
target: {
|
|
8310
|
+
value: normalizedSearch,
|
|
8311
|
+
name: title
|
|
8312
|
+
}
|
|
8313
|
+
};
|
|
8314
|
+
onChange(Event);
|
|
8315
|
+
setIsOpen(false);
|
|
8316
|
+
setSearchTerm('');
|
|
8317
|
+
};
|
|
8281
8318
|
React.useEffect(function () {
|
|
8282
8319
|
var handleClickOutside = function handleClickOutside(event) {
|
|
8283
8320
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
@@ -8367,7 +8404,10 @@ var SelectOption = function SelectOption(_ref37) {
|
|
|
8367
8404
|
placeholder: placeholderText,
|
|
8368
8405
|
"$inputColor": inputColor,
|
|
8369
8406
|
"$placeholderColor": placeholderColor
|
|
8370
|
-
})), React__default.createElement(OptionsWrapper, null,
|
|
8407
|
+
})), React__default.createElement(OptionsWrapper, null, isCustomValue && React__default.createElement(Options, {
|
|
8408
|
+
"$optionSelected": false,
|
|
8409
|
+
onClick: handleCustomValueSelect
|
|
8410
|
+
}, "Add \"", normalizedSearch, "\""), filteredOptions.length ? filteredOptions.map(function (option) {
|
|
8371
8411
|
return React__default.createElement(Options, {
|
|
8372
8412
|
key: option.value,
|
|
8373
8413
|
"$optionColor": optionColor,
|
|
@@ -8379,7 +8419,7 @@ var SelectOption = function SelectOption(_ref37) {
|
|
|
8379
8419
|
},
|
|
8380
8420
|
"$optionSelected": option.value === value
|
|
8381
8421
|
}, option.label);
|
|
8382
|
-
}) : React__default.createElement(NoOptions, null, NoOptionsText)))));
|
|
8422
|
+
}) : !isCustomValue && React__default.createElement(NoOptions, null, NoOptionsText)))));
|
|
8383
8423
|
};
|
|
8384
8424
|
|
|
8385
8425
|
var ButtonDropdown = function ButtonDropdown(_ref) {
|
|
@@ -9454,6 +9494,7 @@ var CheckBox = function CheckBox(_ref11) {
|
|
|
9454
9494
|
"$fontSize": fontSize,
|
|
9455
9495
|
"$color": color || themeColors.vms.text.medium,
|
|
9456
9496
|
"$fontWeight": fontWeight,
|
|
9497
|
+
"$textAlign": 'start',
|
|
9457
9498
|
onClick: function onClick() {
|
|
9458
9499
|
if (!disabled) _onChange(!checked);
|
|
9459
9500
|
}
|