@hexure/ui 1.13.68 → 1.13.69
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/cjs/index.js +34 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +34 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +82 -82
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -2803,7 +2803,19 @@ const StyledButton = styled.button `
|
|
|
2803
2803
|
return '0px';
|
|
2804
2804
|
}};
|
|
2805
2805
|
outline: none;
|
|
2806
|
-
background: ${props =>
|
|
2806
|
+
background: ${props => {
|
|
2807
|
+
if (props.$disabled) {
|
|
2808
|
+
if (props.$format === 'secondary') {
|
|
2809
|
+
return '#66666626';
|
|
2810
|
+
}
|
|
2811
|
+
else {
|
|
2812
|
+
return '#e7e6e6';
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2815
|
+
else {
|
|
2816
|
+
return props.$bg_color || props.theme.PRIMARY_COLOR.Hex;
|
|
2817
|
+
}
|
|
2818
|
+
}};
|
|
2807
2819
|
width: ${props => {
|
|
2808
2820
|
if (props.$hasChildren) {
|
|
2809
2821
|
return 'auto';
|
|
@@ -2822,7 +2834,19 @@ const StyledButton = styled.button `
|
|
|
2822
2834
|
opacity: ${props => (props.$disabled ? 0.6 : 0.9)};
|
|
2823
2835
|
border-width: 1px;
|
|
2824
2836
|
border-style: solid;
|
|
2825
|
-
border-color: ${props =>
|
|
2837
|
+
border-color: ${props => {
|
|
2838
|
+
if (props.$disabled) {
|
|
2839
|
+
if (props.$format === 'secondary') {
|
|
2840
|
+
return '#66666680';
|
|
2841
|
+
}
|
|
2842
|
+
else {
|
|
2843
|
+
return '#e7e6e6';
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2846
|
+
else {
|
|
2847
|
+
return props.$border_color || props.theme.PRIMARY_COLOR.Hex;
|
|
2848
|
+
}
|
|
2849
|
+
}};
|
|
2826
2850
|
box-sizing: border-box;
|
|
2827
2851
|
|
|
2828
2852
|
&:active,
|
|
@@ -2898,10 +2922,15 @@ const Button = (_a) => {
|
|
|
2898
2922
|
};
|
|
2899
2923
|
const format_styles = button_type_mapping[format];
|
|
2900
2924
|
const baseId = dataItemid || 'button';
|
|
2901
|
-
const button_view = (React.createElement(StyledButton, Object.assign({ "$bg_color": format_styles.background_color, "$border_color": format_styles.border_color, "$disabled": disabled || loading, "$hasChildren": !!has_children, "$iconPosition": iconPosition, "$margin": margin, "$small": small, disabled: disabled || loading, onClick: disabled || loading ? undefined : onClick, title: title, type: type || (isForm ? 'submit' : undefined) }, accessibleProps, { "data-itemid": `${baseId}-styled-button` }),
|
|
2902
|
-
children ? (React.createElement(Label$5, { "$content_color": format_styles.content_color, "$small": small, "data-itemid": `${baseId}-label` }, children)) : null,
|
|
2925
|
+
const button_view = (React.createElement(StyledButton, Object.assign({ "$bg_color": format_styles.background_color, "$border_color": format_styles.border_color, "$disabled": disabled || loading, "$format": format, "$hasChildren": !!has_children, "$iconPosition": iconPosition, "$margin": margin, "$small": small, disabled: disabled || loading, onClick: disabled || loading ? undefined : onClick, title: title, type: type || (isForm ? 'submit' : undefined) }, accessibleProps, { "data-itemid": `${baseId}-styled-button` }),
|
|
2926
|
+
children ? (React.createElement(Label$5, { "$content_color": disabled || loading ? '#666666' : format_styles.content_color, "$small": small, "data-itemid": `${baseId}-label` }, children)) : null,
|
|
2903
2927
|
icon && !badge ? (React.createElement(StyledIcon$5, { "$hasChildren": !!has_children, "data-itemid": `${baseId}-icon` },
|
|
2904
|
-
React.createElement(Icon, { color:
|
|
2928
|
+
React.createElement(Icon, { color: (() => {
|
|
2929
|
+
if (disabled || loading) {
|
|
2930
|
+
return '#666666';
|
|
2931
|
+
}
|
|
2932
|
+
return format ? format_styles.content_color : '#fff';
|
|
2933
|
+
})(), "data-itemid": `${baseId}-icon-svg`, path: loading ? js.mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
|
|
2905
2934
|
badge && !icon ? (React.createElement(Badge$1, { "$bg_color": format_styles.badge_bg_color, "$content_color": format_styles.badge_content_color, "$small": small, "data-itemid": `${baseId}-badge` }, badge)) : null));
|
|
2906
2935
|
if (toolTip && Object.keys(toolTip).length) {
|
|
2907
2936
|
return (React.createElement(Tooltip, Object.assign({}, toolTip, { trigger: (toolTip === null || toolTip === void 0 ? void 0 : toolTip.trigger) || button_view }), toolTip === null || toolTip === void 0 ? void 0 : toolTip.children));
|