@korsolutions/ui 0.0.18 → 0.0.20

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 (56) hide show
  1. package/dist/components/index.d.mts +70 -4
  2. package/dist/components/index.mjs +224 -8
  3. package/dist/{index-Bfae0NgJ.d.mts → index-CGY0mO6z.d.mts} +216 -8
  4. package/dist/index.d.mts +3 -3
  5. package/dist/index.mjs +2 -2
  6. package/dist/primitives/index.d.mts +2 -2
  7. package/dist/primitives/index.mjs +2 -2
  8. package/dist/{primitives-B4L9y32H.mjs → primitives-P_8clvQr.mjs} +513 -11
  9. package/dist/{toast-manager-Vq38WK76.mjs → toast-manager-DSo9oN8w.mjs} +1 -1
  10. package/package.json +1 -1
  11. package/src/components/badge/badge.tsx +23 -0
  12. package/src/components/badge/variants/default.tsx +26 -0
  13. package/src/components/badge/variants/index.ts +7 -0
  14. package/src/components/badge/variants/secondary.tsx +26 -0
  15. package/src/components/button/button.tsx +7 -4
  16. package/src/components/dropdown-menu/dropdown-menu.tsx +49 -0
  17. package/src/components/dropdown-menu/variants/default.tsx +40 -0
  18. package/src/components/dropdown-menu/variants/index.ts +5 -0
  19. package/src/components/index.ts +4 -0
  20. package/src/components/popover/popover.tsx +51 -0
  21. package/src/components/popover/variants/default.tsx +26 -0
  22. package/src/components/popover/variants/index.ts +5 -0
  23. package/src/components/textarea/textarea.tsx +14 -0
  24. package/src/components/textarea/variants/default.tsx +38 -0
  25. package/src/components/textarea/variants/index.ts +5 -0
  26. package/src/hooks/useRelativePosition.ts +188 -0
  27. package/src/primitives/badge/badge-label.tsx +21 -0
  28. package/src/primitives/badge/badge-root.tsx +30 -0
  29. package/src/primitives/badge/context.ts +17 -0
  30. package/src/primitives/badge/index.ts +11 -0
  31. package/src/primitives/badge/types.ts +9 -0
  32. package/src/primitives/button/button-root.tsx +2 -4
  33. package/src/primitives/dropdown-menu/context.ts +25 -0
  34. package/src/primitives/dropdown-menu/dropdown-menu-button.tsx +47 -0
  35. package/src/primitives/dropdown-menu/dropdown-menu-content.tsx +39 -0
  36. package/src/primitives/dropdown-menu/dropdown-menu-divider.tsx +18 -0
  37. package/src/primitives/dropdown-menu/dropdown-menu-overlay.tsx +29 -0
  38. package/src/primitives/dropdown-menu/dropdown-menu-portal.tsx +21 -0
  39. package/src/primitives/dropdown-menu/dropdown-menu-root.tsx +35 -0
  40. package/src/primitives/dropdown-menu/dropdown-menu-trigger.tsx +47 -0
  41. package/src/primitives/dropdown-menu/index.ts +26 -0
  42. package/src/primitives/dropdown-menu/types.ts +13 -0
  43. package/src/primitives/index.ts +4 -0
  44. package/src/primitives/popover/context.ts +25 -0
  45. package/src/primitives/popover/index.ts +24 -0
  46. package/src/primitives/popover/popover-close.tsx +29 -0
  47. package/src/primitives/popover/popover-content.tsx +39 -0
  48. package/src/primitives/popover/popover-overlay.tsx +37 -0
  49. package/src/primitives/popover/popover-portal.tsx +21 -0
  50. package/src/primitives/popover/popover-root.tsx +35 -0
  51. package/src/primitives/popover/popover-trigger.tsx +47 -0
  52. package/src/primitives/popover/types.ts +7 -0
  53. package/src/primitives/textarea/index.ts +2 -0
  54. package/src/primitives/textarea/textarea.tsx +56 -0
  55. package/src/primitives/textarea/types.ts +5 -0
  56. package/src/utils/get-ref-layout.ts +16 -0
@@ -1,6 +1,6 @@
1
- import { B as InputPrimitiveBaseProps, E as SelectRootBaseProps, G as FieldStyles, H as InputStyles, L as ButtonStyles, O as SelectStyles, c as AvatarStyles, p as EmptyStyles, r as ToastStyles, y as CardStyles } from "../index-Bfae0NgJ.mjs";
1
+ import { D as BadgeStyles, I as AvatarStyles, S as TextareaPrimitiveBaseProps, V as EmptyStyles, d as PopoverTriggerRef, dt as ButtonStyles, et as SelectRootBaseProps, gt as InputStyles, h as DropdownMenuStyles, j as ToastStyles, lt as ButtonPrimitiveRootProps, mt as InputPrimitiveBaseProps, nt as SelectStyles, q as CardStyles, s as PopoverStyles, w as TextareaStyles, yt as FieldStyles } from "../index-CGY0mO6z.mjs";
2
2
  import React from "react";
3
- import { ImageSource, TextProps, TextStyle } from "react-native";
3
+ import { ImageSource, PressableProps, TextProps, TextStyle } from "react-native";
4
4
 
5
5
  //#region src/components/button/variants/index.d.ts
6
6
  declare const ButtonVariants: {
@@ -10,8 +10,9 @@ declare const ButtonVariants: {
10
10
  //#endregion
11
11
  //#region src/components/button/button.d.ts
12
12
  interface ButtonProps {
13
- onPress?: () => void;
14
13
  children?: string;
14
+ onPress?: ButtonPrimitiveRootProps["onPress"];
15
+ onLayout?: ButtonPrimitiveRootProps["onLayout"];
15
16
  isDisabled?: boolean;
16
17
  isLoading?: boolean;
17
18
  variant?: keyof typeof ButtonVariants;
@@ -196,4 +197,69 @@ declare const Toast: typeof ToastComponent & {
196
197
  dismiss: (id: string) => void;
197
198
  };
198
199
  //#endregion
199
- export { Avatar, AvatarProps, Button, Card, Empty, EmptyProps, Field, FieldProps, Input, Link, LinkProps, Select, SelectOption, SelectProps, Toast, Typography, TypographyProps };
200
+ //#region src/components/badge/variants/index.d.ts
201
+ declare const BadgeVariants: {
202
+ default: () => BadgeStyles;
203
+ secondary: () => BadgeStyles;
204
+ };
205
+ //#endregion
206
+ //#region src/components/badge/badge.d.ts
207
+ interface BadgeProps {
208
+ children: string;
209
+ variant?: keyof typeof BadgeVariants;
210
+ color?: string;
211
+ }
212
+ declare function Badge(props: BadgeProps): React.JSX.Element;
213
+ //#endregion
214
+ //#region src/components/textarea/variants/default.d.ts
215
+ declare function useTextareaVariantDefault(): TextareaStyles;
216
+ //#endregion
217
+ //#region src/components/textarea/variants/index.d.ts
218
+ declare const TextareaVariants: {
219
+ default: typeof useTextareaVariantDefault;
220
+ };
221
+ //#endregion
222
+ //#region src/components/textarea/textarea.d.ts
223
+ interface TextareaProps extends TextareaPrimitiveBaseProps {
224
+ variant?: keyof typeof TextareaVariants;
225
+ }
226
+ declare function Textarea(props: TextareaProps): React.JSX.Element;
227
+ //#endregion
228
+ //#region src/components/dropdown-menu/variants/index.d.ts
229
+ declare const DropdownMenuVariants: {
230
+ default: () => DropdownMenuStyles;
231
+ };
232
+ //#endregion
233
+ //#region src/components/dropdown-menu/dropdown-menu.d.ts
234
+ type DropdownMenuOption = {
235
+ type: "button";
236
+ label: string;
237
+ onPress: () => void;
238
+ } | {
239
+ type: "divider";
240
+ };
241
+ interface DropdownMenuProps {
242
+ trigger: React.ReactElement<PressableProps>;
243
+ options: DropdownMenuOption[];
244
+ variant?: keyof typeof DropdownMenuVariants;
245
+ }
246
+ declare function DropdownMenu(props: DropdownMenuProps): React.JSX.Element;
247
+ //#endregion
248
+ //#region src/components/popover/variants/index.d.ts
249
+ declare const PopoverVariants: {
250
+ default: () => PopoverStyles;
251
+ };
252
+ //#endregion
253
+ //#region src/components/popover/popover.d.ts
254
+ interface PopoverChildrenProps {
255
+ close: () => void;
256
+ }
257
+ interface PopoverProps {
258
+ children: ((props: PopoverChildrenProps) => React.ReactNode) | React.ReactNode;
259
+ trigger: React.ReactElement<PressableProps>;
260
+ closeOnOverlayPress?: boolean;
261
+ variant?: keyof typeof PopoverVariants;
262
+ }
263
+ declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<PopoverTriggerRef>>;
264
+ //#endregion
265
+ export { Avatar, AvatarProps, Badge, Button, Card, DropdownMenu, Empty, EmptyProps, Field, FieldProps, Input, Link, LinkProps, Popover, PopoverProps, Select, SelectOption, SelectProps, Textarea, Toast, Typography, TypographyProps };
@@ -1,6 +1,6 @@
1
- import { i as useThemedStyles, r as ToastComponent, t as ToastAPI } from "../toast-manager-Vq38WK76.mjs";
2
- import { a as SelectPrimitive, c as FieldPrimitive, i as CardPrimitive, n as AvatarPrimitive, o as ButtonPrimitive, r as EmptyPrimitive, s as InputPrimitive } from "../primitives-B4L9y32H.mjs";
3
- import React, { useState } from "react";
1
+ import { i as useThemedStyles, r as ToastComponent, t as ToastAPI } from "../toast-manager-DSo9oN8w.mjs";
2
+ import { a as BadgePrimitive, c as EmptyPrimitive, d as ButtonPrimitive, f as InputPrimitive, i as TextareaPrimitive, l as CardPrimitive, n as usePopover, p as FieldPrimitive, r as DropdownMenuPrimitive, s as AvatarPrimitive, t as PopoverPrimitive, u as SelectPrimitive } from "../primitives-P_8clvQr.mjs";
3
+ import React, { forwardRef, useState } from "react";
4
4
  import { Linking, Text } from "react-native";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
@@ -110,11 +110,11 @@ const ButtonVariants = {
110
110
  //#endregion
111
111
  //#region src/components/button/button.tsx
112
112
  function Button(props) {
113
- const variantStyles = (props.variant ? ButtonVariants[props.variant] : ButtonVariants["default"])();
113
+ const { children, variant = "default", ...rootProps } = props;
114
+ const useVariantStyles = ButtonVariants[variant];
115
+ const variantStyles = useVariantStyles();
114
116
  return /* @__PURE__ */ jsxs(ButtonPrimitive.Root, {
115
- onPress: props.onPress,
116
- isDisabled: props.isDisabled,
117
- isLoading: props.isLoading,
117
+ ...rootProps,
118
118
  styles: variantStyles,
119
119
  children: [props.isLoading && /* @__PURE__ */ jsx(ButtonPrimitive.Spinner, {}), /* @__PURE__ */ jsx(ButtonPrimitive.Label, { children: props.children })]
120
120
  });
@@ -574,4 +574,220 @@ const Toast = Object.assign(ToastComponent, {
574
574
  });
575
575
 
576
576
  //#endregion
577
- export { Avatar, Button, Card, Empty, Field, Input, Link, Select, Toast, Typography };
577
+ //#region src/components/badge/variants/default.tsx
578
+ const useBadgeVariantDefault = () => {
579
+ return useThemedStyles(({ colors, radius, fontFamily, fontSize }) => ({
580
+ root: { default: {
581
+ backgroundColor: colors.primary,
582
+ paddingVertical: 4,
583
+ paddingHorizontal: 8,
584
+ borderRadius: radius,
585
+ alignSelf: "flex-start"
586
+ } },
587
+ label: { default: {
588
+ color: colors.primaryForeground,
589
+ fontSize: fontSize * .75,
590
+ fontWeight: "600",
591
+ fontFamily
592
+ } }
593
+ }));
594
+ };
595
+
596
+ //#endregion
597
+ //#region src/components/badge/variants/secondary.tsx
598
+ const useBadgeVariantSecondary = () => {
599
+ return useThemedStyles(({ colors, radius, fontFamily, fontSize }) => ({
600
+ root: { default: {
601
+ backgroundColor: colors.secondary,
602
+ paddingVertical: 4,
603
+ paddingHorizontal: 8,
604
+ borderRadius: radius,
605
+ alignSelf: "flex-start"
606
+ } },
607
+ label: { default: {
608
+ color: colors.secondaryForeground,
609
+ fontSize: fontSize * .75,
610
+ fontWeight: "600",
611
+ fontFamily
612
+ } }
613
+ }));
614
+ };
615
+
616
+ //#endregion
617
+ //#region src/components/badge/variants/index.ts
618
+ const BadgeVariants = {
619
+ default: useBadgeVariantDefault,
620
+ secondary: useBadgeVariantSecondary
621
+ };
622
+
623
+ //#endregion
624
+ //#region src/components/badge/badge.tsx
625
+ function Badge(props) {
626
+ const useVariantStyles = BadgeVariants[props.variant || "default"];
627
+ const styles = useVariantStyles();
628
+ const customStyle = props.color ? { backgroundColor: props.color } : void 0;
629
+ return /* @__PURE__ */ jsx(BadgePrimitive.Root, {
630
+ styles,
631
+ style: customStyle,
632
+ children: /* @__PURE__ */ jsx(BadgePrimitive.Label, { children: props.children })
633
+ });
634
+ }
635
+
636
+ //#endregion
637
+ //#region src/components/textarea/variants/default.tsx
638
+ function useTextareaVariantDefault() {
639
+ return useThemedStyles(({ colors, radius, fontFamily, fontSize }) => ({
640
+ default: {
641
+ placeholderTextColor: colors.mutedForeground,
642
+ selectionColor: colors.primary,
643
+ style: {
644
+ borderWidth: 1,
645
+ borderColor: colors.border,
646
+ borderRadius: radius,
647
+ backgroundColor: colors.surface,
648
+ paddingVertical: 12,
649
+ paddingHorizontal: 16,
650
+ outlineWidth: 0,
651
+ fontFamily,
652
+ fontSize,
653
+ minHeight: 120,
654
+ textAlignVertical: "top",
655
+ color: colors.foreground
656
+ }
657
+ },
658
+ focused: { style: { borderColor: colors.primary } },
659
+ disabled: { style: {
660
+ color: colors.mutedForeground,
661
+ backgroundColor: colors.muted
662
+ } }
663
+ }));
664
+ }
665
+
666
+ //#endregion
667
+ //#region src/components/textarea/variants/index.ts
668
+ const TextareaVariants = { default: useTextareaVariantDefault };
669
+
670
+ //#endregion
671
+ //#region src/components/textarea/textarea.tsx
672
+ function Textarea(props) {
673
+ const useVariantStyles = TextareaVariants[props.variant ?? "default"];
674
+ const variantStyles = useVariantStyles();
675
+ return /* @__PURE__ */ jsx(TextareaPrimitive, {
676
+ ...props,
677
+ styles: variantStyles
678
+ });
679
+ }
680
+
681
+ //#endregion
682
+ //#region src/components/dropdown-menu/variants/default.tsx
683
+ const useDropdownMenuVariantDefault = () => {
684
+ return useThemedStyles(({ colors, radius, fontFamily, fontSize }) => ({
685
+ overlay: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
686
+ content: {
687
+ overflow: "hidden",
688
+ backgroundColor: colors.surface,
689
+ borderRadius: radius,
690
+ borderWidth: 1,
691
+ borderColor: colors.border,
692
+ shadowColor: "#000",
693
+ shadowOffset: {
694
+ width: 0,
695
+ height: 4
696
+ },
697
+ shadowOpacity: .15,
698
+ shadowRadius: 12,
699
+ elevation: 8
700
+ },
701
+ button: {
702
+ default: {
703
+ paddingVertical: 12,
704
+ paddingHorizontal: 16,
705
+ fontFamily,
706
+ fontSize,
707
+ color: colors.foreground
708
+ },
709
+ hovered: { backgroundColor: colors.muted }
710
+ },
711
+ divider: {
712
+ height: 1,
713
+ backgroundColor: colors.border
714
+ }
715
+ }));
716
+ };
717
+
718
+ //#endregion
719
+ //#region src/components/dropdown-menu/variants/index.ts
720
+ const DropdownMenuVariants = { default: useDropdownMenuVariantDefault };
721
+
722
+ //#endregion
723
+ //#region src/components/dropdown-menu/dropdown-menu.tsx
724
+ function DropdownMenu(props) {
725
+ const useVariantStyles = DropdownMenuVariants[props.variant || "default"];
726
+ const styles = useVariantStyles();
727
+ return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.Root, {
728
+ styles,
729
+ children: [/* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { children: props.trigger }), /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Overlay, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, { children: props.options.map((option) => {
730
+ if (option.type === "button") return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Button, {
731
+ onPress: option.onPress,
732
+ children: option.label
733
+ }, option.label);
734
+ else if (option.type === "divider") return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Divider, {}, Math.random().toString());
735
+ }) }) }) })]
736
+ });
737
+ }
738
+
739
+ //#endregion
740
+ //#region src/components/popover/variants/default.tsx
741
+ const usePopoverVariantDefault = () => {
742
+ return useThemedStyles(({ colors, radius }) => ({
743
+ overlay: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
744
+ content: {
745
+ backgroundColor: colors.surface,
746
+ borderRadius: radius,
747
+ borderWidth: 1,
748
+ borderColor: colors.border,
749
+ padding: 16,
750
+ minWidth: 280,
751
+ maxWidth: 320,
752
+ shadowColor: "#000",
753
+ shadowOffset: {
754
+ width: 0,
755
+ height: 4
756
+ },
757
+ shadowOpacity: .15,
758
+ shadowRadius: 12,
759
+ elevation: 8
760
+ }
761
+ }));
762
+ };
763
+
764
+ //#endregion
765
+ //#region src/components/popover/variants/index.ts
766
+ const PopoverVariants = { default: usePopoverVariantDefault };
767
+
768
+ //#endregion
769
+ //#region src/components/popover/popover.tsx
770
+ const PopoverContentComponent = (props) => {
771
+ const popover = usePopover();
772
+ if (typeof props.children === "function") return /* @__PURE__ */ jsx(PopoverPrimitive.Content, { children: props.children({ close: () => popover.setIsOpen(false) }) });
773
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Content, { children: props.children });
774
+ };
775
+ const PopoverComponent = forwardRef((props, ref) => {
776
+ const useVariantStyles = PopoverVariants[props.variant || "default"];
777
+ const styles = useVariantStyles();
778
+ return /* @__PURE__ */ jsxs(PopoverPrimitive.Root, {
779
+ styles,
780
+ children: [/* @__PURE__ */ jsx(PopoverPrimitive.Trigger, {
781
+ ref,
782
+ children: props.trigger
783
+ }), /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Overlay, {
784
+ closeOnPress: props.closeOnOverlayPress,
785
+ children: /* @__PURE__ */ jsx(PopoverContentComponent, { children: props.children })
786
+ }) })]
787
+ });
788
+ });
789
+ PopoverComponent.displayName = "Popover";
790
+ const Popover = PopoverComponent;
791
+
792
+ //#endregion
793
+ export { Avatar, Badge, Button, Card, DropdownMenu, Empty, Field, Input, Link, Popover, Select, Textarea, Toast, Typography };
@@ -1,6 +1,6 @@
1
- import * as react2 from "react";
2
- import React$1 from "react";
3
- import { ImageSource, ImageStyle, StyleProp, TextInputProps, TextProps, TextStyle, ViewStyle } from "react-native";
1
+ import * as react7 from "react";
2
+ import React$1, { Dispatch, RefAttributes } from "react";
3
+ import { ImageSource, ImageStyle, LayoutRectangle, PressableProps, StyleProp, TextInputProps, TextProps, TextStyle, View, ViewStyle } from "react-native";
4
4
 
5
5
  //#region src/primitives/field/field-label.d.ts
6
6
  interface FieldLabelProps {
@@ -65,7 +65,7 @@ interface InputPrimitiveProps extends InputPrimitiveBaseProps {
65
65
  render?: (props: InputPrimitiveProps) => React.ReactNode;
66
66
  styles?: InputStyles;
67
67
  }
68
- declare function InputPrimitive(props: InputPrimitiveProps): react2.JSX.Element;
68
+ declare function InputPrimitive(props: InputPrimitiveProps): react7.JSX.Element;
69
69
  //#endregion
70
70
  //#region src/primitives/button/button-label.d.ts
71
71
  interface ButtonPrimitiveLabelProps {
@@ -84,9 +84,8 @@ interface ButtonStyles {
84
84
  }
85
85
  //#endregion
86
86
  //#region src/primitives/button/button-root.d.ts
87
- interface ButtonPrimitiveRootProps {
87
+ interface ButtonPrimitiveRootProps extends PressableProps {
88
88
  children?: React$1.ReactNode;
89
- onPress?: () => void;
90
89
  isDisabled?: boolean;
91
90
  isLoading?: boolean;
92
91
  style?: StyleProp<ViewStyle>;
@@ -152,7 +151,7 @@ interface SelectOptionProps {
152
151
  render?: (props: SelectOptionProps) => React.ReactElement;
153
152
  style?: StyleProp<TextStyle>;
154
153
  }
155
- declare function SelectOption(props: SelectOptionProps): react2.JSX.Element;
154
+ declare function SelectOption(props: SelectOptionProps): react7.JSX.Element;
156
155
  //#endregion
157
156
  //#region src/primitives/select/types.d.ts
158
157
  type SelectState = "default" | "disabled";
@@ -390,4 +389,213 @@ declare const ToastPrimitive: {
390
389
  Description: typeof ToastDescription;
391
390
  };
392
391
  //#endregion
393
- export { SelectContentProps as A, InputPrimitiveBaseProps as B, CardHeaderProps as C, SelectRootProps as D, SelectRootBaseProps as E, ButtonPrimitiveRootProps as F, FieldStyles as G, InputStyles as H, ButtonState as I, FieldLabelProps as J, FieldErrorProps as K, ButtonStyles as L, SelectValueProps as M, SelectTriggerProps as N, SelectStyles as O, ButtonPrimitive as P, ButtonPrimitiveLabelProps as R, CardTitleProps as S, SelectPortalProps as T, FieldPrimitive as U, InputPrimitiveProps as V, FieldPrimitiveRootProps as W, CardPrimitive as _, ToastTitleProps as a, CardFooterProps as b, AvatarStyles as c, EmptyPrimitive as d, EmptyRootProps as f, EmptyDescriptionProps as g, EmptyMediaProps as h, ToastDescriptionProps as i, SelectOverlayProps as j, SelectOptionProps as k, AvatarImageProps as l, EmptyTitleProps as m, ToastRootProps as n, AvatarPrimitive as o, EmptyStyles as p, FieldDescriptionProps as q, ToastStyles as r, AvatarRootProps as s, ToastPrimitive as t, AvatarFallbackProps as u, CardRootProps as v, SelectPrimitive as w, CardBodyProps as x, CardStyles as y, InputPrimitive as z };
392
+ //#region src/primitives/badge/badge-label.d.ts
393
+ interface BadgeLabelProps {
394
+ children?: string;
395
+ render?: (props: BadgeLabelProps) => React$1.ReactNode;
396
+ style?: StyleProp<TextStyle>;
397
+ }
398
+ declare function BadgeLabel(props: BadgeLabelProps): React$1.JSX.Element;
399
+ //#endregion
400
+ //#region src/primitives/badge/types.d.ts
401
+ type BadgeState = "default";
402
+ interface BadgeStyles {
403
+ root?: Partial<Record<BadgeState, BadgeRootProps["style"]>>;
404
+ label?: Partial<Record<BadgeState, BadgeLabelProps["style"]>>;
405
+ }
406
+ //#endregion
407
+ //#region src/primitives/badge/badge-root.d.ts
408
+ interface BadgeRootProps {
409
+ children?: React$1.ReactNode;
410
+ render?: (props: BadgeRootProps) => React$1.ReactNode;
411
+ style?: StyleProp<ViewStyle>;
412
+ styles?: BadgeStyles;
413
+ }
414
+ declare function BadgeRoot(props: BadgeRootProps): React$1.JSX.Element;
415
+ //#endregion
416
+ //#region src/primitives/badge/index.d.ts
417
+ declare const BadgePrimitive: {
418
+ Root: typeof BadgeRoot;
419
+ Label: typeof BadgeLabel;
420
+ };
421
+ //#endregion
422
+ //#region src/primitives/textarea/types.d.ts
423
+ type TextareaState = "default" | "focused" | "disabled";
424
+ type TextareaStyles = Partial<Record<TextareaState, TextareaPrimitiveBaseProps>>;
425
+ //#endregion
426
+ //#region src/primitives/textarea/textarea.d.ts
427
+ type TextareaPrimitiveBaseProps = Omit<TextInputProps, "onChange"> & {
428
+ onChange?: TextInputProps["onChangeText"];
429
+ isDisabled?: boolean;
430
+ };
431
+ interface TextareaPrimitiveProps extends TextareaPrimitiveBaseProps {
432
+ render?: (props: TextareaPrimitiveProps) => React.ReactNode;
433
+ styles?: TextareaStyles;
434
+ }
435
+ declare function TextareaPrimitive(props: TextareaPrimitiveProps): react7.JSX.Element;
436
+ //#endregion
437
+ //#region src/primitives/dropdown-menu/dropdown-menu-trigger.d.ts
438
+ interface DropdownMenuTriggerProps extends PressableProps {
439
+ children: React$1.ReactElement<RefAttributes<View> & PressableProps>;
440
+ }
441
+ interface DropdownMenuTriggerRef {
442
+ open: () => void;
443
+ close: () => void;
444
+ }
445
+ //#endregion
446
+ //#region src/primitives/dropdown-menu/dropdown-menu-content.d.ts
447
+ interface DropdownMenuContentProps {
448
+ children?: React$1.ReactNode;
449
+ render?: (props: DropdownMenuContentProps) => React$1.ReactNode;
450
+ style?: StyleProp<ViewStyle>;
451
+ }
452
+ declare function DropdownMenuContent(props: DropdownMenuContentProps): React$1.JSX.Element;
453
+ //#endregion
454
+ //#region src/primitives/dropdown-menu/dropdown-menu-button.d.ts
455
+ interface DropdownMenuButtonProps {
456
+ children?: string;
457
+ onPress?: () => void;
458
+ onMouseEnter?: () => void;
459
+ onMouseLeave?: () => void;
460
+ render?: (props: DropdownMenuButtonProps) => React$1.ReactElement;
461
+ style?: StyleProp<TextStyle>;
462
+ }
463
+ declare function DropdownMenuButton(props: DropdownMenuButtonProps): React$1.JSX.Element;
464
+ //#endregion
465
+ //#region src/primitives/dropdown-menu/dropdown-menu-divider.d.ts
466
+ interface DropdownMenuDividerProps {
467
+ render?: (props: DropdownMenuDividerProps) => React$1.ReactNode;
468
+ style?: StyleProp<ViewStyle>;
469
+ }
470
+ declare function DropdownMenuDivider(props: DropdownMenuDividerProps): React$1.JSX.Element;
471
+ //#endregion
472
+ //#region src/primitives/dropdown-menu/dropdown-menu-overlay.d.ts
473
+ interface DropdownMenuOverlayProps {
474
+ children?: React$1.ReactNode;
475
+ render?: (props: DropdownMenuOverlayProps) => React$1.ReactElement;
476
+ style?: StyleProp<ViewStyle>;
477
+ }
478
+ declare function DropdownMenuOverlay(props: DropdownMenuOverlayProps): React$1.JSX.Element;
479
+ //#endregion
480
+ //#region src/primitives/dropdown-menu/types.d.ts
481
+ type DropdownMenuButtonState = "default" | "hovered";
482
+ interface DropdownMenuStyles {
483
+ content?: DropdownMenuContentProps["style"];
484
+ button?: Partial<Record<DropdownMenuButtonState, DropdownMenuButtonProps["style"]>>;
485
+ divider?: DropdownMenuDividerProps["style"];
486
+ overlay?: DropdownMenuOverlayProps["style"];
487
+ }
488
+ //#endregion
489
+ //#region src/primitives/dropdown-menu/dropdown-menu-root.d.ts
490
+ interface DropdownMenuRootProps {
491
+ children?: React$1.ReactNode;
492
+ render?: (props: DropdownMenuRootProps) => React$1.ReactNode;
493
+ styles?: DropdownMenuStyles;
494
+ }
495
+ declare function DropdownMenuRoot(props: DropdownMenuRootProps): React$1.JSX.Element;
496
+ //#endregion
497
+ //#region src/primitives/dropdown-menu/dropdown-menu-portal.d.ts
498
+ interface DropdownMenuPortalProps {
499
+ children?: React$1.ReactNode;
500
+ }
501
+ declare function DropdownMenuPortal(props: DropdownMenuPortalProps): React$1.JSX.Element | null;
502
+ //#endregion
503
+ //#region src/primitives/dropdown-menu/index.d.ts
504
+ declare const DropdownMenuPrimitive: {
505
+ Root: typeof DropdownMenuRoot;
506
+ Trigger: react7.ForwardRefExoticComponent<DropdownMenuTriggerProps & react7.RefAttributes<DropdownMenuTriggerRef>>;
507
+ Portal: typeof DropdownMenuPortal;
508
+ Overlay: typeof DropdownMenuOverlay;
509
+ Content: typeof DropdownMenuContent;
510
+ Button: typeof DropdownMenuButton;
511
+ Divider: typeof DropdownMenuDivider;
512
+ };
513
+ //#endregion
514
+ //#region src/primitives/popover/popover-trigger.d.ts
515
+ interface PopoverTriggerProps extends PressableProps {
516
+ children: React$1.ReactElement<RefAttributes<View> & PressableProps>;
517
+ }
518
+ interface PopoverTriggerRef {
519
+ open: () => void;
520
+ close: () => void;
521
+ }
522
+ //#endregion
523
+ //#region src/primitives/popover/popover-content.d.ts
524
+ interface PopoverContentProps {
525
+ children?: React$1.ReactNode;
526
+ render?: (props: PopoverContentProps) => React$1.ReactNode;
527
+ style?: StyleProp<ViewStyle>;
528
+ }
529
+ declare function PopoverContent(props: PopoverContentProps): React$1.JSX.Element;
530
+ //#endregion
531
+ //#region src/primitives/popover/popover-overlay.d.ts
532
+ interface PopoverOverlayProps extends Omit<PressableProps, "onPress"> {
533
+ children?: React$1.ReactNode;
534
+ onPress?: () => void;
535
+ closeOnPress?: boolean;
536
+ render?: (props: PopoverOverlayProps) => React$1.ReactElement;
537
+ style?: StyleProp<ViewStyle>;
538
+ }
539
+ declare function PopoverOverlay(props: PopoverOverlayProps): React$1.JSX.Element;
540
+ //#endregion
541
+ //#region src/primitives/popover/types.d.ts
542
+ interface PopoverStyles {
543
+ overlay?: PopoverOverlayProps["style"];
544
+ content?: PopoverContentProps["style"];
545
+ }
546
+ //#endregion
547
+ //#region src/primitives/popover/popover-root.d.ts
548
+ interface PopoverRootProps {
549
+ children?: React$1.ReactNode;
550
+ render?: (props: PopoverRootProps) => React$1.ReactNode;
551
+ styles?: PopoverStyles;
552
+ }
553
+ declare function PopoverRoot(props: PopoverRootProps): React$1.JSX.Element;
554
+ //#endregion
555
+ //#region src/primitives/popover/popover-portal.d.ts
556
+ interface PopoverPortalProps {
557
+ children?: React$1.ReactNode;
558
+ }
559
+ declare function PopoverPortal(props: PopoverPortalProps): React$1.JSX.Element | null;
560
+ //#endregion
561
+ //#region src/primitives/popover/popover-close.d.ts
562
+ interface PopoverCloseProps extends Omit<PressableProps, "onPress"> {
563
+ children?: React$1.ReactNode;
564
+ onPress?: () => void;
565
+ render?: (props: PopoverCloseProps) => React$1.ReactNode;
566
+ style?: StyleProp<ViewStyle>;
567
+ }
568
+ declare function PopoverClose(props: PopoverCloseProps): React$1.JSX.Element;
569
+ //#endregion
570
+ //#region src/hooks/useRelativePosition.d.ts
571
+ interface LayoutPosition {
572
+ pageY: number;
573
+ pageX: number;
574
+ width: number;
575
+ height: number;
576
+ }
577
+ //#endregion
578
+ //#region src/primitives/popover/context.d.ts
579
+ interface PopoverContext {
580
+ isOpen: boolean;
581
+ setIsOpen: Dispatch<React.SetStateAction<boolean>>;
582
+ contentLayout: LayoutRectangle;
583
+ setContentLayout: Dispatch<React.SetStateAction<LayoutRectangle>>;
584
+ triggerPosition: LayoutPosition;
585
+ setTriggerPosition: Dispatch<React.SetStateAction<LayoutPosition>>;
586
+ styles?: PopoverStyles;
587
+ }
588
+ declare const PopoverContext: react7.Context<PopoverContext | undefined>;
589
+ declare const usePopover: () => PopoverContext;
590
+ //#endregion
591
+ //#region src/primitives/popover/index.d.ts
592
+ declare const PopoverPrimitive: {
593
+ Root: typeof PopoverRoot;
594
+ Trigger: react7.ForwardRefExoticComponent<PopoverTriggerProps & react7.RefAttributes<PopoverTriggerRef>>;
595
+ Portal: typeof PopoverPortal;
596
+ Overlay: typeof PopoverOverlay;
597
+ Content: typeof PopoverContent;
598
+ Close: typeof PopoverClose;
599
+ };
600
+ //#endregion
601
+ export { SelectPortalProps as $, ToastRootProps as A, EmptyRootProps as B, TextareaPrimitiveProps as C, BadgeStyles as D, BadgeRootProps as E, AvatarRootProps as F, CardPrimitive as G, EmptyTitleProps as H, AvatarStyles as I, CardFooterProps as J, CardRootProps as K, AvatarImageProps as L, ToastDescriptionProps as M, ToastTitleProps as N, BadgeLabelProps as O, AvatarPrimitive as P, SelectPrimitive as Q, AvatarFallbackProps as R, TextareaPrimitiveBaseProps as S, FieldLabelProps as St, BadgePrimitive as T, EmptyMediaProps as U, EmptyStyles as V, EmptyDescriptionProps as W, CardTitleProps as X, CardBodyProps as Y, CardHeaderProps as Z, DropdownMenuDividerProps as _, FieldPrimitive as _t, PopoverPortalProps as a, SelectOverlayProps as at, DropdownMenuTriggerProps as b, FieldErrorProps as bt, PopoverOverlayProps as c, ButtonPrimitive as ct, PopoverTriggerRef as d, ButtonStyles as dt, SelectRootBaseProps as et, DropdownMenuPrimitive as f, ButtonPrimitiveLabelProps as ft, DropdownMenuOverlayProps as g, InputStyles as gt, DropdownMenuStyles as h, InputPrimitiveProps as ht, PopoverCloseProps as i, SelectContentProps as it, ToastStyles as j, ToastPrimitive as k, PopoverContentProps as l, ButtonPrimitiveRootProps as lt, DropdownMenuRootProps as m, InputPrimitiveBaseProps as mt, PopoverContext as n, SelectStyles as nt, PopoverRootProps as o, SelectValueProps as ot, DropdownMenuPortalProps as p, InputPrimitive as pt, CardStyles as q, usePopover as r, SelectOptionProps as rt, PopoverStyles as s, SelectTriggerProps as st, PopoverPrimitive as t, SelectRootProps as tt, PopoverTriggerProps as u, ButtonState as ut, DropdownMenuButtonProps as v, FieldPrimitiveRootProps as vt, TextareaStyles as w, TextareaPrimitive as x, FieldDescriptionProps as xt, DropdownMenuContentProps as y, FieldStyles as yt, EmptyPrimitive as z };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import * as react0 from "react";
1
+ import * as react4 from "react";
2
2
 
3
3
  //#region src/themes/types.d.ts
4
4
  type ThemeName = "default";
@@ -37,7 +37,7 @@ interface ThemeContext {
37
37
  setTheme: (themeName: ThemeName) => void;
38
38
  themeName: ThemeName;
39
39
  }
40
- declare const ThemeContext: react0.Context<ThemeContext | null>;
40
+ declare const ThemeContext: react4.Context<ThemeContext | null>;
41
41
  declare const useTheme: () => ThemeContext;
42
42
  //#endregion
43
43
  //#region src/index.d.ts
@@ -45,6 +45,6 @@ declare const UniversalUIProvider: ({
45
45
  children
46
46
  }: {
47
47
  children: React.ReactNode;
48
- }) => react0.JSX.Element;
48
+ }) => react4.JSX.Element;
49
49
  //#endregion
50
50
  export { UniversalUIProvider, useTheme };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { a as ThemeProvider, n as ToastContainer, o as useTheme } from "./toast-manager-Vq38WK76.mjs";
2
- import { l as PortalHost } from "./primitives-B4L9y32H.mjs";
1
+ import { a as ThemeProvider, n as ToastContainer, o as useTheme } from "./toast-manager-DSo9oN8w.mjs";
2
+ import { m as PortalHost } from "./primitives-P_8clvQr.mjs";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
 
5
5
  //#region src/index.tsx
@@ -1,2 +1,2 @@
1
- import { A as SelectContentProps, B as InputPrimitiveBaseProps, C as CardHeaderProps, D as SelectRootProps, E as SelectRootBaseProps, F as ButtonPrimitiveRootProps, G as FieldStyles, H as InputStyles, I as ButtonState, J as FieldLabelProps, K as FieldErrorProps, L as ButtonStyles, M as SelectValueProps, N as SelectTriggerProps, O as SelectStyles, P as ButtonPrimitive, R as ButtonPrimitiveLabelProps, S as CardTitleProps, T as SelectPortalProps, U as FieldPrimitive, V as InputPrimitiveProps, W as FieldPrimitiveRootProps, _ as CardPrimitive, a as ToastTitleProps, b as CardFooterProps, c as AvatarStyles, d as EmptyPrimitive, f as EmptyRootProps, g as EmptyDescriptionProps, h as EmptyMediaProps, i as ToastDescriptionProps, j as SelectOverlayProps, k as SelectOptionProps, l as AvatarImageProps, m as EmptyTitleProps, n as ToastRootProps, o as AvatarPrimitive, p as EmptyStyles, q as FieldDescriptionProps, r as ToastStyles, s as AvatarRootProps, t as ToastPrimitive, u as AvatarFallbackProps, v as CardRootProps, w as SelectPrimitive, x as CardBodyProps, y as CardStyles, z as InputPrimitive } from "../index-Bfae0NgJ.mjs";
2
- export { AvatarFallbackProps, AvatarImageProps, AvatarPrimitive, AvatarRootProps, AvatarStyles, ButtonPrimitive, ButtonPrimitiveLabelProps, ButtonPrimitiveRootProps, ButtonState, ButtonStyles, CardBodyProps, CardFooterProps, CardHeaderProps, CardPrimitive, CardRootProps, CardStyles, CardTitleProps, EmptyDescriptionProps, EmptyMediaProps, EmptyPrimitive, EmptyRootProps, EmptyStyles, EmptyTitleProps, FieldDescriptionProps, FieldErrorProps, FieldLabelProps, FieldPrimitive, FieldPrimitiveRootProps, FieldStyles, InputPrimitive, InputPrimitiveBaseProps, InputPrimitiveProps, InputStyles, SelectContentProps, SelectOptionProps, SelectOverlayProps, SelectPortalProps, SelectPrimitive, SelectRootBaseProps, SelectRootProps, SelectStyles, SelectTriggerProps, SelectValueProps, ToastDescriptionProps, ToastPrimitive, ToastRootProps, ToastStyles, ToastTitleProps };
1
+ import { $ as SelectPortalProps, A as ToastRootProps, B as EmptyRootProps, C as TextareaPrimitiveProps, D as BadgeStyles, E as BadgeRootProps, F as AvatarRootProps, G as CardPrimitive, H as EmptyTitleProps, I as AvatarStyles, J as CardFooterProps, K as CardRootProps, L as AvatarImageProps, M as ToastDescriptionProps, N as ToastTitleProps, O as BadgeLabelProps, P as AvatarPrimitive, Q as SelectPrimitive, R as AvatarFallbackProps, S as TextareaPrimitiveBaseProps, St as FieldLabelProps, T as BadgePrimitive, U as EmptyMediaProps, V as EmptyStyles, W as EmptyDescriptionProps, X as CardTitleProps, Y as CardBodyProps, Z as CardHeaderProps, _ as DropdownMenuDividerProps, _t as FieldPrimitive, a as PopoverPortalProps, at as SelectOverlayProps, b as DropdownMenuTriggerProps, bt as FieldErrorProps, c as PopoverOverlayProps, ct as ButtonPrimitive, d as PopoverTriggerRef, dt as ButtonStyles, et as SelectRootBaseProps, f as DropdownMenuPrimitive, ft as ButtonPrimitiveLabelProps, g as DropdownMenuOverlayProps, gt as InputStyles, h as DropdownMenuStyles, ht as InputPrimitiveProps, i as PopoverCloseProps, it as SelectContentProps, j as ToastStyles, k as ToastPrimitive, l as PopoverContentProps, lt as ButtonPrimitiveRootProps, m as DropdownMenuRootProps, mt as InputPrimitiveBaseProps, n as PopoverContext, nt as SelectStyles, o as PopoverRootProps, ot as SelectValueProps, p as DropdownMenuPortalProps, pt as InputPrimitive, q as CardStyles, r as usePopover, rt as SelectOptionProps, st as SelectTriggerProps, t as PopoverPrimitive, tt as SelectRootProps, u as PopoverTriggerProps, ut as ButtonState, v as DropdownMenuButtonProps, vt as FieldPrimitiveRootProps, w as TextareaStyles, x as TextareaPrimitive, xt as FieldDescriptionProps, y as DropdownMenuContentProps, yt as FieldStyles, z as EmptyPrimitive } from "../index-CGY0mO6z.mjs";
2
+ export { AvatarFallbackProps, AvatarImageProps, AvatarPrimitive, AvatarRootProps, AvatarStyles, BadgeLabelProps, BadgePrimitive, BadgeRootProps, BadgeStyles, ButtonPrimitive, ButtonPrimitiveLabelProps, ButtonPrimitiveRootProps, ButtonState, ButtonStyles, CardBodyProps, CardFooterProps, CardHeaderProps, CardPrimitive, CardRootProps, CardStyles, CardTitleProps, DropdownMenuButtonProps, DropdownMenuContentProps, DropdownMenuDividerProps, DropdownMenuOverlayProps, DropdownMenuPortalProps, DropdownMenuPrimitive, DropdownMenuRootProps, DropdownMenuStyles, DropdownMenuTriggerProps, EmptyDescriptionProps, EmptyMediaProps, EmptyPrimitive, EmptyRootProps, EmptyStyles, EmptyTitleProps, FieldDescriptionProps, FieldErrorProps, FieldLabelProps, FieldPrimitive, FieldPrimitiveRootProps, FieldStyles, InputPrimitive, InputPrimitiveBaseProps, InputPrimitiveProps, InputStyles, PopoverCloseProps, PopoverContentProps, PopoverContext, PopoverOverlayProps, PopoverPortalProps, PopoverPrimitive, PopoverRootProps, PopoverTriggerProps, PopoverTriggerRef, SelectContentProps, SelectOptionProps, SelectOverlayProps, SelectPortalProps, SelectPrimitive, SelectRootBaseProps, SelectRootProps, SelectStyles, SelectTriggerProps, SelectValueProps, TextareaPrimitive, TextareaPrimitiveBaseProps, TextareaPrimitiveProps, TextareaStyles, ToastDescriptionProps, ToastPrimitive, ToastRootProps, ToastStyles, ToastTitleProps, usePopover };
@@ -1,3 +1,3 @@
1
- import { a as SelectPrimitive, c as FieldPrimitive, i as CardPrimitive, n as AvatarPrimitive, o as ButtonPrimitive, r as EmptyPrimitive, s as InputPrimitive, t as ToastPrimitive } from "../primitives-B4L9y32H.mjs";
1
+ import { a as BadgePrimitive, c as EmptyPrimitive, d as ButtonPrimitive, f as InputPrimitive, i as TextareaPrimitive, l as CardPrimitive, n as usePopover, o as ToastPrimitive, p as FieldPrimitive, r as DropdownMenuPrimitive, s as AvatarPrimitive, t as PopoverPrimitive, u as SelectPrimitive } from "../primitives-P_8clvQr.mjs";
2
2
 
3
- export { AvatarPrimitive, ButtonPrimitive, CardPrimitive, EmptyPrimitive, FieldPrimitive, InputPrimitive, SelectPrimitive, ToastPrimitive };
3
+ export { AvatarPrimitive, BadgePrimitive, ButtonPrimitive, CardPrimitive, DropdownMenuPrimitive, EmptyPrimitive, FieldPrimitive, InputPrimitive, PopoverPrimitive, SelectPrimitive, TextareaPrimitive, ToastPrimitive, usePopover };