blimpui 0.0.1
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/$/components/primitives/accordion.d.ts +9 -0
- package/dist/$/components/primitives/accordion.d.ts.map +1 -0
- package/dist/$/components/primitives/accordion.js +64 -0
- package/dist/$/components/primitives/alert-dialog.d.ts +31 -0
- package/dist/$/components/primitives/alert-dialog.d.ts.map +1 -0
- package/dist/$/components/primitives/alert-dialog.js +74 -0
- package/dist/$/components/primitives/alert.d.ts +13 -0
- package/dist/$/components/primitives/alert.d.ts.map +1 -0
- package/dist/$/components/primitives/alert.js +42 -0
- package/dist/$/components/primitives/aspect-ratio.d.ts +2 -0
- package/dist/$/components/primitives/aspect-ratio.d.ts.map +1 -0
- package/dist/$/components/primitives/aspect-ratio.js +1 -0
- package/dist/$/components/primitives/avatar.d.ts +6 -0
- package/dist/$/components/primitives/avatar.d.ts.map +1 -0
- package/dist/$/components/primitives/avatar.js +38 -0
- package/dist/$/components/primitives/badge.d.ts +15 -0
- package/dist/$/components/primitives/badge.d.ts.map +1 -0
- package/dist/$/components/primitives/badge.js +64 -0
- package/dist/$/components/primitives/button.d.ts +37 -0
- package/dist/$/components/primitives/button.d.ts.map +1 -0
- package/dist/$/components/primitives/button.js +100 -0
- package/dist/$/components/primitives/calendar/calendar-header.d.ts +13 -0
- package/dist/$/components/primitives/calendar/calendar-header.d.ts.map +1 -0
- package/dist/$/components/primitives/calendar/calendar-header.js +15 -0
- package/dist/$/components/primitives/calendar/calendar-month-grid.d.ts +14 -0
- package/dist/$/components/primitives/calendar/calendar-month-grid.d.ts.map +1 -0
- package/dist/$/components/primitives/calendar/calendar-month-grid.js +29 -0
- package/dist/$/components/primitives/calendar/calendar-weekdays-row.d.ts +8 -0
- package/dist/$/components/primitives/calendar/calendar-weekdays-row.d.ts.map +1 -0
- package/dist/$/components/primitives/calendar/calendar-weekdays-row.js +36 -0
- package/dist/$/components/primitives/calendar/constants.d.ts +3 -0
- package/dist/$/components/primitives/calendar/constants.d.ts.map +1 -0
- package/dist/$/components/primitives/calendar/constants.js +15 -0
- package/dist/$/components/primitives/calendar/date-utils.d.ts +14 -0
- package/dist/$/components/primitives/calendar/date-utils.d.ts.map +1 -0
- package/dist/$/components/primitives/calendar/date-utils.js +77 -0
- package/dist/$/components/primitives/calendar/month-year-overlay.d.ts +14 -0
- package/dist/$/components/primitives/calendar/month-year-overlay.d.ts.map +1 -0
- package/dist/$/components/primitives/calendar/month-year-overlay.js +11 -0
- package/dist/$/components/primitives/calendar/types.d.ts +24 -0
- package/dist/$/components/primitives/calendar/types.d.ts.map +1 -0
- package/dist/$/components/primitives/calendar/types.js +1 -0
- package/dist/$/components/primitives/calendar/use-calendar-shell.d.ts +35 -0
- package/dist/$/components/primitives/calendar/use-calendar-shell.d.ts.map +1 -0
- package/dist/$/components/primitives/calendar/use-calendar-shell.js +95 -0
- package/dist/$/components/primitives/calendar/use-controllable-state.d.ts +8 -0
- package/dist/$/components/primitives/calendar/use-controllable-state.d.ts.map +1 -0
- package/dist/$/components/primitives/calendar/use-controllable-state.js +13 -0
- package/dist/$/components/primitives/calendar.d.ts +5 -0
- package/dist/$/components/primitives/calendar.d.ts.map +1 -0
- package/dist/$/components/primitives/calendar.js +48 -0
- package/dist/$/components/primitives/card.d.ts +10 -0
- package/dist/$/components/primitives/card.d.ts.map +1 -0
- package/dist/$/components/primitives/card.js +51 -0
- package/dist/$/components/primitives/checkbox.d.ts +8 -0
- package/dist/$/components/primitives/checkbox.d.ts.map +1 -0
- package/dist/$/components/primitives/checkbox.js +37 -0
- package/dist/$/components/primitives/collapsible.d.ts +2 -0
- package/dist/$/components/primitives/collapsible.d.ts.map +1 -0
- package/dist/$/components/primitives/collapsible.js +1 -0
- package/dist/$/components/primitives/context-menu.d.ts +61 -0
- package/dist/$/components/primitives/context-menu.d.ts.map +1 -0
- package/dist/$/components/primitives/context-menu.js +101 -0
- package/dist/$/components/primitives/dialog.d.ts +35 -0
- package/dist/$/components/primitives/dialog.d.ts.map +1 -0
- package/dist/$/components/primitives/dialog.js +68 -0
- package/dist/$/components/primitives/dropdown-menu.d.ts +61 -0
- package/dist/$/components/primitives/dropdown-menu.d.ts.map +1 -0
- package/dist/$/components/primitives/dropdown-menu.js +102 -0
- package/dist/$/components/primitives/hover-card.d.ts +18 -0
- package/dist/$/components/primitives/hover-card.d.ts.map +1 -0
- package/dist/$/components/primitives/hover-card.js +41 -0
- package/dist/$/components/primitives/icon.d.ts +27 -0
- package/dist/$/components/primitives/icon.d.ts.map +1 -0
- package/dist/$/components/primitives/icon.js +64 -0
- package/dist/$/components/primitives/input.d.ts +5 -0
- package/dist/$/components/primitives/input.d.ts.map +1 -0
- package/dist/$/components/primitives/input.js +38 -0
- package/dist/$/components/primitives/label.d.ts +4 -0
- package/dist/$/components/primitives/label.d.ts.map +1 -0
- package/dist/$/components/primitives/label.js +33 -0
- package/dist/$/components/primitives/list.d.ts +9 -0
- package/dist/$/components/primitives/list.d.ts.map +1 -0
- package/dist/$/components/primitives/list.js +155 -0
- package/dist/$/components/primitives/menubar.d.ts +57 -0
- package/dist/$/components/primitives/menubar.d.ts.map +1 -0
- package/dist/$/components/primitives/menubar.js +115 -0
- package/dist/$/components/primitives/multi-column-wheelpicker/index.d.ts +2 -0
- package/dist/$/components/primitives/multi-column-wheelpicker/index.d.ts.map +1 -0
- package/dist/$/components/primitives/multi-column-wheelpicker/index.js +1 -0
- package/dist/$/components/primitives/multi-column-wheelpicker/multi-column-wheelpicker.d.ts +35 -0
- package/dist/$/components/primitives/multi-column-wheelpicker/multi-column-wheelpicker.d.ts.map +1 -0
- package/dist/$/components/primitives/multi-column-wheelpicker/multi-column-wheelpicker.js +62 -0
- package/dist/$/components/primitives/native-only-animated-view.d.ts +13 -0
- package/dist/$/components/primitives/native-only-animated-view.d.ts.map +1 -0
- package/dist/$/components/primitives/native-only-animated-view.js +32 -0
- package/dist/$/components/primitives/popover.d.ts +18 -0
- package/dist/$/components/primitives/popover.d.ts.map +1 -0
- package/dist/$/components/primitives/popover.js +41 -0
- package/dist/$/components/primitives/pressable.d.ts +14 -0
- package/dist/$/components/primitives/pressable.d.ts.map +1 -0
- package/dist/$/components/primitives/pressable.js +39 -0
- package/dist/$/components/primitives/progress.d.ts +6 -0
- package/dist/$/components/primitives/progress.d.ts.map +1 -0
- package/dist/$/components/primitives/progress.js +60 -0
- package/dist/$/components/primitives/radio-group.d.ts +5 -0
- package/dist/$/components/primitives/radio-group.d.ts.map +1 -0
- package/dist/$/components/primitives/radio-group.js +37 -0
- package/dist/$/components/primitives/range-calendar/index.d.ts +2 -0
- package/dist/$/components/primitives/range-calendar/index.d.ts.map +1 -0
- package/dist/$/components/primitives/range-calendar/index.js +1 -0
- package/dist/$/components/primitives/range-calendar/range-calendar.d.ts +25 -0
- package/dist/$/components/primitives/range-calendar/range-calendar.d.ts.map +1 -0
- package/dist/$/components/primitives/range-calendar/range-calendar.js +170 -0
- package/dist/$/components/primitives/select.d.ts +59 -0
- package/dist/$/components/primitives/select.d.ts.map +1 -0
- package/dist/$/components/primitives/select.js +119 -0
- package/dist/$/components/primitives/separator.d.ts +4 -0
- package/dist/$/components/primitives/separator.d.ts.map +1 -0
- package/dist/$/components/primitives/separator.js +30 -0
- package/dist/$/components/primitives/skeleton.d.ts +5 -0
- package/dist/$/components/primitives/skeleton.d.ts.map +1 -0
- package/dist/$/components/primitives/skeleton.js +39 -0
- package/dist/$/components/primitives/switch.d.ts +4 -0
- package/dist/$/components/primitives/switch.d.ts.map +1 -0
- package/dist/$/components/primitives/switch.js +37 -0
- package/dist/$/components/primitives/tabs.d.ts +7 -0
- package/dist/$/components/primitives/tabs.d.ts.map +1 -0
- package/dist/$/components/primitives/tabs.js +48 -0
- package/dist/$/components/primitives/text.d.ts +13 -0
- package/dist/$/components/primitives/text.d.ts.map +1 -0
- package/dist/$/components/primitives/text.js +73 -0
- package/dist/$/components/primitives/textarea.d.ts +5 -0
- package/dist/$/components/primitives/textarea.d.ts.map +1 -0
- package/dist/$/components/primitives/textarea.js +33 -0
- package/dist/$/components/primitives/toast/index.d.ts +2 -0
- package/dist/$/components/primitives/toast/index.d.ts.map +1 -0
- package/dist/$/components/primitives/toast/index.js +1 -0
- package/dist/$/components/primitives/toast/index.web.d.ts +2 -0
- package/dist/$/components/primitives/toast/index.web.d.ts.map +1 -0
- package/dist/$/components/primitives/toast/index.web.js +1 -0
- package/dist/$/components/primitives/toggle-group.d.ts +13 -0
- package/dist/$/components/primitives/toggle-group.d.ts.map +1 -0
- package/dist/$/components/primitives/toggle-group.js +65 -0
- package/dist/$/components/primitives/toggle.d.ts +12 -0
- package/dist/$/components/primitives/toggle.d.ts.map +1 -0
- package/dist/$/components/primitives/toggle.js +63 -0
- package/dist/$/components/primitives/tooltip.d.ts +21 -0
- package/dist/$/components/primitives/tooltip.d.ts.map +1 -0
- package/dist/$/components/primitives/tooltip.js +47 -0
- package/dist/$/components/primitives/view.d.ts +15 -0
- package/dist/$/components/primitives/view.d.ts.map +1 -0
- package/dist/$/components/primitives/view.js +37 -0
- package/dist/$/components/primitives/wheelpicker/index.d.ts +4 -0
- package/dist/$/components/primitives/wheelpicker/index.d.ts.map +1 -0
- package/dist/$/components/primitives/wheelpicker/index.js +3 -0
- package/dist/$/components/primitives/wheelpicker/types.d.ts +7 -0
- package/dist/$/components/primitives/wheelpicker/types.d.ts.map +1 -0
- package/dist/$/components/primitives/wheelpicker/types.js +1 -0
- package/dist/$/components/primitives/wheelpicker/use-wheel-picker-value.d.ts +16 -0
- package/dist/$/components/primitives/wheelpicker/use-wheel-picker-value.d.ts.map +1 -0
- package/dist/$/components/primitives/wheelpicker/use-wheel-picker-value.js +43 -0
- package/dist/$/components/primitives/wheelpicker/wheel-picker-item.d.ts +11 -0
- package/dist/$/components/primitives/wheelpicker/wheel-picker-item.d.ts.map +1 -0
- package/dist/$/components/primitives/wheelpicker/wheel-picker-item.js +8 -0
- package/dist/$/components/primitives/wheelpicker/wheel-picker-list.d.ts +18 -0
- package/dist/$/components/primitives/wheelpicker/wheel-picker-list.d.ts.map +1 -0
- package/dist/$/components/primitives/wheelpicker/wheel-picker-list.js +253 -0
- package/dist/$/components/primitives/wheelpicker/wheelpicker.d.ts +17 -0
- package/dist/$/components/primitives/wheelpicker/wheelpicker.d.ts.map +1 -0
- package/dist/$/components/primitives/wheelpicker/wheelpicker.js +15 -0
- package/dist/$/components/ui/accordion.d.ts +17 -0
- package/dist/$/components/ui/accordion.d.ts.map +1 -0
- package/dist/$/components/ui/accordion.js +39 -0
- package/dist/$/components/ui/alert-dialog.d.ts +22 -0
- package/dist/$/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/$/components/ui/alert-dialog.js +92 -0
- package/dist/$/components/ui/alert.d.ts +14 -0
- package/dist/$/components/ui/alert.d.ts.map +1 -0
- package/dist/$/components/ui/alert.js +31 -0
- package/dist/$/components/ui/aspect-ratio.d.ts +2 -0
- package/dist/$/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/$/components/ui/aspect-ratio.js +1 -0
- package/dist/$/components/ui/avatar.d.ts +14 -0
- package/dist/$/components/ui/avatar.d.ts.map +1 -0
- package/dist/$/components/ui/avatar.js +33 -0
- package/dist/$/components/ui/badge.d.ts +2 -0
- package/dist/$/components/ui/badge.d.ts.map +1 -0
- package/dist/$/components/ui/badge.js +1 -0
- package/dist/$/components/ui/button.d.ts +2 -0
- package/dist/$/components/ui/button.d.ts.map +1 -0
- package/dist/$/components/ui/button.js +1 -0
- package/dist/$/components/ui/calendar.d.ts +2 -0
- package/dist/$/components/ui/calendar.d.ts.map +1 -0
- package/dist/$/components/ui/calendar.js +1 -0
- package/dist/$/components/ui/card.d.ts +17 -0
- package/dist/$/components/ui/card.d.ts.map +1 -0
- package/dist/$/components/ui/card.js +33 -0
- package/dist/$/components/ui/checkbox.d.ts +2 -0
- package/dist/$/components/ui/checkbox.d.ts.map +1 -0
- package/dist/$/components/ui/checkbox.js +1 -0
- package/dist/$/components/ui/collapsible.d.ts +12 -0
- package/dist/$/components/ui/collapsible.d.ts.map +1 -0
- package/dist/$/components/ui/collapsible.js +33 -0
- package/dist/$/components/ui/context-menu.d.ts +59 -0
- package/dist/$/components/ui/context-menu.d.ts.map +1 -0
- package/dist/$/components/ui/context-menu.js +66 -0
- package/dist/$/components/ui/date-range-picker.d.ts +26 -0
- package/dist/$/components/ui/date-range-picker.d.ts.map +1 -0
- package/dist/$/components/ui/date-range-picker.js +89 -0
- package/dist/$/components/ui/datepicker.d.ts +26 -0
- package/dist/$/components/ui/datepicker.d.ts.map +1 -0
- package/dist/$/components/ui/datepicker.js +81 -0
- package/dist/$/components/ui/dialog.d.ts +18 -0
- package/dist/$/components/ui/dialog.d.ts.map +1 -0
- package/dist/$/components/ui/dialog.js +33 -0
- package/dist/$/components/ui/dropdown-menu.d.ts +59 -0
- package/dist/$/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/$/components/ui/dropdown-menu.js +79 -0
- package/dist/$/components/ui/form-field/form-field-label.d.ts +15 -0
- package/dist/$/components/ui/form-field/form-field-label.d.ts.map +1 -0
- package/dist/$/components/ui/form-field/form-field-label.js +15 -0
- package/dist/$/components/ui/form-field/form-field-message.d.ts +11 -0
- package/dist/$/components/ui/form-field/form-field-message.d.ts.map +1 -0
- package/dist/$/components/ui/form-field/form-field-message.js +10 -0
- package/dist/$/components/ui/form-field/index.d.ts +48 -0
- package/dist/$/components/ui/form-field/index.d.ts.map +1 -0
- package/dist/$/components/ui/form-field/index.js +80 -0
- package/dist/$/components/ui/form-field/use-form-field-animation.d.ts +8 -0
- package/dist/$/components/ui/form-field/use-form-field-animation.d.ts.map +1 -0
- package/dist/$/components/ui/form-field/use-form-field-animation.js +23 -0
- package/dist/$/components/ui/form-field/use-form-field.d.ts +28 -0
- package/dist/$/components/ui/form-field/use-form-field.d.ts.map +1 -0
- package/dist/$/components/ui/form-field/use-form-field.js +55 -0
- package/dist/$/components/ui/hover-card.d.ts +12 -0
- package/dist/$/components/ui/hover-card.d.ts.map +1 -0
- package/dist/$/components/ui/hover-card.js +33 -0
- package/dist/$/components/ui/icon.d.ts +2 -0
- package/dist/$/components/ui/icon.d.ts.map +1 -0
- package/dist/$/components/ui/icon.js +1 -0
- package/dist/$/components/ui/input.d.ts +30 -0
- package/dist/$/components/ui/input.d.ts.map +1 -0
- package/dist/$/components/ui/input.js +60 -0
- package/dist/$/components/ui/label.d.ts +2 -0
- package/dist/$/components/ui/label.d.ts.map +1 -0
- package/dist/$/components/ui/label.js +1 -0
- package/dist/$/components/ui/list.d.ts +2 -0
- package/dist/$/components/ui/list.d.ts.map +1 -0
- package/dist/$/components/ui/list.js +1 -0
- package/dist/$/components/ui/menubar.d.ts +63 -0
- package/dist/$/components/ui/menubar.d.ts.map +1 -0
- package/dist/$/components/ui/menubar.js +66 -0
- package/dist/$/components/ui/multi-column-wheelpicker.d.ts +2 -0
- package/dist/$/components/ui/multi-column-wheelpicker.d.ts.map +1 -0
- package/dist/$/components/ui/multi-column-wheelpicker.js +1 -0
- package/dist/$/components/ui/native-only-animated-view.d.ts +2 -0
- package/dist/$/components/ui/native-only-animated-view.d.ts.map +1 -0
- package/dist/$/components/ui/native-only-animated-view.js +1 -0
- package/dist/$/components/ui/picker.d.ts +25 -0
- package/dist/$/components/ui/picker.d.ts.map +1 -0
- package/dist/$/components/ui/picker.js +80 -0
- package/dist/$/components/ui/popover.d.ts +34 -0
- package/dist/$/components/ui/popover.d.ts.map +1 -0
- package/dist/$/components/ui/popover.js +63 -0
- package/dist/$/components/ui/pressable.d.ts +2 -0
- package/dist/$/components/ui/pressable.d.ts.map +1 -0
- package/dist/$/components/ui/pressable.js +1 -0
- package/dist/$/components/ui/progress.d.ts +2 -0
- package/dist/$/components/ui/progress.d.ts.map +1 -0
- package/dist/$/components/ui/progress.js +1 -0
- package/dist/$/components/ui/radio-group.d.ts +15 -0
- package/dist/$/components/ui/radio-group.d.ts.map +1 -0
- package/dist/$/components/ui/radio-group.js +41 -0
- package/dist/$/components/ui/range-calendar.d.ts +2 -0
- package/dist/$/components/ui/range-calendar.d.ts.map +1 -0
- package/dist/$/components/ui/range-calendar.js +1 -0
- package/dist/$/components/ui/select.d.ts +75 -0
- package/dist/$/components/ui/select.d.ts.map +1 -0
- package/dist/$/components/ui/select.js +105 -0
- package/dist/$/components/ui/separator.d.ts +2 -0
- package/dist/$/components/ui/separator.d.ts.map +1 -0
- package/dist/$/components/ui/separator.js +1 -0
- package/dist/$/components/ui/skeleton.d.ts +2 -0
- package/dist/$/components/ui/skeleton.d.ts.map +1 -0
- package/dist/$/components/ui/skeleton.js +1 -0
- package/dist/$/components/ui/switch.d.ts +2 -0
- package/dist/$/components/ui/switch.d.ts.map +1 -0
- package/dist/$/components/ui/switch.js +1 -0
- package/dist/$/components/ui/tabs.d.ts +17 -0
- package/dist/$/components/ui/tabs.d.ts.map +1 -0
- package/dist/$/components/ui/tabs.js +48 -0
- package/dist/$/components/ui/text.d.ts +2 -0
- package/dist/$/components/ui/text.d.ts.map +1 -0
- package/dist/$/components/ui/text.js +1 -0
- package/dist/$/components/ui/textarea.d.ts +30 -0
- package/dist/$/components/ui/textarea.d.ts.map +1 -0
- package/dist/$/components/ui/textarea.js +61 -0
- package/dist/$/components/ui/timepicker.d.ts +26 -0
- package/dist/$/components/ui/timepicker.d.ts.map +1 -0
- package/dist/$/components/ui/timepicker.js +90 -0
- package/dist/$/components/ui/timewheelpicker.d.ts +22 -0
- package/dist/$/components/ui/timewheelpicker.d.ts.map +1 -0
- package/dist/$/components/ui/timewheelpicker.js +112 -0
- package/dist/$/components/ui/toggle-group.d.ts +14 -0
- package/dist/$/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/$/components/ui/toggle-group.js +44 -0
- package/dist/$/components/ui/toggle.d.ts +2 -0
- package/dist/$/components/ui/toggle.d.ts.map +1 -0
- package/dist/$/components/ui/toggle.js +1 -0
- package/dist/$/components/ui/tooltip.d.ts +12 -0
- package/dist/$/components/ui/tooltip.d.ts.map +1 -0
- package/dist/$/components/ui/tooltip.js +33 -0
- package/dist/$/components/ui/view.d.ts +2 -0
- package/dist/$/components/ui/view.d.ts.map +1 -0
- package/dist/$/components/ui/view.js +1 -0
- package/dist/$/components/ui/wheelpicker.d.ts +2 -0
- package/dist/$/components/ui/wheelpicker.d.ts.map +1 -0
- package/dist/$/components/ui/wheelpicker.js +1 -0
- package/dist/$/lib/hooks/useExtractTextClasses.d.ts +2 -0
- package/dist/$/lib/hooks/useExtractTextClasses.d.ts.map +1 -0
- package/dist/$/lib/hooks/useExtractTextClasses.js +62 -0
- package/dist/$/lib/utils/renderNode.d.ts +3 -0
- package/dist/$/lib/utils/renderNode.d.ts.map +1 -0
- package/dist/$/lib/utils/renderNode.js +22 -0
- package/dist/$/lib/utils.d.ts +5 -0
- package/dist/$/lib/utils.d.ts.map +1 -0
- package/dist/$/lib/utils.js +32 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/package.json +69 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../../$/components/primitives/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,IAAI,IAAI,WAAW,EACnB,OAAO,IAAI,kBAAkB,EAC7B,OAAO,IAAI,kBAAkB,GAC7B,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Root as Collapsible, Trigger as CollapsibleTrigger, Content as CollapsibleContent, } from "@rn-primitives/collapsible";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as ContextMenuPrimitive from "@rn-primitives/context-menu";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type StyleProp, Text, type TextProps, View, type ViewStyle } from "react-native";
|
|
4
|
+
declare const ContextMenu: React.ForwardRefExoticComponent<import("react-native").ViewProps & {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
} & {
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
relativeTo?: "longPress" | "trigger";
|
|
9
|
+
} & React.RefAttributes<View>>;
|
|
10
|
+
declare const ContextMenuTrigger: React.ForwardRefExoticComponent<Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
} & {
|
|
13
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
14
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
15
|
+
} & React.RefAttributes<import("@rn-primitives/context-menu").TriggerRef>>;
|
|
16
|
+
declare const ContextMenuGroup: React.ForwardRefExoticComponent<import("react-native").ViewProps & {
|
|
17
|
+
asChild?: boolean;
|
|
18
|
+
} & React.RefAttributes<View>>;
|
|
19
|
+
declare const ContextMenuSub: React.ForwardRefExoticComponent<import("react-native").ViewProps & {
|
|
20
|
+
asChild?: boolean;
|
|
21
|
+
} & {
|
|
22
|
+
defaultOpen?: boolean;
|
|
23
|
+
open?: boolean;
|
|
24
|
+
onOpenChange?: (value: boolean) => void;
|
|
25
|
+
} & React.RefAttributes<View>>;
|
|
26
|
+
declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<import("react-native").ViewProps & {
|
|
27
|
+
asChild?: boolean;
|
|
28
|
+
} & {
|
|
29
|
+
value: string | undefined;
|
|
30
|
+
onValueChange: (value: string) => void;
|
|
31
|
+
} & React.RefAttributes<View>>;
|
|
32
|
+
declare function ContextMenuSubTrigger({ className, inset, children, iconClassName, ...props }: ContextMenuPrimitive.SubTriggerProps & React.RefAttributes<ContextMenuPrimitive.SubTriggerRef> & {
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
iconClassName?: string;
|
|
35
|
+
inset?: boolean;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare function ContextMenuSubContent({ className, ...props }: ContextMenuPrimitive.SubContentProps & React.RefAttributes<ContextMenuPrimitive.SubContentRef>): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
declare function ContextMenuContent({ className, overlayClassName, overlayStyle, portalHost, ...props }: ContextMenuPrimitive.ContentProps & React.RefAttributes<ContextMenuPrimitive.ContentRef> & {
|
|
39
|
+
overlayStyle?: StyleProp<ViewStyle>;
|
|
40
|
+
overlayClassName?: string;
|
|
41
|
+
portalHost?: string;
|
|
42
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function ContextMenuItem({ className, inset, variant, ...props }: ContextMenuPrimitive.ItemProps & React.RefAttributes<ContextMenuPrimitive.ItemRef> & {
|
|
44
|
+
className?: string;
|
|
45
|
+
inset?: boolean;
|
|
46
|
+
variant?: "default" | "destructive";
|
|
47
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
declare function ContextMenuCheckboxItem({ className, children, ...props }: ContextMenuPrimitive.CheckboxItemProps & React.RefAttributes<ContextMenuPrimitive.CheckboxItemRef> & {
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare function ContextMenuRadioItem({ className, children, ...props }: ContextMenuPrimitive.RadioItemProps & React.RefAttributes<ContextMenuPrimitive.RadioItemRef> & {
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare function ContextMenuLabel({ className, inset, ...props }: ContextMenuPrimitive.LabelProps & React.RefAttributes<ContextMenuPrimitive.LabelRef> & {
|
|
55
|
+
className?: string;
|
|
56
|
+
inset?: boolean;
|
|
57
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
declare function ContextMenuSeparator({ className, ...props }: ContextMenuPrimitive.SeparatorProps & React.RefAttributes<ContextMenuPrimitive.SeparatorRef>): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
declare function ContextMenuShortcut({ className, ...props }: TextProps & React.RefAttributes<Text>): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, };
|
|
61
|
+
//# sourceMappingURL=context-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../../$/components/primitives/context-menu.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { Icon } from "../../../$/components/primitives/icon";
|
|
25
|
+
import { NativeOnlyAnimatedView } from "../../../$/components/primitives/native-only-animated-view";
|
|
26
|
+
import { TextClassContext } from "../../../$/components/primitives/text";
|
|
27
|
+
import { cn } from "../../../$/lib/utils";
|
|
28
|
+
import * as ContextMenuPrimitive from "@rn-primitives/context-menu";
|
|
29
|
+
import { Check, ChevronDown, ChevronRight, ChevronUp, } from "lucide-react-native";
|
|
30
|
+
import * as React from "react";
|
|
31
|
+
import { Platform, StyleSheet, Text, View, } from "react-native";
|
|
32
|
+
import { FadeIn } from "react-native-reanimated";
|
|
33
|
+
import { FullWindowOverlay as RNFullWindowOverlay } from "react-native-screens";
|
|
34
|
+
var ContextMenu = ContextMenuPrimitive.Root;
|
|
35
|
+
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
36
|
+
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
37
|
+
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
38
|
+
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
39
|
+
function ContextMenuSubTrigger(_a) {
|
|
40
|
+
var className = _a.className, inset = _a.inset, children = _a.children, iconClassName = _a.iconClassName, props = __rest(_a, ["className", "inset", "children", "iconClassName"]);
|
|
41
|
+
var open = ContextMenuPrimitive.useSubContext().open;
|
|
42
|
+
var icon = Platform.OS === "web" ? ChevronRight : open ? ChevronUp : ChevronDown;
|
|
43
|
+
return (_jsx(TextClassContext.Provider, { value: cn("text-sm select-none group-active:text-accent-foreground", open && "text-accent-foreground"), children: _jsxs(ContextMenuPrimitive.SubTrigger, __assign({ className: cn("active:bg-accent group flex flex-row items-center justify-between rounded-sm px-2 py-2 sm:py-1.5", Platform.select({
|
|
44
|
+
web: "focus:bg-accent focus:text-accent-foreground cursor-default outline-none [&_svg]:pointer-events-none",
|
|
45
|
+
}), open && cn("bg-accent", Platform.select({ native: "mb-1" })), inset && "pl-8") }, props, { children: [_jsx(_Fragment, { children: children }), _jsx(Icon, { as: icon, className: cn("text-foreground size-4 shrink-0", iconClassName) })] })) }));
|
|
46
|
+
}
|
|
47
|
+
function ContextMenuSubContent(_a) {
|
|
48
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
49
|
+
return (_jsx(NativeOnlyAnimatedView, { entering: FadeIn, children: _jsx(ContextMenuPrimitive.SubContent, __assign({ className: cn("bg-popover border-border overflow-hidden rounded-md border p-1 shadow-lg shadow-black/5", Platform.select({
|
|
50
|
+
web: "animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fade-in-0 data-[state=closed]:zoom-out-95 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-context-menu-content-transform-origin) z-50 min-w-[8rem]",
|
|
51
|
+
}), className) }, props)) }));
|
|
52
|
+
}
|
|
53
|
+
var FullWindowOverlay = Platform.OS === "ios" ? RNFullWindowOverlay : React.Fragment;
|
|
54
|
+
function ContextMenuContent(_a) {
|
|
55
|
+
var className = _a.className, overlayClassName = _a.overlayClassName, overlayStyle = _a.overlayStyle, portalHost = _a.portalHost, props = __rest(_a, ["className", "overlayClassName", "overlayStyle", "portalHost"]);
|
|
56
|
+
return (_jsx(ContextMenuPrimitive.Portal, { hostName: portalHost, children: _jsx(FullWindowOverlay, { children: _jsx(ContextMenuPrimitive.Overlay, { style: Platform.select({
|
|
57
|
+
web: overlayStyle !== null && overlayStyle !== void 0 ? overlayStyle : undefined,
|
|
58
|
+
native: overlayStyle
|
|
59
|
+
? StyleSheet.flatten([
|
|
60
|
+
StyleSheet.absoluteFill,
|
|
61
|
+
overlayStyle,
|
|
62
|
+
])
|
|
63
|
+
: StyleSheet.absoluteFill,
|
|
64
|
+
}), className: overlayClassName, children: _jsx(NativeOnlyAnimatedView, { entering: FadeIn, children: _jsx(TextClassContext.Provider, { value: "text-popover-foreground", children: _jsx(ContextMenuPrimitive.Content, __assign({ className: cn("bg-popover border-border min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg shadow-black/5", Platform.select({
|
|
65
|
+
web: cn("animate-in fade-in-0 zoom-in-95 max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) z-50 cursor-default", props.side === "bottom" && "slide-in-from-top-2", props.side === "top" && "slide-in-from-bottom-2"),
|
|
66
|
+
}), className) }, props)) }) }) }) }) }));
|
|
67
|
+
}
|
|
68
|
+
function ContextMenuItem(_a) {
|
|
69
|
+
var className = _a.className, inset = _a.inset, variant = _a.variant, props = __rest(_a, ["className", "inset", "variant"]);
|
|
70
|
+
return (_jsx(TextClassContext.Provider, { value: cn("select-none text-sm text-popover-foreground group-active:text-popover-foreground", variant === "destructive" &&
|
|
71
|
+
"text-destructive group-active:text-destructive"), children: _jsx(ContextMenuPrimitive.Item, __assign({ className: cn("active:bg-accent group relative flex flex-row items-center gap-2 rounded-sm px-2 py-2 sm:py-1.5", Platform.select({
|
|
72
|
+
web: cn("focus:bg-accent focus:text-accent-foreground cursor-default outline-none data-[disabled]:pointer-events-none", variant === "destructive" &&
|
|
73
|
+
"focus:bg-destructive/10 dark:focus:bg-destructive/20"),
|
|
74
|
+
}), variant === "destructive" &&
|
|
75
|
+
"active:bg-destructive/10 dark:active:bg-destructive/20", props.disabled && "opacity-50", inset && "pl-8", className) }, props)) }));
|
|
76
|
+
}
|
|
77
|
+
function ContextMenuCheckboxItem(_a) {
|
|
78
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
79
|
+
return (_jsx(TextClassContext.Provider, { value: "text-sm text-popover-foreground select-none group-active:text-accent-foreground", children: _jsxs(ContextMenuPrimitive.CheckboxItem, __assign({ className: cn("active:bg-accent group relative flex flex-row items-center gap-2 rounded-sm py-2 pl-8 pr-2 sm:py-1.5", Platform.select({
|
|
80
|
+
web: "focus:bg-accent focus:text-accent-foreground cursor-default outline-none data-[disabled]:pointer-events-none",
|
|
81
|
+
}), props.disabled && "opacity-50", className) }, props, { children: [_jsx(View, { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(Icon, { as: Check, className: cn("text-foreground size-4", Platform.select({ web: "pointer-events-none" })) }) }) }), _jsx(_Fragment, { children: children })] })) }));
|
|
82
|
+
}
|
|
83
|
+
function ContextMenuRadioItem(_a) {
|
|
84
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
85
|
+
return (_jsx(TextClassContext.Provider, { value: "text-sm text-popover-foreground select-none group-active:text-accent-foreground", children: _jsxs(ContextMenuPrimitive.RadioItem, __assign({ className: cn("active:bg-accent group relative flex flex-row items-center gap-2 rounded-sm py-2 pl-8 pr-2 sm:py-1.5", Platform.select({
|
|
86
|
+
web: "focus:bg-accent focus:text-accent-foreground cursor-default outline-none data-[disabled]:pointer-events-none",
|
|
87
|
+
}), props.disabled && "opacity-50", className) }, props, { children: [_jsx(View, { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(View, { className: "bg-foreground h-2 w-2 rounded-full" }) }) }), _jsx(_Fragment, { children: children })] })) }));
|
|
88
|
+
}
|
|
89
|
+
function ContextMenuLabel(_a) {
|
|
90
|
+
var className = _a.className, inset = _a.inset, props = __rest(_a, ["className", "inset"]);
|
|
91
|
+
return (_jsx(ContextMenuPrimitive.Label, __assign({ className: cn("text-foreground px-2 py-2 text-sm font-medium sm:py-1.5", inset && "pl-8", className) }, props)));
|
|
92
|
+
}
|
|
93
|
+
function ContextMenuSeparator(_a) {
|
|
94
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
95
|
+
return (_jsx(ContextMenuPrimitive.Separator, __assign({ className: cn("bg-border -mx-1 my-1 h-px", className) }, props)));
|
|
96
|
+
}
|
|
97
|
+
function ContextMenuShortcut(_a) {
|
|
98
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
99
|
+
return (_jsx(Text, __assign({ className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className) }, props)));
|
|
100
|
+
}
|
|
101
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as DialogPrimitive from "@rn-primitives/dialog";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { View, type ViewProps } from "react-native";
|
|
4
|
+
declare const Dialog: React.ForwardRefExoticComponent<ViewProps & {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
} & {
|
|
7
|
+
open?: boolean;
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
onOpenChange?: (value: boolean) => void;
|
|
10
|
+
} & React.RefAttributes<View>>;
|
|
11
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
} & {
|
|
14
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
15
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
16
|
+
} & React.RefAttributes<View>>;
|
|
17
|
+
declare const DialogPortal: typeof DialogPrimitive.Portal;
|
|
18
|
+
declare const DialogClose: React.ForwardRefExoticComponent<Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
19
|
+
asChild?: boolean;
|
|
20
|
+
} & {
|
|
21
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
22
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
23
|
+
} & React.RefAttributes<View>>;
|
|
24
|
+
declare function DialogOverlay({ className, children, ...props }: Omit<DialogPrimitive.OverlayProps, "asChild"> & React.RefAttributes<DialogPrimitive.OverlayRef> & {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function DialogContent({ className, portalHost, children, ...props }: DialogPrimitive.ContentProps & React.RefAttributes<DialogPrimitive.ContentRef> & {
|
|
28
|
+
portalHost?: string;
|
|
29
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare function DialogHeader({ className, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function DialogFooter({ className, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare function DialogTitle({ className, ...props }: DialogPrimitive.TitleProps & React.RefAttributes<DialogPrimitive.TitleRef>): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
declare function DialogDescription({ className, ...props }: DialogPrimitive.DescriptionProps & React.RefAttributes<DialogPrimitive.DescriptionRef>): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
35
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../$/components/primitives/dialog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,eAAe,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAkB,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpE,QAAA,MAAM,MAAM;;;;;;8BAAuB,CAAC;AAEpC,QAAA,MAAM,aAAa;;;;;8BAA0B,CAAC;AAE9C,QAAA,MAAM,YAAY,+BAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW;;;;;8BAAwB,CAAC;AAK1C,iBAAS,aAAa,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,SAAS,CAAC,GAC/C,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,UAAU,CAAC,GAAG;IACjD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CA4BD;AACD,iBAAS,aAAa,CAAC,EACtB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,eAAe,CAAC,YAAY,GAC9B,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,UAAU,CAAC,GAAG;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,2CAoCD;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAOvD;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAUvD;AAED,iBAAS,WAAW,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACR,EAAE,eAAe,CAAC,UAAU,GAAG,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,2CAU5E;AAED,iBAAS,iBAAiB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACR,EAAE,eAAe,CAAC,gBAAgB,GAClC,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,cAAc,CAAC,2CAOnD;AAED,OAAO,EACN,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACb,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { Icon } from "../../../$/components/primitives/icon";
|
|
25
|
+
import { NativeOnlyAnimatedView } from "../../../$/components/primitives/native-only-animated-view";
|
|
26
|
+
import { cn } from "../../../$/lib/utils";
|
|
27
|
+
import * as DialogPrimitive from "@rn-primitives/dialog";
|
|
28
|
+
import { X } from "lucide-react-native";
|
|
29
|
+
import * as React from "react";
|
|
30
|
+
import { Platform, Text, View } from "react-native";
|
|
31
|
+
import { FadeIn, FadeOut } from "react-native-reanimated";
|
|
32
|
+
import { FullWindowOverlay as RNFullWindowOverlay } from "react-native-screens";
|
|
33
|
+
var Dialog = DialogPrimitive.Root;
|
|
34
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
35
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
36
|
+
var DialogClose = DialogPrimitive.Close;
|
|
37
|
+
var FullWindowOverlay = Platform.OS === "ios" ? RNFullWindowOverlay : React.Fragment;
|
|
38
|
+
function DialogOverlay(_a) {
|
|
39
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
40
|
+
return (_jsx(FullWindowOverlay, { children: _jsx(DialogPrimitive.Overlay, __assign({ className: cn("absolute bottom-0 left-0 right-0 top-0 z-50 flex items-center justify-center bg-black/50 p-2", Platform.select({
|
|
41
|
+
web: "animate-in fade-in-0 fixed cursor-default [&>*]:cursor-auto",
|
|
42
|
+
}), className) }, props, { asChild: Platform.OS !== "web", children: _jsx(NativeOnlyAnimatedView, { entering: FadeIn.duration(200), exiting: FadeOut.duration(150), children: _jsx(NativeOnlyAnimatedView, { entering: FadeIn.delay(50), exiting: FadeOut.duration(150), children: _jsx(_Fragment, { children: children }) }) }) })) }));
|
|
43
|
+
}
|
|
44
|
+
function DialogContent(_a) {
|
|
45
|
+
var className = _a.className, portalHost = _a.portalHost, children = _a.children, props = __rest(_a, ["className", "portalHost", "children"]);
|
|
46
|
+
return (_jsx(DialogPortal, { hostName: portalHost, children: _jsx(DialogOverlay, { children: _jsxs(DialogPrimitive.Content, __assign({ className: cn("bg-background border-border z-50 mx-auto flex w-full flex-col gap-4 rounded-lg border p-6 shadow-lg shadow-black/5 sm:max-w-lg", Platform.select({
|
|
47
|
+
web: "animate-in fade-in-0 zoom-in-95 web:max-w-[calc(100%-2rem)] duration-200",
|
|
48
|
+
}), className) }, props, { children: [_jsx(_Fragment, { children: children }), _jsxs(DialogPrimitive.Close, { className: cn("absolute right-4 top-4 rounded opacity-70 active:opacity-100", Platform.select({
|
|
49
|
+
web: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
50
|
+
})), hitSlop: 12, children: [_jsx(Icon, { as: X, className: cn("text-accent-foreground web:pointer-events-none size-4 shrink-0") }), _jsx(Text, { className: "sr-only", children: "Close" })] })] })) }) }));
|
|
51
|
+
}
|
|
52
|
+
function DialogHeader(_a) {
|
|
53
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
54
|
+
return (_jsx(View, __assign({ className: cn("flex flex-col gap-2 text-center sm:text-left", className) }, props)));
|
|
55
|
+
}
|
|
56
|
+
function DialogFooter(_a) {
|
|
57
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
58
|
+
return (_jsx(View, __assign({ className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className) }, props)));
|
|
59
|
+
}
|
|
60
|
+
function DialogTitle(_a) {
|
|
61
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
62
|
+
return (_jsx(DialogPrimitive.Title, __assign({ className: cn("text-foreground text-lg font-semibold leading-none", className) }, props)));
|
|
63
|
+
}
|
|
64
|
+
function DialogDescription(_a) {
|
|
65
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
66
|
+
return (_jsx(DialogPrimitive.Description, __assign({ className: cn("text-muted-foreground text-sm", className) }, props)));
|
|
67
|
+
}
|
|
68
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@rn-primitives/dropdown-menu";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type StyleProp, Text, type TextProps, View, type ViewStyle } from "react-native";
|
|
4
|
+
declare const DropdownMenu: React.ForwardRefExoticComponent<import("react-native").ViewProps & {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
} & {
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
} & React.RefAttributes<View>>;
|
|
9
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
} & {
|
|
12
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
13
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
14
|
+
} & React.RefAttributes<import("@rn-primitives/dropdown-menu").TriggerRef>>;
|
|
15
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<import("react-native").ViewProps & {
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
} & React.RefAttributes<View>>;
|
|
18
|
+
declare const DropdownMenuPortal: typeof DropdownMenuPrimitive.Portal;
|
|
19
|
+
declare const DropdownMenuSub: React.ForwardRefExoticComponent<import("react-native").ViewProps & {
|
|
20
|
+
asChild?: boolean;
|
|
21
|
+
} & {
|
|
22
|
+
defaultOpen?: boolean;
|
|
23
|
+
open?: boolean;
|
|
24
|
+
onOpenChange?: (value: boolean) => void;
|
|
25
|
+
} & React.RefAttributes<View>>;
|
|
26
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<import("react-native").ViewProps & {
|
|
27
|
+
asChild?: boolean;
|
|
28
|
+
} & {
|
|
29
|
+
value: string | undefined;
|
|
30
|
+
onValueChange: (value: string) => void;
|
|
31
|
+
} & React.RefAttributes<View>>;
|
|
32
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, iconClassName, ...props }: DropdownMenuPrimitive.SubTriggerProps & React.RefAttributes<DropdownMenuPrimitive.SubTriggerRef> & {
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
iconClassName?: string;
|
|
35
|
+
inset?: boolean;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare function DropdownMenuSubContent({ className, ...props }: DropdownMenuPrimitive.SubContentProps & React.RefAttributes<DropdownMenuPrimitive.SubContentRef>): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
declare function DropdownMenuContent({ className, overlayClassName, overlayStyle, portalHost, ...props }: DropdownMenuPrimitive.ContentProps & React.RefAttributes<DropdownMenuPrimitive.ContentRef> & {
|
|
39
|
+
overlayStyle?: StyleProp<ViewStyle>;
|
|
40
|
+
overlayClassName?: string;
|
|
41
|
+
portalHost?: string;
|
|
42
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: DropdownMenuPrimitive.ItemProps & React.RefAttributes<DropdownMenuPrimitive.ItemRef> & {
|
|
44
|
+
className?: string;
|
|
45
|
+
inset?: boolean;
|
|
46
|
+
variant?: "default" | "destructive";
|
|
47
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
declare function DropdownMenuCheckboxItem({ className, children, ...props }: DropdownMenuPrimitive.CheckboxItemProps & React.RefAttributes<DropdownMenuPrimitive.CheckboxItemRef> & {
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: DropdownMenuPrimitive.RadioItemProps & React.RefAttributes<DropdownMenuPrimitive.RadioItemRef> & {
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuPrimitive.LabelProps & React.RefAttributes<DropdownMenuPrimitive.LabelRef> & {
|
|
55
|
+
className?: string;
|
|
56
|
+
inset?: boolean;
|
|
57
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuPrimitive.SeparatorProps & React.RefAttributes<DropdownMenuPrimitive.SeparatorRef>): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
declare function DropdownMenuShortcut({ className, ...props }: TextProps & React.RefAttributes<Text>): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
|
61
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../../$/components/primitives/dropdown-menu.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { Icon } from "../../../$/components/primitives/icon";
|
|
25
|
+
import { NativeOnlyAnimatedView } from "../../../$/components/primitives/native-only-animated-view";
|
|
26
|
+
import { TextClassContext } from "../../../$/components/primitives/text";
|
|
27
|
+
import { cn } from "../../../$/lib/utils";
|
|
28
|
+
import * as DropdownMenuPrimitive from "@rn-primitives/dropdown-menu";
|
|
29
|
+
import { Check, ChevronDown, ChevronRight, ChevronUp, } from "lucide-react-native";
|
|
30
|
+
import * as React from "react";
|
|
31
|
+
import { Platform, StyleSheet, Text, View, } from "react-native";
|
|
32
|
+
import { FadeIn } from "react-native-reanimated";
|
|
33
|
+
import { FullWindowOverlay as RNFullWindowOverlay } from "react-native-screens";
|
|
34
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
35
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
36
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
37
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
38
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
39
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
40
|
+
function DropdownMenuSubTrigger(_a) {
|
|
41
|
+
var className = _a.className, inset = _a.inset, children = _a.children, iconClassName = _a.iconClassName, props = __rest(_a, ["className", "inset", "children", "iconClassName"]);
|
|
42
|
+
var open = DropdownMenuPrimitive.useSubContext().open;
|
|
43
|
+
var icon = Platform.OS === "web" ? ChevronRight : open ? ChevronUp : ChevronDown;
|
|
44
|
+
return (_jsx(TextClassContext.Provider, { value: cn("text-sm select-none group-active:text-accent-foreground", open && "text-accent-foreground"), children: _jsxs(DropdownMenuPrimitive.SubTrigger, __assign({ className: cn("active:bg-accent group flex flex-row items-center justify-between rounded-sm px-2 py-2 sm:py-1.5", Platform.select({
|
|
45
|
+
web: "focus:bg-accent focus:text-accent-foreground cursor-default outline-none [&_svg]:pointer-events-none",
|
|
46
|
+
}), open && "bg-accent", inset && "pl-8") }, props, { children: [_jsx(_Fragment, { children: children }), _jsx(Icon, { as: icon, className: cn("text-foreground size-4 shrink-0", iconClassName) })] })) }));
|
|
47
|
+
}
|
|
48
|
+
function DropdownMenuSubContent(_a) {
|
|
49
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
50
|
+
return (_jsx(NativeOnlyAnimatedView, { entering: FadeIn, children: _jsx(DropdownMenuPrimitive.SubContent, __assign({ className: cn("bg-popover border-border overflow-hidden rounded-md border p-1 shadow-lg shadow-black/5", Platform.select({
|
|
51
|
+
web: "animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fade-in-0 data-[state=closed]:zoom-out-95 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-context-menu-content-transform-origin) z-50 min-w-[8rem]",
|
|
52
|
+
}), className) }, props)) }));
|
|
53
|
+
}
|
|
54
|
+
var FullWindowOverlay = Platform.OS === "ios" ? RNFullWindowOverlay : React.Fragment;
|
|
55
|
+
function DropdownMenuContent(_a) {
|
|
56
|
+
var className = _a.className, overlayClassName = _a.overlayClassName, overlayStyle = _a.overlayStyle, portalHost = _a.portalHost, props = __rest(_a, ["className", "overlayClassName", "overlayStyle", "portalHost"]);
|
|
57
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { hostName: portalHost, children: _jsx(FullWindowOverlay, { children: _jsx(DropdownMenuPrimitive.Overlay, { style: Platform.select({
|
|
58
|
+
web: overlayStyle !== null && overlayStyle !== void 0 ? overlayStyle : undefined,
|
|
59
|
+
native: overlayStyle
|
|
60
|
+
? StyleSheet.flatten([
|
|
61
|
+
StyleSheet.absoluteFill,
|
|
62
|
+
overlayStyle,
|
|
63
|
+
])
|
|
64
|
+
: StyleSheet.absoluteFill,
|
|
65
|
+
}), className: overlayClassName, children: _jsx(NativeOnlyAnimatedView, { entering: FadeIn, children: _jsx(TextClassContext.Provider, { value: "text-popover-foreground", children: _jsx(DropdownMenuPrimitive.Content, __assign({ className: cn("bg-popover border-border min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg shadow-black/5", Platform.select({
|
|
66
|
+
web: cn("animate-in fade-in-0 zoom-in-95 max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) z-50 cursor-default", props.side === "bottom" && "slide-in-from-top-2", props.side === "top" && "slide-in-from-bottom-2"),
|
|
67
|
+
}), className) }, props)) }) }) }) }) }));
|
|
68
|
+
}
|
|
69
|
+
function DropdownMenuItem(_a) {
|
|
70
|
+
var className = _a.className, inset = _a.inset, variant = _a.variant, props = __rest(_a, ["className", "inset", "variant"]);
|
|
71
|
+
return (_jsx(TextClassContext.Provider, { value: cn("select-none text-sm text-popover-foreground group-active:text-popover-foreground", variant === "destructive" &&
|
|
72
|
+
"text-destructive group-active:text-destructive"), children: _jsx(DropdownMenuPrimitive.Item, __assign({ className: cn("active:bg-accent group relative flex flex-row items-center gap-2 rounded-sm px-2 py-2 sm:py-1.5", Platform.select({
|
|
73
|
+
web: cn("focus:bg-accent focus:text-accent-foreground cursor-default outline-none data-[disabled]:pointer-events-none", variant === "destructive" &&
|
|
74
|
+
"focus:bg-destructive/10 dark:focus:bg-destructive/20"),
|
|
75
|
+
}), variant === "destructive" &&
|
|
76
|
+
"active:bg-destructive/10 dark:active:bg-destructive/20", props.disabled && "opacity-50", inset && "pl-8", className) }, props)) }));
|
|
77
|
+
}
|
|
78
|
+
function DropdownMenuCheckboxItem(_a) {
|
|
79
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
80
|
+
return (_jsx(TextClassContext.Provider, { value: "text-sm text-popover-foreground select-none group-active:text-accent-foreground", children: _jsxs(DropdownMenuPrimitive.CheckboxItem, __assign({ className: cn("active:bg-accent group relative flex flex-row items-center gap-2 rounded-sm py-2 pl-8 pr-2 sm:py-1.5", Platform.select({
|
|
81
|
+
web: "focus:bg-accent focus:text-accent-foreground cursor-default outline-none data-[disabled]:pointer-events-none",
|
|
82
|
+
}), props.disabled && "opacity-50", className) }, props, { children: [_jsx(View, { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Icon, { as: Check, className: cn("text-foreground size-4", Platform.select({ web: "pointer-events-none" })) }) }) }), _jsx(_Fragment, { children: children })] })) }));
|
|
83
|
+
}
|
|
84
|
+
function DropdownMenuRadioItem(_a) {
|
|
85
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
86
|
+
return (_jsx(TextClassContext.Provider, { value: "text-sm text-popover-foreground select-none group-active:text-accent-foreground", children: _jsxs(DropdownMenuPrimitive.RadioItem, __assign({ className: cn("active:bg-accent group relative flex flex-row items-center gap-2 rounded-sm py-2 pl-8 pr-2 sm:py-1.5", Platform.select({
|
|
87
|
+
web: "focus:bg-accent focus:text-accent-foreground cursor-default outline-none data-[disabled]:pointer-events-none",
|
|
88
|
+
}), props.disabled && "opacity-50", className) }, props, { children: [_jsx(View, { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(View, { className: "bg-foreground h-2 w-2 rounded-full" }) }) }), _jsx(_Fragment, { children: children })] })) }));
|
|
89
|
+
}
|
|
90
|
+
function DropdownMenuLabel(_a) {
|
|
91
|
+
var className = _a.className, inset = _a.inset, props = __rest(_a, ["className", "inset"]);
|
|
92
|
+
return (_jsx(DropdownMenuPrimitive.Label, __assign({ className: cn("text-foreground px-2 py-2 text-sm font-medium sm:py-1.5", inset && "pl-8", className) }, props)));
|
|
93
|
+
}
|
|
94
|
+
function DropdownMenuSeparator(_a) {
|
|
95
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
96
|
+
return (_jsx(DropdownMenuPrimitive.Separator, __assign({ className: cn("bg-border -mx-1 my-1 h-px", className) }, props)));
|
|
97
|
+
}
|
|
98
|
+
function DropdownMenuShortcut(_a) {
|
|
99
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
100
|
+
return (_jsx(Text, __assign({ className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className) }, props)));
|
|
101
|
+
}
|
|
102
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as HoverCardPrimitive from "@rn-primitives/hover-card";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const HoverCard: React.ForwardRefExoticComponent<import("react-native").ViewProps & {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
} & {
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
openDelay?: number;
|
|
8
|
+
closeDelay?: number;
|
|
9
|
+
} & React.RefAttributes<import("react-native").View>>;
|
|
10
|
+
declare const HoverCardTrigger: React.ForwardRefExoticComponent<Omit<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>, "ref"> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
} & {
|
|
13
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
14
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
15
|
+
} & React.RefAttributes<import("@rn-primitives/hover-card").TriggerRef>>;
|
|
16
|
+
declare function HoverCardContent({ className, align, sideOffset, ...props }: HoverCardPrimitive.ContentProps & React.RefAttributes<HoverCardPrimitive.ContentRef>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
18
|
+
//# sourceMappingURL=hover-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../../../$/components/primitives/hover-card.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,SAAS;;;;;;qDAA0B,CAAC;AAE1C,QAAA,MAAM,gBAAgB;;;;;wEAA6B,CAAC;AAKpD,iBAAS,gBAAgB,CAAC,EACzB,SAAS,EACT,KAAgB,EAChB,UAAc,EACd,GAAG,KAAK,EACR,EAAE,kBAAkB,CAAC,YAAY,GACjC,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,UAAU,CAAC,2CA+BlD;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { NativeOnlyAnimatedView } from "../../../$/components/primitives/native-only-animated-view";
|
|
25
|
+
import { TextClassContext } from "../../../$/components/primitives/text";
|
|
26
|
+
import { cn } from "../../../$/lib/utils";
|
|
27
|
+
import * as HoverCardPrimitive from "@rn-primitives/hover-card";
|
|
28
|
+
import * as React from "react";
|
|
29
|
+
import { Platform, StyleSheet } from "react-native";
|
|
30
|
+
import { FadeIn, FadeOut } from "react-native-reanimated";
|
|
31
|
+
import { FullWindowOverlay as RNFullWindowOverlay } from "react-native-screens";
|
|
32
|
+
var HoverCard = HoverCardPrimitive.Root;
|
|
33
|
+
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
34
|
+
var FullWindowOverlay = Platform.OS === "ios" ? RNFullWindowOverlay : React.Fragment;
|
|
35
|
+
function HoverCardContent(_a) {
|
|
36
|
+
var className = _a.className, _b = _a.align, align = _b === void 0 ? "center" : _b, _c = _a.sideOffset, sideOffset = _c === void 0 ? 4 : _c, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
37
|
+
return (_jsx(HoverCardPrimitive.Portal, { children: _jsx(FullWindowOverlay, { children: _jsx(HoverCardPrimitive.Overlay, { style: Platform.select({ native: StyleSheet.absoluteFill }), children: _jsx(NativeOnlyAnimatedView, { entering: FadeIn, exiting: FadeOut, children: _jsx(TextClassContext.Provider, { value: "text-popover-foreground", children: _jsx(HoverCardPrimitive.Content, __assign({ align: align, sideOffset: sideOffset, className: cn("bg-popover border-border outline-hidden z-50 w-64 rounded-md border p-4 shadow-md shadow-black/5", Platform.select({
|
|
38
|
+
web: cn("animate-in fade-in-0 zoom-in-95 origin-(--radix-hover-card-content-transform-origin) cursor-default [&>*]:cursor-auto", props.side === "bottom" && "slide-in-from-top-2", props.side === "top" && "slide-in-from-bottom-2"),
|
|
39
|
+
}), className) }, props)) }) }) }) }) }));
|
|
40
|
+
}
|
|
41
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { LucideIcon, LucideProps } from 'lucide-react-native';
|
|
2
|
+
type IconProps = LucideProps & {
|
|
3
|
+
as: LucideIcon;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* A wrapper component for Lucide icons with Uniwind `className` support via `withUniwind`.
|
|
7
|
+
*
|
|
8
|
+
* This component allows you to render any Lucide icon while applying utility classes
|
|
9
|
+
* using `uniwind`. It avoids the need to wrap or configure each icon individually.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import { ArrowRight } from 'lucide-react-native';
|
|
15
|
+
* import { Icon } from '@/registry/uniwind/registry/components/ui/icon';
|
|
16
|
+
*
|
|
17
|
+
* <Icon as={ArrowRight} className="text-red-500 size-4" />
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @param {LucideIcon} as - The Lucide icon component to render.
|
|
21
|
+
* @param {string} className - Utility classes to style the icon using Uniwind.
|
|
22
|
+
* @param {number} size - Icon size (overrides the size class).
|
|
23
|
+
* @param {...LucideProps} ...props - Additional Lucide icon props passed to the "as" icon.
|
|
24
|
+
*/
|
|
25
|
+
declare function Icon({ as: IconComponent, className, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { Icon };
|
|
27
|
+
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../$/components/primitives/icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGnE,KAAK,SAAS,GAAG,WAAW,GAAG;IAC7B,EAAE,EAAE,UAAU,CAAC;CAChB,CAAC;AAiBF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,IAAI,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAIlE;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
|