@korsolutions/ui 0.0.22 → 0.0.23
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/index.d.mts +2 -1
- package/dist/components/index.mjs +13 -4
- package/dist/{index-vgnXBa4Z.d.mts → index-CCYJiglk.d.mts} +9 -9
- package/dist/index.d.mts +3 -3
- package/dist/primitives/index.d.mts +1 -1
- package/package.json +1 -1
- package/src/components/popover/variants/default.tsx +0 -3
- package/src/components/popover/variants/index.ts +2 -0
- package/src/components/popover/variants/unstyled.tsx +13 -0
- package/src/primitives/calendar/calendar-day.tsx +1 -1
- package/src/primitives/calendar/calendar-root.tsx +2 -2
- package/src/primitives/calendar/context.ts +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Et as InputStyles, K as AvatarStyles, L as BadgeStyles, M as TextareaPrimitiveBaseProps, P as TextareaStyles, T as DropdownMenuStyles, V as ToastStyles, Z as EmptyStyles, _ as PopoverStyles, a as CalendarStyles, ft as SelectStyles, kt as FieldStyles, rt as CardStyles, ut as SelectRootBaseProps, wt as InputPrimitiveBaseProps, x as PopoverTriggerRef, xt as ButtonStyles, yt as ButtonPrimitiveRootProps } from "../index-
|
|
1
|
+
import { Et as InputStyles, K as AvatarStyles, L as BadgeStyles, M as TextareaPrimitiveBaseProps, P as TextareaStyles, T as DropdownMenuStyles, V as ToastStyles, Z as EmptyStyles, _ as PopoverStyles, a as CalendarStyles, ft as SelectStyles, kt as FieldStyles, rt as CardStyles, ut as SelectRootBaseProps, wt as InputPrimitiveBaseProps, x as PopoverTriggerRef, xt as ButtonStyles, yt as ButtonPrimitiveRootProps } from "../index-CCYJiglk.mjs";
|
|
2
2
|
import "../use-relative-position-DBzhrBU7.mjs";
|
|
3
3
|
import { t as NumericMaskFormat } from "../use-numeric-mask-B9WZG25o.mjs";
|
|
4
4
|
import React from "react";
|
|
@@ -279,6 +279,7 @@ declare function DropdownMenu(props: DropdownMenuProps): React.JSX.Element;
|
|
|
279
279
|
//#region src/components/popover/variants/index.d.ts
|
|
280
280
|
declare const PopoverVariants: {
|
|
281
281
|
default: () => PopoverStyles;
|
|
282
|
+
unstyled: () => PopoverStyles;
|
|
282
283
|
};
|
|
283
284
|
//#endregion
|
|
284
285
|
//#region src/components/popover/popover.d.ts
|
|
@@ -783,9 +783,6 @@ const usePopoverVariantDefault = () => {
|
|
|
783
783
|
borderRadius: radius,
|
|
784
784
|
borderWidth: 1,
|
|
785
785
|
borderColor: colors.border,
|
|
786
|
-
padding: 16,
|
|
787
|
-
minWidth: 280,
|
|
788
|
-
maxWidth: 320,
|
|
789
786
|
shadowColor: "#000",
|
|
790
787
|
shadowOffset: {
|
|
791
788
|
width: 0,
|
|
@@ -798,9 +795,21 @@ const usePopoverVariantDefault = () => {
|
|
|
798
795
|
}));
|
|
799
796
|
};
|
|
800
797
|
|
|
798
|
+
//#endregion
|
|
799
|
+
//#region src/components/popover/variants/unstyled.tsx
|
|
800
|
+
const usePopoverVariantUnstyled = () => {
|
|
801
|
+
return useThemedStyles(() => ({
|
|
802
|
+
overlay: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
803
|
+
content: {}
|
|
804
|
+
}));
|
|
805
|
+
};
|
|
806
|
+
|
|
801
807
|
//#endregion
|
|
802
808
|
//#region src/components/popover/variants/index.ts
|
|
803
|
-
const PopoverVariants = {
|
|
809
|
+
const PopoverVariants = {
|
|
810
|
+
default: usePopoverVariantDefault,
|
|
811
|
+
unstyled: usePopoverVariantUnstyled
|
|
812
|
+
};
|
|
804
813
|
|
|
805
814
|
//#endregion
|
|
806
815
|
//#region src/components/popover/popover.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as LayoutPosition } from "./use-relative-position-DBzhrBU7.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react8 from "react";
|
|
3
3
|
import React$1, { Dispatch, RefAttributes } from "react";
|
|
4
4
|
import { ImageSource, ImageStyle, LayoutRectangle, PressableProps, StyleProp, TextInputProps, TextProps, TextStyle, View, ViewProps, ViewStyle } from "react-native";
|
|
5
5
|
|
|
@@ -66,7 +66,7 @@ interface InputPrimitiveProps extends InputPrimitiveBaseProps {
|
|
|
66
66
|
render?: (props: InputPrimitiveProps) => React.ReactNode;
|
|
67
67
|
styles?: InputStyles;
|
|
68
68
|
}
|
|
69
|
-
declare function InputPrimitive(props: InputPrimitiveProps):
|
|
69
|
+
declare function InputPrimitive(props: InputPrimitiveProps): react8.JSX.Element;
|
|
70
70
|
//#endregion
|
|
71
71
|
//#region src/primitives/button/button-label.d.ts
|
|
72
72
|
interface ButtonPrimitiveLabelProps {
|
|
@@ -152,7 +152,7 @@ interface SelectOptionProps {
|
|
|
152
152
|
render?: (props: SelectOptionProps) => React.ReactElement;
|
|
153
153
|
style?: StyleProp<TextStyle>;
|
|
154
154
|
}
|
|
155
|
-
declare function SelectOption(props: SelectOptionProps):
|
|
155
|
+
declare function SelectOption(props: SelectOptionProps): react8.JSX.Element;
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region src/primitives/select/types.d.ts
|
|
158
158
|
type SelectState = "default" | "disabled";
|
|
@@ -433,7 +433,7 @@ interface TextareaPrimitiveProps extends TextareaPrimitiveBaseProps {
|
|
|
433
433
|
render?: (props: TextareaPrimitiveProps) => React.ReactNode;
|
|
434
434
|
styles?: TextareaStyles;
|
|
435
435
|
}
|
|
436
|
-
declare function TextareaPrimitive(props: TextareaPrimitiveProps):
|
|
436
|
+
declare function TextareaPrimitive(props: TextareaPrimitiveProps): react8.JSX.Element;
|
|
437
437
|
//#endregion
|
|
438
438
|
//#region src/primitives/dropdown-menu/dropdown-menu-trigger.d.ts
|
|
439
439
|
interface DropdownMenuTriggerProps extends PressableProps {
|
|
@@ -504,7 +504,7 @@ declare function DropdownMenuPortal(props: DropdownMenuPortalProps): React$1.JSX
|
|
|
504
504
|
//#region src/primitives/dropdown-menu/index.d.ts
|
|
505
505
|
declare const DropdownMenuPrimitive: {
|
|
506
506
|
Root: typeof DropdownMenuRoot;
|
|
507
|
-
Trigger:
|
|
507
|
+
Trigger: react8.ForwardRefExoticComponent<DropdownMenuTriggerProps & react8.RefAttributes<DropdownMenuTriggerRef>>;
|
|
508
508
|
Portal: typeof DropdownMenuPortal;
|
|
509
509
|
Overlay: typeof DropdownMenuOverlay;
|
|
510
510
|
Content: typeof DropdownMenuContent;
|
|
@@ -578,13 +578,13 @@ interface PopoverContext {
|
|
|
578
578
|
setTriggerPosition: Dispatch<React.SetStateAction<LayoutPosition>>;
|
|
579
579
|
styles?: PopoverStyles;
|
|
580
580
|
}
|
|
581
|
-
declare const PopoverContext:
|
|
581
|
+
declare const PopoverContext: react8.Context<PopoverContext | undefined>;
|
|
582
582
|
declare const usePopover: () => PopoverContext;
|
|
583
583
|
//#endregion
|
|
584
584
|
//#region src/primitives/popover/index.d.ts
|
|
585
585
|
declare const PopoverPrimitive: {
|
|
586
586
|
Root: typeof PopoverRoot;
|
|
587
|
-
Trigger:
|
|
587
|
+
Trigger: react8.ForwardRefExoticComponent<PopoverTriggerProps & react8.RefAttributes<PopoverTriggerRef>>;
|
|
588
588
|
Portal: typeof PopoverPortal;
|
|
589
589
|
Overlay: typeof PopoverOverlay;
|
|
590
590
|
Content: typeof PopoverContent;
|
|
@@ -656,8 +656,8 @@ interface CalendarStyles {
|
|
|
656
656
|
//#region src/primitives/calendar/calendar-root.d.ts
|
|
657
657
|
interface CalendarRootProps {
|
|
658
658
|
children?: React$1.ReactNode;
|
|
659
|
-
value?: Date;
|
|
660
|
-
onChange?: (date: Date |
|
|
659
|
+
value?: Date | null;
|
|
660
|
+
onChange?: (date: Date | null) => void;
|
|
661
661
|
defaultMonth?: Date;
|
|
662
662
|
minDate?: Date;
|
|
663
663
|
maxDate?: Date;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
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:
|
|
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
|
-
}) =>
|
|
48
|
+
}) => react4.JSX.Element;
|
|
49
49
|
//#endregion
|
|
50
50
|
export { UniversalUIProvider, useTheme };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as EmptyMediaProps, A as DropdownMenuTriggerProps, At as FieldErrorProps, B as ToastRootProps, C as DropdownMenuPortalProps, Ct as InputPrimitive, D as DropdownMenuDividerProps, Dt as FieldPrimitive, E as DropdownMenuOverlayProps, Et as InputStyles, F as BadgePrimitive, G as AvatarRootProps, H as ToastDescriptionProps, I as BadgeRootProps, J as AvatarFallbackProps, K as AvatarStyles, L as BadgeStyles, M as TextareaPrimitiveBaseProps, Mt as FieldLabelProps, N as TextareaPrimitiveProps, O as DropdownMenuButtonProps, Ot as FieldPrimitiveRootProps, P as TextareaStyles, Q as EmptyTitleProps, R as BadgeLabelProps, S as DropdownMenuPrimitive, St as ButtonPrimitiveLabelProps, T as DropdownMenuStyles, Tt as InputPrimitiveProps, U as ToastTitleProps, V as ToastStyles, W as AvatarPrimitive, X as EmptyRootProps, Y as EmptyPrimitive, Z as EmptyStyles, _t as SelectTriggerProps, a as CalendarStyles, at as CardBodyProps, b as PopoverTriggerProps, bt as ButtonState, c as CalendarDayProps, ct as SelectPrimitive, d as PopoverPrimitive, dt as SelectRootProps, et as EmptyDescriptionProps, f as PopoverContext, ft as SelectStyles, g as PopoverRootProps, gt as SelectValueProps, h as PopoverPortalProps, ht as SelectOverlayProps, i as CalendarDayState, it as CardFooterProps, j as TextareaPrimitive, jt as FieldDescriptionProps, k as DropdownMenuContentProps, kt as FieldStyles, l as CalendarWeekLabelsProps, lt as SelectPortalProps, m as PopoverCloseProps, mt as SelectContentProps, n as CalendarNavButtonProps, nt as CardRootProps, o as CalendarTitleProps, ot as CardTitleProps, p as usePopover, pt as SelectOptionProps, q as AvatarImageProps, r as CalendarRootProps, rt as CardStyles, s as CalendarHeaderProps, st as CardHeaderProps, t as CalendarPrimitive, tt as CardPrimitive, u as CalendarWeeksProps, ut as SelectRootBaseProps, v as PopoverOverlayProps, vt as ButtonPrimitive, w as DropdownMenuRootProps, wt as InputPrimitiveBaseProps, x as PopoverTriggerRef, xt as ButtonStyles, y as PopoverContentProps, yt as ButtonPrimitiveRootProps, z as ToastPrimitive } from "../index-
|
|
1
|
+
import { $ as EmptyMediaProps, A as DropdownMenuTriggerProps, At as FieldErrorProps, B as ToastRootProps, C as DropdownMenuPortalProps, Ct as InputPrimitive, D as DropdownMenuDividerProps, Dt as FieldPrimitive, E as DropdownMenuOverlayProps, Et as InputStyles, F as BadgePrimitive, G as AvatarRootProps, H as ToastDescriptionProps, I as BadgeRootProps, J as AvatarFallbackProps, K as AvatarStyles, L as BadgeStyles, M as TextareaPrimitiveBaseProps, Mt as FieldLabelProps, N as TextareaPrimitiveProps, O as DropdownMenuButtonProps, Ot as FieldPrimitiveRootProps, P as TextareaStyles, Q as EmptyTitleProps, R as BadgeLabelProps, S as DropdownMenuPrimitive, St as ButtonPrimitiveLabelProps, T as DropdownMenuStyles, Tt as InputPrimitiveProps, U as ToastTitleProps, V as ToastStyles, W as AvatarPrimitive, X as EmptyRootProps, Y as EmptyPrimitive, Z as EmptyStyles, _t as SelectTriggerProps, a as CalendarStyles, at as CardBodyProps, b as PopoverTriggerProps, bt as ButtonState, c as CalendarDayProps, ct as SelectPrimitive, d as PopoverPrimitive, dt as SelectRootProps, et as EmptyDescriptionProps, f as PopoverContext, ft as SelectStyles, g as PopoverRootProps, gt as SelectValueProps, h as PopoverPortalProps, ht as SelectOverlayProps, i as CalendarDayState, it as CardFooterProps, j as TextareaPrimitive, jt as FieldDescriptionProps, k as DropdownMenuContentProps, kt as FieldStyles, l as CalendarWeekLabelsProps, lt as SelectPortalProps, m as PopoverCloseProps, mt as SelectContentProps, n as CalendarNavButtonProps, nt as CardRootProps, o as CalendarTitleProps, ot as CardTitleProps, p as usePopover, pt as SelectOptionProps, q as AvatarImageProps, r as CalendarRootProps, rt as CardStyles, s as CalendarHeaderProps, st as CardHeaderProps, t as CalendarPrimitive, tt as CardPrimitive, u as CalendarWeeksProps, ut as SelectRootBaseProps, v as PopoverOverlayProps, vt as ButtonPrimitive, w as DropdownMenuRootProps, wt as InputPrimitiveBaseProps, x as PopoverTriggerRef, xt as ButtonStyles, y as PopoverContentProps, yt as ButtonPrimitiveRootProps, z as ToastPrimitive } from "../index-CCYJiglk.mjs";
|
|
2
2
|
import "../use-relative-position-DBzhrBU7.mjs";
|
|
3
3
|
export { AvatarFallbackProps, AvatarImageProps, AvatarPrimitive, AvatarRootProps, AvatarStyles, BadgeLabelProps, BadgePrimitive, BadgeRootProps, BadgeStyles, ButtonPrimitive, ButtonPrimitiveLabelProps, ButtonPrimitiveRootProps, ButtonState, ButtonStyles, CalendarDayProps, CalendarDayState, CalendarHeaderProps, CalendarNavButtonProps, CalendarPrimitive, CalendarRootProps, CalendarStyles, CalendarTitleProps, CalendarWeekLabelsProps, CalendarWeeksProps, 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 };
|
package/package.json
CHANGED
|
@@ -12,9 +12,6 @@ export const usePopoverVariantDefault = (): PopoverStyles => {
|
|
|
12
12
|
borderRadius: radius,
|
|
13
13
|
borderWidth: 1,
|
|
14
14
|
borderColor: colors.border,
|
|
15
|
-
padding: 16,
|
|
16
|
-
minWidth: 280,
|
|
17
|
-
maxWidth: 320,
|
|
18
15
|
shadowColor: "#000",
|
|
19
16
|
shadowOffset: { width: 0, height: 4 },
|
|
20
17
|
shadowOpacity: 0.15,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PopoverStyles } from "@/primitives/popover/types";
|
|
2
|
+
import { useThemedStyles } from "@/utils/use-themed-styles";
|
|
3
|
+
|
|
4
|
+
export const usePopoverVariantUnstyled = (): PopoverStyles => {
|
|
5
|
+
return useThemedStyles(
|
|
6
|
+
(): PopoverStyles => ({
|
|
7
|
+
overlay: {
|
|
8
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
9
|
+
},
|
|
10
|
+
content: {},
|
|
11
|
+
})
|
|
12
|
+
);
|
|
13
|
+
};
|
|
@@ -5,8 +5,8 @@ import { CalendarContext } from "./context";
|
|
|
5
5
|
|
|
6
6
|
export interface CalendarRootProps {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
-
value?: Date;
|
|
9
|
-
onChange?: (date: Date |
|
|
8
|
+
value?: Date | null;
|
|
9
|
+
onChange?: (date: Date | null) => void;
|
|
10
10
|
defaultMonth?: Date;
|
|
11
11
|
minDate?: Date;
|
|
12
12
|
maxDate?: Date;
|
|
@@ -2,8 +2,8 @@ import React from "react";
|
|
|
2
2
|
import { CalendarStyles } from "./types";
|
|
3
3
|
|
|
4
4
|
export interface CalendarContextValue {
|
|
5
|
-
value?: Date;
|
|
6
|
-
onChange?: (date: Date |
|
|
5
|
+
value?: Date | null;
|
|
6
|
+
onChange?: (date: Date | null) => void;
|
|
7
7
|
currentMonth: Date;
|
|
8
8
|
setCurrentMonth: (month: Date) => void;
|
|
9
9
|
minDate?: Date;
|