@uxland/primary-shell 7.41.6 → 7.41.8
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/{component-KfK2npE5.js → component-BgR3-MlL.js} +2 -2
- package/dist/{component-KfK2npE5.js.map → component-BgR3-MlL.js.map} +1 -1
- package/dist/{index-0V-xXwce.js → index-mgf5fUfq.js} +15460 -15187
- package/dist/index-mgf5fUfq.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +2421 -2325
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/api/interaction-service/interaction-service.d.ts +3 -0
- package/package.json +2 -2
- package/src/api/interaction-service/interaction-service-impl.tsx +24 -2
- package/src/api/interaction-service/interaction-service.ts +7 -6
- package/src/api/interaction-service/modal-styles.css +26 -1
- package/dist/index-0V-xXwce.js.map +0 -1
|
@@ -22,10 +22,13 @@ export interface ConfirmationOptions {
|
|
|
22
22
|
showCancelButton?: boolean | undefined;
|
|
23
23
|
confirmButtonText?: string | undefined;
|
|
24
24
|
cancelButtonText?: string | undefined;
|
|
25
|
+
confirmButtonIcon?: string | undefined;
|
|
26
|
+
cancelButtonIcon?: string | undefined;
|
|
25
27
|
showCloseButton?: boolean | undefined;
|
|
26
28
|
fullCustomization?: boolean | undefined;
|
|
27
29
|
closeOnOutsideClick?: boolean | undefined;
|
|
28
30
|
state?: "success" | "info" | "alert" | "error";
|
|
31
|
+
hideIcon?: boolean;
|
|
29
32
|
}
|
|
30
33
|
export interface ConfirmComponentUI<TData = undefined, TResult = undefined> {
|
|
31
34
|
component: React.ComponentType<ConfirmationContentProps<TData, TResult> | ConfirmationWithResultContentProps<TData, TResult>> | (new () => HTMLElement);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxland/primary-shell",
|
|
3
|
-
"version": "7.41.
|
|
3
|
+
"version": "7.41.8",
|
|
4
4
|
"description": "Primaria Shell",
|
|
5
5
|
"author": "UXLand <dev@uxland.es>",
|
|
6
6
|
"homepage": "https://github.com/uxland/harmonix/tree/app#readme",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@primaria/plugins-core": "^1.0.14",
|
|
33
|
-
"@salut/design-system-salut": "../../design-system-salut-2.15.
|
|
33
|
+
"@salut/design-system-salut": "../../design-system-salut-2.15.2.tgz",
|
|
34
34
|
"@types/react": "^19.0.12",
|
|
35
35
|
"@uxland/lit-utilities": "^1.0.0",
|
|
36
36
|
"@uxland/localization": "^1.0.3",
|
|
@@ -19,6 +19,7 @@ const defaultOptions: ConfirmationOptions = {
|
|
|
19
19
|
showCloseButton: true,
|
|
20
20
|
fullCustomization: false,
|
|
21
21
|
closeOnOutsideClick: false,
|
|
22
|
+
hideIcon: false
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export class ParimariaInteractionServiceImpl extends PrimariaInteractionService {
|
|
@@ -126,9 +127,18 @@ export class ParimariaInteractionServiceImpl extends PrimariaInteractionService
|
|
|
126
127
|
};
|
|
127
128
|
|
|
128
129
|
const getCancelButtonVariant = () => {
|
|
129
|
-
if (finalOptions.state) return "alternative-dark";
|
|
130
130
|
return "secondary";
|
|
131
131
|
};
|
|
132
|
+
const getHeadIconVariantClass = () => {
|
|
133
|
+
if (finalOptions.state === "alert") return "warning";
|
|
134
|
+
if (finalOptions.state === "error") return "danger";
|
|
135
|
+
return "";
|
|
136
|
+
};
|
|
137
|
+
const getHeadIcon = () => {
|
|
138
|
+
if (finalOptions.state === "alert") return "error";
|
|
139
|
+
if (finalOptions.state === "error") return "warning";
|
|
140
|
+
return "";
|
|
141
|
+
};
|
|
132
142
|
|
|
133
143
|
const _renderContent = () => {
|
|
134
144
|
return isWebComponent ? (
|
|
@@ -151,7 +161,19 @@ export class ParimariaInteractionServiceImpl extends PrimariaInteractionService
|
|
|
151
161
|
<div className="dialog" ref={dialogRef}>
|
|
152
162
|
{!finalOptions.fullCustomization && (
|
|
153
163
|
<div className="dss-dialog-header">
|
|
154
|
-
<div className="
|
|
164
|
+
<div className="dialog-header-wrapper">
|
|
165
|
+
<div className="dss-dialog-header-title">
|
|
166
|
+
{!finalOptions.hideIcon && (
|
|
167
|
+
<dss-icon
|
|
168
|
+
size="xl"
|
|
169
|
+
fill
|
|
170
|
+
class={`dss-dialog-header-state--${getHeadIconVariantClass()}`}
|
|
171
|
+
icon={getHeadIcon()}
|
|
172
|
+
></dss-icon>
|
|
173
|
+
)}
|
|
174
|
+
{finalOptions.title}
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
155
177
|
{finalOptions.showCloseButton && (
|
|
156
178
|
<dss-icon-button
|
|
157
179
|
class="dss-dialog-header-close"
|
|
@@ -26,15 +26,19 @@ export interface ConfirmationOptions {
|
|
|
26
26
|
showCancelButton?: boolean | undefined;
|
|
27
27
|
confirmButtonText?: string | undefined;
|
|
28
28
|
cancelButtonText?: string | undefined;
|
|
29
|
+
confirmButtonIcon?: string | undefined;
|
|
30
|
+
cancelButtonIcon?: string | undefined;
|
|
29
31
|
showCloseButton?: boolean | undefined;
|
|
30
32
|
fullCustomization?: boolean | undefined;
|
|
31
33
|
closeOnOutsideClick?: boolean | undefined;
|
|
32
34
|
state?: "success" | "info" | "alert" | "error";
|
|
35
|
+
hideIcon?: boolean;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
export interface ConfirmComponentUI<TData = undefined, TResult = undefined> {
|
|
36
|
-
component:
|
|
37
|
-
|
|
39
|
+
component:
|
|
40
|
+
| React.ComponentType<ConfirmationContentProps<TData, TResult> | ConfirmationWithResultContentProps<TData, TResult>>
|
|
41
|
+
| (new () => HTMLElement);
|
|
38
42
|
styles?: string;
|
|
39
43
|
}
|
|
40
44
|
|
|
@@ -44,9 +48,6 @@ export abstract class PrimariaInteractionService {
|
|
|
44
48
|
componentUI: ConfirmComponentUI<TData, TResult>,
|
|
45
49
|
options?: ConfirmationOptions | undefined,
|
|
46
50
|
): Promise<ConfirmationResult<TResult | undefined>>;
|
|
47
|
-
abstract confirmMessage(
|
|
48
|
-
message: string,
|
|
49
|
-
options?: ConfirmationOptions | undefined,
|
|
50
|
-
): Promise<ConfirmationResult>;
|
|
51
|
+
abstract confirmMessage(message: string, options?: ConfirmationOptions | undefined): Promise<ConfirmationResult>;
|
|
51
52
|
abstract dispose(): void;
|
|
52
53
|
}
|
|
@@ -25,6 +25,13 @@
|
|
|
25
25
|
box-shadow: 0 8px 12px 6px rgba(0 0 0 / 5%), 0 4px 4px rgba(0 0 0 / 10%);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
.dialog-header-wrapper {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
}
|
|
34
|
+
|
|
28
35
|
.dss-dialog-header {
|
|
29
36
|
position: relative;
|
|
30
37
|
display: flex;
|
|
@@ -45,6 +52,9 @@
|
|
|
45
52
|
line-height: 30px;
|
|
46
53
|
font-weight: var(--font-bold);
|
|
47
54
|
color: var(--color-neutral-900);
|
|
55
|
+
padding-left: var(--dss-spacing-xl);
|
|
56
|
+
padding-right: var(--dss-spacing-xl);
|
|
57
|
+
text-align: center;
|
|
48
58
|
}
|
|
49
59
|
.dss-dialog-header-close {
|
|
50
60
|
position: absolute;
|
|
@@ -69,4 +79,19 @@
|
|
|
69
79
|
padding: 24px;
|
|
70
80
|
border-bottom-left-radius: 16px;
|
|
71
81
|
border-bottom-right-radius: 16px;
|
|
72
|
-
}
|
|
82
|
+
}
|
|
83
|
+
.dss-dialog-header-icon {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
margin-bottom: var(--dss-spacing-xs);
|
|
88
|
+
}
|
|
89
|
+
.dss-dialog-header-state {
|
|
90
|
+
display: flex;
|
|
91
|
+
}
|
|
92
|
+
.dss-dialog-header-state--warning {
|
|
93
|
+
color: var(--color-yellow-700);
|
|
94
|
+
}
|
|
95
|
+
.dss-dialog-header-state--danger {
|
|
96
|
+
color: var(--color-red-500);
|
|
97
|
+
}
|