@linzjs/lui 16.0.1 → 16.2.0
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/CHANGELOG.md +21 -0
- package/README.md +2 -2
- package/dist/assets/icons/attach_file.svg +1 -1
- package/dist/assets/svg-content.tsx +1 -8
- package/dist/components/LuiFilterContainer/LuiFilterContainer.d.ts +1 -0
- package/dist/components/LuiFormElements/ClearableLuiTextInput/ClearableLuiTextInput.d.ts +3 -3
- package/dist/components/LuiIcon/LuiIcon.d.ts +2 -2
- package/dist/index.js +24 -8
- package/dist/index.js.map +1 -1
- package/dist/lui.css +2 -2
- package/dist/lui.esm.js +24 -8
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiFormElements/LuiTextInput/LuiTextInput.scss +1 -1
- package/package.json +1 -1
package/dist/lui.css
CHANGED
|
@@ -4933,12 +4933,12 @@ body.lui-menu-drawer-open {
|
|
|
4933
4933
|
cursor: not-allowed;
|
|
4934
4934
|
}
|
|
4935
4935
|
|
|
4936
|
-
.LuiTextInput-
|
|
4936
|
+
.LuiTextInput-iconPosition {
|
|
4937
4937
|
position: absolute;
|
|
4938
4938
|
right: 7px;
|
|
4939
4939
|
top: 17%;
|
|
4940
4940
|
}
|
|
4941
|
-
.LuiTextInput-
|
|
4941
|
+
.LuiTextInput-iconPosition svg {
|
|
4942
4942
|
fill: #6b6966;
|
|
4943
4943
|
}
|
|
4944
4944
|
|
package/dist/lui.esm.js
CHANGED
|
@@ -154,11 +154,7 @@ iconMap['ic_arrow_drop_up'] = (React__default.createElement("svg", { xmlns: "htt
|
|
|
154
154
|
iconMap['ic_arrow_forward_ios'] = (React__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
155
155
|
React__default.createElement("path", { d: "m5.93 4.125 2.156-2.109L18.07 12l-9.984 9.984-2.156-2.109L13.852 12z" })));
|
|
156
156
|
iconMap['ic_attach_file'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
157
|
-
React__default.createElement("
|
|
158
|
-
React__default.createElement("path", { d: "m19.571 10.586-8.132 8.132a3.999 3.999 0 0 1-5.657 0 3.999 3.999 0 0 1 0-5.657l8.84-8.84a2.501 2.501 0 0 1 3.535 3.536l-7.425 7.425a1.003 1.003 0 0 1-1.414 0 1.003 1.003 0 0 1 0-1.414l6.717-6.718-1.06-1.06-6.718 6.717a2.501 2.501 0 0 0 3.536 3.536l7.425-7.425a3.999 3.999 0 0 0 0-5.657 3.999 3.999 0 0 0-5.657 0L4.72 12a5.497 5.497 0 0 0 0 7.778 5.497 5.497 0 0 0 7.779 0l8.132-8.131-1.06-1.061Z" })),
|
|
159
|
-
React__default.createElement("defs", null,
|
|
160
|
-
React__default.createElement("clipPath", { id: "a" },
|
|
161
|
-
React__default.createElement("path", { d: "M0 0h24v24H0z" })))));
|
|
157
|
+
React__default.createElement("path", { d: "m19.571 10.586-8.132 8.132a3.999 3.999 0 0 1-5.657 0 3.999 3.999 0 0 1 0-5.657l8.84-8.84a2.501 2.501 0 0 1 3.535 3.536l-7.425 7.425a1.003 1.003 0 0 1-1.414 0 1.003 1.003 0 0 1 0-1.414l6.717-6.718-1.06-1.06-6.718 6.717a2.501 2.501 0 0 0 3.536 3.536l7.425-7.425a3.999 3.999 0 0 0 0-5.657 3.999 3.999 0 0 0-5.657 0L4.72 12a5.497 5.497 0 0 0 0 7.778 5.497 5.497 0 0 0 7.779 0l8.132-8.131-1.06-1.061Z" })));
|
|
162
158
|
iconMap['ic_attachment'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
163
159
|
React__default.createElement("path", { d: "M2.016 12.023c0-1.531.531-2.836 1.594-3.914C4.673 7.03 5.97 6.492 7.501 6.492h10.5c1.094 0 2.032.398 2.813 1.195.781.797 1.172 1.742 1.172 2.836 0 1.094-.39 2.032-1.172 2.813-.781.781-1.719 1.172-2.813 1.172H9.517a2.472 2.472 0 0 1-1.781-.727c-.5-.485-.75-1.07-.75-1.758 0-.687.25-1.281.75-1.781s1.094-.75 1.781-.75h7.5v2.016H9.423c-.281 0-.422.164-.422.492 0 .328.14.492.422.492h8.578c.531 0 1-.195 1.406-.586.406-.39.609-.852.609-1.383s-.203-1-.609-1.406c-.406-.406-.875-.61-1.406-.61h-10.5c-.969 0-1.797.345-2.484 1.032a3.386 3.386 0 0 0-1.031 2.484c0 .969.344 1.789 1.031 2.46a3.425 3.425 0 0 0 2.484 1.009h9.516v2.016H7.501c-1.531 0-2.828-.531-3.891-1.594-1.063-1.063-1.594-2.36-1.594-3.891Z" })));
|
|
164
160
|
iconMap['ic_blocked'] = (React__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
@@ -55808,6 +55804,23 @@ function setSelectedFirmCache(firmId, firmName) {
|
|
|
55808
55804
|
}
|
|
55809
55805
|
}
|
|
55810
55806
|
|
|
55807
|
+
var ClearableLuiTextInput = function (props) {
|
|
55808
|
+
var _a = useState(props.value ? props.value : ''), currentValue = _a[0], setCurrentValue = _a[1];
|
|
55809
|
+
var clear = function () {
|
|
55810
|
+
setCurrentValue('');
|
|
55811
|
+
if (props.onValueChange) {
|
|
55812
|
+
props.onValueChange('');
|
|
55813
|
+
}
|
|
55814
|
+
};
|
|
55815
|
+
var cancelIcon = currentValue !== '' ? (React__default.createElement(LuiIcon, { alt: "clear", name: "ic_cancel_clear", size: "lg", className: 'LuiTextInput-iconPosition', spanProps: { onClick: clear } })) : undefined;
|
|
55816
|
+
return (React__default.createElement(LuiTextInput, __assign({}, props, { icon: cancelIcon, value: currentValue, onChange: function (e) {
|
|
55817
|
+
setCurrentValue(e.target.value);
|
|
55818
|
+
if (props.onValueChange) {
|
|
55819
|
+
props.onValueChange(e.target.value);
|
|
55820
|
+
}
|
|
55821
|
+
} })));
|
|
55822
|
+
};
|
|
55823
|
+
|
|
55811
55824
|
/**
|
|
55812
55825
|
* Filters options and forwards to internal render function.
|
|
55813
55826
|
* has option for minimum elements to filter
|
|
@@ -55815,11 +55828,14 @@ function setSelectedFirmCache(firmId, firmName) {
|
|
|
55815
55828
|
* @constructor
|
|
55816
55829
|
*/
|
|
55817
55830
|
var LuiFilterContainer = function (props) {
|
|
55818
|
-
var renderFunction = props.renderFunction, filterFunction = props.filterFunction, _a = props.showFilter, showFilter = _a === void 0 ? true : _a;
|
|
55819
|
-
var
|
|
55831
|
+
var renderFunction = props.renderFunction, filterFunction = props.filterFunction, _a = props.showFilter, showFilter = _a === void 0 ? true : _a, _b = props.isFilterClearable, isFilterClearable = _b === void 0 ? true : _b;
|
|
55832
|
+
var _c = useState(''), filter = _c[0], setFilter = _c[1];
|
|
55820
55833
|
return (React__default.createElement("div", null,
|
|
55821
55834
|
showFilter && (React__default.createElement("div", { className: 'LuiFilterContainer-filter-container LuiDeprecatedForms' },
|
|
55822
|
-
React__default.createElement(
|
|
55835
|
+
isFilterClearable && (React__default.createElement(ClearableLuiTextInput, { label: 'Filter', inputProps: {
|
|
55836
|
+
placeholder: 'Type to filter',
|
|
55837
|
+
}, hideLabel: true, onValueChange: function (value) { return setFilter(value); } })),
|
|
55838
|
+
!isFilterClearable && (React__default.createElement("input", { type: "text", placeholder: "Type to filter", value: filter, onChange: function (e) { return setFilter(e.target.value); } })))),
|
|
55823
55839
|
renderFunction(filterFunction(filter))));
|
|
55824
55840
|
};
|
|
55825
55841
|
|