@dloizides/ui-feedback 1.16.2 → 1.17.0
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/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { StyleSheet, Platform, TouchableOpacity, Text, View, ActivityIndicator, Modal, useWindowDimensions, Animated, Pressable } from 'react-native';
|
|
4
4
|
import { MIN_TOUCH_TARGET_PX } from '@dloizides/a11y';
|
|
5
5
|
import { Skeleton } from '@dloizides/ui-motion';
|
|
6
|
+
import { Z_INDEX, resolveOnBrand } from '@dloizides/design-tokens';
|
|
6
7
|
import { createPortal } from 'react-dom';
|
|
7
|
-
import { Z_INDEX } from '@dloizides/design-tokens';
|
|
8
8
|
|
|
9
9
|
// src/context/FeedbackUiContext.tsx
|
|
10
10
|
var DEFAULT_FEEDBACK_VALUE = {
|
|
@@ -428,6 +428,12 @@ var AsyncSurface = ({
|
|
|
428
428
|
if (loading) return /* @__PURE__ */ jsx(PageSkeleton, { showHeader: true, rows: skeletonRows, variant });
|
|
429
429
|
return children;
|
|
430
430
|
};
|
|
431
|
+
function confirmFill(theme, destructive) {
|
|
432
|
+
return destructive ? theme.semantic.error["500"] : theme.palette.primary["500"];
|
|
433
|
+
}
|
|
434
|
+
function confirmInk(theme, destructive) {
|
|
435
|
+
return resolveOnBrand(confirmFill(theme, destructive));
|
|
436
|
+
}
|
|
431
437
|
var DIALOG_MAX_WIDTH = 400;
|
|
432
438
|
var styles6 = StyleSheet.create({
|
|
433
439
|
overlay: {
|
|
@@ -503,10 +509,8 @@ var ConfirmDialog = ({
|
|
|
503
509
|
message: { color: theme.colors.textSecondary },
|
|
504
510
|
cancelButton: { borderColor: theme.colors.border },
|
|
505
511
|
cancelButtonText: { color: theme.colors.text },
|
|
506
|
-
confirmButton: {
|
|
507
|
-
|
|
508
|
-
},
|
|
509
|
-
confirmButtonText: { color: theme.colors.surfaceElevated }
|
|
512
|
+
confirmButton: { backgroundColor: confirmFill(theme, destructive) },
|
|
513
|
+
confirmButtonText: { color: confirmInk(theme, destructive) }
|
|
510
514
|
}),
|
|
511
515
|
[theme, destructive]
|
|
512
516
|
);
|
|
@@ -569,7 +573,7 @@ var ConfirmDialog = ({
|
|
|
569
573
|
children: loading ? /* @__PURE__ */ jsx(
|
|
570
574
|
ActivityIndicator,
|
|
571
575
|
{
|
|
572
|
-
color: theme
|
|
576
|
+
color: confirmInk(theme, destructive),
|
|
573
577
|
size: "small",
|
|
574
578
|
testID: "confirm-loading"
|
|
575
579
|
}
|