@linzjs/windows 10.2.0 → 10.3.1
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.
|
@@ -136,7 +136,7 @@ dialog.LuiModalAsync, div.LuiModalAsync {
|
|
|
136
136
|
font-weight: 400;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
.lui-button:focus {
|
|
139
|
+
.lui-button:focus-visible {
|
|
140
140
|
// Button focus not showing unless window content has focus
|
|
141
141
|
outline: form.$input-border-width-thick solid colors.$input-focus;
|
|
142
142
|
}
|
|
@@ -150,3 +150,11 @@ dialog.LuiModalPrefab-file {
|
|
|
150
150
|
padding-bottom: spacing.$unit-xs;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
button.lui-button.lui-button-secondary.lui-button-secondary-error {
|
|
155
|
+
color: colors.$error;
|
|
156
|
+
|
|
157
|
+
span.LuiIcon svg * {
|
|
158
|
+
fill: colors.$error;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -18,7 +18,7 @@ export type PrefabType = 'outline' | 'success' | 'info' | 'warning' | 'error' |
|
|
|
18
18
|
|
|
19
19
|
export interface LuiModalAsyncPrefabButton<RT> {
|
|
20
20
|
default?: boolean;
|
|
21
|
-
level?: LuiButtonProps['level'];
|
|
21
|
+
level?: LuiButtonProps['level'] | 'secondary-error';
|
|
22
22
|
title: string;
|
|
23
23
|
icon?: IconName;
|
|
24
24
|
value?: RT;
|
|
@@ -149,8 +149,11 @@ export const LuiModalPrefab = (props: PropsWithChildren<LuiModalAsyncPrefabProps
|
|
|
149
149
|
{buttons.map((pf, i) => (
|
|
150
150
|
<LuiButton
|
|
151
151
|
key={i}
|
|
152
|
-
level={pf.level ?? 'secondary'}
|
|
153
|
-
className={clsx(
|
|
152
|
+
level={pf.level === 'secondary-error' ? 'secondary' : (pf.level ?? 'secondary')}
|
|
153
|
+
className={clsx(
|
|
154
|
+
pf.icon && 'lui-button-icon',
|
|
155
|
+
pf.level === 'secondary-error' && 'lui-button-secondary-error',
|
|
156
|
+
)}
|
|
154
157
|
onClick={() => {
|
|
155
158
|
setDontShow();
|
|
156
159
|
resolve(pf.value);
|
|
@@ -189,7 +192,7 @@ export const useLuiModalPrefab = () => {
|
|
|
189
192
|
const { showModal, modalOwnerRef } = useShowAsyncModal();
|
|
190
193
|
|
|
191
194
|
const showPrefabModal = useCallback(
|
|
192
|
-
<RT = string
|
|
195
|
+
<RT = string,>(props: PropsWithChildren<useLuiModalPrefabProps<RT>>): PromiseWithResolve<RT> => {
|
|
193
196
|
debugLog(`Show '${props.level}' prefab-modal '${props.title}'`, props);
|
|
194
197
|
if (typeof props.children === 'string') {
|
|
195
198
|
// Convert \n to <br/>
|