hrm_ui_lib 3.3.0 → 3.4.1
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/assets/styles/styles.css +1 -1
- package/components/Checkbox/Checkbox.js +4 -4
- package/components/Chips/Chips.js +1 -1
- package/components/Select/ButtonSelect/ButtonSelect.js +3 -2
- package/components/Select/FilterSelect/FilterDropdown.js +4 -3
- package/components/Select/FilterSelect/FilterSelect.js +3 -3
- package/components/Select/MultiSelect/DesktopWrapper.d.ts +1 -0
- package/components/Select/MultiSelect/DesktopWrapper.js +2 -2
- package/components/Select/MultiSelect/MobileWrapper.d.ts +1 -0
- package/components/Select/MultiSelect/MobileWrapper.js +2 -2
- package/components/Select/MultiSelect/MultiBase/MultiBase.js +4 -3
- package/components/Select/MultiSelect/MultiSelect.js +3 -3
- package/components/Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js +5 -4
- package/components/Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js +5 -4
- package/components/Select/MultiSelect/OptionsWrapper.d.ts +1 -0
- package/components/Select/NestedSelect/NestedSelect.js +5 -4
- package/components/Select/ProfileDropdown/index.js +2 -2
- package/components/Select/Select/Select.js +2 -2
- package/components/Select/Select/SelectDesktop/index.js +4 -3
- package/components/Select/Select/SelectMobile/MobileTopContent.d.ts +2 -1
- package/components/Select/Select/SelectMobile/MobileTopContent.js +2 -2
- package/components/Select/Select/SelectMobile/index.js +3 -2
- package/components/Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js +1 -1
- package/components/Select/SharedComponents/ContentTop.d.ts +1 -0
- package/components/Select/SharedComponents/ContentTop.js +6 -5
- package/components/Select/SharedComponents/Footer.js +2 -2
- package/components/Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js +3 -3
- package/components/Select/helper.d.ts +1 -0
- package/components/Select/helper.js +7 -1
- package/components/Select/types.d.ts +3 -0
- package/components/Status/Status.js +3 -3
- package/components/Tab/Tab.js +3 -3
- package/components/Tab/TabItem.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getOptionDataId: (dataId: string | undefined, value: TItemValue, index: number) => string;
|
|
@@ -26,6 +26,7 @@ interface TSelectBaseProps {
|
|
|
26
26
|
language?: string;
|
|
27
27
|
}
|
|
28
28
|
export interface TNestedSelectProps {
|
|
29
|
+
dataId?: string;
|
|
29
30
|
options: TSelectOptions;
|
|
30
31
|
isRequiredField?: boolean;
|
|
31
32
|
label?: string | ReactElement;
|
|
@@ -164,6 +165,7 @@ export interface ISingleSelectDesktopProps extends ISingleSelectResponsiveProps
|
|
|
164
165
|
setActiveIndex: (index: number) => void;
|
|
165
166
|
}
|
|
166
167
|
export type TSelectFooterPropTypes = {
|
|
168
|
+
dataId?: string;
|
|
167
169
|
checkboxInfo?: TCheckboxInfo;
|
|
168
170
|
hasChange?: boolean;
|
|
169
171
|
buttonProps?: {
|
|
@@ -266,6 +268,7 @@ declare type TNavItemValue = {
|
|
|
266
268
|
children: ReactNode;
|
|
267
269
|
};
|
|
268
270
|
export type TProfileDropdownProps = {
|
|
271
|
+
dataId?: string;
|
|
269
272
|
avatar: ReactElement;
|
|
270
273
|
email: string;
|
|
271
274
|
name: string;
|
|
@@ -8,11 +8,11 @@ var StatusTextSize;
|
|
|
8
8
|
StatusTextSize["small"] = "xsmall";
|
|
9
9
|
})(StatusTextSize || (StatusTextSize = {}));
|
|
10
10
|
export const Status = (props) => {
|
|
11
|
-
const { type = 'primary', size = 'large', text = '', children, className = '', leftIconProps, rightIconProps, withCircle = true, withBackground = false, dataId } = props;
|
|
12
|
-
return (_jsxs("div", { className: classNames(`status status--${size}`, className, {
|
|
11
|
+
const { type = 'primary', size = 'large', text = '', children, className = '', leftIconProps, rightIconProps, withCircle = true, withBackground = false, dataId = '' } = props;
|
|
12
|
+
return (_jsxs("div", { "data-id": dataId, className: classNames(`status status--${size}`, className, {
|
|
13
13
|
status__withBackground: withBackground,
|
|
14
14
|
[`status__withBackground--${type}`]: withBackground
|
|
15
15
|
}), children: [withCircle ? (_jsx("span", { className: classNames('status__circle', 'mr-6', {
|
|
16
16
|
[`status__circle--${type}`]: true
|
|
17
|
-
}) })) : null, (leftIconProps === null || leftIconProps === void 0 ? void 0 : leftIconProps.Component) ? (_jsx(leftIconProps.Component, Object.assign({ size: "xsmall", type: type, className: "mr-6" }, leftIconProps))) : null, _jsxs("div", { className: "status__label", children: [_jsx(Text, { className: "status__label-text", dataId: `${dataId}-text
|
|
17
|
+
}) })) : null, (leftIconProps === null || leftIconProps === void 0 ? void 0 : leftIconProps.Component) ? (_jsx(leftIconProps.Component, Object.assign({ size: "xsmall", type: type, className: "mr-6" }, leftIconProps))) : null, _jsxs("div", { className: "status__label", children: [_jsx(Text, { className: "status__label-text", dataId: dataId ? `${dataId}-text` : '', weight: withBackground ? 'semibold' : 'regular', type: !withCircle || withBackground ? type : 'primary', size: StatusTextSize[size], children: text }), children] }), rightIconProps] }));
|
|
18
18
|
};
|
package/components/Tab/Tab.js
CHANGED
|
@@ -13,8 +13,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { TabItem } from './TabItem';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
export const Tab = (props) => {
|
|
16
|
-
const { selectedValue, tabItems, onSelect, className } = props, rest = __rest(props, ["selectedValue", "tabItems", "onSelect", "className"]);
|
|
17
|
-
return (_jsx("div", { className: "tabs-container", children: _jsx("div", { className: classNames('tabs-header-container', className), children: tabItems.map((tabInfo) => {
|
|
18
|
-
return (_jsx(TabItem, Object.assign({ label: tabInfo.label, badgeProps: tabInfo.badgeProps, onClick: () => onSelect(tabInfo.value), val: tabInfo.value, isSelected: selectedValue === tabInfo.value, dataId: (tabInfo === null || tabInfo === void 0 ? void 0 : tabInfo.dataId) || '', disabled: tabInfo.disabled }, rest), tabInfo.value));
|
|
16
|
+
const { selectedValue, tabItems, onSelect, className, dataId = '' } = props, rest = __rest(props, ["selectedValue", "tabItems", "onSelect", "className", "dataId"]);
|
|
17
|
+
return (_jsx("div", { className: "tabs-container", "data-id": dataId, children: _jsx("div", { className: classNames('tabs-header-container', className), children: tabItems.map((tabInfo, index) => {
|
|
18
|
+
return (_jsx(TabItem, Object.assign({ label: tabInfo.label, badgeProps: tabInfo.badgeProps, onClick: () => onSelect(tabInfo.value), val: tabInfo.value, isSelected: selectedValue === tabInfo.value, dataId: (tabInfo === null || tabInfo === void 0 ? void 0 : tabInfo.dataId) || (dataId ? `${dataId}-item-${index}` : ''), disabled: tabInfo.disabled }, rest), tabInfo.value));
|
|
19
19
|
}) }) }));
|
|
20
20
|
};
|
|
@@ -4,7 +4,7 @@ import { noop } from '../../utils/helpers';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
export const TabItem = (props) => {
|
|
6
6
|
const { size = 'large', iconProps, badgeProps, label, className = '', disabled = false, isSelected, rightIconProps, val, onClick, dataId } = props;
|
|
7
|
-
return (_jsxs("div", { onClick: disabled ? noop : onClick, className: classNames('tab', { [`tab--${size}`]: size }, { 'tab--disabled': disabled }, { 'tab--selected': isSelected }, className), children: [(iconProps === null || iconProps === void 0 ? void 0 : iconProps.Component) ? (_jsx(iconProps.Component, Object.assign({ className: "tab__icon mr-8", size: `${size == 'small' ? 'xsmall' : 'small'}` }, iconProps))) : null, _jsx("span", { className: "tab__label", "data-id": dataId, children: label }), (rightIconProps === null || rightIconProps === void 0 ? void 0 : rightIconProps.Component) ? (_jsx(rightIconProps.Component, Object.assign({ onClick: (e) => {
|
|
7
|
+
return (_jsxs("div", { "data-id": dataId, onClick: disabled ? noop : onClick, className: classNames('tab', { [`tab--${size}`]: size }, { 'tab--disabled': disabled }, { 'tab--selected': isSelected }, className), children: [(iconProps === null || iconProps === void 0 ? void 0 : iconProps.Component) ? (_jsx(iconProps.Component, Object.assign({ className: "tab__icon mr-8", size: `${size == 'small' ? 'xsmall' : 'small'}` }, iconProps))) : null, _jsx("span", { className: "tab__label", "data-id": dataId ? `${dataId}-label` : '', children: label }), (rightIconProps === null || rightIconProps === void 0 ? void 0 : rightIconProps.Component) ? (_jsx(rightIconProps.Component, Object.assign({ onClick: (e) => {
|
|
8
8
|
if (rightIconProps === null || rightIconProps === void 0 ? void 0 : rightIconProps.action) {
|
|
9
9
|
e.stopPropagation();
|
|
10
10
|
rightIconProps === null || rightIconProps === void 0 ? void 0 : rightIconProps.action(val);
|