widenarrow-ui 1.1.42 → 1.1.43
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/FormSkeleton/FormSkeleton.types.d.ts +1 -1
- package/lib/components/IconButton/IconButton.types.d.ts +1 -0
- package/lib/components/InlineButton/InlineButton.types.d.ts +1 -0
- package/lib/components/Input/Input.stories.d.ts +1 -0
- package/lib/components/Input/Input.types.d.ts +1 -0
- package/lib/components/NoDataMessage/NoDataMessage.types.d.ts +1 -1
- package/lib/components/Pagination/Pagination.types.d.ts +1 -1
- package/lib/components/SwitchButton/SwitchButton.types.d.ts +1 -1
- package/lib/index.d.ts +8 -6
- package/lib/index.esm.js +7 -5
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +7 -5
- package/lib/index.js.map +1 -1
- package/lib/utils.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/FormSkeleton/FormSkeleton.types.ts +1 -1
- package/src/components/IconButton/IconButton.tsx +2 -0
- package/src/components/IconButton/IconButton.types.ts +1 -0
- package/src/components/InlineButton/InlineButton.tsx +2 -0
- package/src/components/InlineButton/InlineButton.types.ts +1 -0
- package/src/components/Input/Input.stories.tsx +22 -0
- package/src/components/Input/Input.tsx +1 -0
- package/src/components/Input/Input.types.ts +1 -0
- package/src/components/NoDataMessage/NoDataMessage.types.ts +1 -1
- package/src/components/Pagination/Pagination.types.ts +1 -1
- package/src/components/SwitchButton/SwitchButton.tsx +1 -1
- package/src/components/SwitchButton/SwitchButton.types.ts +1 -1
- package/src/utils.ts +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { CSSProperties, MouseEvent, ReactNode, FC, ChangeEvent, RefObject, FocusEvent, KeyboardEvent } from 'react';
|
|
3
3
|
import { Placement, PositioningStrategy } from '@popperjs/core';
|
|
4
|
-
import { HierarchyTypes as HierarchyTypes$1, ColorTypes as ColorTypes$1, IconTypes as IconTypes$1 } from 'src/constants';
|
|
5
4
|
|
|
6
5
|
declare enum IconTypes {
|
|
7
6
|
ACCOUNT_SETTINGS = "iconAccountSettings",
|
|
@@ -579,7 +578,7 @@ interface PaginationProps {
|
|
|
579
578
|
withTablePagination?: boolean;
|
|
580
579
|
withFastForwardButtons?: boolean;
|
|
581
580
|
pageSizeOptions?: Array<number>;
|
|
582
|
-
buttonType?: HierarchyTypes
|
|
581
|
+
buttonType?: HierarchyTypes.PRIMARY | HierarchyTypes.SECONDARY;
|
|
583
582
|
className?: string;
|
|
584
583
|
nextPageTitle?: string;
|
|
585
584
|
previousPageTitle?: string;
|
|
@@ -602,7 +601,7 @@ interface Block {
|
|
|
602
601
|
interface FormSkeletonProps {
|
|
603
602
|
className?: string;
|
|
604
603
|
blocks: Array<Block>;
|
|
605
|
-
color?: Partial<ColorTypes
|
|
604
|
+
color?: Partial<ColorTypes>;
|
|
606
605
|
}
|
|
607
606
|
|
|
608
607
|
declare const FormSkeleton: FC<FormSkeletonProps>;
|
|
@@ -681,6 +680,7 @@ interface IconButtonProps extends IconStyleInterface {
|
|
|
681
680
|
iconColor?: Partial<ColorTypes>;
|
|
682
681
|
href?: string;
|
|
683
682
|
disabled?: boolean;
|
|
683
|
+
tabIndex?: number;
|
|
684
684
|
toolTip?: string;
|
|
685
685
|
ariaLabel?: string;
|
|
686
686
|
}
|
|
@@ -692,6 +692,7 @@ interface IconInterface {
|
|
|
692
692
|
disabled?: boolean;
|
|
693
693
|
icon: Partial<IconTypes>;
|
|
694
694
|
toolTip?: string;
|
|
695
|
+
tabIndex?: number;
|
|
695
696
|
onClickCallback: () => void;
|
|
696
697
|
}
|
|
697
698
|
interface InputProps {
|
|
@@ -769,6 +770,7 @@ interface InlineButtonProps {
|
|
|
769
770
|
withEllipsis?: boolean;
|
|
770
771
|
disabled?: boolean | undefined;
|
|
771
772
|
style?: CSSProperties;
|
|
773
|
+
tabIndex?: number;
|
|
772
774
|
toolTip?: string;
|
|
773
775
|
}
|
|
774
776
|
|
|
@@ -944,7 +946,7 @@ declare const SortableTable: FC<SortableTableProps>;
|
|
|
944
946
|
interface SwitchButtonProps {
|
|
945
947
|
checked: boolean;
|
|
946
948
|
name?: string;
|
|
947
|
-
label
|
|
949
|
+
label?: string;
|
|
948
950
|
withLabel?: boolean;
|
|
949
951
|
withInlineLabel?: boolean;
|
|
950
952
|
ariaLabel?: string;
|
|
@@ -1054,7 +1056,7 @@ declare const SkeletonItem: FC<SkeletonItemProps>;
|
|
|
1054
1056
|
|
|
1055
1057
|
interface NoDataMessageProps {
|
|
1056
1058
|
className?: string;
|
|
1057
|
-
icon?: Partial<IconTypes
|
|
1059
|
+
icon?: Partial<IconTypes>;
|
|
1058
1060
|
title?: string;
|
|
1059
1061
|
message?: string;
|
|
1060
1062
|
absoluteCenter?: boolean;
|
|
@@ -1062,7 +1064,7 @@ interface NoDataMessageProps {
|
|
|
1062
1064
|
button?: {
|
|
1063
1065
|
onClickCallback: () => void;
|
|
1064
1066
|
text: string;
|
|
1065
|
-
icon: Partial<IconTypes
|
|
1067
|
+
icon: Partial<IconTypes>;
|
|
1066
1068
|
};
|
|
1067
1069
|
}
|
|
1068
1070
|
|
package/lib/index.esm.js
CHANGED
|
@@ -354,7 +354,7 @@ var getPaginationArray = function (pagination) {
|
|
|
354
354
|
};
|
|
355
355
|
/**
|
|
356
356
|
* @function pickAttributes
|
|
357
|
-
* @param
|
|
357
|
+
* @param attributes
|
|
358
358
|
* @returns {Object}
|
|
359
359
|
*/
|
|
360
360
|
var pickAttributes = function (attributes) { return pickBy(function (val) { return val !== undefined; }, attributes); };
|
|
@@ -2765,7 +2765,7 @@ var styles$f = {"body":"InlineButton-module_aw3KLt","container":"InlineButton-mo
|
|
|
2765
2765
|
var s$f = classNames.bind(styles$f);
|
|
2766
2766
|
var InlineButton = memo(function (_a) {
|
|
2767
2767
|
var _b, _c;
|
|
2768
|
-
var className = _a.className, id = _a.id, loading = _a.loading, ariaLabel = _a.ariaLabel, text = _a.text, style = _a.style, _d = _a.size, size = _d === void 0 ? SizeTypes.MEDIUM : _d, sizeMd = _a.sizeMd, sizeLg = _a.sizeLg, sizeXl = _a.sizeXl, _e = _a.type, type = _e === void 0 ? HierarchyTypes.PRIMARY : _e, textClassName = _a.textClassName, children = _a.children, icon = _a.icon, withIconRight = _a.withIconRight, iconSize = _a.iconSize, iconClassName = _a.iconClassName, rotateIcon = _a.rotateIcon, rotateIconByDegree = _a.rotateIconByDegree, onClickCallback = _a.onClickCallback, withEllipsis = _a.withEllipsis, disabled = _a.disabled, toolTip = _a.toolTip;
|
|
2768
|
+
var className = _a.className, id = _a.id, loading = _a.loading, ariaLabel = _a.ariaLabel, text = _a.text, style = _a.style, _d = _a.size, size = _d === void 0 ? SizeTypes.MEDIUM : _d, sizeMd = _a.sizeMd, sizeLg = _a.sizeLg, sizeXl = _a.sizeXl, _e = _a.type, type = _e === void 0 ? HierarchyTypes.PRIMARY : _e, textClassName = _a.textClassName, children = _a.children, icon = _a.icon, withIconRight = _a.withIconRight, iconSize = _a.iconSize, iconClassName = _a.iconClassName, tabIndex = _a.tabIndex, rotateIcon = _a.rotateIcon, rotateIconByDegree = _a.rotateIconByDegree, onClickCallback = _a.onClickCallback, withEllipsis = _a.withEllipsis, disabled = _a.disabled, toolTip = _a.toolTip;
|
|
2769
2769
|
var mergedClassNames = s$f('container', (_b = {},
|
|
2770
2770
|
_b["container_".concat(type)] = !!type,
|
|
2771
2771
|
_b["container_sizeSm_".concat(size)] = !!size,
|
|
@@ -2792,6 +2792,7 @@ var InlineButton = memo(function (_a) {
|
|
|
2792
2792
|
var baseAttributes = (_c = {
|
|
2793
2793
|
className: mergedClassNames,
|
|
2794
2794
|
id: id,
|
|
2795
|
+
tabIndex: tabIndex,
|
|
2795
2796
|
disabled: loading || disabled,
|
|
2796
2797
|
onClick: !!onClickCallback && !loading ? onClickCallback : undefined
|
|
2797
2798
|
},
|
|
@@ -2961,7 +2962,7 @@ var styles$a = {"body":"IconButton-module_DV09bK","container":"IconButton-module
|
|
|
2961
2962
|
var s$a = classNames.bind(styles$a);
|
|
2962
2963
|
var IconButton = memo(function (_a) {
|
|
2963
2964
|
var _b, _c;
|
|
2964
|
-
var className = _a.className, disabled = _a.disabled, style = _a.style, icon = _a.icon, id = _a.id, text = _a.text, _d = _a.size, size = _d === void 0 ? SizeTypes.MEDIUM : _d, _e = _a.type, type = _e === void 0 ? HierarchyTypes.SECONDARY : _e, href = _a.href, iconColor = _a.iconColor, iconSize = _a.iconSize, iconClassName = _a.iconClassName, onClickCallback = _a.onClickCallback, rotateIcon = _a.rotateIcon, rotateIconByDegree = _a.rotateIconByDegree, toolTip = _a.toolTip, ariaLabel = _a.ariaLabel;
|
|
2965
|
+
var className = _a.className, disabled = _a.disabled, style = _a.style, icon = _a.icon, id = _a.id, text = _a.text, _d = _a.size, size = _d === void 0 ? SizeTypes.MEDIUM : _d, _e = _a.type, type = _e === void 0 ? HierarchyTypes.SECONDARY : _e, href = _a.href, iconColor = _a.iconColor, iconSize = _a.iconSize, iconClassName = _a.iconClassName, onClickCallback = _a.onClickCallback, rotateIcon = _a.rotateIcon, tabIndex = _a.tabIndex, rotateIconByDegree = _a.rotateIconByDegree, toolTip = _a.toolTip, ariaLabel = _a.ariaLabel;
|
|
2965
2966
|
var mergedClassNames = s$a('container', (_b = {},
|
|
2966
2967
|
_b["container_".concat(size)] = size,
|
|
2967
2968
|
_b["container_".concat(type)] = type,
|
|
@@ -2990,6 +2991,7 @@ var IconButton = memo(function (_a) {
|
|
|
2990
2991
|
_c['aria-label'] = ariaLabel || text,
|
|
2991
2992
|
_c.style = style,
|
|
2992
2993
|
_c.href = href,
|
|
2994
|
+
_c.tabIndex = tabIndex,
|
|
2993
2995
|
_c.target = href ? '_blank' : undefined,
|
|
2994
2996
|
_c.rel = href ? 'noopener noreferrer' : undefined,
|
|
2995
2997
|
_c);
|
|
@@ -3050,7 +3052,7 @@ var Input = function (_a) {
|
|
|
3050
3052
|
icon_displayNone: iconObject.loading
|
|
3051
3053
|
},
|
|
3052
3054
|
_a[iconClassName] = iconClassName,
|
|
3053
|
-
_a)), disabled: has('disabled', iconObject) ? iconObject.disabled : disabled, toolTip: iconObject.toolTip, icon: iconObject.icon, onClickCallback: iconObject.onClickCallback }))] }));
|
|
3055
|
+
_a)), tabIndex: iconObject.tabIndex, disabled: has('disabled', iconObject) ? iconObject.disabled : disabled, toolTip: iconObject.toolTip, icon: iconObject.icon, onClickCallback: iconObject.onClickCallback }))] }));
|
|
3054
3056
|
};
|
|
3055
3057
|
var containerAttributes = {
|
|
3056
3058
|
htmlFor: name
|
|
@@ -3391,7 +3393,7 @@ var SwitchButton = function (_a) {
|
|
|
3391
3393
|
label_alignCenter: alignCenter,
|
|
3392
3394
|
label_withInlineLabel: withInlineLabel,
|
|
3393
3395
|
label_disabled: disabled
|
|
3394
|
-
}), children: label }), jsx("input", __assign({ className: s$2('input'), type: 'checkbox', onChange: function () { return undefined; } }, pickAttributes(inputAttributes))), jsxs("div", { className: s$2('button', {
|
|
3396
|
+
}), children: label || ariaLabel }), jsx("input", __assign({ className: s$2('input'), type: 'checkbox', onChange: function () { return undefined; } }, pickAttributes(inputAttributes))), jsxs("div", { className: s$2('button', {
|
|
3395
3397
|
button_alignCenter: alignCenter
|
|
3396
3398
|
}), children: [jsx("span", { className: s$2('line') }), jsx("span", { className: s$2('circle') })] })] })));
|
|
3397
3399
|
};
|