@hexure/ui 1.13.67 → 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 +53 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Tag/Tag.d.ts +1 -0
- package/dist/esm/index.js +53 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Tag/Tag.d.ts +1 -0
- package/dist/index.d.ts +83 -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));
|
|
@@ -3128,6 +3157,15 @@ const Wrapper$e = styled.div `
|
|
|
3128
3157
|
color: #ffffff;
|
|
3129
3158
|
box-sizing: border-box;
|
|
3130
3159
|
cursor: ${props => (props.$removable ? 'pointer' : 'default')};
|
|
3160
|
+
${props => props.$rotate &&
|
|
3161
|
+
`
|
|
3162
|
+
transform: rotate(270deg);
|
|
3163
|
+
transform-origin: top left;
|
|
3164
|
+
width: max-content;
|
|
3165
|
+
position: absolute;
|
|
3166
|
+
top: -11px;
|
|
3167
|
+
left: 3px;
|
|
3168
|
+
`}
|
|
3131
3169
|
`;
|
|
3132
3170
|
const Content$2 = styled.div `
|
|
3133
3171
|
display: flex;
|
|
@@ -3146,9 +3184,9 @@ const Remove$1 = styled.div `
|
|
|
3146
3184
|
align-items: center;
|
|
3147
3185
|
`;
|
|
3148
3186
|
const Tag = (_a) => {
|
|
3149
|
-
var { children, color = 'PRIMARY', removable, onClick, dataItemid } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick", "dataItemid"]);
|
|
3187
|
+
var { children, color = 'PRIMARY', removable, onClick, dataItemid, rotate } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick", "dataItemid", "rotate"]);
|
|
3150
3188
|
const baseId = dataItemid || 'tag';
|
|
3151
|
-
return (React.createElement(Wrapper$e, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
3189
|
+
return (React.createElement(Wrapper$e, Object.assign({ "$color": color, "$removable": removable, "$rotate": rotate, onClick: onClick }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
3152
3190
|
React.createElement(Content$2, { "data-itemid": `${baseId}-content` },
|
|
3153
3191
|
React.createElement(Label$4, { "$color": color, "data-itemid": `${baseId}-label` }, children),
|
|
3154
3192
|
removable ? (React.createElement(Remove$1, { "data-itemid": `${baseId}-remove` },
|
|
@@ -3230,7 +3268,7 @@ const SubMenuItem = styled.a `
|
|
|
3230
3268
|
`;
|
|
3231
3269
|
const Footer = styled.div `
|
|
3232
3270
|
padding: 20px 14px 0px;
|
|
3233
|
-
display: flex;
|
|
3271
|
+
display: ${props => (props.$isOpen ? 'flex' : 'inline')};
|
|
3234
3272
|
align-items: center;
|
|
3235
3273
|
`;
|
|
3236
3274
|
const FooterInfo = styled.div `
|
|
@@ -3238,6 +3276,9 @@ const FooterInfo = styled.div `
|
|
|
3238
3276
|
flex-direction: column;
|
|
3239
3277
|
flex: 1;
|
|
3240
3278
|
align-items: flex-start;
|
|
3279
|
+
${props => !props.$isOpen &&
|
|
3280
|
+
`position: relative;
|
|
3281
|
+
`}
|
|
3241
3282
|
`;
|
|
3242
3283
|
const SidebarMenuContainer = styled.div `
|
|
3243
3284
|
flex-grow: 1;
|
|
@@ -3258,10 +3299,10 @@ const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px', dataIte
|
|
|
3258
3299
|
return (React.createElement(SubMenuItem, { "$active": menu_item.is_active, "$color": theme.PRIMARY_COLOR, "data-itemid": `${menuItemId}-sub-menu-item`, key: menuItemId, onClick: menu_item.onClick }, menu_item.label));
|
|
3259
3300
|
}))) : null));
|
|
3260
3301
|
})),
|
|
3261
|
-
React.createElement(Footer, { "data-itemid": `${baseId}-footer` },
|
|
3262
|
-
|
|
3263
|
-
footerTag
|
|
3264
|
-
React.createElement(Copy, { "data-itemid": `${baseId}-footer-copy`, margin: '8px 0 0 0', type: 'small' },
|
|
3302
|
+
React.createElement(Footer, { "$isOpen": !collapsed, "data-itemid": `${baseId}-footer` },
|
|
3303
|
+
React.createElement(FooterInfo, { "$isOpen": !collapsed, "data-itemid": `${baseId}-footer-info` },
|
|
3304
|
+
footerTag && (React.createElement(Tag, { "data-itemid": `${baseId}-footer-tag`, rotate: collapsed }, footerTag)),
|
|
3305
|
+
!collapsed && (React.createElement(Copy, { "data-itemid": `${baseId}-footer-copy`, margin: '8px 0 0 0', type: 'small' },
|
|
3265
3306
|
"\u00A9 ",
|
|
3266
3307
|
new Date().getFullYear(),
|
|
3267
3308
|
" Hexure"))),
|