@luomus/laji-form 15.1.29 → 15.1.30
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/dist/styles.css
CHANGED
|
@@ -3150,6 +3150,9 @@ body .laji-form {
|
|
|
3150
3150
|
margin-top: 5px;
|
|
3151
3151
|
}
|
|
3152
3152
|
|
|
3153
|
+
.laji-form .autosuggest-input-addon {
|
|
3154
|
+
margin-bottom: 0px;
|
|
3155
|
+
}
|
|
3153
3156
|
.laji-form .autosuggest-input-addon.active {
|
|
3154
3157
|
color: #2980b9 !important;
|
|
3155
3158
|
}
|
|
@@ -3848,9 +3851,12 @@ body .laji-form {
|
|
|
3848
3851
|
font-size: 20px;
|
|
3849
3852
|
}
|
|
3850
3853
|
.laji-form-dropdown-caret {
|
|
3851
|
-
bottom: 2px;
|
|
3852
3854
|
position: absolute;
|
|
3853
3855
|
right: 3px;
|
|
3856
|
+
bottom: 0px;
|
|
3857
|
+
}
|
|
3858
|
+
.laji-form-dropdown-caret img {
|
|
3859
|
+
width: 20px;
|
|
3854
3860
|
}
|
|
3855
3861
|
|
|
3856
3862
|
.laji-form-multiselect-input-wrapper-focus {
|
|
@@ -3859,4 +3865,8 @@ body .laji-form {
|
|
|
3859
3865
|
.laji-form-multiselect-input-wrapper-readonly {
|
|
3860
3866
|
background-color: #eee;
|
|
3861
3867
|
}
|
|
3868
|
+
.laji-form-checkbox-buttons .btn {
|
|
3869
|
+
height: 25px;
|
|
3870
|
+
}
|
|
3871
|
+
|
|
3862
3872
|
|
|
@@ -112,14 +112,16 @@ class CheckboxWidget extends React.Component {
|
|
|
112
112
|
tabIndex: (toggleMode || _disabled) ? undefined : 0
|
|
113
113
|
};
|
|
114
114
|
const tabTargetClass = "laji-form-checkbox-widget-tab-target";
|
|
115
|
-
const checkbox = (React.createElement(ButtonToolbar, { className: utils_1.classNames(toggleMode && "desktop-layout") },
|
|
115
|
+
const checkbox = (React.createElement(ButtonToolbar, { className: utils_1.classNames("laji-form-checkbox-buttons", toggleMode && "desktop-layout") },
|
|
116
116
|
React.createElement(ToggleButtonGroup, Object.assign({ ref: this.groupRef, type: "radio", value: [_value], name: this.props.id, onChange: this.onButtonGroupChange, onKeyDown: this.onGroupKeyDown, className: utils_1.classNames(toggleMode && tabTargetClass) }, commonProps, { tabIndex: (toggleMode && !_disabled) ? 0 : undefined }),
|
|
117
117
|
React.createElement(ToggleButton, Object.assign({ id: `${id}-true`, ref: this.trueRef, value: true, onClick: toggleMode ? this.toggle : undefined, className: utils_1.classNames(toggleMode && _value === false && "laji-form-hide-btn-label", _value === true && tabTargetClass), onKeyDown: this.onTrueKeyDown }, commonProps), trueLabel),
|
|
118
118
|
React.createElement(ToggleButton, Object.assign({ id: `${id}-false`, ref: this.falseRef, value: false, onClick: toggleMode ? this.toggle : undefined, className: utils_1.classNames(toggleMode && _value === true && "laji-form-hide-btn-label", _value === false && tabTargetClass), onKeyDown: this.onFalseKeyDown }, commonProps), falseLabel),
|
|
119
119
|
(displayUndefined ?
|
|
120
120
|
React.createElement(ToggleButton, Object.assign({ id: `${id}-undefined`, ref: this.undefinedRef, value: "undefined", className: utils_1.classNames(value === undefined && tabTargetClass) }, commonProps, { onKeyDown: this.onUndefinedKeyDown }), unknownLabel) : null))));
|
|
121
121
|
const { Label } = this.props.formContext;
|
|
122
|
-
return !hasLabel ? checkbox :
|
|
122
|
+
return !hasLabel ? checkbox : React.createElement(React.Fragment, null,
|
|
123
|
+
React.createElement(Label, { label: label, required: required, uiSchema: options, contextId: this.props.formContext.contextId }),
|
|
124
|
+
checkbox);
|
|
123
125
|
}
|
|
124
126
|
formatValue(value, options, props) {
|
|
125
127
|
return value === undefined
|
|
@@ -308,7 +308,8 @@ const SelectedMultiValue = ({ children: enu, onDelete, readonly }) => {
|
|
|
308
308
|
React.createElement("span", { tabIndex: readonly ? undefined : 0, role: readonly ? undefined : "button", onClick: onDeleteClick }, "\u00D7")));
|
|
309
309
|
};
|
|
310
310
|
const Caret = ({ onFocus }) => React.createElement("div", { className: "laji-form-dropdown-caret-container", style: { position: "absolute", pointerEvents: "none" } },
|
|
311
|
-
React.createElement("span", { onFocus: onFocus, className: "laji-form-dropdown-caret" },
|
|
311
|
+
React.createElement("span", { onFocus: onFocus, className: "laji-form-dropdown-caret" },
|
|
312
|
+
React.createElement("img", { src: "https://cdn.laji.fi/images/icons/caret-down.svg" })));
|
|
312
313
|
function ListItem({ onSelected, active, children }) {
|
|
313
314
|
const onClick = react_1.useCallback(() => {
|
|
314
315
|
onSelected(children);
|