@korsolutions/ui 0.0.36 → 0.0.38

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 (124) hide show
  1. package/dist/module/components/alert-dialog/alert-dialog.js +41 -0
  2. package/dist/module/components/alert-dialog/alert-dialog.js.map +1 -0
  3. package/dist/module/components/alert-dialog/async-alert-dialog.js +117 -0
  4. package/dist/module/components/alert-dialog/async-alert-dialog.js.map +1 -0
  5. package/dist/module/components/alert-dialog/index.js +6 -0
  6. package/dist/module/components/alert-dialog/index.js.map +1 -0
  7. package/dist/module/components/alert-dialog/variants/default.js +93 -0
  8. package/dist/module/components/alert-dialog/variants/default.js.map +1 -0
  9. package/dist/module/components/alert-dialog/variants/index.js +7 -0
  10. package/dist/module/components/alert-dialog/variants/index.js.map +1 -0
  11. package/dist/module/components/checkbox/checkbox.js +4 -4
  12. package/dist/module/components/checkbox/checkbox.js.map +1 -1
  13. package/dist/module/components/index.js +1 -0
  14. package/dist/module/components/index.js.map +1 -1
  15. package/dist/module/index.js +2 -1
  16. package/dist/module/index.js.map +1 -1
  17. package/dist/module/primitives/alert-dialog/alert-dialog-action.js +34 -0
  18. package/dist/module/primitives/alert-dialog/alert-dialog-action.js.map +1 -0
  19. package/dist/module/primitives/alert-dialog/alert-dialog-cancel.js +34 -0
  20. package/dist/module/primitives/alert-dialog/alert-dialog-cancel.js.map +1 -0
  21. package/dist/module/primitives/alert-dialog/alert-dialog-content.js +23 -0
  22. package/dist/module/primitives/alert-dialog/alert-dialog-content.js.map +1 -0
  23. package/dist/module/primitives/alert-dialog/alert-dialog-description.js +23 -0
  24. package/dist/module/primitives/alert-dialog/alert-dialog-description.js.map +1 -0
  25. package/dist/module/primitives/alert-dialog/alert-dialog-footer.js +23 -0
  26. package/dist/module/primitives/alert-dialog/alert-dialog-footer.js.map +1 -0
  27. package/dist/module/primitives/alert-dialog/alert-dialog-overlay.js +26 -0
  28. package/dist/module/primitives/alert-dialog/alert-dialog-overlay.js.map +1 -0
  29. package/dist/module/primitives/alert-dialog/alert-dialog-portal.js +20 -0
  30. package/dist/module/primitives/alert-dialog/alert-dialog-portal.js.map +1 -0
  31. package/dist/module/primitives/alert-dialog/alert-dialog-root.js +22 -0
  32. package/dist/module/primitives/alert-dialog/alert-dialog-root.js.map +1 -0
  33. package/dist/module/primitives/alert-dialog/alert-dialog-title.js +23 -0
  34. package/dist/module/primitives/alert-dialog/alert-dialog-title.js.map +1 -0
  35. package/dist/module/primitives/alert-dialog/alert-dialog-trigger.js +28 -0
  36. package/dist/module/primitives/alert-dialog/alert-dialog-trigger.js.map +1 -0
  37. package/dist/module/primitives/alert-dialog/context.js +12 -0
  38. package/dist/module/primitives/alert-dialog/context.js.map +1 -0
  39. package/dist/module/primitives/alert-dialog/index.js +26 -0
  40. package/dist/module/primitives/alert-dialog/index.js.map +1 -0
  41. package/dist/module/primitives/alert-dialog/types.js +4 -0
  42. package/dist/module/primitives/alert-dialog/types.js.map +1 -0
  43. package/dist/module/primitives/checkbox/checkbox-indicator.js +3 -3
  44. package/dist/module/primitives/checkbox/checkbox-indicator.js.map +1 -1
  45. package/dist/module/primitives/checkbox/checkbox-root.js +12 -12
  46. package/dist/module/primitives/checkbox/checkbox-root.js.map +1 -1
  47. package/dist/module/primitives/index.js +1 -0
  48. package/dist/module/primitives/index.js.map +1 -1
  49. package/dist/module/primitives/popover/popover-portal.js +1 -1
  50. package/dist/module/primitives/popover/popover-portal.js.map +1 -1
  51. package/dist/typescript/src/components/alert-dialog/alert-dialog.d.ts +15 -0
  52. package/dist/typescript/src/components/alert-dialog/alert-dialog.d.ts.map +1 -0
  53. package/dist/typescript/src/components/alert-dialog/async-alert-dialog.d.ts +19 -0
  54. package/dist/typescript/src/components/alert-dialog/async-alert-dialog.d.ts.map +1 -0
  55. package/dist/typescript/src/components/alert-dialog/index.d.ts +4 -0
  56. package/dist/typescript/src/components/alert-dialog/index.d.ts.map +1 -0
  57. package/dist/typescript/src/components/alert-dialog/variants/default.d.ts +3 -0
  58. package/dist/typescript/src/components/alert-dialog/variants/default.d.ts.map +1 -0
  59. package/dist/typescript/src/components/alert-dialog/variants/index.d.ts +4 -0
  60. package/dist/typescript/src/components/alert-dialog/variants/index.d.ts.map +1 -0
  61. package/dist/typescript/src/components/checkbox/checkbox.d.ts +3 -3
  62. package/dist/typescript/src/components/checkbox/checkbox.d.ts.map +1 -1
  63. package/dist/typescript/src/components/index.d.ts +1 -0
  64. package/dist/typescript/src/components/index.d.ts.map +1 -1
  65. package/dist/typescript/src/index.d.ts.map +1 -1
  66. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-action.d.ts +8 -0
  67. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-action.d.ts.map +1 -0
  68. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-cancel.d.ts +8 -0
  69. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-cancel.d.ts.map +1 -0
  70. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-content.d.ts +8 -0
  71. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-content.d.ts.map +1 -0
  72. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-description.d.ts +8 -0
  73. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-description.d.ts.map +1 -0
  74. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-footer.d.ts +8 -0
  75. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-footer.d.ts.map +1 -0
  76. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-overlay.d.ts +7 -0
  77. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-overlay.d.ts.map +1 -0
  78. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-portal.d.ts +7 -0
  79. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-portal.d.ts.map +1 -0
  80. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-root.d.ts +8 -0
  81. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-root.d.ts.map +1 -0
  82. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-title.d.ts +8 -0
  83. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-title.d.ts.map +1 -0
  84. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-trigger.d.ts +154 -0
  85. package/dist/typescript/src/primitives/alert-dialog/alert-dialog-trigger.d.ts.map +1 -0
  86. package/dist/typescript/src/primitives/alert-dialog/context.d.ts +10 -0
  87. package/dist/typescript/src/primitives/alert-dialog/context.d.ts.map +1 -0
  88. package/dist/typescript/src/primitives/alert-dialog/index.d.ts +33 -0
  89. package/dist/typescript/src/primitives/alert-dialog/index.d.ts.map +1 -0
  90. package/dist/typescript/src/primitives/alert-dialog/types.d.ts +13 -0
  91. package/dist/typescript/src/primitives/alert-dialog/types.d.ts.map +1 -0
  92. package/dist/typescript/src/primitives/checkbox/checkbox-context.d.ts +3 -3
  93. package/dist/typescript/src/primitives/checkbox/checkbox-context.d.ts.map +1 -1
  94. package/dist/typescript/src/primitives/checkbox/checkbox-root.d.ts +3 -3
  95. package/dist/typescript/src/primitives/checkbox/checkbox-root.d.ts.map +1 -1
  96. package/dist/typescript/src/primitives/index.d.ts +1 -0
  97. package/dist/typescript/src/primitives/index.d.ts.map +1 -1
  98. package/package.json +1 -1
  99. package/src/components/alert-dialog/alert-dialog.tsx +38 -0
  100. package/src/components/alert-dialog/async-alert-dialog.tsx +121 -0
  101. package/src/components/alert-dialog/index.ts +3 -0
  102. package/src/components/alert-dialog/variants/default.tsx +82 -0
  103. package/src/components/alert-dialog/variants/index.ts +5 -0
  104. package/src/components/checkbox/checkbox.tsx +5 -5
  105. package/src/components/index.ts +1 -0
  106. package/src/index.tsx +2 -0
  107. package/src/primitives/alert-dialog/alert-dialog-action.tsx +27 -0
  108. package/src/primitives/alert-dialog/alert-dialog-cancel.tsx +27 -0
  109. package/src/primitives/alert-dialog/alert-dialog-content.tsx +21 -0
  110. package/src/primitives/alert-dialog/alert-dialog-description.tsx +21 -0
  111. package/src/primitives/alert-dialog/alert-dialog-footer.tsx +21 -0
  112. package/src/primitives/alert-dialog/alert-dialog-overlay.tsx +25 -0
  113. package/src/primitives/alert-dialog/alert-dialog-portal.tsx +20 -0
  114. package/src/primitives/alert-dialog/alert-dialog-root.tsx +25 -0
  115. package/src/primitives/alert-dialog/alert-dialog-title.tsx +21 -0
  116. package/src/primitives/alert-dialog/alert-dialog-trigger.tsx +27 -0
  117. package/src/primitives/alert-dialog/context.ts +18 -0
  118. package/src/primitives/alert-dialog/index.ts +34 -0
  119. package/src/primitives/alert-dialog/types.ts +13 -0
  120. package/src/primitives/checkbox/checkbox-context.tsx +3 -3
  121. package/src/primitives/checkbox/checkbox-indicator.tsx +3 -3
  122. package/src/primitives/checkbox/checkbox-root.tsx +14 -15
  123. package/src/primitives/index.ts +1 -0
  124. package/src/primitives/popover/popover-portal.tsx +1 -1
@@ -0,0 +1,154 @@
1
+ import type { ViewRef } from "../../types/element.types";
2
+ import React from "react";
3
+ import { type PressableProps } from "react-native";
4
+ export interface AlertDialogPrimitiveTriggerProps extends PressableProps {
5
+ children: React.ReactElement<React.RefAttributes<ViewRef> & PressableProps>;
6
+ }
7
+ export declare function AlertDialogTrigger(props: AlertDialogPrimitiveTriggerProps): React.ReactElement<React.RefAttributes<import("react-native/types_generated/src/private/types/HostInstance").LegacyHostInstanceMethods> & Readonly<Omit<Omit<Readonly<Omit<Readonly<{
8
+ onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
9
+ onAccessibilityTap?: (() => unknown) | undefined;
10
+ onLayout?: ((event: import("react-native").LayoutChangeEvent) => unknown) | undefined;
11
+ onMagicTap?: (() => unknown) | undefined;
12
+ onAccessibilityEscape?: (() => unknown) | undefined;
13
+ }>, "style" | "children" | "pointerEvents" | "id" | "nativeID" | "onResponderGrant" | "onResponderMove" | "onResponderRelease" | "onResponderTerminate" | "onResponderTerminationRequest" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "role" | "testID" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onClick" | "onMoveShouldSetResponderCapture" | "onResponderReject" | "onResponderStart" | "onResponderEnd" | "onStartShouldSetResponderCapture" | "onMouseEnter" | "onMouseLeave" | "onClickCapture" | "onPointerEnterCapture" | "onPointerLeaveCapture" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "collapsable" | "collapsableChildren" | "needsOffscreenAlphaCompositing" | "hitSlop" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
14
+ onMoveShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
15
+ onMoveShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
16
+ onResponderGrant?: ((e: import("react-native").GestureResponderEvent) => void | boolean) | undefined;
17
+ onResponderMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
18
+ onResponderReject?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
19
+ onResponderRelease?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
20
+ onResponderStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
21
+ onResponderEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
22
+ onResponderTerminate?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
23
+ onResponderTerminationRequest?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
24
+ onStartShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
25
+ onStartShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
26
+ }>, "style" | "children" | "pointerEvents" | "id" | "nativeID" | "role" | "testID" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onClick" | "onMouseEnter" | "onMouseLeave" | "onClickCapture" | "onPointerEnterCapture" | "onPointerLeaveCapture" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "collapsable" | "collapsableChildren" | "needsOffscreenAlphaCompositing" | "hitSlop" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
27
+ onMouseEnter?: ((event: import("react-native").MouseEvent) => void) | undefined;
28
+ onMouseLeave?: ((event: import("react-native").MouseEvent) => void) | undefined;
29
+ }>, "style" | "children" | "pointerEvents" | "id" | "nativeID" | "role" | "testID" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onClick" | "onClickCapture" | "onPointerEnterCapture" | "onPointerLeaveCapture" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "collapsable" | "collapsableChildren" | "needsOffscreenAlphaCompositing" | "hitSlop" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
30
+ onClick?: ((event: import("react-native").PointerEvent) => void) | undefined;
31
+ onClickCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
32
+ onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
33
+ onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
34
+ onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
35
+ onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
36
+ onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
37
+ onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
38
+ onPointerCancel?: ((e: import("react-native").PointerEvent) => void) | undefined;
39
+ onPointerCancelCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
40
+ onPointerDown?: ((e: import("react-native").PointerEvent) => void) | undefined;
41
+ onPointerDownCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
42
+ onPointerUp?: ((e: import("react-native").PointerEvent) => void) | undefined;
43
+ onPointerUpCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
44
+ onPointerOver?: ((e: import("react-native").PointerEvent) => void) | undefined;
45
+ onPointerOverCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
46
+ onPointerOut?: ((e: import("react-native").PointerEvent) => void) | undefined;
47
+ onPointerOutCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
48
+ onGotPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
49
+ onGotPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
50
+ onLostPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
51
+ onLostPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
52
+ }>, "style" | "children" | "pointerEvents" | "id" | "nativeID" | "role" | "testID" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "onClick" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "collapsable" | "collapsableChildren" | "needsOffscreenAlphaCompositing" | "hitSlop" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
53
+ onBlur?: ((event: import("react-native").BlurEvent) => void) | undefined;
54
+ onBlurCapture?: ((event: import("react-native").BlurEvent) => void) | undefined;
55
+ onFocus?: ((event: import("react-native").FocusEvent) => void) | undefined;
56
+ onFocusCapture?: ((event: import("react-native").FocusEvent) => void) | undefined;
57
+ }>, "style" | "children" | "pointerEvents" | "id" | "nativeID" | "role" | "testID" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "onClick" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "collapsable" | "collapsableChildren" | "needsOffscreenAlphaCompositing" | "hitSlop" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
58
+ onTouchCancel?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
59
+ onTouchCancelCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
60
+ onTouchEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
61
+ onTouchEndCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
62
+ onTouchMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
63
+ onTouchMoveCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
64
+ onTouchStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
65
+ onTouchStartCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
66
+ }>, "style" | "children" | "pointerEvents" | "id" | "nativeID" | "role" | "testID" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "onClick" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "collapsable" | "collapsableChildren" | "needsOffscreenAlphaCompositing" | "hitSlop" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
67
+ nativeBackgroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
68
+ nativeForegroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
69
+ renderToHardwareTextureAndroid?: boolean | undefined;
70
+ hasTVPreferredFocus?: boolean | undefined;
71
+ nextFocusDown?: number | undefined;
72
+ nextFocusForward?: number | undefined;
73
+ nextFocusLeft?: number | undefined;
74
+ nextFocusRight?: number | undefined;
75
+ nextFocusUp?: number | undefined;
76
+ focusable?: boolean | undefined;
77
+ tabIndex?: 0 | -1;
78
+ onClick?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
79
+ }>, "style" | "children" | "pointerEvents" | "id" | "nativeID" | "role" | "testID" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "shouldRasterizeIOS" | "collapsable" | "collapsableChildren" | "needsOffscreenAlphaCompositing" | "hitSlop" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
80
+ shouldRasterizeIOS?: boolean | undefined;
81
+ }>, "style" | "children" | "pointerEvents" | "id" | "nativeID" | "role" | "testID" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "collapsable" | "collapsableChildren" | "needsOffscreenAlphaCompositing" | "hitSlop" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<Omit<Readonly<{
82
+ accessibilityLabelledBy?: (string | undefined) | (Array<string> | undefined);
83
+ "aria-labelledby"?: string | undefined;
84
+ accessibilityLiveRegion?: ("none" | "polite" | "assertive") | undefined;
85
+ "aria-live"?: ("polite" | "assertive" | "off") | undefined;
86
+ importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
87
+ screenReaderFocusable?: boolean;
88
+ }>, "role" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & Omit<Readonly<{
89
+ accessibilityIgnoresInvertColors?: boolean | undefined;
90
+ accessibilityViewIsModal?: boolean | undefined;
91
+ accessibilityShowsLargeContentViewer?: boolean | undefined;
92
+ accessibilityLargeContentTitle?: string | undefined;
93
+ "aria-modal"?: boolean | undefined;
94
+ accessibilityElementsHidden?: boolean | undefined;
95
+ accessibilityLanguage?: string | undefined;
96
+ accessibilityRespondsToUserInteraction?: boolean | undefined;
97
+ }>, "role" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & {
98
+ accessible?: boolean | undefined;
99
+ accessibilityLabel?: string | undefined;
100
+ accessibilityHint?: string | undefined;
101
+ "aria-label"?: string | undefined;
102
+ accessibilityRole?: import("react-native").AccessibilityRole | undefined;
103
+ role?: import("react-native").Role | undefined;
104
+ accessibilityState?: import("react-native").AccessibilityState | undefined;
105
+ accessibilityValue?: import("react-native").AccessibilityValue | undefined;
106
+ "aria-valuemax"?: import("react-native").AccessibilityValue["max"] | undefined;
107
+ "aria-valuemin"?: import("react-native").AccessibilityValue["min"] | undefined;
108
+ "aria-valuenow"?: import("react-native").AccessibilityValue["now"] | undefined;
109
+ "aria-valuetext"?: import("react-native").AccessibilityValue["text"] | undefined;
110
+ accessibilityActions?: ReadonlyArray<import("react-native/types_generated/Libraries/Components/View/ViewAccessibility").AccessibilityActionInfo> | undefined;
111
+ "aria-busy"?: boolean | undefined;
112
+ "aria-checked"?: (boolean | undefined) | "mixed";
113
+ "aria-disabled"?: boolean | undefined;
114
+ "aria-expanded"?: boolean | undefined;
115
+ "aria-selected"?: boolean | undefined;
116
+ "aria-hidden"?: boolean | undefined;
117
+ }>, "style" | "children" | "pointerEvents" | "id" | "nativeID" | "testID" | "collapsable" | "collapsableChildren" | "needsOffscreenAlphaCompositing" | "hitSlop" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
118
+ children?: React.ReactNode;
119
+ style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").ViewStyleProp | undefined;
120
+ collapsable?: boolean | undefined;
121
+ collapsableChildren?: boolean | undefined;
122
+ id?: string;
123
+ testID?: string | undefined;
124
+ nativeID?: string | undefined;
125
+ needsOffscreenAlphaCompositing?: boolean | undefined;
126
+ hitSlop?: import("react-native/types_generated/Libraries/StyleSheet/EdgeInsetsPropType").EdgeInsetsOrSizeProp | undefined;
127
+ pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
128
+ removeClippedSubviews?: boolean | undefined;
129
+ experimental_accessibilityOrder?: Array<string> | undefined;
130
+ }>, never>>, "onMouseEnter" | "onMouseLeave">, "style" | "children" | "disabled" | "onLayout" | "onLongPress" | "onPress" | "onPressIn" | "onPressOut" | "pressRetentionOffset" | "testID" | "hitSlop" | "cancelable" | "delayHoverIn" | "delayHoverOut" | "delayLongPress" | "onHoverIn" | "onHoverOut" | "onPressMove" | "android_disableSound" | "android_ripple" | "testOnly_pressed" | "unstable_pressDelay"> & Omit<Readonly<{
131
+ cancelable?: boolean | undefined;
132
+ children?: React.ReactNode | ((state: import("react-native").PressableStateCallbackType) => React.ReactNode);
133
+ delayHoverIn?: number | undefined;
134
+ delayHoverOut?: number | undefined;
135
+ delayLongPress?: number | undefined;
136
+ disabled?: boolean | undefined;
137
+ hitSlop?: import("react-native/types_generated/Libraries/StyleSheet/Rect").RectOrSize | undefined;
138
+ pressRetentionOffset?: import("react-native/types_generated/Libraries/StyleSheet/Rect").RectOrSize | undefined;
139
+ onLayout?: ((event: import("react-native").LayoutChangeEvent) => unknown) | undefined;
140
+ onHoverIn?: ((event: import("react-native").MouseEvent) => unknown) | undefined;
141
+ onHoverOut?: ((event: import("react-native").MouseEvent) => unknown) | undefined;
142
+ onLongPress?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
143
+ onPress?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
144
+ onPressIn?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
145
+ onPressMove?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
146
+ onPressOut?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
147
+ style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheetTypes").____ViewStyleProp_Internal | ((state: import("react-native").PressableStateCallbackType) => import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").ViewStyleProp) | undefined;
148
+ testID?: string | undefined;
149
+ android_disableSound?: boolean | undefined;
150
+ android_ripple?: import("react-native").PressableAndroidRippleConfig | undefined;
151
+ testOnly_pressed?: boolean | undefined;
152
+ unstable_pressDelay?: number | undefined;
153
+ }>, never>>, string | React.JSXElementConstructor<any>>;
154
+ //# sourceMappingURL=alert-dialog-trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog-trigger.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert-dialog/alert-dialog-trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,MAAM,WAAW,gCAAiC,SAAQ,cAAc;IACtE,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,cAAc,CAAC,CAAC;CAC7E;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDAiBzE"}
@@ -0,0 +1,10 @@
1
+ import React, { type Dispatch } from "react";
2
+ import type { AlertDialogStyles } from "./types";
3
+ export interface AlertDialogPrimitiveContextValue {
4
+ isOpen: boolean;
5
+ setIsOpen: Dispatch<React.SetStateAction<boolean>>;
6
+ styles?: AlertDialogStyles;
7
+ }
8
+ export declare const AlertDialogPrimitiveContext: React.Context<AlertDialogPrimitiveContextValue | null>;
9
+ export declare const useAlertDialog: () => AlertDialogPrimitiveContextValue;
10
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert-dialog/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,eAAO,MAAM,2BAA2B,wDAA+D,CAAC;AAExG,eAAO,MAAM,cAAc,wCAM1B,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { AlertDialogAction } from "./alert-dialog-action";
2
+ import { AlertDialogCancel } from "./alert-dialog-cancel";
3
+ import { AlertDialogContent } from "./alert-dialog-content";
4
+ import { AlertDialogDescription } from "./alert-dialog-description";
5
+ import { AlertDialogFooter } from "./alert-dialog-footer";
6
+ import { AlertDialogOverlay } from "./alert-dialog-overlay";
7
+ import { AlertDialogPortal } from "./alert-dialog-portal";
8
+ import { AlertDialogRoot } from "./alert-dialog-root";
9
+ import { AlertDialogTitle } from "./alert-dialog-title";
10
+ import { AlertDialogTrigger } from "./alert-dialog-trigger";
11
+ export declare const AlertDialogPrimitive: {
12
+ Root: typeof AlertDialogRoot;
13
+ Trigger: typeof AlertDialogTrigger;
14
+ Portal: typeof AlertDialogPortal;
15
+ Overlay: typeof AlertDialogOverlay;
16
+ Content: typeof AlertDialogContent;
17
+ Title: typeof AlertDialogTitle;
18
+ Description: typeof AlertDialogDescription;
19
+ Footer: typeof AlertDialogFooter;
20
+ Action: typeof AlertDialogAction;
21
+ Cancel: typeof AlertDialogCancel;
22
+ };
23
+ export type { AlertDialogPrimitiveActionProps } from "./alert-dialog-action";
24
+ export type { AlertDialogPrimitiveCancelProps } from "./alert-dialog-cancel";
25
+ export type { AlertDialogPrimitiveContentProps } from "./alert-dialog-content";
26
+ export type { AlertDialogPrimitiveDescriptionProps } from "./alert-dialog-description";
27
+ export type { AlertDialogPrimitiveFooterProps } from "./alert-dialog-footer";
28
+ export type { AlertDialogPrimitiveOverlayProps } from "./alert-dialog-overlay";
29
+ export type { AlertDialogPrimitiveRootProps } from "./alert-dialog-root";
30
+ export type { AlertDialogPrimitiveTitleProps } from "./alert-dialog-title";
31
+ export type { AlertDialogPrimitiveTriggerProps } from "./alert-dialog-trigger";
32
+ export * from "./types";
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert-dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAWhC,CAAC;AAEF,YAAY,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AAC7E,YAAY,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AAC7E,YAAY,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC/E,YAAY,EAAE,oCAAoC,EAAE,MAAM,4BAA4B,CAAC;AACvF,YAAY,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AAC7E,YAAY,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC/E,YAAY,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACzE,YAAY,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAC3E,YAAY,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC/E,cAAc,SAAS,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { StyleProp, TextStyle, ViewStyle } from "react-native";
2
+ export interface AlertDialogStyles {
3
+ overlay?: StyleProp<ViewStyle>;
4
+ content?: StyleProp<ViewStyle>;
5
+ title?: StyleProp<TextStyle>;
6
+ description?: StyleProp<TextStyle>;
7
+ footer?: StyleProp<ViewStyle>;
8
+ action?: StyleProp<ViewStyle>;
9
+ actionText?: StyleProp<TextStyle>;
10
+ cancel?: StyleProp<ViewStyle>;
11
+ cancelText?: StyleProp<TextStyle>;
12
+ }
13
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert-dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACnC"}
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
- import type { CheckboxStyles, CheckboxState } from "./types";
2
+ import type { CheckboxState, CheckboxStyles } from "./types";
3
3
  export interface CheckboxPrimitiveContextValue {
4
- checked: boolean;
5
- disabled?: boolean;
4
+ value: boolean;
5
+ isDisabled?: boolean;
6
6
  state: CheckboxState;
7
7
  styles?: CheckboxStyles;
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-context.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/checkbox/checkbox-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7D,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,wBAAwB,qDAAkE,CAAC;AAExG,eAAO,MAAM,kBAAkB,qCAM9B,CAAC"}
1
+ {"version":3,"file":"checkbox-context.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/checkbox/checkbox-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE7D,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,wBAAwB,qDAAkE,CAAC;AAExG,eAAO,MAAM,kBAAkB,qCAM9B,CAAC"}
@@ -3,9 +3,9 @@ import { type PressableProps, type StyleProp, type ViewStyle } from "react-nativ
3
3
  import type { CheckboxStyles } from "./types";
4
4
  export interface CheckboxPrimitiveRootProps extends Omit<PressableProps, "children"> {
5
5
  children: React.ReactNode;
6
- checked: boolean;
7
- onChange: (checked: boolean) => void;
8
- disabled?: boolean;
6
+ value: boolean;
7
+ onChange: (value: boolean) => void;
8
+ isDisabled?: boolean;
9
9
  style?: StyleProp<ViewStyle>;
10
10
  styles?: CheckboxStyles;
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-root.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/checkbox/checkbox-root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9F,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,SAAS,CAAC;AAE7D,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IAClF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAeD,wBAAgB,YAAY,CAAC,KAAK,EAAE,0BAA0B,qBAsC7D"}
1
+ {"version":3,"file":"checkbox-root.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/checkbox/checkbox-root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9F,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,SAAS,CAAC;AAE7D,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IAClF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAeD,wBAAgB,YAAY,CAAC,KAAK,EAAE,0BAA0B,qBAqC7D"}
@@ -14,4 +14,5 @@ export * from "./portal";
14
14
  export * from "./calendar";
15
15
  export * from "./tabs";
16
16
  export * from "./checkbox";
17
+ export * from "./alert-dialog";
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@korsolutions/ui",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,38 @@
1
+ import { AlertDialogPrimitive } from "@/primitives";
2
+ import type { PressableProps } from "react-native";
3
+ import { AlertDialogVariants } from "./variants";
4
+
5
+ interface AlertDialogProps {
6
+ trigger: React.ReactElement<PressableProps>;
7
+ title: string;
8
+ description: string;
9
+ actionLabel?: string;
10
+ cancelLabel?: string;
11
+ onAction?: () => void;
12
+ onCancel?: () => void;
13
+ variant?: keyof typeof AlertDialogVariants;
14
+ }
15
+
16
+ export function AlertDialog(props: AlertDialogProps) {
17
+ const { title, description, actionLabel = "Continue", cancelLabel = "Cancel", onAction, onCancel, variant = "default" } = props;
18
+
19
+ const useVariantStyles = AlertDialogVariants[variant];
20
+ const variantStyles = useVariantStyles();
21
+
22
+ return (
23
+ <AlertDialogPrimitive.Root styles={variantStyles}>
24
+ <AlertDialogPrimitive.Trigger>{props.trigger}</AlertDialogPrimitive.Trigger>
25
+ <AlertDialogPrimitive.Portal>
26
+ <AlertDialogPrimitive.Overlay />
27
+ <AlertDialogPrimitive.Content>
28
+ <AlertDialogPrimitive.Title>{title}</AlertDialogPrimitive.Title>
29
+ <AlertDialogPrimitive.Description>{description}</AlertDialogPrimitive.Description>
30
+ <AlertDialogPrimitive.Footer>
31
+ <AlertDialogPrimitive.Cancel onPress={onCancel}>{cancelLabel}</AlertDialogPrimitive.Cancel>
32
+ <AlertDialogPrimitive.Action onPress={onAction}>{actionLabel}</AlertDialogPrimitive.Action>
33
+ </AlertDialogPrimitive.Footer>
34
+ </AlertDialogPrimitive.Content>
35
+ </AlertDialogPrimitive.Portal>
36
+ </AlertDialogPrimitive.Root>
37
+ );
38
+ }
@@ -0,0 +1,121 @@
1
+ import { AlertDialogPrimitive } from "@/primitives";
2
+ import React, { useEffect, useState } from "react";
3
+ import { useAlertDialog } from "@/primitives/alert-dialog/context";
4
+ import { AlertDialogVariants } from "./variants";
5
+
6
+ interface AsyncAlertDialogProps {
7
+ title: string;
8
+ description: string;
9
+ actionLabel?: string;
10
+ cancelLabel?: string;
11
+ variant?: keyof typeof AlertDialogVariants;
12
+ }
13
+
14
+ interface AsyncAlertDialogResult {
15
+ confirmed: boolean;
16
+ }
17
+
18
+ interface AsyncAlertDialogInstance {
19
+ id: string;
20
+ resolve: (result: AsyncAlertDialogResult) => void;
21
+ props: AsyncAlertDialogProps;
22
+ }
23
+
24
+ // Global state
25
+ const dialogQueue: AsyncAlertDialogInstance[] = [];
26
+ let currentDialog: AsyncAlertDialogInstance | null = null;
27
+ let setCurrentDialogFn: ((dialog: AsyncAlertDialogInstance | null) => void) | null = null;
28
+
29
+ // Process next dialog in queue
30
+ function processQueue() {
31
+ if (currentDialog || dialogQueue.length === 0) return;
32
+
33
+ currentDialog = dialogQueue.shift()!;
34
+ setCurrentDialogFn?.(currentDialog);
35
+ }
36
+
37
+ // Close current dialog
38
+ function closeDialog(confirmed: boolean) {
39
+ if (!currentDialog) return;
40
+
41
+ currentDialog.resolve({ confirmed });
42
+ currentDialog = null;
43
+ setCurrentDialogFn?.(null);
44
+
45
+ // Process next in queue after a small delay
46
+ setTimeout(processQueue, 100);
47
+ }
48
+
49
+ // Inner component that has access to the dialog context
50
+ function AsyncAlertDialogContent({ instance }: { instance: AsyncAlertDialogInstance }) {
51
+ const { title, description, actionLabel = "Continue", cancelLabel = "Cancel" } = instance.props;
52
+ const { setIsOpen } = useAlertDialog();
53
+
54
+ const handleAction = () => closeDialog(true);
55
+ const handleCancel = () => closeDialog(false);
56
+
57
+ // Automatically open the dialog when mounted
58
+ useEffect(() => {
59
+ setIsOpen(true);
60
+ }, [setIsOpen]);
61
+
62
+ return (
63
+ <AlertDialogPrimitive.Portal>
64
+ <AlertDialogPrimitive.Overlay onPress={handleCancel} />
65
+ <AlertDialogPrimitive.Content>
66
+ <AlertDialogPrimitive.Title>{title}</AlertDialogPrimitive.Title>
67
+ <AlertDialogPrimitive.Description>{description}</AlertDialogPrimitive.Description>
68
+ <AlertDialogPrimitive.Footer>
69
+ <AlertDialogPrimitive.Cancel onPress={handleCancel}>{cancelLabel}</AlertDialogPrimitive.Cancel>
70
+ <AlertDialogPrimitive.Action onPress={handleAction}>{actionLabel}</AlertDialogPrimitive.Action>
71
+ </AlertDialogPrimitive.Footer>
72
+ </AlertDialogPrimitive.Content>
73
+ </AlertDialogPrimitive.Portal>
74
+ );
75
+ }
76
+
77
+ // Component that renders a single dialog instance
78
+ function AsyncAlertDialogInstance({ instance }: { instance: AsyncAlertDialogInstance }) {
79
+ const { variant = "default" } = instance.props;
80
+
81
+ const useVariantStyles = AlertDialogVariants[variant];
82
+ const variantStyles = useVariantStyles();
83
+
84
+ return (
85
+ <AlertDialogPrimitive.Root styles={variantStyles}>
86
+ <AsyncAlertDialogContent instance={instance} />
87
+ </AlertDialogPrimitive.Root>
88
+ );
89
+ }
90
+
91
+ export function AsyncAlertDialogManager() {
92
+ const [dialog, setDialog] = useState<AsyncAlertDialogInstance | null>(null);
93
+
94
+ useEffect(() => {
95
+ setCurrentDialogFn = setDialog;
96
+ return () => {
97
+ setCurrentDialogFn = null;
98
+ };
99
+ }, []);
100
+
101
+ if (!dialog) return null;
102
+
103
+ return <AsyncAlertDialogInstance instance={dialog} />;
104
+ }
105
+
106
+ function show(props: AsyncAlertDialogProps): Promise<AsyncAlertDialogResult> {
107
+ return new Promise((resolve) => {
108
+ const instance: AsyncAlertDialogInstance = {
109
+ id: Date.now().toString(),
110
+ props,
111
+ resolve,
112
+ };
113
+
114
+ dialogQueue.push(instance);
115
+ processQueue();
116
+ });
117
+ }
118
+
119
+ export const AsyncAlertDialog = {
120
+ show,
121
+ };
@@ -0,0 +1,3 @@
1
+ export { AlertDialog } from "./alert-dialog";
2
+ export { AlertDialogVariants } from "./variants";
3
+ export { AsyncAlertDialog, AsyncAlertDialogManager } from "./async-alert-dialog";
@@ -0,0 +1,82 @@
1
+ import { type AlertDialogStyles } from "@/primitives";
2
+ import { useThemedStyles } from "@/utils/use-themed-styles";
3
+
4
+ export const useAlertDialogVariantDefault = (): AlertDialogStyles => {
5
+ return useThemedStyles(
6
+ ({ colors, radius, fontFamily, fontSize }): AlertDialogStyles => ({
7
+ overlay: {
8
+ position: "absolute",
9
+ top: 0,
10
+ left: 0,
11
+ right: 0,
12
+ bottom: 0,
13
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
14
+ justifyContent: "center",
15
+ alignItems: "center",
16
+ },
17
+ content: {
18
+ backgroundColor: colors.background,
19
+ borderRadius: radius,
20
+ padding: 24,
21
+ maxWidth: 400,
22
+ width: "90%",
23
+ shadowColor: "#000",
24
+ shadowOffset: { width: 0, height: 2 },
25
+ shadowOpacity: 0.25,
26
+ shadowRadius: 8,
27
+ elevation: 5,
28
+ position: "absolute",
29
+ top: "50%",
30
+ left: "50%",
31
+ transform: [{ translateX: "-50%" }, { translateY: "-50%" }],
32
+ borderWidth: 1,
33
+ borderColor: colors.border,
34
+ },
35
+ title: {
36
+ fontSize: fontSize * 1.25,
37
+ fontWeight: "600",
38
+ color: colors.foreground,
39
+ fontFamily,
40
+ marginBottom: 8,
41
+ },
42
+ description: {
43
+ fontSize,
44
+ color: colors.mutedForeground,
45
+ fontFamily,
46
+ lineHeight: fontSize * 1.5,
47
+ },
48
+ footer: {
49
+ flexDirection: "row",
50
+ justifyContent: "flex-end",
51
+ gap: 12,
52
+ marginTop: 24,
53
+ },
54
+ cancel: {
55
+ paddingVertical: 10,
56
+ paddingHorizontal: 16,
57
+ borderRadius: radius,
58
+ borderWidth: 1,
59
+ borderColor: colors.border,
60
+ backgroundColor: colors.background,
61
+ },
62
+ cancelText: {
63
+ color: colors.foreground,
64
+ fontSize,
65
+ fontWeight: "500",
66
+ fontFamily,
67
+ },
68
+ action: {
69
+ paddingVertical: 10,
70
+ paddingHorizontal: 16,
71
+ borderRadius: radius,
72
+ backgroundColor: colors.primary,
73
+ },
74
+ actionText: {
75
+ color: colors.primaryForeground,
76
+ fontSize,
77
+ fontWeight: "500",
78
+ fontFamily,
79
+ },
80
+ })
81
+ );
82
+ };
@@ -0,0 +1,5 @@
1
+ import { useAlertDialogVariantDefault } from "./default";
2
+
3
+ export const AlertDialogVariants = {
4
+ default: useAlertDialogVariantDefault,
5
+ };
@@ -4,22 +4,22 @@ import { View } from "react-native";
4
4
  import { CheckboxVariants } from "./variants";
5
5
 
6
6
  interface CheckboxProps {
7
- checked: boolean;
8
- onChange: (checked: boolean) => void;
7
+ value: boolean;
8
+ onChange: (value: boolean) => void;
9
9
  title?: string;
10
10
  description?: string;
11
- disabled?: boolean;
11
+ isDisabled?: boolean;
12
12
  variant?: keyof typeof CheckboxVariants;
13
13
  }
14
14
 
15
15
  export function Checkbox(props: CheckboxProps) {
16
- const { checked, onChange, title, description, disabled, variant = "default" } = props;
16
+ const { value, onChange, title, description, isDisabled, variant = "default" } = props;
17
17
 
18
18
  const useVariantStyles = CheckboxVariants[variant];
19
19
  const variantStyles = useVariantStyles();
20
20
 
21
21
  return (
22
- <CheckboxPrimitive.Root checked={checked} onChange={onChange} disabled={disabled} styles={variantStyles}>
22
+ <CheckboxPrimitive.Root value={value} onChange={onChange} isDisabled={isDisabled} styles={variantStyles}>
23
23
  <CheckboxPrimitive.Indicator />
24
24
  {(title || description) && (
25
25
  <View style={{ flex: 1 }}>
@@ -15,3 +15,4 @@ export * from "./popover/popover";
15
15
  export * from "./calendar/calendar";
16
16
  export * from "./tabs";
17
17
  export * from "./checkbox";
18
+ export * from "./alert-dialog";