@infomaximum/ui-kit 0.18.0 → 0.18.2
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/components/BaseTooltip/BaseTooltip.js +29 -32
- package/dist/components/BaseTooltip/hooks/useShowTooltipController.js +3 -2
- package/dist/components/Button/Button.styles.d.ts +50 -2
- package/dist/components/Button/Button.styles.js +7 -2
- package/dist/components/Dropdown/Dropdown.js +2 -1
- package/dist/components/Dropdown/components/Menu/Menu.js +7 -7
- package/dist/components/Input/Input.js +8 -7
- package/dist/components/Input/Input.styles.d.ts +15 -14
- package/dist/components/Input/Input.styles.js +48 -40
- package/dist/components/Input/Input.tokens.d.ts +3 -0
- package/dist/components/Input/Input.tokens.js +3 -0
- package/dist/components/Input/Input.types.d.ts +2 -1
- package/dist/components/Input/components/InputTextArea/InputTextArea.js +3 -3
- package/dist/components/Input/components/InputTextArea/InputTextArea.styles.d.ts +5 -4
- package/dist/components/Input/components/InputTextArea/InputTextArea.styles.js +2 -2
- package/dist/components/Input/components/InputTextArea/InputTextArea.types.d.ts +2 -1
- package/dist/components/InputNumber/InputNumber.js +7 -7
- package/dist/components/InputNumber/InputNumber.styles.d.ts +6 -5
- package/dist/components/InputNumber/InputNumber.styles.js +38 -34
- package/dist/components/InputNumber/InputNumber.tokens.d.ts +3 -0
- package/dist/components/InputNumber/InputNumber.tokens.js +3 -0
- package/dist/components/InputNumber/InputNumber.types.d.ts +2 -1
- package/dist/components/InternalPicker/pickers/RangePicker/RangePicker.js +5 -2
- package/dist/components/InternalPicker/pickers/RangePicker/RangePicker.types.d.ts +2 -2
- package/dist/components/InternalPicker/pickers/SinglePicker/SinglePicker.js +5 -2
- package/dist/components/InternalPicker/pickers/SinglePicker/SinglePicker.types.d.ts +2 -1
- package/dist/components/InternalPicker/styles/DatePanel.styles.d.ts +596 -596
- package/dist/components/InternalPicker/styles/Popup.styles.d.ts +627 -593
- package/dist/components/InternalPicker/styles/Popup.styles.js +36 -1
- package/dist/components/InternalPicker/styles/RangeSelector.styles.d.ts +12 -0
- package/dist/components/InternalPicker/styles/RangeSelector.styles.js +3 -0
- package/dist/components/InternalPicker/styles/SingleSelector.styles.d.ts +9 -0
- package/dist/components/InternalPicker/styles/SingleSelector.styles.js +9 -0
- package/dist/components/InternalPicker/tokens.d.ts +2 -0
- package/dist/components/InternalPicker/tokens.js +2 -0
- package/dist/components/Radio/components/RadioGroup/RadioGroup.js +7 -2
- package/dist/components/Radio/components/RadioGroup/RadioGroup.styles.d.ts +8 -1
- package/dist/components/Radio/components/RadioGroup/RadioGroup.styles.js +14 -4
- package/dist/components/Radio/components/RadioGroup/RadioGroup.types.d.ts +5 -0
- package/dist/components/Table/hooks/useTableVisualParamsChange/utils.d.ts +1 -1
- package/dist/components/Tabs/components/TabItem/TabItem.styles.d.ts +1 -1
- package/package.json +1 -1
|
@@ -56,6 +56,40 @@ const getPickerNowBtnStyle = (pickerTokens) => ({
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
+
const getPickerPresetsStyle = (pickerTokens, theme) => ({
|
|
60
|
+
[`.${prefixCls}-panel-layout`]: {
|
|
61
|
+
display: "flex"
|
|
62
|
+
},
|
|
63
|
+
[`.${prefixCls}-presets`]: {
|
|
64
|
+
display: "flex",
|
|
65
|
+
flexDirection: "column",
|
|
66
|
+
width: 128,
|
|
67
|
+
boxSizing: "border-box",
|
|
68
|
+
borderRight: `1px solid ${theme.lineDivider}`
|
|
69
|
+
},
|
|
70
|
+
[`.${prefixCls}-presets ul`]: {
|
|
71
|
+
height: 0,
|
|
72
|
+
flex: "auto",
|
|
73
|
+
listStyle: "none",
|
|
74
|
+
overflow: "auto",
|
|
75
|
+
margin: 0,
|
|
76
|
+
padding: theme.paddingXS
|
|
77
|
+
},
|
|
78
|
+
[`.${prefixCls}-presets li`]: {
|
|
79
|
+
paddingBlock: theme.paddingXS,
|
|
80
|
+
paddingInline: theme.paddingM,
|
|
81
|
+
borderRadius: theme.borderRadiusM,
|
|
82
|
+
cursor: "pointer",
|
|
83
|
+
...theme.typography.body2,
|
|
84
|
+
color: pickerTokens.pickerText,
|
|
85
|
+
overflow: "hidden",
|
|
86
|
+
textOverflow: "ellipsis",
|
|
87
|
+
whiteSpace: "nowrap",
|
|
88
|
+
"&:hover": {
|
|
89
|
+
background: pickerTokens.pickerCellSecondaryBgHover
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
59
93
|
const getPopupStyle = (pickerTokens) => (theme) => ({
|
|
60
94
|
...getPickerDropdownStyle(theme),
|
|
61
95
|
...getPickerRangeWrapperStyle(),
|
|
@@ -66,7 +100,8 @@ const getPopupStyle = (pickerTokens) => (theme) => ({
|
|
|
66
100
|
...getPickerFooterStyle(theme),
|
|
67
101
|
...getPickerRangesStyle(theme),
|
|
68
102
|
...getPickerOkStyle(),
|
|
69
|
-
...getPickerNowBtnStyle(pickerTokens)
|
|
103
|
+
...getPickerNowBtnStyle(pickerTokens),
|
|
104
|
+
...getPickerPresetsStyle(pickerTokens, theme)
|
|
70
105
|
});
|
|
71
106
|
export {
|
|
72
107
|
getPopupStyle
|
|
@@ -26,6 +26,9 @@ export declare const getRangeSelectorStyle: (pickerTokens: PickerTokens) => (the
|
|
|
26
26
|
"&.picker-error-status .picker-active-bar": {
|
|
27
27
|
background: "#FF4D4F";
|
|
28
28
|
};
|
|
29
|
+
"&.picker-warning-status .picker-active-bar": {
|
|
30
|
+
background: "#FA8C16";
|
|
31
|
+
};
|
|
29
32
|
"&.picker-focused .picker-active-bar": {
|
|
30
33
|
opacity: number;
|
|
31
34
|
};
|
|
@@ -128,4 +131,13 @@ export declare const getRangeSelectorStyle: (pickerTokens: PickerTokens) => (the
|
|
|
128
131
|
":not(.picker-disabled).picker-error-status:hover": {
|
|
129
132
|
readonly borderColor: "#FF7875";
|
|
130
133
|
};
|
|
134
|
+
"&.picker-warning-status": {
|
|
135
|
+
readonly borderColor: "#FA8C16";
|
|
136
|
+
readonly ":focus, :focus-within": {
|
|
137
|
+
readonly boxShadow: `0px 0px 4px 0px rgba(${number}, ${number}, ${number}, 0.5)`;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
":not(.picker-disabled).picker-warning-status:hover": {
|
|
141
|
+
readonly borderColor: "#FFA940";
|
|
142
|
+
};
|
|
131
143
|
};
|
|
@@ -10,6 +10,9 @@ const getPickerActiveBarStyle = (pickerTokens) => ({
|
|
|
10
10
|
[`&.${prefixCls}-error-status .${prefixCls}-active-bar`]: {
|
|
11
11
|
background: pickerTokens.pickerBorderDanger
|
|
12
12
|
},
|
|
13
|
+
[`&.${prefixCls}-warning-status .${prefixCls}-active-bar`]: {
|
|
14
|
+
background: pickerTokens.pickerBorderWarning
|
|
15
|
+
},
|
|
13
16
|
[`&.${prefixCls}-focused .${prefixCls}-active-bar`]: {
|
|
14
17
|
opacity: 1
|
|
15
18
|
}
|
|
@@ -100,4 +100,13 @@ export declare const getSingleSelectorStyle: (pickerTokens: PickerTokens) => (th
|
|
|
100
100
|
":not(.picker-disabled).picker-error-status:hover": {
|
|
101
101
|
readonly borderColor: "#FF7875";
|
|
102
102
|
};
|
|
103
|
+
"&.picker-warning-status": {
|
|
104
|
+
readonly borderColor: "#FA8C16";
|
|
105
|
+
readonly ":focus, :focus-within": {
|
|
106
|
+
readonly boxShadow: `0px 0px 4px 0px rgba(${number}, ${number}, ${number}, 0.5)`;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
":not(.picker-disabled).picker-warning-status:hover": {
|
|
110
|
+
readonly borderColor: "#FFA940";
|
|
111
|
+
};
|
|
103
112
|
};
|
|
@@ -31,6 +31,15 @@ const getPickerStyle = (pickerTokens, theme) => ({
|
|
|
31
31
|
},
|
|
32
32
|
[`:not(.${prefixCls}-disabled).${prefixCls}-error-status:hover`]: {
|
|
33
33
|
borderColor: pickerTokens.pickerBorderDangerHover
|
|
34
|
+
},
|
|
35
|
+
[`&.${prefixCls}-warning-status`]: {
|
|
36
|
+
borderColor: pickerTokens.pickerBorderWarning,
|
|
37
|
+
":focus, :focus-within": {
|
|
38
|
+
boxShadow: `0px 0px 4px 0px ${theme.fieldFocusedWarning}`
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
[`:not(.${prefixCls}-disabled).${prefixCls}-warning-status:hover`]: {
|
|
42
|
+
borderColor: pickerTokens.pickerBorderWarningHover
|
|
34
43
|
}
|
|
35
44
|
});
|
|
36
45
|
const getPickerInputWrapperStyle = (theme) => ({
|
|
@@ -5,6 +5,8 @@ export declare const getPickerTokens: (theme: Theme) => {
|
|
|
5
5
|
pickerBorder: "#D9D9D9";
|
|
6
6
|
pickerBorderDanger: "#FF4D4F";
|
|
7
7
|
pickerBorderDangerHover: "#FF7875";
|
|
8
|
+
pickerBorderWarning: "#FA8C16";
|
|
9
|
+
pickerBorderWarningHover: "#FFA940";
|
|
8
10
|
pickerBg: "#FFFFFF";
|
|
9
11
|
pickerBgDisabled: "#F0F0F0";
|
|
10
12
|
pickerPlaceholder: "#BFBFBF";
|
|
@@ -4,6 +4,8 @@ const getPickerTokens = (theme) => ({
|
|
|
4
4
|
pickerBorder: theme.lineBorder,
|
|
5
5
|
pickerBorderDanger: theme.dangerBase,
|
|
6
6
|
pickerBorderDangerHover: theme.dangerHover,
|
|
7
|
+
pickerBorderWarning: theme.warningBase,
|
|
8
|
+
pickerBorderWarningHover: theme.warningHover,
|
|
7
9
|
pickerBg: theme.bgContainer,
|
|
8
10
|
pickerBgDisabled: theme.bgContainerDisabled,
|
|
9
11
|
pickerPlaceholder: theme.textHint,
|
|
@@ -14,13 +14,14 @@ const RadioGroupComponent = (props) => {
|
|
|
14
14
|
disabled = false,
|
|
15
15
|
optionType = "default",
|
|
16
16
|
buttonType = "text",
|
|
17
|
+
orientation = "horizontal",
|
|
17
18
|
options,
|
|
18
19
|
onChange,
|
|
19
20
|
children,
|
|
20
21
|
...restProps
|
|
21
22
|
} = props;
|
|
22
23
|
const theme = useTheme();
|
|
23
|
-
const
|
|
24
|
+
const isDefaultOptionType = optionType === "default";
|
|
24
25
|
const [value, setValue] = useMergedState(defaultValue, {
|
|
25
26
|
value: valueProp
|
|
26
27
|
});
|
|
@@ -51,7 +52,11 @@ const RadioGroupComponent = (props) => {
|
|
|
51
52
|
return /* @__PURE__ */ jsx(Radio, { disabled: option.disabled || disabled, value: option.value, checked: value === option.value, icon: option.icon, children: option.label }, `radio-group-value-options-${option.value}`);
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
|
-
return /* @__PURE__ */ jsx("div", { css: getRadioGroupStyle(
|
|
55
|
+
return /* @__PURE__ */ jsx("div", { css: getRadioGroupStyle({
|
|
56
|
+
theme,
|
|
57
|
+
isDefaultOptionType,
|
|
58
|
+
orientation
|
|
59
|
+
}), ...restProps, children: /* @__PURE__ */ jsx(RadioGroupContext.Provider, { value: contextValue, children: childrenToRender }) });
|
|
55
60
|
};
|
|
56
61
|
const RadioGroup = RadioGroupComponent;
|
|
57
62
|
export {
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { Theme } from 'themes';
|
|
2
|
-
|
|
2
|
+
import { RadioGroupOrientation } from './RadioGroup.types';
|
|
3
|
+
export declare const getRadioGroupStyle: ({ theme, isDefaultOptionType, orientation, }: {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
isDefaultOptionType: boolean;
|
|
6
|
+
orientation: RadioGroupOrientation;
|
|
7
|
+
}) => {
|
|
3
8
|
readonly display: "inline-flex";
|
|
9
|
+
readonly flexDirection: "column" | undefined;
|
|
4
10
|
readonly columnGap: 8 | undefined;
|
|
11
|
+
readonly rowGap: 8 | undefined;
|
|
5
12
|
};
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
const getRadioGroupStyle = (
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const getRadioGroupStyle = ({
|
|
2
|
+
theme,
|
|
3
|
+
isDefaultOptionType,
|
|
4
|
+
orientation
|
|
5
|
+
}) => {
|
|
6
|
+
const isVertical = isDefaultOptionType && orientation === "vertical";
|
|
7
|
+
const isHorizontal = isDefaultOptionType && orientation === "horizontal";
|
|
8
|
+
return {
|
|
9
|
+
display: "inline-flex",
|
|
10
|
+
flexDirection: isVertical ? "column" : void 0,
|
|
11
|
+
columnGap: isHorizontal ? theme.spaceM : void 0,
|
|
12
|
+
rowGap: isVertical ? theme.spaceM : void 0
|
|
13
|
+
};
|
|
14
|
+
};
|
|
5
15
|
export {
|
|
6
16
|
getRadioGroupStyle
|
|
7
17
|
};
|
|
@@ -3,9 +3,14 @@ import { HTMLAttributes, PropsWithChildren, ReactNode } from 'react';
|
|
|
3
3
|
interface RadioOptionType extends Pick<RadioProps, "value" | "disabled" | "icon"> {
|
|
4
4
|
label?: ReactNode;
|
|
5
5
|
}
|
|
6
|
+
export type RadioGroupOrientation = "horizontal" | "vertical";
|
|
6
7
|
export interface RadioGroupProps extends PropsWithChildren, Pick<RadioProps, "disabled" | "name" | "value" | "onChange">, Pick<HTMLAttributes<HTMLElement>, "defaultValue" | "className" | "id"> {
|
|
7
8
|
options?: (string | number | RadioOptionType)[];
|
|
9
|
+
/** @default "default" */
|
|
8
10
|
optionType?: "default" | "button";
|
|
11
|
+
/** @default "text" */
|
|
9
12
|
buttonType?: "text" | "icon";
|
|
13
|
+
/** @default "horizontal" */
|
|
14
|
+
orientation?: RadioGroupOrientation;
|
|
10
15
|
}
|
|
11
16
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const forceScroll: (scrollLeft: number, target: HTMLElement | null) => void;
|
|
2
2
|
export declare const getHorizontalScrollPositionRange: (el: HTMLElement) => readonly [number, number];
|
|
3
3
|
export declare const getVerticalScrollBarWidth: (el: HTMLElement) => number;
|
|
4
|
-
export declare const pickedScrollTargetProps: ("
|
|
4
|
+
export declare const pickedScrollTargetProps: ("clientHeight" | "clientWidth" | "scrollHeight" | "scrollLeft" | "scrollTop" | "scrollWidth")[];
|
|
@@ -5,7 +5,7 @@ export declare const getTabItemStyle: (iconOnly: boolean, disabled: boolean, sel
|
|
|
5
5
|
readonly display: "flex";
|
|
6
6
|
readonly flexWrap: "nowrap";
|
|
7
7
|
readonly alignItems: "center";
|
|
8
|
-
readonly justifyContent: "
|
|
8
|
+
readonly justifyContent: "unset" | "center";
|
|
9
9
|
readonly gap: 4;
|
|
10
10
|
readonly padding: `4px 0 ${number}px` | `8px 0 ${number}px`;
|
|
11
11
|
readonly color: "#262626" | "#595959" | "#8C8C8C" | "#BFBFBF";
|