@lanaco/lnc-react-ui 2.1.25 → 2.1.28
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/index.esm.js +42 -20
- package/lib/index.js +42 -20
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -49341,9 +49341,11 @@ var TableView = function TableView(props) {
|
|
|
49341
49341
|
|
|
49342
49342
|
var renderBodyCell = function renderBodyCell(dataItem, def, rowIndex, cellIndex) {
|
|
49343
49343
|
var tabIndex = rowIndex * Columns.length + cellIndex + 50;
|
|
49344
|
-
|
|
49344
|
+
|
|
49345
|
+
var onClick = function onClick() {
|
|
49345
49346
|
ChangeToFormView(dataItem);
|
|
49346
|
-
}
|
|
49347
|
+
};
|
|
49348
|
+
|
|
49347
49349
|
if (!EnableFormView) onClick = function onClick() {};
|
|
49348
49350
|
if (!EnableSelection || ReadOnly) onClick = function onClick() {};
|
|
49349
49351
|
|
|
@@ -52287,32 +52289,42 @@ var heightBySize$3 = function heightBySize(size) {
|
|
|
52287
52289
|
};
|
|
52288
52290
|
|
|
52289
52291
|
var Container$9 = newStyled.div(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n display: inline-block;\n box-sizing: border-box;\n"])));
|
|
52290
|
-
var Inner$3 = newStyled.div(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n flex-direction: row;\n border: 0.0625rem solid #bfbfbf80;\n font-family: ", ";\n font-size: ", ";\n padding: 0;\n margin: 0;\n border-radius: 0.5rem;\n cursor:
|
|
52292
|
+
var Inner$3 = newStyled.div(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n flex-direction: row;\n border: 0.0625rem solid #bfbfbf80;\n font-family: ", ";\n font-size: ", ";\n padding: 0;\n margin: 0;\n border-radius: 0.5rem;\n cursor: ", ";\n\n min-height: ", ";\n max-height: ", ";\n"])), function (props) {
|
|
52291
52293
|
return props.theme.typography.fontFamily;
|
|
52292
52294
|
}, function (props) {
|
|
52293
52295
|
return props.theme.typography[props.size].fontSize;
|
|
52296
|
+
}, function (props) {
|
|
52297
|
+
return props.disabled ? "default" : "pointer";
|
|
52294
52298
|
}, function (props) {
|
|
52295
52299
|
return heightBySize$3(props.size);
|
|
52296
52300
|
}, function (props) {
|
|
52297
52301
|
return heightBySize$3(props.size);
|
|
52298
52302
|
});
|
|
52299
52303
|
var TextSpan$1 = newStyled.span(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteral([""])));
|
|
52300
|
-
var Text$1 = newStyled.div(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteral(["\n flex: 1;\n\n padding: ", ";\n transition: all 250ms ease;\n border-radius: 0.5rem 0 0 0.5rem;\n white-space: pre;\n flex-grow: 10;\n height: 100%;\n background-color: ", ";\n\n color: ", ";\n"])), function (props) {
|
|
52304
|
+
var Text$1 = newStyled.div(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteral(["\n flex: 1;\n\n padding: ", ";\n transition: all 250ms ease;\n border-radius: 0.5rem 0 0 0.5rem;\n white-space: pre;\n flex-grow: 10;\n height: 100%;\n opacity: ", ";\n background-color: ", ";\n\n color: ", ";\n"])), function (props) {
|
|
52301
52305
|
return paddingBySize$4(props.size);
|
|
52306
|
+
}, function (props) {
|
|
52307
|
+
return props.disabled ? "0.6" : "1";
|
|
52302
52308
|
}, function (props) {
|
|
52303
52309
|
return props.inactive ? props.theme.palette.gray[900] : props.theme.palette.primary.main;
|
|
52304
52310
|
}, function (props) {
|
|
52305
52311
|
return props.theme.palette.primary.text;
|
|
52306
52312
|
});
|
|
52307
|
-
var AdditionalInfo = newStyled.div(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteral(["\n padding: ", ";\n transition: all 250ms ease;\n white-space: pre;\n flex-grow: 10;\n height: 100%;\n background-color: ", ";\n\n color: ", ";\n"])), function (props) {
|
|
52313
|
+
var AdditionalInfo = newStyled.div(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteral(["\n padding: ", ";\n transition: all 250ms ease;\n white-space: pre;\n flex-grow: 10;\n height: 100%;\n opacity: ", ";\n background-color: ", ";\n\n color: ", ";\n"])), function (props) {
|
|
52308
52314
|
return paddingBySize$4(props.size);
|
|
52315
|
+
}, function (props) {
|
|
52316
|
+
return props.disabled ? "0.6" : "1";
|
|
52309
52317
|
}, function (props) {
|
|
52310
52318
|
return props.inactive ? props.theme.palette.gray[100] : props.theme.palette.primary.lighter;
|
|
52311
52319
|
}, function (props) {
|
|
52312
52320
|
return props.theme.palette.primary.textDark;
|
|
52313
52321
|
});
|
|
52314
|
-
var ButtonContainer$1 = newStyled.div(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteral(["\n display: inline;\n cursor:
|
|
52322
|
+
var ButtonContainer$1 = newStyled.div(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteral(["\n display: inline;\n cursor: ", ";\n padding: ", ";\n transition: all 250ms ease;\n border-radius: 0 0.5rem 0.5rem 0;\n // flex-grow: 0;\n align-self: flex-end;\n margin-left: auto;\n height: 100%;\n opacity: ", ";\n background-color: ", ";\n\n color: ", ";\n\n & i {\n font-size: ", ";\n }\n"])), function (props) {
|
|
52323
|
+
return props.disabled ? "default" : "pointer";
|
|
52324
|
+
}, function (props) {
|
|
52315
52325
|
return paddingBySize$4(props.size);
|
|
52326
|
+
}, function (props) {
|
|
52327
|
+
return props.disabled ? "0.6" : "1";
|
|
52316
52328
|
}, function (props) {
|
|
52317
52329
|
return getBtnContainerColor(props);
|
|
52318
52330
|
}, function (props) {
|
|
@@ -52357,7 +52369,8 @@ var Chip = function Chip(props) {
|
|
|
52357
52369
|
additional: additionalInfo && additionalInfo !== "",
|
|
52358
52370
|
onClick: function onClick() {
|
|
52359
52371
|
return onRemove(id);
|
|
52360
|
-
}
|
|
52372
|
+
},
|
|
52373
|
+
disabled: disabled
|
|
52361
52374
|
}), /*#__PURE__*/React__default.createElement("i", {
|
|
52362
52375
|
className: "fas fa-times"
|
|
52363
52376
|
}))));
|
|
@@ -52438,16 +52451,18 @@ var Inner$2 = newStyled.div(_templateObject6$1 || (_templateObject6$1 = _taggedT
|
|
|
52438
52451
|
var SearchIcon = newStyled.div(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteral(["\n padding: ", ";\n color: ", ";\n font-size: ", ";\n background-color: whitesmoke;\n transition: all 250ms ease;\n"])), function (props) {
|
|
52439
52452
|
return iconPaddingBySize$1(props.size);
|
|
52440
52453
|
}, function (props) {
|
|
52441
|
-
return props.theme.palette[props.color].main;
|
|
52454
|
+
return props.disabled ? props.theme.palette.gray[800] : props.theme.palette[props.color].main;
|
|
52442
52455
|
}, function (props) {
|
|
52443
52456
|
return getIconFontSize$1(props);
|
|
52444
52457
|
});
|
|
52445
|
-
var ClearIcon$1 = newStyled.div(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteral(["\n padding: ", ";\n color: ", ";\n font-size: ", ";\n background-color: whitesmoke;\n transition: all 250ms ease;\n cursor:
|
|
52458
|
+
var ClearIcon$1 = newStyled.div(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteral(["\n padding: ", ";\n color: ", ";\n font-size: ", ";\n background-color: whitesmoke;\n transition: all 250ms ease;\n cursor: ", ";\n margin-right: 0;\n margin-left: auto;\n"])), function (props) {
|
|
52446
52459
|
return iconPaddingBySize$1(props.size);
|
|
52447
52460
|
}, function (props) {
|
|
52448
|
-
return props.theme.palette[props.color].main;
|
|
52461
|
+
return props.disabled ? props.theme.palette.gray[800] : props.theme.palette[props.color].main;
|
|
52449
52462
|
}, function (props) {
|
|
52450
52463
|
return getIconFontSize$1(props);
|
|
52464
|
+
}, function (props) {
|
|
52465
|
+
return props.disabled ? "default" : "pointer";
|
|
52451
52466
|
});
|
|
52452
52467
|
var Content$2 = newStyled.div(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteral(["\n position: absolute;\n background-color: white;\n z-index: 1;\n margin-top: 0.25rem;\n padding: 0.1875rem;\n width: calc(100% - 0.625rem);\n border-radius: 0.15625rem;\n box-shadow: 0 0 0.375rem #bebebe;\n border: 0.125rem solid ", ";\n display: flex;\n flex-direction: column;\n transition: all 250ms ease;\n"])), function (props) {
|
|
52453
52468
|
return props.theme.palette[props.color].main;
|
|
@@ -52469,6 +52484,7 @@ var SearchBar = function SearchBar(props) {
|
|
|
52469
52484
|
suggestions = props.suggestions,
|
|
52470
52485
|
onChange = props.onChange,
|
|
52471
52486
|
id = props.id,
|
|
52487
|
+
disabled = props.disabled,
|
|
52472
52488
|
className = props.className,
|
|
52473
52489
|
size = props.size,
|
|
52474
52490
|
color = props.color,
|
|
@@ -52582,7 +52598,9 @@ var SearchBar = function SearchBar(props) {
|
|
|
52582
52598
|
|
|
52583
52599
|
return /*#__PURE__*/React__default.createElement(Container$8, _extends({
|
|
52584
52600
|
className: className
|
|
52585
|
-
}, themeProps), /*#__PURE__*/React__default.createElement(Inner$2, themeProps, /*#__PURE__*/React__default.createElement(SearchIcon,
|
|
52601
|
+
}, themeProps), /*#__PURE__*/React__default.createElement(Inner$2, themeProps, /*#__PURE__*/React__default.createElement(SearchIcon, _extends({}, themeProps, {
|
|
52602
|
+
disabled: disabled
|
|
52603
|
+
}), /*#__PURE__*/React__default.createElement("i", {
|
|
52586
52604
|
className: "fas fa-search fa-fw"
|
|
52587
52605
|
})), /*#__PURE__*/React__default.createElement(ItemContainer$1, themeProps, /*#__PURE__*/React__default.createElement(TransitionGroup$1, {
|
|
52588
52606
|
component: null
|
|
@@ -52601,28 +52619,33 @@ var SearchBar = function SearchBar(props) {
|
|
|
52601
52619
|
additionalInfo: x.value,
|
|
52602
52620
|
inactive: !x.active,
|
|
52603
52621
|
onRemove: function onRemove() {
|
|
52604
|
-
return handleRemoveItem(key);
|
|
52622
|
+
return disabled ? {} : handleRemoveItem(key);
|
|
52605
52623
|
},
|
|
52606
52624
|
onClick: function onClick() {
|
|
52607
|
-
return handleActiveInactive(key);
|
|
52608
|
-
}
|
|
52625
|
+
return disabled ? {} : handleActiveInactive(key);
|
|
52626
|
+
},
|
|
52627
|
+
disabled: disabled
|
|
52609
52628
|
}))));
|
|
52610
52629
|
})), /*#__PURE__*/React__default.createElement(InputContainer$1, themeProps, /*#__PURE__*/React__default.createElement(Input$1, _extends({}, themeProps, {
|
|
52611
52630
|
ref: InputRef,
|
|
52612
52631
|
value: value,
|
|
52613
52632
|
onBlur: onInputBlur,
|
|
52614
52633
|
onChange: onInputChange,
|
|
52615
|
-
onKeyDown: onKeyDown
|
|
52616
|
-
|
|
52634
|
+
onKeyDown: onKeyDown,
|
|
52635
|
+
disabled: disabled
|
|
52636
|
+
})))), /*#__PURE__*/React__default.createElement(ClearIcon$1, _extends({}, themeProps, {
|
|
52637
|
+
disabled: disabled
|
|
52638
|
+
}), /*#__PURE__*/React__default.createElement("i", {
|
|
52617
52639
|
className: "fas fa-times fa-fw",
|
|
52618
52640
|
onClick: function onClick() {
|
|
52619
|
-
return onChange(id, []);
|
|
52641
|
+
return disabled ? {} : onChange(id, []);
|
|
52620
52642
|
}
|
|
52621
52643
|
}))), renderSuggestions());
|
|
52622
52644
|
};
|
|
52623
52645
|
|
|
52624
52646
|
SearchBar.defaultProps = {
|
|
52625
52647
|
id: "",
|
|
52648
|
+
disabled: false,
|
|
52626
52649
|
onChange: function onChange() {},
|
|
52627
52650
|
items: [],
|
|
52628
52651
|
suggestions: [],
|
|
@@ -52634,6 +52657,7 @@ SearchBar.defaultProps = {
|
|
|
52634
52657
|
SearchBar.propTypes = {
|
|
52635
52658
|
theme: PropTypes.object.isRequired,
|
|
52636
52659
|
id: PropTypes.any,
|
|
52660
|
+
disabled: PropTypes.bool,
|
|
52637
52661
|
onChange: PropTypes.func,
|
|
52638
52662
|
className: PropTypes.string,
|
|
52639
52663
|
items: PropTypes.array,
|
|
@@ -53177,14 +53201,12 @@ var heightBySize = function heightBySize(size) {
|
|
|
53177
53201
|
};
|
|
53178
53202
|
|
|
53179
53203
|
var Container$2 = newStyled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n display: inline-block;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n"])));
|
|
53180
|
-
var Inner$1 = newStyled.div(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n flex-direction: row;\n font-family: ", ";\n font-size: ", ";\n padding: 0;\n margin: 0;\n border-radius: 0.5rem;\n\n min-height: ", ";\n
|
|
53204
|
+
var Inner$1 = newStyled.div(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n flex-direction: row;\n font-family: ", ";\n font-size: ", ";\n padding: 0;\n margin: 0;\n border-radius: 0.5rem;\n\n min-height: ", ";\n"])), function (props) {
|
|
53181
53205
|
return props.theme.typography.fontFamily;
|
|
53182
53206
|
}, function (props) {
|
|
53183
53207
|
return props.theme.typography[props.size].fontSize;
|
|
53184
53208
|
}, function (props) {
|
|
53185
53209
|
return heightBySize(props.size);
|
|
53186
|
-
}, function (props) {
|
|
53187
|
-
return heightBySize(props.size);
|
|
53188
53210
|
});
|
|
53189
53211
|
var TextSpan = newStyled.span(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral([""])));
|
|
53190
53212
|
var Text = newStyled.div(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n flex: 1;\n\n padding: ", ";\n transition: all 250ms ease;\n border-radius: 0.2rem 0 0 0.2rem;\n white-space: pre;\n flex-grow: 10;\n height: 100%;\n background-color: ", ";\n color: ", ";\n"])), function (props) {
|
package/lib/index.js
CHANGED
|
@@ -49382,9 +49382,11 @@ var TableView = function TableView(props) {
|
|
|
49382
49382
|
|
|
49383
49383
|
var renderBodyCell = function renderBodyCell(dataItem, def, rowIndex, cellIndex) {
|
|
49384
49384
|
var tabIndex = rowIndex * Columns.length + cellIndex + 50;
|
|
49385
|
-
|
|
49385
|
+
|
|
49386
|
+
var onClick = function onClick() {
|
|
49386
49387
|
ChangeToFormView(dataItem);
|
|
49387
|
-
}
|
|
49388
|
+
};
|
|
49389
|
+
|
|
49388
49390
|
if (!EnableFormView) onClick = function onClick() {};
|
|
49389
49391
|
if (!EnableSelection || ReadOnly) onClick = function onClick() {};
|
|
49390
49392
|
|
|
@@ -52328,32 +52330,42 @@ var heightBySize$3 = function heightBySize(size) {
|
|
|
52328
52330
|
};
|
|
52329
52331
|
|
|
52330
52332
|
var Container$9 = newStyled.div(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral__default['default'](["\n display: inline-block;\n box-sizing: border-box;\n"])));
|
|
52331
|
-
var Inner$3 = newStyled.div(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral__default['default'](["\n display: flex;\n align-items: flex-start;\n flex-direction: row;\n border: 0.0625rem solid #bfbfbf80;\n font-family: ", ";\n font-size: ", ";\n padding: 0;\n margin: 0;\n border-radius: 0.5rem;\n cursor:
|
|
52333
|
+
var Inner$3 = newStyled.div(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral__default['default'](["\n display: flex;\n align-items: flex-start;\n flex-direction: row;\n border: 0.0625rem solid #bfbfbf80;\n font-family: ", ";\n font-size: ", ";\n padding: 0;\n margin: 0;\n border-radius: 0.5rem;\n cursor: ", ";\n\n min-height: ", ";\n max-height: ", ";\n"])), function (props) {
|
|
52332
52334
|
return props.theme.typography.fontFamily;
|
|
52333
52335
|
}, function (props) {
|
|
52334
52336
|
return props.theme.typography[props.size].fontSize;
|
|
52337
|
+
}, function (props) {
|
|
52338
|
+
return props.disabled ? "default" : "pointer";
|
|
52335
52339
|
}, function (props) {
|
|
52336
52340
|
return heightBySize$3(props.size);
|
|
52337
52341
|
}, function (props) {
|
|
52338
52342
|
return heightBySize$3(props.size);
|
|
52339
52343
|
});
|
|
52340
52344
|
var TextSpan$1 = newStyled.span(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteral__default['default']([""])));
|
|
52341
|
-
var Text$1 = newStyled.div(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteral__default['default'](["\n flex: 1;\n\n padding: ", ";\n transition: all 250ms ease;\n border-radius: 0.5rem 0 0 0.5rem;\n white-space: pre;\n flex-grow: 10;\n height: 100%;\n background-color: ", ";\n\n color: ", ";\n"])), function (props) {
|
|
52345
|
+
var Text$1 = newStyled.div(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteral__default['default'](["\n flex: 1;\n\n padding: ", ";\n transition: all 250ms ease;\n border-radius: 0.5rem 0 0 0.5rem;\n white-space: pre;\n flex-grow: 10;\n height: 100%;\n opacity: ", ";\n background-color: ", ";\n\n color: ", ";\n"])), function (props) {
|
|
52342
52346
|
return paddingBySize$4(props.size);
|
|
52347
|
+
}, function (props) {
|
|
52348
|
+
return props.disabled ? "0.6" : "1";
|
|
52343
52349
|
}, function (props) {
|
|
52344
52350
|
return props.inactive ? props.theme.palette.gray[900] : props.theme.palette.primary.main;
|
|
52345
52351
|
}, function (props) {
|
|
52346
52352
|
return props.theme.palette.primary.text;
|
|
52347
52353
|
});
|
|
52348
|
-
var AdditionalInfo = newStyled.div(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteral__default['default'](["\n padding: ", ";\n transition: all 250ms ease;\n white-space: pre;\n flex-grow: 10;\n height: 100%;\n background-color: ", ";\n\n color: ", ";\n"])), function (props) {
|
|
52354
|
+
var AdditionalInfo = newStyled.div(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteral__default['default'](["\n padding: ", ";\n transition: all 250ms ease;\n white-space: pre;\n flex-grow: 10;\n height: 100%;\n opacity: ", ";\n background-color: ", ";\n\n color: ", ";\n"])), function (props) {
|
|
52349
52355
|
return paddingBySize$4(props.size);
|
|
52356
|
+
}, function (props) {
|
|
52357
|
+
return props.disabled ? "0.6" : "1";
|
|
52350
52358
|
}, function (props) {
|
|
52351
52359
|
return props.inactive ? props.theme.palette.gray[100] : props.theme.palette.primary.lighter;
|
|
52352
52360
|
}, function (props) {
|
|
52353
52361
|
return props.theme.palette.primary.textDark;
|
|
52354
52362
|
});
|
|
52355
|
-
var ButtonContainer$1 = newStyled.div(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteral__default['default'](["\n display: inline;\n cursor:
|
|
52363
|
+
var ButtonContainer$1 = newStyled.div(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteral__default['default'](["\n display: inline;\n cursor: ", ";\n padding: ", ";\n transition: all 250ms ease;\n border-radius: 0 0.5rem 0.5rem 0;\n // flex-grow: 0;\n align-self: flex-end;\n margin-left: auto;\n height: 100%;\n opacity: ", ";\n background-color: ", ";\n\n color: ", ";\n\n & i {\n font-size: ", ";\n }\n"])), function (props) {
|
|
52364
|
+
return props.disabled ? "default" : "pointer";
|
|
52365
|
+
}, function (props) {
|
|
52356
52366
|
return paddingBySize$4(props.size);
|
|
52367
|
+
}, function (props) {
|
|
52368
|
+
return props.disabled ? "0.6" : "1";
|
|
52357
52369
|
}, function (props) {
|
|
52358
52370
|
return getBtnContainerColor(props);
|
|
52359
52371
|
}, function (props) {
|
|
@@ -52398,7 +52410,8 @@ var Chip = function Chip(props) {
|
|
|
52398
52410
|
additional: additionalInfo && additionalInfo !== "",
|
|
52399
52411
|
onClick: function onClick() {
|
|
52400
52412
|
return onRemove(id);
|
|
52401
|
-
}
|
|
52413
|
+
},
|
|
52414
|
+
disabled: disabled
|
|
52402
52415
|
}), /*#__PURE__*/React__default['default'].createElement("i", {
|
|
52403
52416
|
className: "fas fa-times"
|
|
52404
52417
|
}))));
|
|
@@ -52479,16 +52492,18 @@ var Inner$2 = newStyled.div(_templateObject6$1 || (_templateObject6$1 = _taggedT
|
|
|
52479
52492
|
var SearchIcon = newStyled.div(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteral__default['default'](["\n padding: ", ";\n color: ", ";\n font-size: ", ";\n background-color: whitesmoke;\n transition: all 250ms ease;\n"])), function (props) {
|
|
52480
52493
|
return iconPaddingBySize$1(props.size);
|
|
52481
52494
|
}, function (props) {
|
|
52482
|
-
return props.theme.palette[props.color].main;
|
|
52495
|
+
return props.disabled ? props.theme.palette.gray[800] : props.theme.palette[props.color].main;
|
|
52483
52496
|
}, function (props) {
|
|
52484
52497
|
return getIconFontSize$1(props);
|
|
52485
52498
|
});
|
|
52486
|
-
var ClearIcon$1 = newStyled.div(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteral__default['default'](["\n padding: ", ";\n color: ", ";\n font-size: ", ";\n background-color: whitesmoke;\n transition: all 250ms ease;\n cursor:
|
|
52499
|
+
var ClearIcon$1 = newStyled.div(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteral__default['default'](["\n padding: ", ";\n color: ", ";\n font-size: ", ";\n background-color: whitesmoke;\n transition: all 250ms ease;\n cursor: ", ";\n margin-right: 0;\n margin-left: auto;\n"])), function (props) {
|
|
52487
52500
|
return iconPaddingBySize$1(props.size);
|
|
52488
52501
|
}, function (props) {
|
|
52489
|
-
return props.theme.palette[props.color].main;
|
|
52502
|
+
return props.disabled ? props.theme.palette.gray[800] : props.theme.palette[props.color].main;
|
|
52490
52503
|
}, function (props) {
|
|
52491
52504
|
return getIconFontSize$1(props);
|
|
52505
|
+
}, function (props) {
|
|
52506
|
+
return props.disabled ? "default" : "pointer";
|
|
52492
52507
|
});
|
|
52493
52508
|
var Content$2 = newStyled.div(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteral__default['default'](["\n position: absolute;\n background-color: white;\n z-index: 1;\n margin-top: 0.25rem;\n padding: 0.1875rem;\n width: calc(100% - 0.625rem);\n border-radius: 0.15625rem;\n box-shadow: 0 0 0.375rem #bebebe;\n border: 0.125rem solid ", ";\n display: flex;\n flex-direction: column;\n transition: all 250ms ease;\n"])), function (props) {
|
|
52494
52509
|
return props.theme.palette[props.color].main;
|
|
@@ -52510,6 +52525,7 @@ var SearchBar = function SearchBar(props) {
|
|
|
52510
52525
|
suggestions = props.suggestions,
|
|
52511
52526
|
onChange = props.onChange,
|
|
52512
52527
|
id = props.id,
|
|
52528
|
+
disabled = props.disabled,
|
|
52513
52529
|
className = props.className,
|
|
52514
52530
|
size = props.size,
|
|
52515
52531
|
color = props.color,
|
|
@@ -52623,7 +52639,9 @@ var SearchBar = function SearchBar(props) {
|
|
|
52623
52639
|
|
|
52624
52640
|
return /*#__PURE__*/React__default['default'].createElement(Container$8, _extends__default['default']({
|
|
52625
52641
|
className: className
|
|
52626
|
-
}, themeProps), /*#__PURE__*/React__default['default'].createElement(Inner$2, themeProps, /*#__PURE__*/React__default['default'].createElement(SearchIcon,
|
|
52642
|
+
}, themeProps), /*#__PURE__*/React__default['default'].createElement(Inner$2, themeProps, /*#__PURE__*/React__default['default'].createElement(SearchIcon, _extends__default['default']({}, themeProps, {
|
|
52643
|
+
disabled: disabled
|
|
52644
|
+
}), /*#__PURE__*/React__default['default'].createElement("i", {
|
|
52627
52645
|
className: "fas fa-search fa-fw"
|
|
52628
52646
|
})), /*#__PURE__*/React__default['default'].createElement(ItemContainer$1, themeProps, /*#__PURE__*/React__default['default'].createElement(TransitionGroup$1, {
|
|
52629
52647
|
component: null
|
|
@@ -52642,28 +52660,33 @@ var SearchBar = function SearchBar(props) {
|
|
|
52642
52660
|
additionalInfo: x.value,
|
|
52643
52661
|
inactive: !x.active,
|
|
52644
52662
|
onRemove: function onRemove() {
|
|
52645
|
-
return handleRemoveItem(key);
|
|
52663
|
+
return disabled ? {} : handleRemoveItem(key);
|
|
52646
52664
|
},
|
|
52647
52665
|
onClick: function onClick() {
|
|
52648
|
-
return handleActiveInactive(key);
|
|
52649
|
-
}
|
|
52666
|
+
return disabled ? {} : handleActiveInactive(key);
|
|
52667
|
+
},
|
|
52668
|
+
disabled: disabled
|
|
52650
52669
|
}))));
|
|
52651
52670
|
})), /*#__PURE__*/React__default['default'].createElement(InputContainer$1, themeProps, /*#__PURE__*/React__default['default'].createElement(Input$1, _extends__default['default']({}, themeProps, {
|
|
52652
52671
|
ref: InputRef,
|
|
52653
52672
|
value: value,
|
|
52654
52673
|
onBlur: onInputBlur,
|
|
52655
52674
|
onChange: onInputChange,
|
|
52656
|
-
onKeyDown: onKeyDown
|
|
52657
|
-
|
|
52675
|
+
onKeyDown: onKeyDown,
|
|
52676
|
+
disabled: disabled
|
|
52677
|
+
})))), /*#__PURE__*/React__default['default'].createElement(ClearIcon$1, _extends__default['default']({}, themeProps, {
|
|
52678
|
+
disabled: disabled
|
|
52679
|
+
}), /*#__PURE__*/React__default['default'].createElement("i", {
|
|
52658
52680
|
className: "fas fa-times fa-fw",
|
|
52659
52681
|
onClick: function onClick() {
|
|
52660
|
-
return onChange(id, []);
|
|
52682
|
+
return disabled ? {} : onChange(id, []);
|
|
52661
52683
|
}
|
|
52662
52684
|
}))), renderSuggestions());
|
|
52663
52685
|
};
|
|
52664
52686
|
|
|
52665
52687
|
SearchBar.defaultProps = {
|
|
52666
52688
|
id: "",
|
|
52689
|
+
disabled: false,
|
|
52667
52690
|
onChange: function onChange() {},
|
|
52668
52691
|
items: [],
|
|
52669
52692
|
suggestions: [],
|
|
@@ -52675,6 +52698,7 @@ SearchBar.defaultProps = {
|
|
|
52675
52698
|
SearchBar.propTypes = {
|
|
52676
52699
|
theme: PropTypes__default['default'].object.isRequired,
|
|
52677
52700
|
id: PropTypes__default['default'].any,
|
|
52701
|
+
disabled: PropTypes__default['default'].bool,
|
|
52678
52702
|
onChange: PropTypes__default['default'].func,
|
|
52679
52703
|
className: PropTypes__default['default'].string,
|
|
52680
52704
|
items: PropTypes__default['default'].array,
|
|
@@ -53218,14 +53242,12 @@ var heightBySize = function heightBySize(size) {
|
|
|
53218
53242
|
};
|
|
53219
53243
|
|
|
53220
53244
|
var Container$2 = newStyled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral__default['default'](["\n display: inline-block;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n"])));
|
|
53221
|
-
var Inner$1 = newStyled.div(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral__default['default'](["\n display: flex;\n align-items: flex-start;\n flex-direction: row;\n font-family: ", ";\n font-size: ", ";\n padding: 0;\n margin: 0;\n border-radius: 0.5rem;\n\n min-height: ", ";\n
|
|
53245
|
+
var Inner$1 = newStyled.div(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral__default['default'](["\n display: flex;\n align-items: flex-start;\n flex-direction: row;\n font-family: ", ";\n font-size: ", ";\n padding: 0;\n margin: 0;\n border-radius: 0.5rem;\n\n min-height: ", ";\n"])), function (props) {
|
|
53222
53246
|
return props.theme.typography.fontFamily;
|
|
53223
53247
|
}, function (props) {
|
|
53224
53248
|
return props.theme.typography[props.size].fontSize;
|
|
53225
53249
|
}, function (props) {
|
|
53226
53250
|
return heightBySize(props.size);
|
|
53227
|
-
}, function (props) {
|
|
53228
|
-
return heightBySize(props.size);
|
|
53229
53251
|
});
|
|
53230
53252
|
var TextSpan = newStyled.span(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral__default['default']([""])));
|
|
53231
53253
|
var Text = newStyled.div(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral__default['default'](["\n flex: 1;\n\n padding: ", ";\n transition: all 250ms ease;\n border-radius: 0.2rem 0 0 0.2rem;\n white-space: pre;\n flex-grow: 10;\n height: 100%;\n background-color: ", ";\n color: ", ";\n"])), function (props) {
|