widenarrow-ui 1.0.39 → 1.0.40
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/components/Button/Button.types.d.ts +1 -1
- package/lib/components/Checkbox/Checkbox.stories.d.ts +1 -0
- package/lib/components/Checkbox/Checkbox.types.d.ts +4 -2
- package/lib/components/SortableTable/SortableTable.types.d.ts +1 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +6 -3
- package/lib/index.esm.css +1 -1
- package/lib/index.esm.js +15 -14
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +15 -14
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/Button.tsx +5 -5
- package/src/components/Button/Button.types.ts +1 -1
- package/src/components/Checkbox/Checkbox.module.scss +4 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +9 -0
- package/src/components/Checkbox/Checkbox.tsx +6 -2
- package/src/components/Checkbox/Checkbox.types.ts +4 -2
- package/src/components/SortableTable/SortableTable.module.scss +4 -0
- package/src/components/SortableTable/SortableTable.tsx +3 -2
- package/src/components/SortableTable/SortableTable.types.ts +1 -0
package/lib/index.js
CHANGED
|
@@ -2041,7 +2041,7 @@ var styles$j = {"body":"Button-module_AK7AMO","container":"Button-module_0j8mdA"
|
|
|
2041
2041
|
var s$j = classNames.bind(styles$j);
|
|
2042
2042
|
var Button = react.memo(function (_a) {
|
|
2043
2043
|
var _b, _c;
|
|
2044
|
-
var className = _a.className, id = _a.id, style = _a.style, _d = _a.type, type = _d === void 0 ? exports.HierarchyTypes.PRIMARY : _d, _e = _a.size, size = _e === void 0 ? exports.SizeTypes.MEDIUM : _e, text = _a.text, toolTip = _a.toolTip, icon = _a.icon, iconSize = _a.iconSize,
|
|
2044
|
+
var className = _a.className, id = _a.id, style = _a.style, _d = _a.type, type = _d === void 0 ? exports.HierarchyTypes.PRIMARY : _d, _e = _a.size, size = _e === void 0 ? exports.SizeTypes.MEDIUM : _e, text = _a.text, toolTip = _a.toolTip, icon = _a.icon, iconSize = _a.iconSize, withIconRight = _a.withIconRight, rotateIconByDegree = _a.rotateIconByDegree, withEllipsis = _a.withEllipsis, onClickCallback = _a.onClickCallback, loading = _a.loading, disabled = _a.disabled, children = _a.children, autoFocus = _a.autoFocus, ariaLabel = _a.ariaLabel, tabIndex = _a.tabIndex;
|
|
2045
2045
|
var mergedClassNames = s$j('container', (_b = {
|
|
2046
2046
|
container_primary: type === exports.HierarchyTypes.PRIMARY,
|
|
2047
2047
|
container_secondary: type === exports.HierarchyTypes.SECONDARY,
|
|
@@ -2067,11 +2067,11 @@ var Button = react.memo(function (_a) {
|
|
|
2067
2067
|
}
|
|
2068
2068
|
return jsxRuntime.jsx(Icon, { icon: icon, size: iconSize || exports.SizeTypes.MEDIUM, className: s$j('icon'), rotateIconByDegree: rotateIconByDegree });
|
|
2069
2069
|
};
|
|
2070
|
-
var getInnerMarkup = function () { return (jsxRuntime.jsxs("div", __assign({ className: s$j('inner') }, { children: [icon &&
|
|
2071
|
-
text_withIconLeft: icon &&
|
|
2072
|
-
text_withIconRight: icon &&
|
|
2070
|
+
var getInnerMarkup = function () { return (jsxRuntime.jsxs("div", __assign({ className: s$j('inner') }, { children: [icon && !withIconRight ? jsxRuntime.jsx("div", __assign({ className: s$j('iconContainer') }, { children: getButtonIcon() })) : null, text ? (jsxRuntime.jsx("span", __assign({ className: s$j('text', {
|
|
2071
|
+
text_withIconLeft: icon && !withIconRight,
|
|
2072
|
+
text_withIconRight: icon && withIconRight,
|
|
2073
2073
|
text_withEllipsis: withEllipsis
|
|
2074
|
-
}) }, { children: text }))) : null, icon &&
|
|
2074
|
+
}) }, { children: text }))) : null, icon && withIconRight ? jsxRuntime.jsx("div", __assign({ className: s$j('iconContainer') }, { children: getButtonIcon() })) : null] }))); };
|
|
2075
2075
|
var baseAttributes = (_c = {
|
|
2076
2076
|
className: mergedClassNames,
|
|
2077
2077
|
id: id,
|
|
@@ -2091,26 +2091,27 @@ var Button = react.memo(function (_a) {
|
|
|
2091
2091
|
return buttonMarkup;
|
|
2092
2092
|
});
|
|
2093
2093
|
|
|
2094
|
-
var styles$i = {"body":"Checkbox-module_et5-hi","container":"Checkbox-module_pUY-sk","container_disabled":"Checkbox-module_R-WdsF","container_withHelperText":"Checkbox-module_LXApNe","container_enabled":"Checkbox-module_gWKAcZ","label":"Checkbox-module_JBaRmp","box":"Checkbox-module_KLUVKO","label_withHelperText":"Checkbox-module_YXNy27","label_isBlocked":"Checkbox-module_iDzbdV","label_withWordWrap":"Checkbox-module_sk8jg7","box_isChecked":"Checkbox-module_bQFvLF","box_isIndeterminate":"Checkbox-module_8QNUb3","box_isDisabled":"Checkbox-module_qbmebz","box_isCheckedAndDisabled":"Checkbox-module_QPcUI7","box_isFake":"Checkbox-module_uNeZ8r","input":"Checkbox-module_-039s6","input_disabled":"Checkbox-module_Nt3GpM","icon":"Checkbox-module_VMxEfA","helperText":"Checkbox-module_mkQr-O"};
|
|
2094
|
+
var styles$i = {"body":"Checkbox-module_et5-hi","container":"Checkbox-module_pUY-sk","container_disabled":"Checkbox-module_R-WdsF","container_withHelperText":"Checkbox-module_LXApNe","container_withEllipsis":"Checkbox-module_OMFVzd","container_enabled":"Checkbox-module_gWKAcZ","label":"Checkbox-module_JBaRmp","box":"Checkbox-module_KLUVKO","label_withHelperText":"Checkbox-module_YXNy27","label_isBlocked":"Checkbox-module_iDzbdV","label_withWordWrap":"Checkbox-module_sk8jg7","box_isChecked":"Checkbox-module_bQFvLF","box_isIndeterminate":"Checkbox-module_8QNUb3","box_isDisabled":"Checkbox-module_qbmebz","box_isCheckedAndDisabled":"Checkbox-module_QPcUI7","box_isFake":"Checkbox-module_uNeZ8r","input":"Checkbox-module_-039s6","input_disabled":"Checkbox-module_Nt3GpM","icon":"Checkbox-module_VMxEfA","helperText":"Checkbox-module_mkQr-O"};
|
|
2095
2095
|
|
|
2096
2096
|
var s$i = classNames.bind(styles$i);
|
|
2097
2097
|
var Checkbox = function (_a) {
|
|
2098
2098
|
var _b;
|
|
2099
|
-
var name = _a.name, className = _a.className, label = _a.label, helperText = _a.helperText, onChange = _a.onChange, onChangeFake = _a.onChangeFake, wordWrap = _a.wordWrap, checked = _a.checked, blocked = _a.blocked, indeterminate = _a.indeterminate, disabled = _a.disabled, isFake = _a.isFake, ariaLabel = _a.ariaLabel;
|
|
2099
|
+
var name = _a.name, value = _a.value, className = _a.className, label = _a.label, helperText = _a.helperText, onChange = _a.onChange, onChangeFake = _a.onChangeFake, wordWrap = _a.wordWrap, withEllipsis = _a.withEllipsis, checked = _a.checked, blocked = _a.blocked, indeterminate = _a.indeterminate, disabled = _a.disabled, isFake = _a.isFake, ariaLabel = _a.ariaLabel;
|
|
2100
2100
|
var onClickRealInput = function (event) {
|
|
2101
2101
|
if (!disabled && onChange) {
|
|
2102
|
-
onChange(event);
|
|
2102
|
+
onChange(value || name || '', event);
|
|
2103
2103
|
}
|
|
2104
2104
|
};
|
|
2105
2105
|
var onClickFakeInput = function (event) {
|
|
2106
2106
|
if (!disabled && onChangeFake) {
|
|
2107
|
-
onChangeFake(event);
|
|
2107
|
+
onChangeFake(value || name || '', event);
|
|
2108
2108
|
}
|
|
2109
2109
|
};
|
|
2110
2110
|
return (jsxRuntime.jsxs("div", __assign({ className: s$i('container', (_b = {
|
|
2111
2111
|
container_enabled: !disabled,
|
|
2112
2112
|
container_disabled: disabled,
|
|
2113
|
-
container_withHelperText: helperText
|
|
2113
|
+
container_withHelperText: helperText,
|
|
2114
|
+
container_withEllipsis: withEllipsis
|
|
2114
2115
|
},
|
|
2115
2116
|
_b[className] = className,
|
|
2116
2117
|
_b)) }, { children: [isFake ? (jsxRuntime.jsx("div", __assign({ className: s$i('box', {
|
|
@@ -2126,7 +2127,7 @@ var Checkbox = function (_a) {
|
|
|
2126
2127
|
box_isIndeterminate: indeterminate && !checked,
|
|
2127
2128
|
box_isDisabled: disabled,
|
|
2128
2129
|
box_isCheckedAndDisabled: disabled && checked
|
|
2129
|
-
}) }, { children: (checked || indeterminate) && jsxRuntime.jsx(Icon, { icon: checked ? exports.IconTypes.CHECK : exports.IconTypes.CHECK_INDETERMINATE, className: s$i('icon') }) }))] })), label && (jsxRuntime.jsxs(Label, __assign({ htmlFor: name, withWordBreak: wordWrap, disabled: disabled, marginBottom: '0', marginTop: '0', className: s$i('label', { label_isBlocked: blocked, label_withWordWrap: wordWrap, label_withHelperText: helperText }) }, { children: [label, helperText ? jsxRuntime.jsx("span", __assign({ className: s$i('helperText') }, { children: helperText })) : null] })))] })));
|
|
2130
|
+
}) }, { children: (checked || indeterminate) && jsxRuntime.jsx(Icon, { icon: checked ? exports.IconTypes.CHECK : exports.IconTypes.CHECK_INDETERMINATE, className: s$i('icon') }) }))] })), label && (jsxRuntime.jsxs(Label, __assign({ htmlFor: name, withWordBreak: wordWrap, disabled: disabled, withEllipsis: withEllipsis, marginBottom: '0', marginTop: '0', className: s$i('label', { label_isBlocked: blocked, label_withWordWrap: wordWrap, label_withHelperText: helperText }) }, { children: [label, helperText ? jsxRuntime.jsx("span", __assign({ className: s$i('helperText') }, { children: helperText })) : null] })))] })));
|
|
2130
2131
|
};
|
|
2131
2132
|
|
|
2132
2133
|
var styles$h = {"body":"Image-module_R0tivq","container":"Image-module_dYcZ5E","hoverOverlay":"Image-module_RZIW5V","container_withContainer":"Image-module_KohPWB","backgroundImage":"Image-module_c9gqLs","container_withAspectRatio":"Image-module_1OcRcC","image":"Image-module_1pa50f","ar4_1":"Image-module_BLQniT","ar3_1":"Image-module_qHwkv6","ar21_9":"Image-module_mBTxSg","ar16_9":"Image-module_nBLWjn","ar21_13":"Image-module_gxLQIV","ar4_3":"Image-module_qCRFSM","ar1_1":"Image-module_L0IiPU","backgroundImage_sizeContain":"Image-module_U-PVTF","backgroundImage_positionCenter":"Image-module_rSvAOx","backgroundImage_positionTop":"Image-module_MLdHRI","backgroundImage_positionBottom":"Image-module_4efd0J","lazy-image":"Image-module_cR0QR3","lazyloading":"Image-module_yIpGSs","lazyloaded":"Image-module_DFxhJb","hoverOverlayColor_blue":"Image-module_NsN9mb","hoverOverlayColor_lightBlue":"Image-module_2w0ChB","hoverOverlayColor_yellow":"Image-module_DMLlor","hoverOverlayColor_orange":"Image-module_J3iwe9","hoverOverlayColor_green":"Image-module_Ptd1Ve","hoverOverlayColor_red":"Image-module_RtgY-W","hoverOverlayColor_white":"Image-module_CI4wIF","hoverOverlayColor_grey1":"Image-module_XtlHIJ","hoverOverlayColor_grey2":"Image-module_ZqQzaU","hoverOverlayColor_grey3":"Image-module_cO-8NN","hoverOverlayColor_grey4":"Image-module_UIJSnG","hoverOverlayColor_grey5":"Image-module_-yqLQm","hoverOverlayColor_grey6":"Image-module_DLAtSn","hoverOverlayColor_grey7":"Image-module_l8oZVN","hoverOverlayColor_black":"Image-module_Pva4Sh"};
|
|
@@ -2853,7 +2854,7 @@ var MultiActionButton = function (_a) {
|
|
|
2853
2854
|
return buttonMarkup;
|
|
2854
2855
|
};
|
|
2855
2856
|
|
|
2856
|
-
var styles$2 = {"body":"SortableTable-module_255i6l","container":"SortableTable-module_gOksTd","table":"SortableTable-module_dfN-ML","table_loading":"SortableTable-module_7Xgt8Z","headerButton":"SortableTable-module_AadsXB","spinner":"SortableTable-module_w6cEGh","row":"SortableTable-module_XTdF1B","row_notInView":"SortableTable-module_WrgDHR","row_header":"SortableTable-module_kQXB-F","row_stickyHeader":"SortableTable-module_fot04-","cell":"SortableTable-module_BbzTcK","cell_header":"SortableTable-module_8ypAZw","cell_alignCenter":"SortableTable-module_WyBmBy","cell_alignRight":"SortableTable-module_d3tm0o","cellData":"SortableTable-module_NCWDUf","cellData_withEllipsis":"SortableTable-module_linqtd"};
|
|
2857
|
+
var styles$2 = {"body":"SortableTable-module_255i6l","container":"SortableTable-module_gOksTd","container_withMinWidth":"SortableTable-module_zbtuXT","table":"SortableTable-module_dfN-ML","table_loading":"SortableTable-module_7Xgt8Z","headerButton":"SortableTable-module_AadsXB","spinner":"SortableTable-module_w6cEGh","row":"SortableTable-module_XTdF1B","row_notInView":"SortableTable-module_WrgDHR","row_header":"SortableTable-module_kQXB-F","row_stickyHeader":"SortableTable-module_fot04-","cell":"SortableTable-module_BbzTcK","cell_header":"SortableTable-module_8ypAZw","cell_alignCenter":"SortableTable-module_WyBmBy","cell_alignRight":"SortableTable-module_d3tm0o","cellData":"SortableTable-module_NCWDUf","cellData_withEllipsis":"SortableTable-module_linqtd"};
|
|
2857
2858
|
|
|
2858
2859
|
var s$2 = classNames.bind(styles$2);
|
|
2859
2860
|
var SortableTableRow = function (_a) {
|
|
@@ -2867,7 +2868,7 @@ var SortableTableRow = function (_a) {
|
|
|
2867
2868
|
};
|
|
2868
2869
|
var SortableTable = function (_a) {
|
|
2869
2870
|
var _b, _c;
|
|
2870
|
-
var cells = _a.cells, data = _a.data, _d = _a.sortBy, sortBy = _d === void 0 ? [{ keyName: 'name', ascending: true }] : _d, _e = _a.skeletonRows, skeletonRows = _e === void 0 ? 6 : _e, loading = _a.loading, className = _a.className, headerClassName = _a.headerClassName, rowClassName = _a.rowClassName, withStickyHeader = _a.withStickyHeader, withIntersectionObserver = _a.withIntersectionObserver, onSortCallback = _a.onSortCallback;
|
|
2871
|
+
var cells = _a.cells, data = _a.data, _d = _a.sortBy, sortBy = _d === void 0 ? [{ keyName: 'name', ascending: true }] : _d, _e = _a.skeletonRows, skeletonRows = _e === void 0 ? 6 : _e, loading = _a.loading, className = _a.className, headerClassName = _a.headerClassName, rowClassName = _a.rowClassName, withStickyHeader = _a.withStickyHeader, withIntersectionObserver = _a.withIntersectionObserver, minWidth = _a.minWidth, onSortCallback = _a.onSortCallback;
|
|
2871
2872
|
var _f = react.useState(!ramda.is(Function, onSortCallback) ? sortBy : []), sortByLocalState = _f[0], setSortByLocalState = _f[1];
|
|
2872
2873
|
var noData = !loading && isArrayWithContent(data) === false;
|
|
2873
2874
|
var getTableHeaderCell = function (cell) {
|
|
@@ -2939,7 +2940,7 @@ var SortableTable = function (_a) {
|
|
|
2939
2940
|
}
|
|
2940
2941
|
return null;
|
|
2941
2942
|
};
|
|
2942
|
-
return (jsxRuntime.jsxs("div", __assign({ className: s$2('container', (_b = {}, _b[className] = className, _b)) }, { children: [loading ? jsxRuntime.jsx(SolidSpinner, { className: s$2('spinner'), type: exports.HierarchyTypes.PRIMARY, size: exports.SizeTypes.MEDIUM }) : null, jsxRuntime.jsxs("table", __assign({ className: s$2('table', { table_loading: loading }) }, { children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsx("tr", __assign({ className: s$2('row', (_c = { row_header: true, row_stickyHeader: withStickyHeader }, _c[headerClassName] = headerClassName, _c)) }, { children: cells.map(function (cell, i) { return (jsxRuntime.jsx("th", __assign({ className: s$2('cell', {
|
|
2943
|
+
return (jsxRuntime.jsxs("div", __assign({ className: s$2('container', (_b = {}, _b[className] = className, _b.container_withMinWidth = !!minWidth, _b)) }, { children: [loading ? jsxRuntime.jsx(SolidSpinner, { className: s$2('spinner'), type: exports.HierarchyTypes.PRIMARY, size: exports.SizeTypes.MEDIUM }) : null, jsxRuntime.jsxs("table", __assign({ className: s$2('table', { table_loading: loading }), style: { minWidth: minWidth || 'auto' } }, { children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsx("tr", __assign({ className: s$2('row', (_c = { row_header: true, row_stickyHeader: withStickyHeader }, _c[headerClassName] = headerClassName, _c)) }, { children: cells.map(function (cell, i) { return (jsxRuntime.jsx("th", __assign({ className: s$2('cell', {
|
|
2943
2944
|
cell_alignRight: cell.alignRight,
|
|
2944
2945
|
cell_alignCenter: cell.alignCenter,
|
|
2945
2946
|
cell_header: true
|