@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 CHANGED
@@ -5,8 +5,8 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var reactNative = require('react-native');
6
6
  var a11y = require('@dloizides/a11y');
7
7
  var uiMotion = require('@dloizides/ui-motion');
8
- var reactDom = require('react-dom');
9
8
  var designTokens = require('@dloizides/design-tokens');
9
+ var reactDom = require('react-dom');
10
10
 
11
11
  // src/context/FeedbackUiContext.tsx
12
12
  var DEFAULT_FEEDBACK_VALUE = {
@@ -430,6 +430,12 @@ var AsyncSurface = ({
430
430
  if (loading) return /* @__PURE__ */ jsxRuntime.jsx(PageSkeleton, { showHeader: true, rows: skeletonRows, variant });
431
431
  return children;
432
432
  };
433
+ function confirmFill(theme, destructive) {
434
+ return destructive ? theme.semantic.error["500"] : theme.palette.primary["500"];
435
+ }
436
+ function confirmInk(theme, destructive) {
437
+ return designTokens.resolveOnBrand(confirmFill(theme, destructive));
438
+ }
433
439
  var DIALOG_MAX_WIDTH = 400;
434
440
  var styles6 = reactNative.StyleSheet.create({
435
441
  overlay: {
@@ -505,10 +511,8 @@ var ConfirmDialog = ({
505
511
  message: { color: theme.colors.textSecondary },
506
512
  cancelButton: { borderColor: theme.colors.border },
507
513
  cancelButtonText: { color: theme.colors.text },
508
- confirmButton: {
509
- backgroundColor: destructive ? theme.semantic.error["500"] : theme.palette.primary["500"]
510
- },
511
- confirmButtonText: { color: theme.colors.surfaceElevated }
514
+ confirmButton: { backgroundColor: confirmFill(theme, destructive) },
515
+ confirmButtonText: { color: confirmInk(theme, destructive) }
512
516
  }),
513
517
  [theme, destructive]
514
518
  );
@@ -571,7 +575,7 @@ var ConfirmDialog = ({
571
575
  children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
572
576
  reactNative.ActivityIndicator,
573
577
  {
574
- color: theme.colors.surfaceElevated,
578
+ color: confirmInk(theme, destructive),
575
579
  size: "small",
576
580
  testID: "confirm-loading"
577
581
  }