@dloizides/ui-layout 1.44.0 → 1.45.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.mjs CHANGED
@@ -2226,14 +2226,16 @@ var ConfirmDialog = ({
2226
2226
  onCancel,
2227
2227
  busy = false,
2228
2228
  initialFocus = "cancel" /* Cancel */,
2229
- testID = LAYOUT_TEST_IDS.confirmDialog
2229
+ testID = LAYOUT_TEST_IDS.confirmDialog,
2230
+ confirmTestID = `${testID}-confirm`,
2231
+ cancelTestID = `${testID}-cancel`
2230
2232
  }) => {
2231
2233
  const { theme, t } = useUi();
2232
2234
  const resolvedConfirm = confirmLabel ?? t(LAYOUT_I18N.confirm);
2233
2235
  const resolvedCancel = cancelLabel ?? t(LAYOUT_I18N.cancel);
2234
2236
  const focusTestID = {
2235
- ["cancel" /* Cancel */]: `${testID}-cancel`,
2236
- ["confirm" /* Confirm */]: `${testID}-confirm`,
2237
+ ["cancel" /* Cancel */]: cancelTestID,
2238
+ ["confirm" /* Confirm */]: confirmTestID,
2237
2239
  ["none" /* None */]: testID
2238
2240
  };
2239
2241
  const footer = /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -2244,7 +2246,7 @@ var ConfirmDialog = ({
2244
2246
  accessibilityLabel: resolvedCancel,
2245
2247
  disabled: busy,
2246
2248
  label: resolvedCancel,
2247
- testID: `${testID}-cancel`,
2249
+ testID: cancelTestID,
2248
2250
  variant: "secondary",
2249
2251
  onPress: onCancel
2250
2252
  }
@@ -2256,7 +2258,7 @@ var ConfirmDialog = ({
2256
2258
  accessibilityLabel: resolvedConfirm,
2257
2259
  label: resolvedConfirm,
2258
2260
  loading: busy,
2259
- testID: `${testID}-confirm`,
2261
+ testID: confirmTestID,
2260
2262
  variant: destructive ? "danger" : "primary",
2261
2263
  onPress: onConfirm
2262
2264
  }