@wireapp/react-ui-kit 9.7.2 → 9.7.4
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/Form/Button.js +1 -1
- package/lib/Form/Checkbox.js +4 -4
- package/lib/Form/CodeInput.js +2 -2
- package/lib/Form/DropFileInput.js +1 -1
- package/lib/Form/ErrorMessage.js +1 -1
- package/lib/Form/IndicatorRangeInput.js +3 -3
- package/lib/Form/Input.js +3 -3
- package/lib/Form/InputLabel.js +1 -1
- package/lib/Form/RangeInput.js +1 -1
- package/lib/Form/RangeInput.styles.js +1 -1
- package/lib/Form/Select.js +4 -4
- package/lib/Form/SelectComponents.js +6 -6
- package/lib/Form/ShakeBox.js +1 -1
- package/lib/Form/Switch.js +4 -4
- package/lib/Form/Tooltip.js +1 -1
- package/lib/Icon/ErrorIcon.js +1 -1
- package/lib/Icon/RecordIcon.js +1 -1
- package/lib/Icon/RecordPendingIcon.js +1 -1
- package/lib/Icon/SVGIcon.js +1 -1
- package/lib/Layout/StyledApp.js +1 -1
- package/lib/Layout/headerMenu/HeaderMenu.js +1 -1
- package/lib/Layout/headerMenu/HeaderSubMenu.js +1 -1
- package/lib/Misc/ButtonGroup.js +3 -3
- package/lib/Misc/IconButton.js +1 -1
- package/lib/Misc/Pagination.js +3 -3
- package/lib/Misc/Pill.js +1 -1
- package/lib/Misc/childrenWithDefaultProps.d.ts +1 -1
- package/lib/Misc/childrenWithDefaultProps.d.ts.map +1 -1
- package/lib/Modal/Modal.js +2 -2
- package/lib/Modal/Overlay.js +1 -1
- package/lib/Text/Link.js +1 -1
- package/lib/Theme/Theme.js +1 -1
- package/lib/mediaQueries.js +1 -1
- package/lib/types/enums.js +1 -1
- package/package.json +7 -7
package/lib/Form/Button.js
CHANGED
|
@@ -25,7 +25,7 @@ var ButtonVariant;
|
|
|
25
25
|
ButtonVariant["TERTIARY"] = "tertiary";
|
|
26
26
|
ButtonVariant["QUATERNARY"] = "quaternary";
|
|
27
27
|
ButtonVariant["SEND"] = "send";
|
|
28
|
-
})(ButtonVariant
|
|
28
|
+
})(ButtonVariant || (exports.ButtonVariant = ButtonVariant = {}));
|
|
29
29
|
const buttonStyle = (theme, _a) => {
|
|
30
30
|
var { variant = ButtonVariant.PRIMARY, backgroundColor, block = false, disabled = false, noCapital = false, bold = true, center = true, color = Identity_1.COLOR.WHITE, fontSize = theme.fontSizes.base, noWrap = true, textTransform = 'none', truncate = true } = _a, props = __rest(_a, ["variant", "backgroundColor", "block", "disabled", "noCapital", "bold", "center", "color", "fontSize", "noWrap", "textTransform", "truncate"]);
|
|
31
31
|
return (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, Text_1.textStyle)(theme, Object.assign({ block,
|
package/lib/Form/Checkbox.js
CHANGED
|
@@ -86,21 +86,21 @@ const StyledLabel = (_a) => {
|
|
|
86
86
|
})), { borderRadius: '3px', boxSizing: 'border-box', content: '""', display: 'inline-block', minWidth: '22px', height: '22px', lineHeight: '1.4rem', margin: '0 8px 0 0px', color: theme.general.color }) }), (labelBeforeCheckbox && {
|
|
87
87
|
flexDirection: 'row-reverse',
|
|
88
88
|
justifyContent: 'space-between',
|
|
89
|
-
})), { alignItems: 'center', position: 'relative', margin: '0 0 0 -16px', width: aligncenter ? 'auto' : '100%', lineHeight: '1.4rem', display: 'flex', opacity: disabled ? 0.56 : 1, cursor: disabled ? 'not-allowed' : 'pointer', borderRadius: '4px' })) }, props, { children: [children, (0, jsx_runtime_1.jsx)("svg",
|
|
89
|
+
})), { alignItems: 'center', position: 'relative', margin: '0 0 0 -16px', width: aligncenter ? 'auto' : '100%', lineHeight: '1.4rem', display: 'flex', opacity: disabled ? 0.56 : 1, cursor: disabled ? 'not-allowed' : 'pointer', borderRadius: '4px' })) }, props, { children: [children, (0, jsx_runtime_1.jsx)("svg", { width: "15", height: "13", viewBox: "0 0 16 13", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M5.65685 12.0711L15.9842 1.62738L14.57 0.213167L5.65685 9.24264L1.41421 5L0 6.41421L5.65685 12.0711Z" }) })] })));
|
|
90
90
|
};
|
|
91
91
|
exports.Checkbox = React.forwardRef((_a, ref) => {
|
|
92
92
|
var { id, children, style, disabled, wrapperCSS = {}, markInvalid, aligncenter, labelBeforeCheckbox, outlineOffset = '0.4rem' } = _a, props = __rest(_a, ["id", "children", "style", "disabled", "wrapperCSS", "markInvalid", "aligncenter", "labelBeforeCheckbox", "outlineOffset"]);
|
|
93
93
|
const inputId = (0, react_1.useId)();
|
|
94
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
94
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: (theme) => (Object.assign({ alignItems: 'center', display: 'flex', justifyContent: 'flex-start', position: 'relative', left: '-0.3rem', [`.${Input_1.INPUT_CLASSNAME}:focus-visible + label`]: {
|
|
95
95
|
outline: `1px solid ${theme.general.primaryColor}`,
|
|
96
96
|
outlineOffset: outlineOffset,
|
|
97
|
-
} }, wrapperCSS)), style: style
|
|
97
|
+
} }, wrapperCSS)), style: style, children: [(0, jsx_runtime_1.jsx)("input", Object.assign({ type: "checkbox", id: id !== null && id !== void 0 ? id : inputId, style: {
|
|
98
98
|
height: '22px',
|
|
99
99
|
marginBottom: '0',
|
|
100
100
|
opacity: 0,
|
|
101
101
|
width: '22px',
|
|
102
102
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
103
|
-
}, disabled: disabled, ref: ref, className: Input_1.INPUT_CLASSNAME }, props)), (0, jsx_runtime_1.jsx)(StyledLabel,
|
|
103
|
+
}, disabled: disabled, ref: ref, className: Input_1.INPUT_CLASSNAME }, props)), (0, jsx_runtime_1.jsx)(StyledLabel, { htmlFor: id !== null && id !== void 0 ? id : inputId, disabled: disabled, markInvalid: markInvalid, aligncenter: aligncenter, labelBeforeCheckbox: labelBeforeCheckbox, children: children })] }));
|
|
104
104
|
});
|
|
105
105
|
exports.Checkbox.displayName = 'Checkbox';
|
|
106
106
|
const CheckboxLabel = (_a) => {
|
package/lib/Form/CodeInput.js
CHANGED
|
@@ -121,10 +121,10 @@ const CodeInput = ({ style, digits = 6, autoFocus = false, markInvalid, onCodeCo
|
|
|
121
121
|
onCodeComplete(completeCode);
|
|
122
122
|
}
|
|
123
123
|
}, [values]);
|
|
124
|
-
return ((0, jsx_runtime_1.jsx)(CodeInputWrapper,
|
|
124
|
+
return ((0, jsx_runtime_1.jsx)(CodeInputWrapper, { style: style, children: Array.from({ length: digits }, (_, index) => ((0, jsx_runtime_1.jsx)(DigitInput
|
|
125
125
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
126
126
|
, {
|
|
127
127
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
128
|
-
autoFocus: index === 0 && autoFocus, onPaste: event => handlePaste(index, event), onFocus: forceSelection, onMouseDown: forceSelectionPreventDefault, onTouchStart: forceSelectionPreventDefault, onKeyDown: event => handleKeyDown(index, event), onKeyUp: forceSelection, markInvalid: markInvalid, ref: node => (inputs[index] = node), value: values[index], onChange: () => { }, disabled: disabled }, index))) }))
|
|
128
|
+
autoFocus: index === 0 && autoFocus, onPaste: event => handlePaste(index, event), onFocus: forceSelection, onMouseDown: forceSelectionPreventDefault, onTouchStart: forceSelectionPreventDefault, onKeyDown: event => handleKeyDown(index, event), onKeyUp: forceSelection, markInvalid: markInvalid, ref: node => (inputs[index] = node), value: values[index], onChange: () => { }, disabled: disabled }, index))) }));
|
|
129
129
|
};
|
|
130
130
|
exports.CodeInput = CodeInput;
|
|
@@ -124,6 +124,6 @@ exports.DropFileInput = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
124
124
|
}
|
|
125
125
|
onFilesUploaded(Array.from(files));
|
|
126
126
|
};
|
|
127
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
127
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: exports.dropFileWrapperStyle, children: [(0, jsx_runtime_1.jsx)("div", { css: (theme) => (Object.assign(Object.assign({}, (0, exports.dropFileZoneWrapperStyle)(theme, isDraggedOver)), dropFileZoneWrapperCSS)), "data-testid": "dropzone", onDragOver: handleDragOver, onDragLeave: resetDraggedOver, onDrop: handleDrop, children: (0, jsx_runtime_1.jsxs)(Layout_1.FlexBox, { align: "center", justify: "center", flexWrap: "wrap", css: { maxWidth: '280px', margin: '0 auto' }, children: [(0, jsx_runtime_1.jsx)(Icon_1.UploadIcon, { css: { margin: '12px 0' } }), (0, jsx_runtime_1.jsxs)("div", { css: { maxWidth: '160px', margin: '0 25px' }, children: [(0, jsx_runtime_1.jsx)("span", { css: exports.dropFileZoneHeadingStyle, children: headingText }), (0, jsx_runtime_1.jsxs)("label", { "aria-label": `${headingText} ${labelText} (${description})`, css: (theme) => (0, exports.dropFileZoneLabelStyle)(theme), children: [(0, jsx_runtime_1.jsx)("span", { children: labelText }), (0, jsx_runtime_1.jsx)("input", Object.assign({ "data-testid": "file-input", ref: ref, accept: accept, multiple: multiple, css: visuallyHiddenStyles, onChange: handleChange, type: "file" }, inputProps))] })] })] }) }), description && (0, jsx_runtime_1.jsx)("p", { css: exports.dropFileZonDescriptionStyle, children: description })] }));
|
|
128
128
|
});
|
|
129
129
|
exports.DropFileInput.displayName = 'DropFileInput';
|
package/lib/Form/ErrorMessage.js
CHANGED
|
@@ -28,6 +28,6 @@ const filterErrorMessageProps = (props) => {
|
|
|
28
28
|
exports.filterErrorMessageProps = filterErrorMessageProps;
|
|
29
29
|
const ErrorMessage = (_a) => {
|
|
30
30
|
var { children } = _a, props = __rest(_a, ["children"]);
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(Layout_1.FlexBox, Object.assign({ css: (theme) => (0, exports.errorMessageStyle)(theme, props) }, props, { children: (0, jsx_runtime_1.jsx)(Text_1.Text,
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(Layout_1.FlexBox, Object.assign({ css: (theme) => (0, exports.errorMessageStyle)(theme, props) }, props, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { color: Identity_1.COLOR_V2.RED_LIGHT_500, fontSize: '12px', css: { fontWeight: 400 }, children: children }) })));
|
|
32
32
|
};
|
|
33
33
|
exports.ErrorMessage = ErrorMessage;
|
|
@@ -52,12 +52,12 @@ exports.IndicatorRangeInput = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
52
52
|
const valueText = ((_b = dataListOptions[valueNum]) === null || _b === void 0 ? void 0 : _b.heading)
|
|
53
53
|
? `${dataListOptions[valueNum].label} (${dataListOptions[valueNum].heading})`
|
|
54
54
|
: dataListOptions[valueNum].label;
|
|
55
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
55
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: { wrapperCSS, width: '100%' }, children: [label && ((0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { css: (theme) => ({ fontSize: theme.fontSizes.base }), htmlFor: id, children: label })), (0, jsx_runtime_1.jsxs)("div", { css: IndicatorRangeInput_styles_1.containerStyles, children: [isCustomSlider && ((0, jsx_runtime_1.jsx)("div", { css: { position: 'relative', display: 'flex', marginBottom: '20px' }, children: dataListOptions.map((dataListOption, index) => ((0, jsx_runtime_1.jsx)("div", { css: (theme) => (0, IndicatorRangeInput_styles_1.headingStyle)(listLength, theme), onClick: () => {
|
|
56
56
|
if (dataListOption === null || dataListOption === void 0 ? void 0 : dataListOption.heading) {
|
|
57
57
|
onOptionClick(index);
|
|
58
58
|
}
|
|
59
|
-
}
|
|
59
|
+
}, children: dataListOption === null || dataListOption === void 0 ? void 0 : dataListOption.heading }, dataListOption.value))) })), (0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref, css: (theme) => (0, IndicatorRangeInput_styles_1.rangeStyles)(backgroundSize, valueNum, listLength, isCustomSlider, theme), id: id, name: id, min: minNum, max: maxNum, value: value, onChange: onChange, type: "range", list: "tickMarks" }, (isCustomSlider && {
|
|
60
60
|
'aria-valuetext': valueText,
|
|
61
|
-
}), inputProps)), isCustomSlider && ((0, jsx_runtime_1.jsx)("datalist",
|
|
61
|
+
}), inputProps)), isCustomSlider && ((0, jsx_runtime_1.jsx)("datalist", { id: "tickMarks", css: (theme) => (0, IndicatorRangeInput_styles_1.dataListOption)(listLength, theme), children: dataListOptions.map((dataListOption, index) => ((0, jsx_runtime_1.jsx)("option", { value: dataListOption.value, label: dataListOption.label, onClick: () => onOptionClick(index) }, index))) }))] })] }));
|
|
62
62
|
});
|
|
63
63
|
exports.IndicatorRangeInput.displayName = 'IndicatorRangeInput';
|
package/lib/Form/Input.js
CHANGED
|
@@ -111,13 +111,13 @@ exports.Input = React.forwardRef((_a, ref) => {
|
|
|
111
111
|
const isPasswordInput = type === 'password';
|
|
112
112
|
const toggledPasswordType = togglePassword ? 'text' : 'password';
|
|
113
113
|
const toggleSetPassword = () => setTogglePassword(prevState => !prevState);
|
|
114
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
114
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: exports.INPUT_GROUP, css: (theme) => (Object.assign({ marginBottom: hasError ? '2px' : '20px', width: '100%', '&:focus-within label': {
|
|
115
115
|
color: theme.general.primaryColor,
|
|
116
|
-
} }, wrapperCSS))
|
|
116
|
+
} }, wrapperCSS)), children: [label && ((0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { htmlFor: props.id, isRequired: props.required, markInvalid: props.markInvalid, children: label })), (0, jsx_runtime_1.jsxs)("div", { css: { marginBottom: hasError && '8px', position: 'relative' }, children: [(0, jsx_runtime_1.jsx)("input", Object.assign({ className: exports.INPUT_CLASSNAME, css: (theme) => (0, exports.inputStyle)(theme, props, hasError), ref: ref, type: isPasswordInput ? toggledPasswordType : type, "aria-required": props.required }, filterInputProps(props))), hasError && !isPasswordInput && ((0, jsx_runtime_1.jsx)(Icon_1.ErrorIcon, { css: centerInputAction, width: 16, height: 16, "aria-hidden": "true" })), isPasswordInput && ((0, jsx_runtime_1.jsx)("button", { type: "button", "data-uie-name": !togglePassword ? 'do-show-password' : 'do-hide-password', css: Object.assign(Object.assign({}, centerInputAction), { background: 'transparent', border: 'none', cursor: 'pointer', padding: 0 }), onClick: toggleSetPassword, title: "Toggle password visibility", "aria-controls": props.id, "aria-expanded": togglePassword, children: togglePassword ? (0, jsx_runtime_1.jsx)(Icon_1.HideIcon, {}) : (0, jsx_runtime_1.jsx)(Icon_1.ShowIcon, {}) }))] }), !hasError && helperText && ((0, jsx_runtime_1.jsx)("p", { css: (theme) => ({
|
|
117
117
|
fontSize: theme.fontSizes.small,
|
|
118
118
|
fontWeight: 400,
|
|
119
119
|
color: theme.Input.placeholderColor,
|
|
120
120
|
marginTop: 8,
|
|
121
|
-
})
|
|
121
|
+
}), children: helperText })), error] }));
|
|
122
122
|
});
|
|
123
123
|
exports.Input.displayName = 'Input';
|
package/lib/Form/InputLabel.js
CHANGED
|
@@ -21,6 +21,6 @@ const InputLabel = (_a) => {
|
|
|
21
21
|
fontWeight: 400,
|
|
22
22
|
lineHeight: '1rem',
|
|
23
23
|
color: markInvalid ? Identity_1.COLOR_V2.RED_LIGHT_500 : theme.Input.labelColor,
|
|
24
|
-
}) }, props, { children: [children, isRequired && ((0, jsx_runtime_1.jsx)("span",
|
|
24
|
+
}) }, props, { children: [children, isRequired && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => ({ fontSize: theme.fontSizes.base, marginLeft: '4px', color: Identity_1.COLOR_V2.RED_LIGHT_500 }), children: "*" }))] })));
|
|
25
25
|
};
|
|
26
26
|
exports.InputLabel = InputLabel;
|
package/lib/Form/RangeInput.js
CHANGED
|
@@ -40,6 +40,6 @@ exports.RangeInput = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
40
40
|
const maxNum = Number(max);
|
|
41
41
|
const valueNum = Number(value);
|
|
42
42
|
const backgroundSize = `${((valueNum - minNum) * 100) / (maxNum - minNum)}% 100%`;
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: wrapperCSS, children: [label && (0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { htmlFor: id, children: label }), (0, jsx_runtime_1.jsxs)("div", { css: RangeInput_styles_1.rangeInputWrapperStyles, children: [minValueLabel && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => (0, RangeInput_styles_1.getValueLabelStyles)(theme, RangeInput_styles_1.ValueLabelPosition.LEFT), children: minValueLabel })), maxValueLabel && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => (0, RangeInput_styles_1.getValueLabelStyles)(theme, RangeInput_styles_1.ValueLabelPosition.RIGHT), children: maxValueLabel })), (0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref, css: (theme) => (0, RangeInput_styles_1.getImageCropZoomInputStyles)(theme, backgroundSize), id: id, name: id, min: min, max: max, value: value, onChange: onChange, type: "range" }, inputProps))] })] }));
|
|
44
44
|
});
|
|
45
45
|
exports.RangeInput.displayName = 'RangeInput';
|
|
@@ -47,7 +47,7 @@ var ValueLabelPosition;
|
|
|
47
47
|
(function (ValueLabelPosition) {
|
|
48
48
|
ValueLabelPosition["LEFT"] = "left";
|
|
49
49
|
ValueLabelPosition["RIGHT"] = "right";
|
|
50
|
-
})(ValueLabelPosition
|
|
50
|
+
})(ValueLabelPosition || (exports.ValueLabelPosition = ValueLabelPosition = {}));
|
|
51
51
|
const getValueLabelStyles = (theme, position) => ({
|
|
52
52
|
pointerEvents: 'none',
|
|
53
53
|
bottom: '100%',
|
package/lib/Form/Select.js
CHANGED
|
@@ -26,20 +26,20 @@ const Select = (_a) => {
|
|
|
26
26
|
var { id, label, error, helperText, disabled = false, dataUieName, options, isMulti, wrapperCSS = {}, markInvalid = false, required = false } = _a, props = __rest(_a, ["id", "label", "error", "helperText", "disabled", "dataUieName", "options", "isMulti", "wrapperCSS", "markInvalid", "required"]);
|
|
27
27
|
const theme = (0, react_1.useTheme)();
|
|
28
28
|
const hasError = !!error;
|
|
29
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: (theme) => (Object.assign({ marginBottom: markInvalid ? '2px' : '20px', width: '100%', '&:focus-within label': {
|
|
30
30
|
color: theme.general.primaryColor,
|
|
31
|
-
} }, wrapperCSS)), "data-uie-name": dataUieName
|
|
31
|
+
} }, wrapperCSS)), "data-uie-name": dataUieName, children: [label && ((0, jsx_runtime_1.jsx)(InputLabel_1.InputLabel, { htmlFor: id, markInvalid: markInvalid, isRequired: required, children: label })), (0, jsx_runtime_1.jsx)(react_select_1.default, Object.assign({ id: id, styles: (0, SelectStyles_1.customStyles)(theme, markInvalid), components: {
|
|
32
32
|
SelectContainer: SelectComponents_1.SelectContainer,
|
|
33
33
|
DropdownIndicator: SelectComponents_1.DropdownIndicator,
|
|
34
34
|
Option: (0, SelectComponents_1.CustomOption)(dataUieName),
|
|
35
35
|
Menu: (0, SelectComponents_1.Menu)(dataUieName),
|
|
36
36
|
ValueContainer: SelectComponents_1.ValueContainer,
|
|
37
37
|
IndicatorsContainer: SelectComponents_1.IndicatorsContainer,
|
|
38
|
-
}, tabIndex: enums_1.TabIndex.UNFOCUSABLE, isDisabled: disabled, hideSelectedOptions: false, isSearchable: false, isClearable: false, closeMenuOnSelect: !isMulti, isMulti: isMulti, options: options }, props)), !hasError && helperText && ((0, jsx_runtime_1.jsx)("p",
|
|
38
|
+
}, tabIndex: enums_1.TabIndex.UNFOCUSABLE, isDisabled: disabled, hideSelectedOptions: false, isSearchable: false, isClearable: false, closeMenuOnSelect: !isMulti, isMulti: isMulti, options: options }, props)), !hasError && helperText && ((0, jsx_runtime_1.jsx)("p", { css: (theme) => ({
|
|
39
39
|
fontSize: theme.fontSizes.small,
|
|
40
40
|
fontWeight: 400,
|
|
41
41
|
color: theme.Input.labelColor,
|
|
42
42
|
marginTop: 8,
|
|
43
|
-
})
|
|
43
|
+
}), children: helperText })), error] }));
|
|
44
44
|
};
|
|
45
45
|
exports.Select = Select;
|
|
@@ -36,7 +36,7 @@ const ArrowDown_1 = require("../Icon/ArrowDown");
|
|
|
36
36
|
const enums_1 = require("../types/enums");
|
|
37
37
|
// SelectContainer
|
|
38
38
|
const SelectContainer = (props) => {
|
|
39
|
-
return ((0, jsx_runtime_1.jsx)(react_select_1.components.SelectContainer, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)("div",
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)(react_select_1.components.SelectContainer, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)("div", { tabIndex: enums_1.TabIndex.FOCUSABLE, children: props.children }) })));
|
|
40
40
|
};
|
|
41
41
|
exports.SelectContainer = SelectContainer;
|
|
42
42
|
const DropdownIndicator = (props) => {
|
|
@@ -58,12 +58,12 @@ const CustomOption = (dataUieName) => (props) => {
|
|
|
58
58
|
'data-uie-name': `option-${dataUieName}`,
|
|
59
59
|
'data-uie-value': (_a = options.find(option => option.label === children)) === null || _a === void 0 ? void 0 : _a.value,
|
|
60
60
|
'data-uie-selected': isSelected,
|
|
61
|
-
}), { children: [isMulti && ((0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: isSelected, onChange: () => null, css: { gridArea: 'checkbox', width: 22, height: 22, cursor: 'pointer', placeSelf: 'center' } })), (0, jsx_runtime_1.jsx)("div",
|
|
61
|
+
}), { children: [isMulti && ((0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: isSelected, onChange: () => null, css: { gridArea: 'checkbox', width: 22, height: 22, cursor: 'pointer', placeSelf: 'center' } })), (0, jsx_runtime_1.jsx)("div", { css: { gridArea: 'label', overflowWrap: 'break-word', overflow: 'hidden' }, children: children }), data && data.description && ((0, jsx_runtime_1.jsx)("p", { css: (theme) => ({
|
|
62
62
|
marginBottom: 0,
|
|
63
63
|
fontSize: theme.fontSizes.medium,
|
|
64
64
|
color: isSelected ? theme.Select.focusedDescriptionColor : theme.Input.labelColor,
|
|
65
65
|
gridArea: 'description',
|
|
66
|
-
})
|
|
66
|
+
}), children: data.description }))] })) })));
|
|
67
67
|
};
|
|
68
68
|
exports.CustomOption = CustomOption;
|
|
69
69
|
// eslint-disable-next-line react/display-name
|
|
@@ -77,14 +77,14 @@ exports.Menu = Menu;
|
|
|
77
77
|
const renderValue = value => {
|
|
78
78
|
if (Array.isArray(value)) {
|
|
79
79
|
const currentValue = (i) => value[i].props.children;
|
|
80
|
-
return ((0, jsx_runtime_1.jsx)("div",
|
|
80
|
+
return ((0, jsx_runtime_1.jsx)("div", { css: {
|
|
81
81
|
whiteSpace: 'nowrap',
|
|
82
82
|
overflow: 'hidden',
|
|
83
83
|
textOverflow: 'ellipsis',
|
|
84
84
|
minWidth: 0,
|
|
85
85
|
paddingRight: 14,
|
|
86
86
|
gridArea: '1/1/2/3',
|
|
87
|
-
}
|
|
87
|
+
}, children: currentValue(0) }));
|
|
88
88
|
}
|
|
89
89
|
return value;
|
|
90
90
|
};
|
|
@@ -98,6 +98,6 @@ const IndicatorsContainer = (_a) => {
|
|
|
98
98
|
var { children } = _a, restProps = __rest(_a, ["children"]);
|
|
99
99
|
const value = restProps.getValue();
|
|
100
100
|
const displaySelectedOptionsCount = Array.isArray(value) && value.length > 1;
|
|
101
|
-
return ((0, jsx_runtime_1.jsxs)(react_select_1.components.IndicatorsContainer, Object.assign({}, restProps, { children: [displaySelectedOptionsCount && (0, jsx_runtime_1.jsxs)("div",
|
|
101
|
+
return ((0, jsx_runtime_1.jsxs)(react_select_1.components.IndicatorsContainer, Object.assign({}, restProps, { children: [displaySelectedOptionsCount && (0, jsx_runtime_1.jsxs)("div", { css: { fontWeight: 600 }, children: ["(+", value.length - 1, ")"] }), children] })));
|
|
102
102
|
};
|
|
103
103
|
exports.IndicatorsContainer = IndicatorsContainer;
|
package/lib/Form/ShakeBox.js
CHANGED
|
@@ -74,6 +74,6 @@ exports.ShakeBox = React.forwardRef(({ children, amplitude = 8, damping = 0.75,
|
|
|
74
74
|
},
|
|
75
75
|
}));
|
|
76
76
|
(0, react_1.useEffect)(() => () => cancelAnimationFrame(requestAnimationId), []);
|
|
77
|
-
return (0, jsx_runtime_1.jsx)("div",
|
|
77
|
+
return (0, jsx_runtime_1.jsx)("div", { css: { transform: `translateX(${offset}px)` }, children: children });
|
|
78
78
|
});
|
|
79
79
|
exports.ShakeBox.displayName = 'ShakeBox';
|
package/lib/Form/Switch.js
CHANGED
|
@@ -23,20 +23,20 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
23
23
|
const react_1 = require("react");
|
|
24
24
|
const Identity_1 = require("../Identity");
|
|
25
25
|
const Misc_1 = require("../Misc");
|
|
26
|
-
const Switch = ({ id = Math.random().toString(), checked, onToggle = () => { }, showLoading, disabled, loadingColor = Identity_1.COLOR.BLUE, activatedColor = Identity_1.COLOR.BLUE, deactivatedColor = '#d2d2d2', name, dataUieName, }) => ((0, jsx_runtime_1.jsx)("div",
|
|
26
|
+
const Switch = ({ id = Math.random().toString(), checked, onToggle = () => { }, showLoading, disabled, loadingColor = Identity_1.COLOR.BLUE, activatedColor = Identity_1.COLOR.BLUE, deactivatedColor = '#d2d2d2', name, dataUieName, }) => ((0, jsx_runtime_1.jsx)("div", { css: {
|
|
27
27
|
display: 'inline-block',
|
|
28
28
|
position: 'relative',
|
|
29
29
|
textAlign: 'left',
|
|
30
30
|
userSelect: 'none',
|
|
31
31
|
verticalAlign: 'middle',
|
|
32
32
|
width: '42px',
|
|
33
|
-
}
|
|
33
|
+
}, children: (0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", { id: id, checked: checked, disabled: disabled, name: name, onChange: event => onToggle(event.target.checked), type: "checkbox", css: { display: 'none' }, "data-uie-name": dataUieName }), (0, jsx_runtime_1.jsxs)("label", { htmlFor: id, css: {
|
|
34
34
|
borderRadius: '20px',
|
|
35
35
|
cursor: disabled || showLoading ? '' : 'pointer',
|
|
36
36
|
display: 'block',
|
|
37
37
|
margin: 0,
|
|
38
38
|
overflow: 'hidden',
|
|
39
|
-
}
|
|
39
|
+
}, children: [(0, jsx_runtime_1.jsx)("span", { css: {
|
|
40
40
|
['&:after']: {
|
|
41
41
|
content: '" "',
|
|
42
42
|
paddingRight: '10px',
|
|
@@ -82,5 +82,5 @@ const Switch = ({ id = Math.random().toString(), checked, onToggle = () => { },
|
|
|
82
82
|
top: 0,
|
|
83
83
|
transition: 'all 0.15s ease-in 0s',
|
|
84
84
|
width: '23px',
|
|
85
|
-
} }))] })
|
|
85
|
+
} }))] })] }) }));
|
|
86
86
|
exports.Switch = Switch;
|
package/lib/Form/Tooltip.js
CHANGED
|
@@ -111,6 +111,6 @@ const Tooltip = (_a) => {
|
|
|
111
111
|
var { children } = _a, props = __rest(_a, ["children"]);
|
|
112
112
|
const filteredProps = filterTooltipProps(props);
|
|
113
113
|
const { body, position = 'top' } = props;
|
|
114
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ css: (theme) => tooltipStyle(theme), "data-position": position }, filteredProps, { "data-testid": "tooltip-wrapper"
|
|
114
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ css: (theme) => tooltipStyle(theme), "data-position": position }, filteredProps, { "data-testid": "tooltip-wrapper", children: [(0, jsx_runtime_1.jsxs)("div", { className: "tooltip-content", "data-testid": "tooltip-content", children: [body, (0, jsx_runtime_1.jsx)("div", { className: "tooltip-arrow" })] }), children] })));
|
|
115
115
|
};
|
|
116
116
|
exports.Tooltip = Tooltip;
|
package/lib/Icon/ErrorIcon.js
CHANGED
|
@@ -21,5 +21,5 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
23
|
const SVGIcon_1 = require("./SVGIcon");
|
|
24
|
-
const ErrorIcon = (props) => ((0, jsx_runtime_1.jsx)(SVGIcon_1.SVGIcon, Object.assign({ realWidth: 13, realHeight: 12 }, props, { children: (0, jsx_runtime_1.jsxs)("g",
|
|
24
|
+
const ErrorIcon = (props) => ((0, jsx_runtime_1.jsx)(SVGIcon_1.SVGIcon, Object.assign({ realWidth: 13, realHeight: 12 }, props, { children: (0, jsx_runtime_1.jsxs)("g", { transform: "translate(.5 .333)", fill: "none", fillRule: "evenodd", children: [(0, jsx_runtime_1.jsx)("circle", { fill: "#E02020", cx: "6", cy: "6", r: "6" }), (0, jsx_runtime_1.jsx)("text", { fontFamily: "SFProText-Heavy, SF Pro Text", fontSize: "9", fontWeight: "600", fill: "#FFF", children: (0, jsx_runtime_1.jsx)("tspan", { x: "4.291", y: "9", children: "!" }) })] }) })));
|
|
25
25
|
exports.ErrorIcon = ErrorIcon;
|
package/lib/Icon/RecordIcon.js
CHANGED
|
@@ -21,5 +21,5 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
23
|
const SVGIcon_1 = require("./SVGIcon");
|
|
24
|
-
const RecordIcon = (props) => ((0, jsx_runtime_1.jsx)(SVGIcon_1.SVGIcon, Object.assign({ realWidth: 16, realHeight: 16 }, props, { children: (0, jsx_runtime_1.jsxs)("g",
|
|
24
|
+
const RecordIcon = (props) => ((0, jsx_runtime_1.jsx)(SVGIcon_1.SVGIcon, Object.assign({ realWidth: 16, realHeight: 16 }, props, { children: (0, jsx_runtime_1.jsxs)("g", { fill: "#FB0807", fillRule: "evenodd", children: [(0, jsx_runtime_1.jsx)("circle", { fillOpacity: ".24", cx: "8", cy: "8", r: "8" }), (0, jsx_runtime_1.jsx)("circle", { cx: "8", cy: "8", r: "4" })] }) })));
|
|
25
25
|
exports.RecordIcon = RecordIcon;
|
|
@@ -21,5 +21,5 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
23
|
const SVGIcon_1 = require("./SVGIcon");
|
|
24
|
-
const RecordPendingIcon = (props) => ((0, jsx_runtime_1.jsx)(SVGIcon_1.SVGIcon, Object.assign({ realWidth: 16, realHeight: 16 }, props, { children: (0, jsx_runtime_1.jsxs)("g",
|
|
24
|
+
const RecordPendingIcon = (props) => ((0, jsx_runtime_1.jsx)(SVGIcon_1.SVGIcon, Object.assign({ realWidth: 16, realHeight: 16 }, props, { children: (0, jsx_runtime_1.jsxs)("g", { fill: "#FB0807", children: [(0, jsx_runtime_1.jsx)("circle", { fillOpacity: ".24", cx: "8", cy: "8", r: "8" }), (0, jsx_runtime_1.jsx)("path", { d: "M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 1a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm-.5-4.5H10v1H7.5v-1zm0-2h1v3h-1v-3z" })] }) })));
|
|
25
25
|
exports.RecordPendingIcon = RecordPendingIcon;
|
package/lib/Icon/SVGIcon.js
CHANGED
|
@@ -28,6 +28,6 @@ const SVGIcon = (_a) => {
|
|
|
28
28
|
const newWidth = Math.ceil(realWidth * newScale);
|
|
29
29
|
const newHeight = Math.ceil(realHeight * newScale);
|
|
30
30
|
const shadowId = shadow && Math.random().toString();
|
|
31
|
-
return ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ css: (theme) => svgIconStyle(theme, props), viewBox: `0 0 ${realWidth} ${realHeight}`, width: newWidth, height: newHeight }, props, { children: [shadow && ((0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsxs)("filter",
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ css: (theme) => svgIconStyle(theme, props), viewBox: `0 0 ${realWidth} ${realHeight}`, width: newWidth, height: newHeight }, props, { children: [shadow && ((0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsxs)("filter", { id: shadowId, x: "-50%", y: "-50%", width: "200%", height: "200%", children: [(0, jsx_runtime_1.jsx)("feOffset", { result: "offOut", in: "SourceAlpha", dx: "0", dy: "0" }), (0, jsx_runtime_1.jsx)("feGaussianBlur", { result: "blurOut", in: "offOut", stdDeviation: "2.5" }), (0, jsx_runtime_1.jsx)("feBlend", { in: "SourceGraphic", in2: "blurOut", mode: "normal" })] }) })), (0, jsx_runtime_1.jsx)("g", { filter: shadow && `url(#${shadowId})`, children: children })] })));
|
|
32
32
|
};
|
|
33
33
|
exports.SVGIcon = SVGIcon;
|
package/lib/Layout/StyledApp.js
CHANGED
|
@@ -24,6 +24,6 @@ const filterStyledAppProps = (props) => (0, util_1.filterProps)(props, ['backgro
|
|
|
24
24
|
const StyledAppContainer = (props) => ((0, jsx_runtime_1.jsx)("div", Object.assign({ css: (theme) => styledAppContainerStyle(theme, props) }, filterStyledAppProps(props))));
|
|
25
25
|
const StyledApp = (_a) => {
|
|
26
26
|
var { themeId = Theme_1.THEME_ID.LIGHT, theme, children } = _a, props = __rest(_a, ["themeId", "theme", "children"]);
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(Theme_1.ThemeProvider,
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(Theme_1.ThemeProvider, { theme: theme ? theme : Theme_1.themes[themeId], children: (0, jsx_runtime_1.jsxs)(StyledAppContainer, Object.assign({}, props, { children: [(0, jsx_runtime_1.jsx)(GlobalStyle_1.GlobalStyle, {}), children] })) }));
|
|
28
28
|
};
|
|
29
29
|
exports.StyledApp = StyledApp;
|
|
@@ -46,6 +46,6 @@ const HeaderMenu = (_a) => {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
const closeMenu = () => setIsOpen(false);
|
|
49
|
-
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ css: { height: '64px' } }, props, { "data-uie-name": "element-header-menu"
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ css: { height: '64px' } }, props, { "data-uie-name": "element-header-menu", children: (0, jsx_runtime_1.jsxs)(MenuContent_1.MenuContent, { open: isOpen, children: [(0, jsx_runtime_1.jsx)("div", { css: { alignSelf: 'center', display: 'flex', zIndex: 2 }, onClick: closeMenu, children: logoElement }), (0, jsx_runtime_1.jsx)("div", { css: { alignSelf: 'center', display: 'flex' }, children: centerElement }), (0, jsx_runtime_1.jsx)(MenuOpenButton_1.MenuOpenButton, { onClick: toggleMenu, open: isOpen, style: { justifySelf: 'end', position: isOpen ? 'fixed' : undefined, right: '16px', top: '21px' }, "data-uie-name": "do-toggle-header-menu" }), (0, jsx_runtime_1.jsx)(MenuItems_1.MenuItems, { onClick: closeMenu, open: isOpen, children: (0, jsx_runtime_1.jsx)(MenuScrollableItems_1.MenuScrollableItems, { children: children }) })] }) })));
|
|
50
50
|
};
|
|
51
51
|
exports.HeaderMenu = HeaderMenu;
|
|
@@ -65,6 +65,6 @@ exports.MobileStyledHeaderSubMenu = MobileStyledHeaderSubMenu;
|
|
|
65
65
|
const HeaderSubMenu = (_a) => {
|
|
66
66
|
var { caption, isOpen, children } = _a, props = __rest(_a, ["caption", "isOpen", "children"]);
|
|
67
67
|
const isDesktop = typeof window !== 'undefined' && window.matchMedia(`(${mediaQueries_1.QUERY.desktop})`).matches;
|
|
68
|
-
return ((0, jsx_runtime_1.jsxs)(MenuSubLink_1.MenuSubLink, Object.assign({}, props, { style: { cursor: 'pointer', display: 'inline-block', position: 'relative', textAlign: 'center' }
|
|
68
|
+
return ((0, jsx_runtime_1.jsxs)(MenuSubLink_1.MenuSubLink, Object.assign({}, props, { style: { cursor: 'pointer', display: 'inline-block', position: 'relative', textAlign: 'center' }, children: [(0, jsx_runtime_1.jsx)("span", { children: caption }), (0, jsx_runtime_1.jsx)(Identity_1.Opacity, { in: isOpen && isDesktop, timeout: motions_1.DURATION.DEFAULT, style: { display: 'inline-block', left: -18, marginTop: 10, paddingTop: 20, position: 'absolute', zIndex: 1 }, mountOnEnter: false, unmountOnExit: false, children: (0, jsx_runtime_1.jsx)(Identity_1.YAxisMovement, { in: isOpen && isDesktop, startValue: '-30px', endValue: '0px', style: { display: 'inline-block' }, timeout: motions_1.DURATION.DEFAULT, mountOnEnter: false, unmountOnExit: true, children: (0, jsx_runtime_1.jsx)(exports.DesktopStyledHeaderSubMenu, { children: children }) }) }), (0, jsx_runtime_1.jsx)(Identity_1.Opacity, { in: isOpen && !isDesktop, timeout: motions_1.DURATION.DEFAULT, mountOnEnter: false, unmountOnExit: false, style: { display: 'block', position: 'relative' }, children: (0, jsx_runtime_1.jsx)(Identity_1.Slide, { in: isOpen && !isDesktop, startValue: '-56%', endValue: '0', timeout: motions_1.DURATION.DEFAULT, mountOnEnter: false, unmountOnExit: true, children: (0, jsx_runtime_1.jsx)(exports.MobileStyledHeaderSubMenu, { children: children }) }) })] })));
|
|
69
69
|
};
|
|
70
70
|
exports.HeaderSubMenu = HeaderSubMenu;
|
package/lib/Misc/ButtonGroup.js
CHANGED
|
@@ -46,16 +46,16 @@ const buttonStyle = (_, { disabled = false }) => (Object.assign({ height: '32px'
|
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
48
|
})));
|
|
49
|
-
const ButtonGroup = ({ children }) => ((0, jsx_runtime_1.jsx)("div",
|
|
49
|
+
const ButtonGroup = ({ children }) => ((0, jsx_runtime_1.jsx)("div", { css: (theme) => buttonGroupStyle(theme), role: "group", "aria-label": "Button Group", children: children }));
|
|
50
50
|
exports.ButtonGroup = ButtonGroup;
|
|
51
51
|
const Button = (_a) => {
|
|
52
52
|
var { children, icon } = _a, props = __rest(_a, ["children", "icon"]);
|
|
53
|
-
return ((0, jsx_runtime_1.jsxs)("button", Object.assign({ css: (theme) => buttonStyle(theme, props) }, props, { children: [icon, children && ((0, jsx_runtime_1.jsx)("span",
|
|
53
|
+
return ((0, jsx_runtime_1.jsxs)("button", Object.assign({ css: (theme) => buttonStyle(theme, props) }, props, { children: [icon, children && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => ({
|
|
54
54
|
marginLeft: !!icon && '6px',
|
|
55
55
|
fontSize: theme.fontSizes.small,
|
|
56
56
|
fontWeight: 'bold',
|
|
57
57
|
lineHeight: '0.875rem',
|
|
58
58
|
letterSpacing: '0.25px',
|
|
59
|
-
})
|
|
59
|
+
}), children: children }))] })));
|
|
60
60
|
};
|
|
61
61
|
ButtonGroup.Button = Button;
|
package/lib/Misc/IconButton.js
CHANGED
|
@@ -20,7 +20,7 @@ var IconButtonVariant;
|
|
|
20
20
|
(function (IconButtonVariant) {
|
|
21
21
|
IconButtonVariant["PRIMARY"] = "primary";
|
|
22
22
|
IconButtonVariant["SECONDARY"] = "secondary";
|
|
23
|
-
})(IconButtonVariant
|
|
23
|
+
})(IconButtonVariant || (exports.IconButtonVariant = IconButtonVariant = {}));
|
|
24
24
|
const iconButtonStyle = (theme, { variant = IconButtonVariant.PRIMARY, backgroundColor, disabled = false }) => (Object.assign(Object.assign({ border: 0, borderRadius: '12px', cursor: disabled ? 'default' : 'pointer', display: 'flex', alignItems: 'center', justifyContent: 'center', marginBottom: '16px', padding: 0, outline: 'none', textDecoration: 'none', touchAction: 'manipulation', transition: motions_1.defaultTransition, width: '40px', height: '32px', '&:hover, &:focus': {
|
|
25
25
|
textDecoration: 'none',
|
|
26
26
|
} }, (variant === IconButtonVariant.PRIMARY && Object.assign({ backgroundColor: disabled
|
package/lib/Misc/Pagination.js
CHANGED
|
@@ -26,8 +26,8 @@ const Pagination = (_a) => {
|
|
|
26
26
|
const endLength = 1;
|
|
27
27
|
const skipLength = 1;
|
|
28
28
|
const normalizeCount = endLength + skipLength + spanLength;
|
|
29
|
-
const dots = (key) => ((0, jsx_runtime_1.jsx)(Text_1.Bold,
|
|
30
|
-
const renderPageNumber = pageIndex => currentPage === pageIndex ? ((0, jsx_runtime_1.jsx)(Text_1.Bold,
|
|
29
|
+
const dots = (key) => ((0, jsx_runtime_1.jsx)(Text_1.Bold, { fontSize: '11px', children: '…' }, key));
|
|
30
|
+
const renderPageNumber = pageIndex => currentPage === pageIndex ? ((0, jsx_runtime_1.jsx)(Text_1.Bold, { fontSize: '11px', style: { color: Identity_1.COLOR.BLUE, margin: '0 8px' }, "data-uie-name": "status-active-page", children: pageIndex + 1 }, pageIndex)) : ((0, jsx_runtime_1.jsx)(Text_1.Link, { style: { margin: '0 8px' }, onClick: () => goPage(pageIndex), "data-uie-name": "go-page", children: pageIndex + 1 }, pageIndex));
|
|
31
31
|
const normalizedCurrent = Math.min(Math.max(currentPage, normalizeCount), lastPageIndex - normalizeCount);
|
|
32
32
|
const beforeCount = normalizedCurrent - spanLength - endLength;
|
|
33
33
|
const afterCount = lastPageIndex - endLength - normalizedCurrent - spanLength;
|
|
@@ -40,6 +40,6 @@ const Pagination = (_a) => {
|
|
|
40
40
|
}
|
|
41
41
|
return pages;
|
|
42
42
|
};
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(Layout_1.FlexBox, Object.assign({ align: "flex-end", "data-uie-name": "element-pagination" }, props, { children: [(0, jsx_runtime_1.jsx)("div",
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)(Layout_1.FlexBox, Object.assign({ align: "flex-end", "data-uie-name": "element-pagination" }, props, { children: [(0, jsx_runtime_1.jsx)("div", { css: { flexBasis: 100 }, children: !isFirstPage && ((0, jsx_runtime_1.jsx)(Text_1.Link, { block: true, onClick: () => goPage(currentPage - 1), "data-uie-name": "go-previous-page", children: (0, jsx_runtime_1.jsx)(PreviousPageComponent, {}) })) }), (0, jsx_runtime_1.jsx)("div", { css: { alignItems: 'flex-end', display: 'flex', flexDirection: 'row', margin: '0 auto' }, "data-uie-name": "list-pages", children: renderPageList() }), (0, jsx_runtime_1.jsx)("div", { css: { display: 'flex', flexBasis: 100, justifyContent: 'flex-end' }, children: !isLastPage && ((0, jsx_runtime_1.jsx)(Text_1.Link, { block: true, onClick: () => goPage(currentPage + 1), "data-uie-name": "go-next-page", children: (0, jsx_runtime_1.jsx)(NextPageComponent, {}) })) })] })));
|
|
44
44
|
};
|
|
45
45
|
exports.Pagination = Pagination;
|
package/lib/Misc/Pill.js
CHANGED
|
@@ -11,7 +11,7 @@ var PILL_TYPE;
|
|
|
11
11
|
PILL_TYPE["error"] = "ERROR";
|
|
12
12
|
PILL_TYPE["success"] = "SUCCESS";
|
|
13
13
|
PILL_TYPE["warning"] = "WARNING";
|
|
14
|
-
})(PILL_TYPE
|
|
14
|
+
})(PILL_TYPE || (exports.PILL_TYPE = PILL_TYPE = {}));
|
|
15
15
|
const pillStyle = (theme, { active = false, type = null }) => {
|
|
16
16
|
const backgroundColors = {
|
|
17
17
|
[PILL_TYPE.error]: Identity_1.COLOR.RED_OPAQUE_32,
|
|
@@ -3,5 +3,5 @@ export interface ChildrenProps<T extends Element, P extends React.HTMLProps<T>>
|
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
defaultProps: P;
|
|
5
5
|
}
|
|
6
|
-
export declare const childrenWithDefaultProps: <E extends Element, P extends unknown>(props: ChildrenProps<E, P>) => (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.
|
|
6
|
+
export declare const childrenWithDefaultProps: <E extends Element, P extends unknown>(props: ChildrenProps<E, P>) => (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[];
|
|
7
7
|
//# sourceMappingURL=childrenWithDefaultProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"childrenWithDefaultProps.d.ts","sourceRoot":"","sources":["../../src/Misc/childrenWithDefaultProps.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,EAAE,CAAC,CAAC;CACjB;AAED,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"childrenWithDefaultProps.d.ts","sourceRoot":"","sources":["../../src/Misc/childrenWithDefaultProps.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,EAAE,CAAC,CAAC;CACjB;AAED,eAAO,MAAM,wBAAwB,gNAYjC,CAAC"}
|
package/lib/Modal/Modal.js
CHANGED
|
@@ -95,10 +95,10 @@ const modalActionStyles = ({ bold }) => ({
|
|
|
95
95
|
justifyContent: 'center',
|
|
96
96
|
padding: '8px 0',
|
|
97
97
|
});
|
|
98
|
-
const ModalActions = ({ actions }) => ((0, jsx_runtime_1.jsx)("div",
|
|
98
|
+
const ModalActions = ({ actions }) => ((0, jsx_runtime_1.jsx)("div", { css: modalActionsWrapperStyles(), children: actions.map(action => ((0, jsx_runtime_1.jsx)("div", { onClick: action.onClick, css: modalActionStyles({ bold: action.bold }), "data-uie-name": action.dataUieName, children: action.title }, action.title))) }));
|
|
99
99
|
const Modal = (_a) => {
|
|
100
100
|
var { actions = [], children, bodyStyle, fullscreen, onClose, onBackgroundClick } = _a, props = __rest(_a, ["actions", "children", "bodyStyle", "fullscreen", "onClose", "onBackgroundClick"]);
|
|
101
|
-
return ((0, jsx_runtime_1.jsxs)(Overlay_1.OverlayWrapper, Object.assign({}, props, { "data-uie-name": "modal"
|
|
101
|
+
return ((0, jsx_runtime_1.jsxs)(Overlay_1.OverlayWrapper, Object.assign({}, props, { "data-uie-name": "modal", children: [(0, jsx_runtime_1.jsxs)(ModalBody, { fullscreen: fullscreen, style: bodyStyle, children: [(0, jsx_runtime_1.jsx)(ModalContent, { children: children }), onClose !== util_1.noop && (0, jsx_runtime_1.jsx)(ModalClose, { onClick: onClose, "data-uie-name": "do-close" }), actions.length > 0 && (0, jsx_runtime_1.jsx)(ModalActions, { actions: actions, "data-uie-name": "modal-actions" })] }), !fullscreen && ((0, jsx_runtime_1.jsx)(ModalBackground, { onClick: onBackgroundClick === util_1.noop ? onClose : onBackgroundClick, "data-uie-name": "modal-background" }))] })));
|
|
102
102
|
};
|
|
103
103
|
exports.Modal = Modal;
|
|
104
104
|
exports.Modal.defaultProps = {
|
package/lib/Modal/Overlay.js
CHANGED
|
@@ -65,6 +65,6 @@ const OverlayBackground = (props) => (0, jsx_runtime_1.jsx)("div", Object.assign
|
|
|
65
65
|
exports.OverlayBackground = OverlayBackground;
|
|
66
66
|
const Overlay = (_a) => {
|
|
67
67
|
var { onBackgroundClick = util_1.noop, children = null } = _a, props = __rest(_a, ["onBackgroundClick", "children"]);
|
|
68
|
-
return ((0, jsx_runtime_1.jsxs)(exports.OverlayWrapper, Object.assign({}, props, { "data-uie-name": "modal"
|
|
68
|
+
return ((0, jsx_runtime_1.jsxs)(exports.OverlayWrapper, Object.assign({}, props, { "data-uie-name": "modal", children: [(0, jsx_runtime_1.jsx)(exports.OverlayContent, { children: children }), (0, jsx_runtime_1.jsx)(exports.OverlayBackground, { onClick: onBackgroundClick, "data-uie-name": "overlay-background" })] })));
|
|
69
69
|
};
|
|
70
70
|
exports.Overlay = Overlay;
|
package/lib/Text/Link.js
CHANGED
|
@@ -20,7 +20,7 @@ var LinkVariant;
|
|
|
20
20
|
(function (LinkVariant) {
|
|
21
21
|
LinkVariant["PRIMARY"] = "primary";
|
|
22
22
|
LinkVariant["SECONDARY"] = "secondary";
|
|
23
|
-
})(LinkVariant
|
|
23
|
+
})(LinkVariant || (exports.LinkVariant = LinkVariant = {}));
|
|
24
24
|
const linkStyle = (theme, _a) => {
|
|
25
25
|
var { bold = true, fontSize = theme.fontSizes.extraSmall, textTransform = 'uppercase', variant = LinkVariant.SECONDARY, color = theme.general.color } = _a, props = __rest(_a, ["bold", "fontSize", "textTransform", "variant", "color"]);
|
|
26
26
|
return Object.assign(Object.assign(Object.assign(Object.assign({}, (0, Text_1.textStyle)(theme, Object.assign({ bold, color, fontSize, textTransform }, props))), { color: color, cursor: 'pointer', textDecoration: 'none', '&:visited, &:link, &:active': {
|
package/lib/Theme/Theme.js
CHANGED
|
@@ -11,7 +11,7 @@ var THEME_ID;
|
|
|
11
11
|
THEME_ID["DARK"] = "THEME_DARK";
|
|
12
12
|
THEME_ID["LIGHT"] = "THEME_LIGHT";
|
|
13
13
|
THEME_ID["DEFAULT"] = "THEME_DEFAULT";
|
|
14
|
-
})(THEME_ID
|
|
14
|
+
})(THEME_ID || (exports.THEME_ID = THEME_ID = {}));
|
|
15
15
|
exports.themes = {
|
|
16
16
|
[THEME_ID.DEFAULT]: {
|
|
17
17
|
fontSizes: Sizes_1.fontSizes,
|
package/lib/mediaQueries.js
CHANGED
|
@@ -30,7 +30,7 @@ var QueryKeys;
|
|
|
30
30
|
QueryKeys["TABLET"] = "tablet";
|
|
31
31
|
QueryKeys["TABLET_DOWN"] = "tabletDown";
|
|
32
32
|
QueryKeys["TABLET_UP"] = "tabletUp";
|
|
33
|
-
})(QueryKeys
|
|
33
|
+
})(QueryKeys || (exports.QueryKeys = QueryKeys = {}));
|
|
34
34
|
exports.QUERY = {
|
|
35
35
|
[QueryKeys.DESKTOP]: `min-width: ${sizes_1.WIDTH.DESKTOP_MIN}px`,
|
|
36
36
|
[QueryKeys.DESKTOP_XL]: `min-width: ${sizes_1.WIDTH.DESKTOP_XL_MIN}px`,
|
package/lib/types/enums.js
CHANGED
|
@@ -23,4 +23,4 @@ var TabIndex;
|
|
|
23
23
|
(function (TabIndex) {
|
|
24
24
|
TabIndex[TabIndex["FOCUSABLE"] = 0] = "FOCUSABLE";
|
|
25
25
|
TabIndex[TabIndex["UNFOCUSABLE"] = -1] = "UNFOCUSABLE";
|
|
26
|
-
})(TabIndex
|
|
26
|
+
})(TabIndex || (exports.TabIndex = TabIndex = {}));
|
package/package.json
CHANGED
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"react-transition-group": "4.4.5"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@babel/cli": "7.
|
|
19
|
-
"@babel/core": "7.22.
|
|
20
|
-
"@babel/preset-env": "7.22.
|
|
21
|
-
"@babel/preset-react": "7.22.
|
|
22
|
-
"@babel/preset-typescript": "7.
|
|
18
|
+
"@babel/cli": "7.22.5",
|
|
19
|
+
"@babel/core": "7.22.5",
|
|
20
|
+
"@babel/preset-env": "7.22.5",
|
|
21
|
+
"@babel/preset-react": "7.22.5",
|
|
22
|
+
"@babel/preset-typescript": "7.22.5",
|
|
23
23
|
"@emotion/babel-preset-css-prop": "^11.10.0",
|
|
24
24
|
"@emotion/jest": "11.11.0",
|
|
25
25
|
"@emotion/react": "^11.10.4",
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"test:watch": "jest --watch",
|
|
71
71
|
"test:update": "jest --updateSnapshot"
|
|
72
72
|
},
|
|
73
|
-
"version": "9.7.
|
|
74
|
-
"gitHead": "
|
|
73
|
+
"version": "9.7.4",
|
|
74
|
+
"gitHead": "1ed405f040d81c74928aa513385b2378fbb37cd3"
|
|
75
75
|
}
|