@kanso-labs/react-native-kanso-ui 0.3.1 → 0.5.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.
Files changed (123) hide show
  1. package/dist/autocomplete/index.js +39 -0
  2. package/dist/autocomplete/index.js.map +1 -0
  3. package/dist/button/index.d.ts +2 -1
  4. package/dist/button/index.js +35 -2
  5. package/dist/button/index.js.map +1 -1
  6. package/dist/button/pending.js +1 -1
  7. package/dist/button/slots.d.ts +2 -0
  8. package/dist/button/slots.js.map +1 -1
  9. package/dist/chip/index.js +1 -1
  10. package/dist/components/autocomplete/index.d.ts +49 -0
  11. package/dist/components/autocomplete/index.js +87 -0
  12. package/dist/components/autocomplete/index.js.map +1 -0
  13. package/dist/components/avatar/index.d.ts +1 -1
  14. package/dist/components/button/index.d.ts +2 -2
  15. package/dist/components/button/index.js +196 -150
  16. package/dist/components/button/index.js.map +1 -1
  17. package/dist/components/card/index.d.ts +1 -1
  18. package/dist/components/card/index.js +1 -1
  19. package/dist/components/checkbox/index.d.ts +1 -1
  20. package/dist/components/checkbox/index.js +106 -193
  21. package/dist/components/checkbox/index.js.map +1 -1
  22. package/dist/components/chip/index.d.ts +1 -1
  23. package/dist/components/chip-group/index.d.ts +1 -1
  24. package/dist/components/chip-group/index.js +1 -1
  25. package/dist/components/copy-field/index.d.ts +1 -1
  26. package/dist/components/copy-field/index.js +1 -1
  27. package/dist/components/currency/index.d.ts +1 -1
  28. package/dist/components/currency/index.js +1 -1
  29. package/dist/components/dialog/index.d.ts +3 -2
  30. package/dist/components/dialog/index.js +105 -242
  31. package/dist/components/dialog/index.js.map +1 -1
  32. package/dist/components/icon-button/index.d.ts +2 -2
  33. package/dist/components/icon-button/index.js +205 -159
  34. package/dist/components/icon-button/index.js.map +1 -1
  35. package/dist/components/link/index.d.ts +1 -1
  36. package/dist/components/link/index.js +1 -1
  37. package/dist/components/list/index.d.ts +216 -0
  38. package/dist/components/list/index.js +1118 -0
  39. package/dist/components/list/index.js.map +1 -0
  40. package/dist/components/list-item/index.d.ts +63 -0
  41. package/dist/components/list-item/index.js +275 -0
  42. package/dist/components/list-item/index.js.map +1 -0
  43. package/dist/components/menu/index.d.ts +309 -0
  44. package/dist/components/menu/index.js +1283 -0
  45. package/dist/components/menu/index.js.map +1 -0
  46. package/dist/components/meter/index.d.ts +1 -1
  47. package/dist/components/meter/index.js +1 -1
  48. package/dist/components/number-field/index.d.ts +1 -1
  49. package/dist/components/number-field/index.js +2 -2
  50. package/dist/components/popover/index.d.ts +140 -0
  51. package/dist/components/popover/index.js +704 -0
  52. package/dist/components/popover/index.js.map +1 -0
  53. package/dist/components/product-icon/index.d.ts +1 -1
  54. package/dist/components/progress-indicator/index.d.ts +1 -1
  55. package/dist/components/progress-indicator/index.js +1 -1
  56. package/dist/components/radio-group/index.d.ts +1 -1
  57. package/dist/components/radio-group/index.js +1 -1
  58. package/dist/components/search-field/index.d.ts +12 -4
  59. package/dist/components/search-field/index.js +64 -58
  60. package/dist/components/search-field/index.js.map +1 -1
  61. package/dist/components/segmented-button/index.d.ts +1 -1
  62. package/dist/components/segmented-button/index.js +1 -1
  63. package/dist/components/separator/index.d.ts +1 -1
  64. package/dist/components/separator/index.js +1 -1
  65. package/dist/components/sheet/index.d.ts +137 -0
  66. package/dist/components/sheet/index.js +1091 -0
  67. package/dist/components/sheet/index.js.map +1 -0
  68. package/dist/components/snackbar/index.d.ts +1 -1
  69. package/dist/components/snackbar/index.js +1 -1
  70. package/dist/components/stack/index.d.ts +1 -1
  71. package/dist/components/stack/index.js +1 -1
  72. package/dist/components/switch/index.d.ts +1 -1
  73. package/dist/components/switch/index.js +1 -1
  74. package/dist/components/switch/index.js.map +1 -1
  75. package/dist/components/text/index.d.ts +1 -1
  76. package/dist/components/text/index.js +1 -1
  77. package/dist/components/text-field/index.d.ts +1 -1
  78. package/dist/components/text-field/index.js +1 -1
  79. package/dist/control/checkbox-box.js +137 -0
  80. package/dist/control/checkbox-box.js.map +1 -0
  81. package/dist/control/index.js +1 -1
  82. package/dist/field/index.d.ts +1 -1
  83. package/dist/field/index.js +1 -1
  84. package/dist/form/index.d.ts +1 -1
  85. package/dist/glyphs/index.js +21 -2
  86. package/dist/glyphs/index.js.map +1 -1
  87. package/dist/i18n/index.js +16 -1
  88. package/dist/i18n/index.js.map +1 -1
  89. package/dist/i18n/messages.js +374 -34
  90. package/dist/i18n/messages.js.map +1 -1
  91. package/dist/index.d.ts +7 -1
  92. package/dist/index.js +8 -2
  93. package/dist/indicator/index.d.ts +1 -1
  94. package/dist/indicator/index.js +2 -2
  95. package/dist/mark/index.d.ts +1 -1
  96. package/dist/mark/index.js +1 -1
  97. package/dist/modal/index.d.ts +16 -0
  98. package/dist/modal/index.js +277 -0
  99. package/dist/modal/index.js.map +1 -0
  100. package/dist/overlay/anchored.d.ts +2 -0
  101. package/dist/overlay/anchored.js +182 -0
  102. package/dist/overlay/anchored.js.map +1 -0
  103. package/dist/overlay/host.d.ts +2 -0
  104. package/dist/overlay/host.js +1 -1
  105. package/dist/overlay/index.d.ts +4 -0
  106. package/dist/overlay/panel.js +215 -0
  107. package/dist/overlay/panel.js.map +1 -0
  108. package/dist/overlay/placement.d.ts +8 -0
  109. package/dist/overlay/placement.js +87 -0
  110. package/dist/overlay/placement.js.map +1 -0
  111. package/dist/press/index.js +1 -1
  112. package/dist/ref/index.js +15 -0
  113. package/dist/ref/index.js.map +1 -0
  114. package/dist/router/index.js +1 -1
  115. package/dist/row/index.js +158 -0
  116. package/dist/row/index.js.map +1 -0
  117. package/dist/row/styles.js +51 -0
  118. package/dist/row/styles.js.map +1 -0
  119. package/dist/theme/scope.js +1 -1
  120. package/dist/theme-scope.d.ts +1 -1
  121. package/dist/theme-scope.js +1 -1
  122. package/dist/typography/fonts.js +1 -1
  123. package/package.json +6 -6
@@ -1,37 +1,21 @@
1
1
  import { useTheme } from "../../theme/scope.js";
2
2
  import { composeStyles, themedStyles } from "../../theme/styles.js";
3
3
  import { useTypeRole } from "../../typography/roles.js";
4
+ import { refsOf } from "../../ref/index.js";
4
5
  import { ButtonSlotContext } from "../../button/slots.js";
5
- import { AnimatedPressable } from "../../button/index.js";
6
- import { withOpacity } from "../../theme/color.js";
7
6
  import { useWindowSizeClass } from "../../hooks/useWindowSizeClass.js";
8
- import { OverlayHost } from "../../overlay/host.js";
7
+ import { ModalWindow, NO_INSETS, insetsOf, panelRoleOf, registerOf, useModalState, useModalTrigger } from "../../modal/index.js";
9
8
  import { c } from "react/compiler-runtime";
10
- import { AccessibilityInfo, Modal, Platform, ScrollView, StyleSheet, Text, View, useWindowDimensions } from "react-native";
11
- import { createContext, use, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
12
- import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { createContext, use, useEffect, useId, useLayoutEffect, useState } from "react";
10
+ import { jsx } from "react/jsx-runtime";
11
+ import { ScrollView, StyleSheet, Text, View, useWindowDimensions } from "react-native";
13
12
  import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
14
13
  import { SafeAreaInsetsContext } from "react-native-safe-area-context";
15
- import { useOverlayTriggerState } from "react-stately/useOverlayTriggerState";
16
14
  //#region src/components/dialog/index.tsx
17
15
  const MIN_WIDTH = 280;
18
16
  const MAX_WIDTH = 560;
19
17
  const SCALE_FROM = .9;
20
18
  const RISE_FROM = .03;
21
- const SCRIM_OPACITY = .32;
22
- const NO_INSETS = {
23
- bottom: 0,
24
- left: 0,
25
- right: 0,
26
- top: 0
27
- };
28
- const ORIENTATIONS = [
29
- "portrait",
30
- "portrait-upside-down",
31
- "landscape",
32
- "landscape-left",
33
- "landscape-right"
34
- ];
35
19
  const NO_PARTS = {
36
20
  footer: 0,
37
21
  header: 0,
@@ -99,14 +83,6 @@ const stylesOf = themedStyles(({ colors, radii, shadows, sizing, spacing }) => S
99
83
  alignItems: "stretch",
100
84
  padding: 0
101
85
  },
102
- scrim: {
103
- backgroundColor: withOpacity(colors.scrim, SCRIM_OPACITY),
104
- bottom: 0,
105
- left: 0,
106
- position: "absolute",
107
- right: 0,
108
- top: 0
109
- },
110
86
  title: {
111
87
  color: colors.onSurface,
112
88
  flexShrink: 1
@@ -152,7 +128,7 @@ function bodyPaddingOf({ basic, parts }, spacing) {
152
128
  * `onOpenChange` to `Dialog.Content` instead.
153
129
  */
154
130
  function Dialog(t0) {
155
- const $ = c(15);
131
+ const $ = c(10);
156
132
  const { children, defaultOpen, isOpen, onOpenChange } = t0;
157
133
  let t1;
158
134
  if ($[0] !== defaultOpen || $[1] !== isOpen || $[2] !== onOpenChange) {
@@ -166,51 +142,28 @@ function Dialog(t0) {
166
142
  $[2] = onOpenChange;
167
143
  $[3] = t1;
168
144
  } else t1 = $[3];
169
- const state = useOverlayTriggerState(t1);
170
- const [trigger, setTrigger] = useState(null);
145
+ const { context, slots } = useModalTrigger(t1);
171
146
  let t2;
172
- if ($[4] !== state || $[5] !== trigger) {
173
- t2 = {
174
- state,
175
- trigger
176
- };
177
- $[4] = state;
178
- $[5] = trigger;
179
- $[6] = t2;
180
- } else t2 = $[6];
181
- const context = t2;
182
- let t3;
183
- if ($[7] !== state) {
184
- t3 = { default: (event) => {
185
- const target = event.currentTarget;
186
- setTrigger(typeof target === "number" ? null : target);
187
- state.open();
188
- } };
189
- $[7] = state;
190
- $[8] = t3;
191
- } else t3 = $[8];
192
- const slots = t3;
193
- let t4;
194
- if ($[9] !== children || $[10] !== slots) {
195
- t4 = /* @__PURE__ */ jsx(ButtonSlotContext, {
147
+ if ($[4] !== children || $[5] !== slots) {
148
+ t2 = /* @__PURE__ */ jsx(ButtonSlotContext, {
196
149
  value: slots,
197
150
  children
198
151
  });
199
- $[9] = children;
200
- $[10] = slots;
201
- $[11] = t4;
202
- } else t4 = $[11];
203
- let t5;
204
- if ($[12] !== context || $[13] !== t4) {
205
- t5 = /* @__PURE__ */ jsx(DialogTriggerContext, {
152
+ $[4] = children;
153
+ $[5] = slots;
154
+ $[6] = t2;
155
+ } else t2 = $[6];
156
+ let t3;
157
+ if ($[7] !== context || $[8] !== t2) {
158
+ t3 = /* @__PURE__ */ jsx(DialogTriggerContext, {
206
159
  value: context,
207
- children: t4
160
+ children: t2
208
161
  });
209
- $[12] = context;
210
- $[13] = t4;
211
- $[14] = t5;
212
- } else t5 = $[14];
213
- return t5;
162
+ $[7] = context;
163
+ $[8] = t2;
164
+ $[9] = t3;
165
+ } else t3 = $[9];
166
+ return t3;
214
167
  }
215
168
  /**
216
169
  * What the dialog shows, as a body that scrolls when its content runs past
@@ -316,7 +269,7 @@ function DialogBody(t0) {
316
269
  * `style`, `ref` and `testID` land on the container.
317
270
  */
318
271
  function DialogContent(t0) {
319
- const $ = c(46);
272
+ const $ = c(49);
320
273
  let children;
321
274
  let defaultOpen;
322
275
  let isOpen;
@@ -365,8 +318,7 @@ function DialogContent(t0) {
365
318
  $[12] = onOpenChange;
366
319
  $[13] = t4;
367
320
  } else t4 = $[13];
368
- const own = useOverlayTriggerState(t4);
369
- const state = outer?.state ?? own;
321
+ const { close, present, setPresent, slots, state } = useModalState(outer, t4);
370
322
  const theme = useTheme();
371
323
  const styles = stylesOf(theme);
372
324
  const insets = use(SafeAreaInsetsContext) ?? NO_INSETS;
@@ -381,133 +333,110 @@ function DialogContent(t0) {
381
333
  } else t5 = $[14];
382
334
  const [register] = useState(t5);
383
335
  const [title, setTitle] = useState(null);
384
- const [present, setPresent] = useState(state.isOpen);
385
336
  const motion = useDialogMotion(state.isOpen, present, setPresent, basic);
386
337
  let t6;
387
- if ($[15] !== state) {
388
- t6 = () => {
389
- state.close();
390
- };
391
- $[15] = state;
392
- $[16] = t6;
393
- } else t6 = $[16];
394
- const close = t6;
395
- let t7;
396
- if ($[17] !== close) {
397
- t7 = { close };
398
- $[17] = close;
399
- $[18] = t7;
400
- } else t7 = $[18];
401
- const slots = t7;
402
- let t8;
403
- if ($[19] !== basic || $[20] !== parts || $[21] !== register || $[22] !== titleId) {
404
- t8 = {
338
+ if ($[15] !== basic || $[16] !== parts || $[17] !== register || $[18] !== titleId) {
339
+ t6 = {
405
340
  basic,
406
341
  parts,
407
342
  register,
408
343
  setTitle,
409
344
  titleId
410
345
  };
411
- $[19] = basic;
412
- $[20] = parts;
413
- $[21] = register;
414
- $[22] = titleId;
415
- $[23] = t8;
416
- } else t8 = $[23];
417
- const layout = t8;
418
- if (state.isOpen && !present) setPresent(true);
419
- useReturnFocus(present, outer);
346
+ $[15] = basic;
347
+ $[16] = parts;
348
+ $[17] = register;
349
+ $[18] = titleId;
350
+ $[19] = t6;
351
+ } else t6 = $[19];
352
+ const layout = t6;
420
353
  if (!present) return null;
421
354
  const labelledBy = parts.title > 0 ? titleId : void 0;
422
- const web = Platform.OS === "web";
423
- let t9;
424
- if ($[24] !== title) {
425
- t9 = focusOf(title);
426
- $[24] = title;
427
- $[25] = t9;
428
- } else t9 = $[25];
429
- const T0 = View;
430
- const t10 = composeStyles(styles.layout, basic ? void 0 : styles.layoutFull);
431
- const t11 = Animated;
432
- let t12;
433
- if ($[26] !== labelledBy || $[27] !== role) {
434
- t12 = web ? void 0 : panelRoleOf(role, labelledBy);
435
- $[26] = labelledBy;
436
- $[27] = role;
437
- $[28] = t12;
438
- } else t12 = $[28];
439
- const t13 = isKeyboardDismissDisabled ? void 0 : close;
440
- const t14 = composeStyles(styles.container, basic ? styles.containerBasic : styles.containerFull, basic ? void 0 : insetsOf(insets), motion.panel, style);
441
- let t15;
442
- if ($[29] !== children || $[30] !== slots) {
443
- t15 = /* @__PURE__ */ jsx(ButtonSlotContext, {
355
+ const T0 = ModalWindow;
356
+ const t7 = isDismissable && state.isOpen ? close : void 0;
357
+ const t8 = motion.scrim;
358
+ const T1 = View;
359
+ const t9 = composeStyles(styles.layout, basic ? void 0 : styles.layoutFull);
360
+ const t10 = Animated;
361
+ let t11;
362
+ if ($[20] !== labelledBy || $[21] !== role) {
363
+ t11 = panelRoleOf(role, labelledBy);
364
+ $[20] = labelledBy;
365
+ $[21] = role;
366
+ $[22] = t11;
367
+ } else t11 = $[22];
368
+ const t12 = isKeyboardDismissDisabled ? void 0 : close;
369
+ const t13 = composeStyles(styles.container, basic ? styles.containerBasic : styles.containerFull, basic ? void 0 : insetsOf(insets), motion.panel, style);
370
+ let t14;
371
+ if ($[23] !== children || $[24] !== slots) {
372
+ t14 = /* @__PURE__ */ jsx(ButtonSlotContext, {
444
373
  value: slots,
445
374
  children
446
375
  });
447
- $[29] = children;
448
- $[30] = slots;
449
- $[31] = t15;
450
- } else t15 = $[31];
451
- let t16;
452
- if ($[32] !== layout || $[33] !== t15) {
453
- t16 = /* @__PURE__ */ jsx(DialogLayoutContext, {
376
+ $[23] = children;
377
+ $[24] = slots;
378
+ $[25] = t14;
379
+ } else t14 = $[25];
380
+ let t15;
381
+ if ($[26] !== layout || $[27] !== t14) {
382
+ t15 = /* @__PURE__ */ jsx(DialogLayoutContext, {
454
383
  value: layout,
384
+ children: t14
385
+ });
386
+ $[26] = layout;
387
+ $[27] = t14;
388
+ $[28] = t15;
389
+ } else t15 = $[28];
390
+ let t16;
391
+ if ($[29] !== props || $[30] !== t10.View || $[31] !== t11 || $[32] !== t12 || $[33] !== t13 || $[34] !== t15) {
392
+ t16 = /* @__PURE__ */ jsx(t10.View, {
393
+ ...t11,
394
+ onAccessibilityEscape: t12,
395
+ ...props,
396
+ style: t13,
455
397
  children: t15
456
398
  });
457
- $[32] = layout;
458
- $[33] = t15;
459
- $[34] = t16;
460
- } else t16 = $[34];
399
+ $[29] = props;
400
+ $[30] = t10.View;
401
+ $[31] = t11;
402
+ $[32] = t12;
403
+ $[33] = t13;
404
+ $[34] = t15;
405
+ $[35] = t16;
406
+ } else t16 = $[35];
461
407
  let t17;
462
- if ($[35] !== props || $[36] !== t11.View || $[37] !== t12 || $[38] !== t13 || $[39] !== t14 || $[40] !== t16) {
463
- t17 = /* @__PURE__ */ jsx(t11.View, {
464
- ...t12,
465
- onAccessibilityEscape: t13,
466
- ...props,
467
- style: t14,
408
+ if ($[36] !== T1 || $[37] !== t16 || $[38] !== t9) {
409
+ t17 = /* @__PURE__ */ jsx(T1, {
410
+ style: t9,
468
411
  children: t16
469
412
  });
470
- $[35] = props;
471
- $[36] = t11.View;
472
- $[37] = t12;
473
- $[38] = t13;
474
- $[39] = t14;
475
- $[40] = t16;
476
- $[41] = t17;
477
- } else t17 = $[41];
413
+ $[36] = T1;
414
+ $[37] = t16;
415
+ $[38] = t9;
416
+ $[39] = t17;
417
+ } else t17 = $[39];
478
418
  let t18;
479
- if ($[42] !== T0 || $[43] !== t10 || $[44] !== t17) {
419
+ if ($[40] !== T0 || $[41] !== close || $[42] !== isKeyboardDismissDisabled || $[43] !== labelledBy || $[44] !== motion.scrim || $[45] !== t17 || $[46] !== t7 || $[47] !== title) {
480
420
  t18 = /* @__PURE__ */ jsx(T0, {
481
- style: t10,
421
+ isKeyboardDismissDisabled,
422
+ labelledBy,
423
+ onClose: close,
424
+ onScrimPress: t7,
425
+ scrim: t8,
426
+ title,
482
427
  children: t17
483
428
  });
484
- $[42] = T0;
485
- $[43] = t10;
486
- $[44] = t17;
487
- $[45] = t18;
488
- } else t18 = $[45];
489
- return /* @__PURE__ */ jsx(Modal, {
490
- animationType: "none",
491
- "aria-labelledby": web ? labelledBy : void 0,
492
- navigationBarTranslucent: true,
493
- onRequestClose: isKeyboardDismissDisabled ? ignore : close,
494
- onShow: t9,
495
- statusBarTranslucent: true,
496
- supportedOrientations: ORIENTATIONS,
497
- transparent: true,
498
- visible: true,
499
- children: /* @__PURE__ */ jsx(ButtonSlotContext, {
500
- value: null,
501
- children: /* @__PURE__ */ jsxs(OverlayHost, { children: [/* @__PURE__ */ jsx(AnimatedPressable, {
502
- accessible: false,
503
- "aria-hidden": true,
504
- focusable: false,
505
- onPress: isDismissable && state.isOpen ? close : void 0,
506
- style: composeStyles(styles.scrim, motion.scrim),
507
- tabIndex: -1
508
- }), t18] })
509
- })
510
- });
429
+ $[40] = T0;
430
+ $[41] = close;
431
+ $[42] = isKeyboardDismissDisabled;
432
+ $[43] = labelledBy;
433
+ $[44] = motion.scrim;
434
+ $[45] = t17;
435
+ $[46] = t7;
436
+ $[47] = title;
437
+ $[48] = t18;
438
+ } else t18 = $[48];
439
+ return t18;
511
440
  }
512
441
  /**
513
442
  * The dialog's actions, at the trailing edge and wrapping onto another row
@@ -675,48 +604,6 @@ function DialogTitle(t0) {
675
604
  } else t7 = $[15];
676
605
  return t7;
677
606
  }
678
- function focusOf(title) {
679
- return () => {
680
- if (title !== null && Platform.OS !== "web") AccessibilityInfo.sendAccessibilityEvent(title, "focus");
681
- };
682
- }
683
- function ignore() {}
684
- function insetsOf(insets) {
685
- return {
686
- paddingBottom: insets.bottom,
687
- paddingLeft: insets.left,
688
- paddingRight: insets.right,
689
- paddingTop: insets.top
690
- };
691
- }
692
- function panelRoleOf(role, labelledBy) {
693
- return {
694
- "aria-labelledby": labelledBy,
695
- "aria-modal": true,
696
- role
697
- };
698
- }
699
- function refsOf(own, other) {
700
- return (node) => {
701
- own(node);
702
- if (typeof other === "function") other(node);
703
- else if (other !== null && other !== void 0) other.current = node;
704
- };
705
- }
706
- function registerOf(setParts) {
707
- return (part) => {
708
- setParts((parts) => ({
709
- ...parts,
710
- [part]: parts[part] + 1
711
- }));
712
- return () => {
713
- setParts((parts) => ({
714
- ...parts,
715
- [part]: parts[part] - 1
716
- }));
717
- };
718
- };
719
- }
720
607
  /**
721
608
  * The scrim's and the panel's motion, and the timer that unmounts the dialog
722
609
  * once its exit has run. The panel arrives over the medium duration on the
@@ -826,30 +713,6 @@ function useLayout(part) {
826
713
  if (layout === null) throw new Error(`${part} is drawn inside Dialog.Content.`);
827
714
  return layout;
828
715
  }
829
- function useReturnFocus(present, outer) {
830
- const $ = c(6);
831
- const shown = useRef(present);
832
- let t0;
833
- if ($[0] !== outer?.trigger || $[1] !== present) {
834
- t0 = () => {
835
- const trigger = outer?.trigger ?? null;
836
- const gone = shown.current && !present;
837
- shown.current = present;
838
- if (gone && trigger !== null && Platform.OS !== "web") AccessibilityInfo.sendAccessibilityEvent(trigger, "focus");
839
- };
840
- $[0] = outer?.trigger;
841
- $[1] = present;
842
- $[2] = t0;
843
- } else t0 = $[2];
844
- let t1;
845
- if ($[3] !== outer || $[4] !== present) {
846
- t1 = [outer, present];
847
- $[3] = outer;
848
- $[4] = present;
849
- $[5] = t1;
850
- } else t1 = $[5];
851
- useEffect(t0, t1);
852
- }
853
716
  Dialog.Body = DialogBody;
854
717
  Dialog.Content = DialogContent;
855
718
  Dialog.Footer = DialogFooter;