@xh/hoist 71.0.0-SNAPSHOT.1735324763102 → 71.0.0-SNAPSHOT.1735325329103
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/CHANGELOG.md +1 -0
- package/build/types/desktop/cmp/error/impl/ErrorMessage.d.ts +1 -1
- package/build/types/mobile/cmp/error/impl/ErrorMessage.d.ts +1 -1
- package/cmp/error/ErrorMessage.ts +0 -2
- package/desktop/cmp/button/Button.scss +48 -21
- package/desktop/cmp/error/impl/ErrorMessage.ts +5 -3
- package/mobile/cmp/error/impl/ErrorMessage.ts +5 -3
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,4 +4,4 @@ import '@xh/hoist/desktop/register';
|
|
|
4
4
|
* Desktop implementation of ErrorMessage.
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const errorMessageImpl: import("@xh/hoist/core").ElementFactory<ErrorMessageProps
|
|
7
|
+
export declare const errorMessageImpl: import("@xh/hoist/core").ElementFactory<Omit<ErrorMessageProps, "error" | "actionFn" | "detailsFn">>;
|
|
@@ -4,4 +4,4 @@ import '@xh/hoist/mobile/register';
|
|
|
4
4
|
* Mobile implementation of ErrorMessage.
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const errorMessageImpl: import("@xh/hoist/core").ElementFactory<ErrorMessageProps
|
|
7
|
+
export declare const errorMessageImpl: import("@xh/hoist/core").ElementFactory<Omit<ErrorMessageProps, "error" | "actionFn" | "detailsFn">>;
|
|
@@ -97,14 +97,12 @@ export const [ErrorMessage, errorMessage] = hoistCmp.withFactory<ErrorMessagePro
|
|
|
97
97
|
...rest,
|
|
98
98
|
item: XH.isMobileApp
|
|
99
99
|
? mobileErrorMessageImpl({
|
|
100
|
-
error,
|
|
101
100
|
message,
|
|
102
101
|
title,
|
|
103
102
|
actionButtonProps,
|
|
104
103
|
detailsButtonProps
|
|
105
104
|
})
|
|
106
105
|
: desktopErrorMessageImpl({
|
|
107
|
-
error,
|
|
108
106
|
message,
|
|
109
107
|
title,
|
|
110
108
|
actionButtonProps,
|
|
@@ -56,33 +56,12 @@
|
|
|
56
56
|
padding: var(--xh-pad-half-px) var(--xh-pad-px);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
// Standard and outlined have borders - remove standard radius in between adjacent buttons so
|
|
60
|
-
// they seamlessly combine their inner borders.
|
|
61
|
-
border-radius: 0;
|
|
62
|
-
&.xh-button--standard,
|
|
63
|
-
&.xh-button--outlined {
|
|
64
|
-
&:first-child {
|
|
65
|
-
border-bottom-left-radius: var(--xh-button-border-radius-px);
|
|
66
|
-
border-top-left-radius: var(--xh-button-border-radius-px);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&:last-child {
|
|
70
|
-
border-bottom-right-radius: var(--xh-button-border-radius-px);
|
|
71
|
-
border-top-right-radius: var(--xh-button-border-radius-px);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
59
|
// Minimal has no borders - radius is made visible by background shading when hovered or
|
|
76
60
|
// pressed, and looks more natural without any radius.
|
|
77
61
|
&.xh-button--minimal {
|
|
78
62
|
border-radius: 0;
|
|
79
63
|
}
|
|
80
64
|
|
|
81
|
-
// Outlined buttons should avoid doubled-up inner borders.
|
|
82
|
-
&.xh-button--outlined:not(:last-child) {
|
|
83
|
-
border-right: none;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
65
|
&.xh-button--enabled {
|
|
87
66
|
// Hoist calls FocusStyleManager.onlyShowFocusOnTabs(), which by default hides focus indicators
|
|
88
67
|
// unless a component has been tabbed into via keyboard. Override here to always show a focus
|
|
@@ -93,6 +72,54 @@
|
|
|
93
72
|
}
|
|
94
73
|
}
|
|
95
74
|
}
|
|
75
|
+
|
|
76
|
+
// Horizontal mode only styles
|
|
77
|
+
&:not(.bp5-vertical) {
|
|
78
|
+
.xh-button.bp5-button {
|
|
79
|
+
// Standard and outlined have borders - remove standard radius in between adjacent buttons so
|
|
80
|
+
// they seamlessly combine their inner borders.
|
|
81
|
+
border-radius: 0;
|
|
82
|
+
&.xh-button--standard,
|
|
83
|
+
&.xh-button--outlined {
|
|
84
|
+
&:first-child {
|
|
85
|
+
border-radius: var(--xh-button-border-radius-px) 0 0 var(--xh-button-border-radius-px);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:last-child {
|
|
89
|
+
border-radius: 0 var(--xh-button-border-radius-px) var(--xh-button-border-radius-px) 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Outlined buttons should avoid doubled-up inner borders.
|
|
94
|
+
&.xh-button--outlined:not(:last-child) {
|
|
95
|
+
border-right: none;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Vertical mode only styles
|
|
101
|
+
&.bp5-vertical {
|
|
102
|
+
.xh-button.bp5-button {
|
|
103
|
+
// Standard and outlined have borders - remove standard radius in between adjacent buttons so
|
|
104
|
+
// they seamlessly combine their inner borders.
|
|
105
|
+
border-radius: 0;
|
|
106
|
+
&.xh-button--standard,
|
|
107
|
+
&.xh-button--outlined {
|
|
108
|
+
&:first-child {
|
|
109
|
+
border-radius: var(--xh-button-border-radius-px) var(--xh-button-border-radius-px) 0 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:last-child {
|
|
113
|
+
border-radius: 0 0 var(--xh-button-border-radius-px) var(--xh-button-border-radius-px);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Outlined buttons should avoid doubled-up inner borders.
|
|
118
|
+
&.xh-button--outlined:not(:last-child) {
|
|
119
|
+
border-bottom: none;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
96
123
|
}
|
|
97
124
|
}
|
|
98
125
|
|
|
@@ -17,8 +17,10 @@ import '@xh/hoist/desktop/register';
|
|
|
17
17
|
* Desktop implementation of ErrorMessage.
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
|
-
export const errorMessageImpl = hoistCmp.factory<
|
|
21
|
-
|
|
20
|
+
export const errorMessageImpl = hoistCmp.factory<
|
|
21
|
+
Omit<ErrorMessageProps, 'error' | 'actionFn' | 'detailsFn'>
|
|
22
|
+
>({
|
|
23
|
+
render({message, title, actionButtonProps, detailsButtonProps}) {
|
|
22
24
|
let buttons = [],
|
|
23
25
|
buttonBar = null;
|
|
24
26
|
if (detailsButtonProps) buttons.push(detailsButton(detailsButtonProps as ButtonProps));
|
|
@@ -31,7 +33,7 @@ export const errorMessageImpl = hoistCmp.factory<ErrorMessageProps>({
|
|
|
31
33
|
|
|
32
34
|
return div({
|
|
33
35
|
className: 'xh-error-message__inner',
|
|
34
|
-
items: [titleCmp({title}), messageCmp({message
|
|
36
|
+
items: [titleCmp({title}), messageCmp({message}), buttonBar]
|
|
35
37
|
});
|
|
36
38
|
}
|
|
37
39
|
});
|
|
@@ -17,8 +17,10 @@ import '@xh/hoist/mobile/register';
|
|
|
17
17
|
* Mobile implementation of ErrorMessage.
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
|
-
export const errorMessageImpl = hoistCmp.factory<
|
|
21
|
-
|
|
20
|
+
export const errorMessageImpl = hoistCmp.factory<
|
|
21
|
+
Omit<ErrorMessageProps, 'error' | 'actionFn' | 'detailsFn'>
|
|
22
|
+
>({
|
|
23
|
+
render({message, title, actionButtonProps, detailsButtonProps}) {
|
|
22
24
|
let buttons = [],
|
|
23
25
|
buttonBar = null;
|
|
24
26
|
if (detailsButtonProps) buttons.push(detailsButton(detailsButtonProps as ButtonProps));
|
|
@@ -31,7 +33,7 @@ export const errorMessageImpl = hoistCmp.factory<ErrorMessageProps>({
|
|
|
31
33
|
|
|
32
34
|
return div({
|
|
33
35
|
className: 'xh-error-message__inner',
|
|
34
|
-
items: [titleCmp({title}), messageCmp({message
|
|
36
|
+
items: [titleCmp({title}), messageCmp({message}), buttonBar]
|
|
35
37
|
});
|
|
36
38
|
}
|
|
37
39
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "71.0.0-SNAPSHOT.
|
|
3
|
+
"version": "71.0.0-SNAPSHOT.1735325329103",
|
|
4
4
|
"description": "Hoist add-on for building and deploying React Applications.",
|
|
5
5
|
"repository": "github:xh/hoist-react",
|
|
6
6
|
"homepage": "https://xh.io",
|