@lssm/lib.ui-kit 1.7.3 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -0
- package/dist/node_modules/react-hook-form/dist/index.esm.js +27 -16
- package/dist/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
- package/dist/node_modules/zod/v4/core/core.js +0 -1
- package/dist/node_modules/zod/v4/core/core.js.map +1 -1
- package/dist/node_modules/zod/v4/core/registries.js +0 -2
- package/dist/node_modules/zod/v4/core/registries.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/accordion.d.ts +5 -5
- package/dist/ui/accordion.js +4 -4
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/alert-dialog.d.ts +11 -11
- package/dist/ui/alert-dialog.js +9 -9
- package/dist/ui/alert-dialog.js.map +1 -1
- package/dist/ui/alert.d.ts +4 -4
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +3 -3
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/aspect-ratio.d.ts +5 -5
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/avatar.d.ts +4 -4
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +3 -3
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge.d.ts +3 -3
- package/dist/ui/badge.js +1 -1
- package/dist/ui/badge.js.map +1 -1
- package/dist/ui/breadcrumb.d.ts +8 -8
- package/dist/ui/breadcrumb.js +6 -6
- package/dist/ui/breadcrumb.js.map +1 -1
- package/dist/ui/button.d.ts +4 -4
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +1 -1
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/card.d.ts +7 -7
- package/dist/ui/card.js +6 -6
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/checkbox.d.ts +3 -3
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/collapsible.d.ts +8 -8
- package/dist/ui/context-menu.d.ts +16 -16
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +9 -9
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/date-picker.d.ts +2 -2
- package/dist/ui/date-range-picker.d.ts +2 -2
- package/dist/ui/datetime-picker.d.ts +2 -2
- package/dist/ui/datetime-picker.d.ts.map +1 -1
- package/dist/ui/dialog.d.ts +10 -10
- package/dist/ui/dialog.js +7 -7
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/dropdown-menu.d.ts +16 -16
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +9 -9
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/empty-state.d.ts +4 -4
- package/dist/ui/empty-state.d.ts.map +1 -1
- package/dist/ui/empty.d.ts +9 -9
- package/dist/ui/empty.d.ts.map +1 -1
- package/dist/ui/empty.js +6 -6
- package/dist/ui/empty.js.map +1 -1
- package/dist/ui/fab.d.ts +3 -3
- package/dist/ui/field.d.ts +14 -14
- package/dist/ui/field.d.ts.map +1 -1
- package/dist/ui/field.js +10 -11
- package/dist/ui/field.js.map +1 -1
- package/dist/ui/form.d.ts +7 -7
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +5 -6
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/hover-card.d.ts +6 -6
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +1 -1
- package/dist/ui/hover-card.js.map +1 -1
- package/dist/ui/input.d.ts +2 -2
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +1 -1
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/label.d.ts +2 -2
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/label.js +1 -1
- package/dist/ui/label.js.map +1 -1
- package/dist/ui/link.d.ts +2 -2
- package/dist/ui/link.d.ts.map +1 -1
- package/dist/ui/link.js +1 -1
- package/dist/ui/link.js.map +1 -1
- package/dist/ui/loading-button.d.ts +2 -2
- package/dist/ui/loading-button.d.ts.map +1 -1
- package/dist/ui/loading-button.js +1 -1
- package/dist/ui/loading-button.js.map +1 -1
- package/dist/ui/loading-overlay.d.ts +2 -2
- package/dist/ui/loading-overlay.d.ts.map +1 -1
- package/dist/ui/loading-screen.d.ts +2 -2
- package/dist/ui/marketing/FeatureGrid.d.ts +2 -2
- package/dist/ui/marketing/Hero.d.ts +2 -2
- package/dist/ui/marketing/PricingTable.d.ts +2 -2
- package/dist/ui/menubar.d.ts +17 -17
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +11 -11
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/molecules/SkeletonList.d.ts +2 -2
- package/dist/ui/navigation-menu.d.ts +10 -10
- package/dist/ui/navigation-menu.js +6 -6
- package/dist/ui/navigation-menu.js.map +1 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +2 -2
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +0 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/dist/ui/organisms/ListPage/ListPage.d.ts +2 -2
- package/dist/ui/organisms/ListPage/ListPage.d.ts.map +1 -1
- package/dist/ui/page-header.d.ts +4 -4
- package/dist/ui/page-header.d.ts.map +1 -1
- package/dist/ui/password-strength.d.ts +2 -2
- package/dist/ui/password-strength.d.ts.map +1 -1
- package/dist/ui/popover.d.ts +8 -8
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +1 -1
- package/dist/ui/popover.js.map +1 -1
- package/dist/ui/progress.d.ts +2 -2
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +1 -1
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/radio-group.d.ts +3 -3
- package/dist/ui/radio-group.js +2 -2
- package/dist/ui/radio-group.js.map +1 -1
- package/dist/ui/select.d.ts +13 -13
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +7 -7
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/separator.d.ts +2 -2
- package/dist/ui/separator.d.ts.map +1 -1
- package/dist/ui/separator.js +1 -1
- package/dist/ui/separator.js.map +1 -1
- package/dist/ui/skeleton.d.ts +2 -2
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/skeleton.js.map +1 -1
- package/dist/ui/stack.d.ts +17 -17
- package/dist/ui/stack.d.ts.map +1 -1
- package/dist/ui/stack.js +3 -3
- package/dist/ui/stack.js.map +1 -1
- package/dist/ui/stepper.d.ts +4 -4
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/switch.d.ts +2 -2
- package/dist/ui/switch.js +2 -2
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.d.ts +8 -8
- package/dist/ui/table.js +7 -7
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tabs.d.ts +11 -11
- package/dist/ui/tabs.js +3 -3
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/text.d.ts +2 -2
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/text.js +1 -1
- package/dist/ui/text.js.map +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/textarea.js.map +1 -1
- package/dist/ui/time-picker.d.ts +2 -2
- package/dist/ui/time-picker.d.ts.map +1 -1
- package/dist/ui/toggle-group.d.ts +4 -4
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +3 -3
- package/dist/ui/toggle-group.js.map +1 -1
- package/dist/ui/toggle.d.ts +6 -6
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +2 -2
- package/dist/ui/toggle.js.map +1 -1
- package/dist/ui/tooltip.d.ts +6 -6
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +1 -1
- package/dist/ui/tooltip.js.map +1 -1
- package/dist/ui/typography.d.ts +12 -12
- package/dist/ui/typography.d.ts.map +1 -1
- package/dist/ui/typography.js +11 -11
- package/dist/ui/typography.js.map +1 -1
- package/dist/ui/useColorScheme.d.ts +2 -2
- package/dist/ui/useColorScheme.d.ts.map +1 -1
- package/dist/ui/usecases/UseCaseCard.d.ts +2 -2
- package/dist/ui/usecases/UserStoryCard.d.ts +2 -2
- package/dist/ui/usecases/UserStoryCard.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/ui/field.d.ts
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
import { Label } from "./label.js";
|
|
2
2
|
import { BoxProps } from "./stack.js";
|
|
3
3
|
import { TypographyProps } from "./typography.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime97 from "react/jsx-runtime";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
|
-
import * as
|
|
6
|
+
import * as class_variance_authority_types7 from "class-variance-authority/types";
|
|
7
7
|
|
|
8
8
|
//#region ui/field.d.ts
|
|
9
9
|
declare function FieldSet({
|
|
10
10
|
className,
|
|
11
11
|
...props
|
|
12
|
-
}: BoxProps):
|
|
12
|
+
}: BoxProps): react_jsx_runtime97.JSX.Element;
|
|
13
13
|
declare function FieldLegend({
|
|
14
14
|
className,
|
|
15
15
|
variant,
|
|
16
16
|
...props
|
|
17
17
|
}: BoxProps & {
|
|
18
18
|
variant?: 'legend' | 'label';
|
|
19
|
-
}):
|
|
19
|
+
}): react_jsx_runtime97.JSX.Element;
|
|
20
20
|
declare function FieldGroup({
|
|
21
21
|
className,
|
|
22
22
|
...props
|
|
23
|
-
}: BoxProps):
|
|
23
|
+
}: BoxProps): react_jsx_runtime97.JSX.Element;
|
|
24
24
|
declare const fieldVariants: (props?: ({
|
|
25
|
-
orientation?: "
|
|
26
|
-
} &
|
|
25
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
26
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
27
27
|
declare function Field({
|
|
28
28
|
className,
|
|
29
29
|
orientation,
|
|
30
30
|
...props
|
|
31
|
-
}: BoxProps & VariantProps<typeof fieldVariants>):
|
|
31
|
+
}: BoxProps & VariantProps<typeof fieldVariants>): react_jsx_runtime97.JSX.Element;
|
|
32
32
|
declare function FieldContent({
|
|
33
33
|
className,
|
|
34
34
|
...props
|
|
35
|
-
}: BoxProps):
|
|
35
|
+
}: BoxProps): react_jsx_runtime97.JSX.Element;
|
|
36
36
|
declare function FieldLabel({
|
|
37
37
|
className,
|
|
38
38
|
...props
|
|
39
|
-
}: React.ComponentProps<typeof Label>):
|
|
39
|
+
}: React.ComponentProps<typeof Label>): react_jsx_runtime97.JSX.Element;
|
|
40
40
|
declare function FieldTitle({
|
|
41
41
|
className,
|
|
42
42
|
...props
|
|
43
|
-
}: BoxProps):
|
|
43
|
+
}: BoxProps): react_jsx_runtime97.JSX.Element;
|
|
44
44
|
declare function FieldDescription({
|
|
45
45
|
className,
|
|
46
46
|
...props
|
|
47
|
-
}: TypographyProps):
|
|
47
|
+
}: TypographyProps): react_jsx_runtime97.JSX.Element;
|
|
48
48
|
declare function FieldSeparator({
|
|
49
49
|
children,
|
|
50
50
|
className,
|
|
51
51
|
...props
|
|
52
52
|
}: BoxProps & {
|
|
53
53
|
children?: React.ReactNode;
|
|
54
|
-
}):
|
|
54
|
+
}): react_jsx_runtime97.JSX.Element;
|
|
55
55
|
declare function FieldError({
|
|
56
56
|
className,
|
|
57
57
|
children,
|
|
@@ -61,7 +61,7 @@ declare function FieldError({
|
|
|
61
61
|
errors?: ({
|
|
62
62
|
message?: string;
|
|
63
63
|
} | undefined)[];
|
|
64
|
-
}):
|
|
64
|
+
}): react_jsx_runtime97.JSX.Element | null;
|
|
65
65
|
//#endregion
|
|
66
66
|
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
67
67
|
//# sourceMappingURL=field.d.ts.map
|
package/dist/ui/field.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","names":[],"sources":["../../ui/field.tsx"],"sourcesContent":[],"mappings":";;;;;;;;iBAWS,QAAA;;;GAAkC,WAAQ,mBAAA,CAAA,GAAA,CAAA;iBAc1C,WAAA;;;;GAIN;;IAA2C,mBAAA,CAAA,GAAA,CAAA;AApBS,iBAoC9C,UAAA,CAlCQ;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAkC4B,QAlC5B,CAAA,EAkCoC,mBAAA,CAAA,GAAA,CAAA,OAlCpC;cA+CX,aA/Cc,EAAA,CAAA,KAA+B,CAA/B,EAAA,CAAA;EAAuB,WAAA,CAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"field.d.ts","names":[],"sources":["../../ui/field.tsx"],"sourcesContent":[],"mappings":";;;;;;;;iBAWS,QAAA;;;GAAkC,WAAQ,mBAAA,CAAA,GAAA,CAAA;iBAc1C,WAAA;;;;GAIN;;IAA2C,mBAAA,CAAA,GAAA,CAAA;AApBS,iBAoC9C,UAAA,CAlCQ;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAkC4B,QAlC5B,CAAA,EAkCoC,mBAAA,CAAA,GAAA,CAAA,OAlCpC;cA+CX,aA/Cc,EAAA,CAAA,KAA+B,CAA/B,EAAA,CAAA;EAAuB,WAAA,CAAA,EAAA,YAAA,GAAA,UAAA,GAAA,YAAA,GAAA,IAAA,GAAA,SAAA;CAAQ,GAqElD,+BAAA,CAAA,SArEkD,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;iBAuE1C,KAAA,CAvE0C;EAAA,SAAA;EAAA,WAAA;EAAA,GAAA;AAAA,CAAA,EA2EhD,QA3EgD,GA2ErC,YA3EqC,CAAA,OA2EjB,aA3EiB,CAAA,CAAA,EA2EH,mBAAA,CAAA,GAAA,CAAA,OA3EG;AAAA,iBAuF1C,YAAA,CAzEW;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAyE2B,QAzE3B,CAAA,EAyEmC,mBAAA,CAAA,GAAA,CAAA,OAzEnC;iBAsFX,UAAA,CArFP;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAwFC,KAAA,CAAM,cAxFP,CAAA,OAwF6B,KAxF7B,CAAA,CAAA,EAwFmC,mBAAA,CAAA,GAAA,CAAA,OAxFnC;iBAuGO,UAAA,CAtGP;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAsG2C,QAtG3C,CAAA,EAsGmD,mBAAA,CAAA,GAAA,CAAA,OAtGnD;iBAmHO,gBAAA,CAjHN;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAiHgD,eAjHhD,CAAA,EAiH+D,mBAAA,CAAA,GAAA,CAAA,OAjH/D;iBAgIM,cAAA,CAhIqC;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAoI3C,QApI2C,GAAA;EAAA,QAAA,CAAA,EAqIjC,KAAA,CAAM,SArI2B;AAAA,CAAA,CAAA,EAsI7C,mBAAA,CAAA,GAAA,CAAA,OAtHkB;iBA8IV,UAAA,CA9Ia;EAAA,SAAA;EAAA,QAAA;EAAA,MAAA;EAAA,GAAA;AAA+B,CAA/B,EAmJnB,QAnJmB,GAAA;EAAuB,MAAA,CAAA,EAAA,CAAA;IAAQ,OAAA,CAAA,EAAA,MAAA;EAAA,CAAA,GAAA,SAAA,CAAA,EAAA;AAAA,CAAA,CAAA,EAqJpD,mBAAA,CAAA,GAAA,CAAA,OAAA,GAlHA,IAAA"}
|
package/dist/ui/field.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
import { cn } from "./utils.js";
|
|
5
4
|
import { Box, VStack } from "./stack.js";
|
|
6
5
|
import { P } from "./typography.js";
|
|
@@ -11,14 +10,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
11
10
|
import { cva } from "class-variance-authority";
|
|
12
11
|
|
|
13
12
|
//#region ui/field.tsx
|
|
14
|
-
function FieldSet({ className
|
|
13
|
+
function FieldSet({ className, ...props }) {
|
|
15
14
|
return /* @__PURE__ */ jsx(Box, {
|
|
16
15
|
"data-slot": "field-set",
|
|
17
16
|
className: cn("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
|
|
18
17
|
...props
|
|
19
18
|
});
|
|
20
19
|
}
|
|
21
|
-
function FieldLegend({ className, variant = "legend"
|
|
20
|
+
function FieldLegend({ className, variant = "legend", ...props }) {
|
|
22
21
|
return /* @__PURE__ */ jsx(Box, {
|
|
23
22
|
"data-slot": "field-legend",
|
|
24
23
|
"data-variant": variant,
|
|
@@ -26,7 +25,7 @@ function FieldLegend({ className, variant = "legend",...props }) {
|
|
|
26
25
|
...props
|
|
27
26
|
});
|
|
28
27
|
}
|
|
29
|
-
function FieldGroup({ className
|
|
28
|
+
function FieldGroup({ className, ...props }) {
|
|
30
29
|
return /* @__PURE__ */ jsx(Box, {
|
|
31
30
|
"data-slot": "field-group",
|
|
32
31
|
className: cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4", className),
|
|
@@ -49,7 +48,7 @@ const fieldVariants = cva("group/field flex w-full gap-3 data-[invalid=true]:tex
|
|
|
49
48
|
} },
|
|
50
49
|
defaultVariants: { orientation: "vertical" }
|
|
51
50
|
});
|
|
52
|
-
function Field({ className, orientation = "vertical"
|
|
51
|
+
function Field({ className, orientation = "vertical", ...props }) {
|
|
53
52
|
return /* @__PURE__ */ jsx(Box, {
|
|
54
53
|
role: "group",
|
|
55
54
|
"data-slot": "field",
|
|
@@ -58,35 +57,35 @@ function Field({ className, orientation = "vertical",...props }) {
|
|
|
58
57
|
...props
|
|
59
58
|
});
|
|
60
59
|
}
|
|
61
|
-
function FieldContent({ className
|
|
60
|
+
function FieldContent({ className, ...props }) {
|
|
62
61
|
return /* @__PURE__ */ jsx(Box, {
|
|
63
62
|
"data-slot": "field-content",
|
|
64
63
|
className: cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className),
|
|
65
64
|
...props
|
|
66
65
|
});
|
|
67
66
|
}
|
|
68
|
-
function FieldLabel({ className
|
|
67
|
+
function FieldLabel({ className, ...props }) {
|
|
69
68
|
return /* @__PURE__ */ jsx(Label, {
|
|
70
69
|
"data-slot": "field-label",
|
|
71
70
|
className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4", "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10", className),
|
|
72
71
|
...props
|
|
73
72
|
});
|
|
74
73
|
}
|
|
75
|
-
function FieldTitle({ className
|
|
74
|
+
function FieldTitle({ className, ...props }) {
|
|
76
75
|
return /* @__PURE__ */ jsx(Box, {
|
|
77
76
|
"data-slot": "field-label",
|
|
78
77
|
className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", className),
|
|
79
78
|
...props
|
|
80
79
|
});
|
|
81
80
|
}
|
|
82
|
-
function FieldDescription({ className
|
|
81
|
+
function FieldDescription({ className, ...props }) {
|
|
83
82
|
return /* @__PURE__ */ jsx(P, {
|
|
84
83
|
"data-slot": "field-description",
|
|
85
84
|
className: cn("text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", className),
|
|
86
85
|
...props
|
|
87
86
|
});
|
|
88
87
|
}
|
|
89
|
-
function FieldSeparator({ children, className
|
|
88
|
+
function FieldSeparator({ children, className, ...props }) {
|
|
90
89
|
return /* @__PURE__ */ jsxs(Box, {
|
|
91
90
|
"data-slot": "field-separator",
|
|
92
91
|
"data-content": !!children,
|
|
@@ -99,7 +98,7 @@ function FieldSeparator({ children, className,...props }) {
|
|
|
99
98
|
})]
|
|
100
99
|
});
|
|
101
100
|
}
|
|
102
|
-
function FieldError({ className, children, errors
|
|
101
|
+
function FieldError({ className, children, errors, ...props }) {
|
|
103
102
|
const content = useMemo(() => {
|
|
104
103
|
if (children) return children;
|
|
105
104
|
if (!errors?.length) return null;
|
package/dist/ui/field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","names":[],"sources":["../../ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from './utils';\nimport { Label } from './label';\nimport { Separator } from './separator';\nimport { Box, VStack, type BoxProps } from './stack';\nimport { P, type TypographyProps } from './typography';\n\nfunction FieldSet({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-set\"\n className={cn(\n 'flex flex-col gap-6',\n 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLegend({\n className,\n variant = 'legend',\n ...props\n}: BoxProps & { variant?: 'legend' | 'label' }) {\n return (\n <Box\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn(\n 'mb-3 font-medium',\n 'data-[variant=legend]:text-base',\n 'data-[variant=label]:text-sm',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldGroup({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4',\n className\n )}\n {...props}\n />\n );\n}\n\nconst fieldVariants = cva(\n 'group/field flex w-full gap-3 data-[invalid=true]:text-destructive',\n {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n 'data-[slot=field-label]:*:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto',\n '@md/field-group:data-[slot=field-label]:*:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n }\n);\n\nfunction Field({\n className,\n orientation = 'vertical',\n ...props\n}: BoxProps & VariantProps<typeof fieldVariants>) {\n return (\n <Box\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nfunction FieldContent({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-content\"\n className={cn(\n 'group/field-content flex flex-1 flex-col gap-1.5 leading-snug',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4',\n 'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldTitle({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-label\"\n className={cn(\n 'flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldDescription({ className, ...props }: TypographyProps) {\n return (\n <P\n data-slot=\"field-description\"\n className={cn(\n 'text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: BoxProps & {\n children?: React.ReactNode;\n}) {\n return (\n <Box\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn(\n 'relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2',\n className\n )}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <Box\n className=\"bg-background text-muted-foreground relative mx-auto block w-fit px-2\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </Box>\n )}\n </Box>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: BoxProps & {\n errors?: ({ message?: string } | undefined)[];\n}) {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors?.length) {\n return null;\n }\n\n if (errors?.length == 1) {\n return errors[0]?.message;\n }\n\n return (\n <VStack className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map(\n (error, index) => error?.message && <P key={index}>{error.message}</P>\n )}\n </VStack>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <Box\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </Box>\n );\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"field.js","names":[],"sources":["../../ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from './utils';\nimport { Label } from './label';\nimport { Separator } from './separator';\nimport { Box, VStack, type BoxProps } from './stack';\nimport { P, type TypographyProps } from './typography';\n\nfunction FieldSet({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-set\"\n className={cn(\n 'flex flex-col gap-6',\n 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLegend({\n className,\n variant = 'legend',\n ...props\n}: BoxProps & { variant?: 'legend' | 'label' }) {\n return (\n <Box\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn(\n 'mb-3 font-medium',\n 'data-[variant=legend]:text-base',\n 'data-[variant=label]:text-sm',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldGroup({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4',\n className\n )}\n {...props}\n />\n );\n}\n\nconst fieldVariants = cva(\n 'group/field flex w-full gap-3 data-[invalid=true]:text-destructive',\n {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n 'data-[slot=field-label]:*:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto',\n '@md/field-group:data-[slot=field-label]:*:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n }\n);\n\nfunction Field({\n className,\n orientation = 'vertical',\n ...props\n}: BoxProps & VariantProps<typeof fieldVariants>) {\n return (\n <Box\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nfunction FieldContent({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-content\"\n className={cn(\n 'group/field-content flex flex-1 flex-col gap-1.5 leading-snug',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4',\n 'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldTitle({ className, ...props }: BoxProps) {\n return (\n <Box\n data-slot=\"field-label\"\n className={cn(\n 'flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldDescription({ className, ...props }: TypographyProps) {\n return (\n <P\n data-slot=\"field-description\"\n className={cn(\n 'text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: BoxProps & {\n children?: React.ReactNode;\n}) {\n return (\n <Box\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn(\n 'relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2',\n className\n )}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <Box\n className=\"bg-background text-muted-foreground relative mx-auto block w-fit px-2\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </Box>\n )}\n </Box>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: BoxProps & {\n errors?: ({ message?: string } | undefined)[];\n}) {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors?.length) {\n return null;\n }\n\n if (errors?.length == 1) {\n return errors[0]?.message;\n }\n\n return (\n <VStack className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map(\n (error, index) => error?.message && <P key={index}>{error.message}</P>\n )}\n </VStack>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <Box\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </Box>\n );\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n};\n"],"mappings":";;;;;;;;;;;;AAWA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAmB;AACnD,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,uBACA,gFACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,WACA,UAAU,UACV,GAAG,SAC2C;AAC9C,QACE,oBAAC;EACC,aAAU;EACV,gBAAc;EACd,WAAW,GACT,oBACA,mCACA,gCACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAAE,WAAW,GAAG,SAAmB;AACrD,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,wIACA,UACD;EACD,GAAI;GACJ;;AAIN,MAAM,gBAAgB,IACpB,sEACA;CACE,UAAU,EACR,aAAa;EACX,UAAU,CAAC,wCAAwC;EACnD,YAAY;GACV;GACA;GACA;GACD;EACD,YAAY;GACV;GACA;GACA;GACD;EACF,EACF;CACD,iBAAiB,EACf,aAAa,YACd;CACF,CACF;AAED,SAAS,MAAM,EACb,WACA,cAAc,YACd,GAAG,SAC6C;AAChD,QACE,oBAAC;EACC,MAAK;EACL,aAAU;EACV,oBAAkB;EAClB,WAAW,GAAG,cAAc,EAAE,aAAa,CAAC,EAAE,UAAU;EACxD,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,WAAW,GAAG,SAAmB;AACvD,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,iEACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAClB,WACA,GAAG,SACkC;AACrC,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,gHACA,iKACA,6HACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAAE,WAAW,GAAG,SAAmB;AACrD,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,8GACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAA0B;AAClE,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,uHACA,gEACA,qEACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,eAAe,EACtB,UACA,WACA,GAAG,SAGF;AACD,QACE,qBAAC;EACC,aAAU;EACV,gBAAc,CAAC,CAAC;EAChB,WAAW,GACT,6EACA,UACD;EACD,GAAI;aAEJ,oBAAC,aAAU,WAAU,6BAA6B,EACjD,YACC,oBAAC;GACC,WAAU;GACV,aAAU;GAET;IACG;GAEJ;;AAIV,SAAS,WAAW,EAClB,WACA,UACA,QACA,GAAG,SAGF;CACD,MAAM,UAAU,cAAc;AAC5B,MAAI,SACF,QAAO;AAGT,MAAI,CAAC,QAAQ,OACX,QAAO;AAGT,MAAI,QAAQ,UAAU,EACpB,QAAO,OAAO,IAAI;AAGpB,SACE,oBAAC;GAAO,WAAU;aACf,OAAO,KACL,OAAO,UAAU,OAAO,WAAW,oBAAC,eAAe,MAAM,WAAd,MAA0B,CACvE;IACM;IAEV,CAAC,UAAU,OAAO,CAAC;AAEtB,KAAI,CAAC,QACH,QAAO;AAGT,QACE,oBAAC;EACC,MAAK;EACL,aAAU;EACV,WAAW,GAAG,wCAAwC,UAAU;EAChE,GAAI;YAEH;GACG"}
|
package/dist/ui/form.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Label } from "./label.js";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime109 from "react/jsx-runtime";
|
|
5
5
|
import * as react_hook_form0 from "react-hook-form";
|
|
6
6
|
import { ControllerProps, FieldPath, FieldValues, UseFormReturn, useFieldArray, useForm } from "react-hook-form";
|
|
7
7
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
@@ -10,7 +10,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
|
|
|
10
10
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form0.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
|
|
11
11
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
|
|
12
12
|
...props
|
|
13
|
-
}: ControllerProps<TFieldValues, TName>) =>
|
|
13
|
+
}: ControllerProps<TFieldValues, TName>) => react_jsx_runtime109.JSX.Element;
|
|
14
14
|
declare const useFormField: () => {
|
|
15
15
|
invalid: boolean;
|
|
16
16
|
isDirty: boolean;
|
|
@@ -26,25 +26,25 @@ declare const useFormField: () => {
|
|
|
26
26
|
declare function FormItem({
|
|
27
27
|
className,
|
|
28
28
|
...props
|
|
29
|
-
}: React$1.ComponentProps<'div'>):
|
|
29
|
+
}: React$1.ComponentProps<'div'>): react_jsx_runtime109.JSX.Element;
|
|
30
30
|
declare function FormLabel({
|
|
31
31
|
className,
|
|
32
32
|
...props
|
|
33
|
-
}: React$1.ComponentProps<typeof Label>):
|
|
33
|
+
}: React$1.ComponentProps<typeof Label>): react_jsx_runtime109.JSX.Element;
|
|
34
34
|
declare function FormControl({
|
|
35
35
|
asChild,
|
|
36
36
|
...props
|
|
37
37
|
}: React$1.ComponentProps<typeof View> & {
|
|
38
38
|
asChild?: boolean;
|
|
39
|
-
}):
|
|
39
|
+
}): react_jsx_runtime109.JSX.Element;
|
|
40
40
|
declare function FormDescription({
|
|
41
41
|
className,
|
|
42
42
|
...props
|
|
43
|
-
}: React$1.ComponentProps<'p'>):
|
|
43
|
+
}: React$1.ComponentProps<'p'>): react_jsx_runtime109.JSX.Element;
|
|
44
44
|
declare function FormMessage({
|
|
45
45
|
className,
|
|
46
46
|
...props
|
|
47
|
-
}: React$1.ComponentProps<'p'>):
|
|
47
|
+
}: React$1.ComponentProps<'p'>): react_jsx_runtime109.JSX.Element | null;
|
|
48
48
|
//#endregion
|
|
49
49
|
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type UseFormReturn, useFieldArray, useForm, useFormField, zodResolver };
|
|
50
50
|
//# sourceMappingURL=form.d.ts.map
|
package/dist/ui/form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","names":[],"sources":["../../ui/form.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;cAqBM,4BAAI,kDAAA,qBAAA,gBAAA,CAAA,kBAAA,cAAA,UAAA,wBAAA,OAAA,CAAA,GAAA,CAAA;cAaJ,iCACiB,cAAc,2BACrB,UAAU,gBAAgB,UAAU;;GAGjD,gBAAgB,cAAc,WAAM,
|
|
1
|
+
{"version":3,"file":"form.d.ts","names":[],"sources":["../../ui/form.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;cAqBM,4BAAI,kDAAA,qBAAA,gBAAA,CAAA,kBAAA,cAAA,UAAA,wBAAA,OAAA,CAAA,GAAA,CAAA;cAaJ,iCACiB,cAAc,2BACrB,UAAU,gBAAgB,UAAU;;GAGjD,gBAAgB,cAAc,WAAM,oBAAA,CAAA,GAAA,CAAA;cAQjC;EA1BA,OAAmB,EAAA,OAAA;EAAf,OAAA,EAAA,OAAA;EAAA,SAAA,EAAA,OAAA;EAAA,YAAA,EAAA,OAAA;EAAA,KAAA,CAAA,EA+CT,gBAAA,CAAA,UA/CS;EAAA,EAAA,EAAA,MAAA;EAAA,IAAA,EAAA,MAAA;EAAA,UAAA,EAAA,MAAA;EAAe,iBAAA,EAAA,MAAA;EAanB,aAWL,EAAA,MAAA;CAVsB;iBA2Cd,QAAA,CA3C4B;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA2CM,OAAA,CAAM,cA3CZ,CAAA,KAAA,CAAA,CAAA,EA2CiC,oBAAA,CAAA,GAAA,CAAA,OA3CjC;iBAyD5B,SAAA,CAxDiB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA2DvB,OAAA,CAAM,cA3DiB,CAAA,OA2DK,KA3DL,CAAA,CAAA,EA2DW,oBAAA,CAAA,GAAA,CAAA,OA3DX;iBAyEjB,WAAA,CAzEO;EAAA,OAAA;EAAA,GAAA;CAAA,EA4Eb,OAAA,CAAM,cA5EO,CAAA,OA4Ee,IA5Ef,CAAA,GAAA;EAAoC,OAAA,CAAA,EAAA,OAAA;CAAV,CAAA,EA8EzC,oBAAA,CAAA,GAAA,CAAA,OA9EyC;iBAkGjC,eAAA,CA/FU;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA+F+B,OAAA,CAAM,cA/FrC,CAAA,GAAA,CAAA,CAAA,EA+FwD,oBAAA,CAAA,GAAA,CAAA,OA/FxD;iBA4GV,WAAA,CA5GwB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA4Ga,OAAA,CAAM,cA5GnB,CAAA,GAAA,CAAA,CAAA,EA4GsC,oBAAA,CAAA,GAAA,CAAA,OAAA,GA5GtC,IAAA"}
|
package/dist/ui/form.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
import { cn } from "./utils.js";
|
|
5
4
|
import { Label } from "./label.js";
|
|
6
5
|
import { Controller, FormProvider, useFieldArray, useForm, useFormContext, useFormState } from "../node_modules/react-hook-form/dist/index.esm.js";
|
|
@@ -37,7 +36,7 @@ const useFormField = () => {
|
|
|
37
36
|
};
|
|
38
37
|
};
|
|
39
38
|
const FormItemContext = React$1.createContext({});
|
|
40
|
-
function FormItem({ className
|
|
39
|
+
function FormItem({ className, ...props }) {
|
|
41
40
|
const id = React$1.useId();
|
|
42
41
|
return /* @__PURE__ */ jsx(FormItemContext.Provider, {
|
|
43
42
|
value: { id },
|
|
@@ -48,7 +47,7 @@ function FormItem({ className,...props }) {
|
|
|
48
47
|
})
|
|
49
48
|
});
|
|
50
49
|
}
|
|
51
|
-
function FormLabel({ className
|
|
50
|
+
function FormLabel({ className, ...props }) {
|
|
52
51
|
const { error, formItemId } = useFormField();
|
|
53
52
|
return /* @__PURE__ */ jsx(Label, {
|
|
54
53
|
"data-slot": "form-label",
|
|
@@ -58,7 +57,7 @@ function FormLabel({ className,...props }) {
|
|
|
58
57
|
...props
|
|
59
58
|
});
|
|
60
59
|
}
|
|
61
|
-
function FormControl({ asChild = false
|
|
60
|
+
function FormControl({ asChild = false, ...props }) {
|
|
62
61
|
const Component = asChild ? Slot.Text : View;
|
|
63
62
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
64
63
|
return /* @__PURE__ */ jsx(Component, {
|
|
@@ -69,7 +68,7 @@ function FormControl({ asChild = false,...props }) {
|
|
|
69
68
|
...props
|
|
70
69
|
});
|
|
71
70
|
}
|
|
72
|
-
function FormDescription({ className
|
|
71
|
+
function FormDescription({ className, ...props }) {
|
|
73
72
|
const { formDescriptionId } = useFormField();
|
|
74
73
|
return /* @__PURE__ */ jsx("p", {
|
|
75
74
|
"data-slot": "form-description",
|
|
@@ -78,7 +77,7 @@ function FormDescription({ className,...props }) {
|
|
|
78
77
|
...props
|
|
79
78
|
});
|
|
80
79
|
}
|
|
81
|
-
function FormMessage({ className
|
|
80
|
+
function FormMessage({ className, ...props }) {
|
|
82
81
|
const { error, formMessageId } = useFormField();
|
|
83
82
|
const body = error ? String(error?.message ?? "") : props.children;
|
|
84
83
|
if (!body) return null;
|
package/dist/ui/form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","names":["React","RNView"],"sources":["../../ui/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as Slot from '@rn-primitives/slot';\nimport { View as RNView } from 'react-native';\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from 'react-hook-form';\n\nimport { cn } from './utils';\nimport { Label } from './label';\n\nexport { zodResolver } from '@hookform/resolvers/zod';\nexport { useForm, type UseFormReturn, useFieldArray } from 'react-hook-form';\n\nconst Form = FormProvider;\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue\n);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue\n);\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n data-slot=\"form-item\"\n className={cn('grid gap-2', className)}\n {...props}\n />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={cn('data-[error=true]:text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({\n asChild = false,\n ...props\n}: React.ComponentProps<typeof RNView> & {\n asChild?: boolean;\n}) {\n const Component = asChild ? Slot.Text : RNView;\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Component\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n data-slot=\"form-message\"\n id={formMessageId}\n className={cn('text-destructive text-sm', className)}\n {...props}\n >\n {body}\n </p>\n );\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"form.js","names":["React","RNView"],"sources":["../../ui/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as Slot from '@rn-primitives/slot';\nimport { View as RNView } from 'react-native';\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from 'react-hook-form';\n\nimport { cn } from './utils';\nimport { Label } from './label';\n\nexport { zodResolver } from '@hookform/resolvers/zod';\nexport { useForm, type UseFormReturn, useFieldArray } from 'react-hook-form';\n\nconst Form = FormProvider;\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue\n);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue\n);\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n data-slot=\"form-item\"\n className={cn('grid gap-2', className)}\n {...props}\n />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={cn('data-[error=true]:text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({\n asChild = false,\n ...props\n}: React.ComponentProps<typeof RNView> & {\n asChild?: boolean;\n}) {\n const Component = asChild ? Slot.Text : RNView;\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Component\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n data-slot=\"form-message\"\n id={formMessageId}\n className={cn('text-destructive text-sm', className)}\n {...props}\n >\n {body}\n </p>\n );\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAM,OAAO;AASb,MAAM,mBAAmBA,QAAM,cAC7B,EAAE,CACH;AAED,MAAM,aAGJ,EACA,GAAG,YACuC;AAC1C,QACE,oBAAC,iBAAiB;EAAS,OAAO,EAAE,MAAM,MAAM,MAAM;YACpD,oBAAC,cAAW,GAAI,QAAS;GACC;;AAIhC,MAAM,qBAAqB;CACzB,MAAM,eAAeA,QAAM,WAAW,iBAAiB;CACvD,MAAM,cAAcA,QAAM,WAAW,gBAAgB;CACrD,MAAM,EAAE,kBAAkB,gBAAgB;CAC1C,MAAM,YAAY,aAAa,EAAE,MAAM,aAAa,MAAM,CAAC;CAC3D,MAAM,aAAa,cAAc,aAAa,MAAM,UAAU;AAE9D,KAAI,CAAC,aACH,OAAM,IAAI,MAAM,iDAAiD;CAGnE,MAAM,EAAE,OAAO;AAEf,QAAO;EACL;EACA,MAAM,aAAa;EACnB,YAAY,GAAG,GAAG;EAClB,mBAAmB,GAAG,GAAG;EACzB,eAAe,GAAG,GAAG;EACrB,GAAG;EACJ;;AAOH,MAAM,kBAAkBA,QAAM,cAC5B,EAAE,CACH;AAED,SAAS,SAAS,EAAE,WAAW,GAAG,SAAsC;CACtE,MAAM,KAAKA,QAAM,OAAO;AAExB,QACE,oBAAC,gBAAgB;EAAS,OAAO,EAAE,IAAI;YACrC,oBAAC;GACC,aAAU;GACV,WAAW,GAAG,cAAc,UAAU;GACtC,GAAI;IACJ;GACuB;;AAI/B,SAAS,UAAU,EACjB,WACA,GAAG,SACkC;CACrC,MAAM,EAAE,OAAO,eAAe,cAAc;AAE5C,QACE,oBAAC;EACC,aAAU;EACV,cAAY,CAAC,CAAC;EACd,WAAW,GAAG,sCAAsC,UAAU;EAC9D,SAAS;EACT,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,UAAU,OACV,GAAG,SAGF;CACD,MAAM,YAAY,UAAU,KAAK,OAAOC;CACxC,MAAM,EAAE,OAAO,YAAY,mBAAmB,kBAC5C,cAAc;AAEhB,QACE,oBAAC;EACC,aAAU;EACV,IAAI;EACJ,oBACE,CAAC,QACG,GAAG,sBACH,GAAG,kBAAkB,GAAG;EAE9B,gBAAc,CAAC,CAAC;EAChB,GAAI;GACJ;;AAIN,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAoC;CAC3E,MAAM,EAAE,sBAAsB,cAAc;AAE5C,QACE,oBAAC;EACC,aAAU;EACV,IAAI;EACJ,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;GACJ;;AAIN,SAAS,YAAY,EAAE,WAAW,GAAG,SAAoC;CACvE,MAAM,EAAE,OAAO,kBAAkB,cAAc;CAC/C,MAAM,OAAO,QAAQ,OAAO,OAAO,WAAW,GAAG,GAAG,MAAM;AAE1D,KAAI,CAAC,KACH,QAAO;AAGT,QACE,oBAAC;EACC,aAAU;EACV,IAAI;EACJ,WAAW,GAAG,4BAA4B,UAAU;EACpD,GAAI;YAEH;GACC"}
|
package/dist/ui/hover-card.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as react_native52 from "react-native";
|
|
3
|
+
import * as react_jsx_runtime123 from "react/jsx-runtime";
|
|
4
4
|
import * as _rn_primitives_hover_card0 from "@rn-primitives/hover-card";
|
|
5
5
|
|
|
6
6
|
//#region ui/hover-card.d.ts
|
|
7
|
-
declare const HoverCard: React$1.ForwardRefExoticComponent<
|
|
7
|
+
declare const HoverCard: React$1.ForwardRefExoticComponent<react_native52.ViewProps & {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
} & {
|
|
10
10
|
onOpenChange?: (open: boolean) => void;
|
|
11
11
|
openDelay?: number;
|
|
12
12
|
closeDelay?: number;
|
|
13
|
-
} & React$1.RefAttributes<
|
|
14
|
-
declare const HoverCardTrigger: React$1.ForwardRefExoticComponent<Omit<
|
|
13
|
+
} & React$1.RefAttributes<react_native52.View>>;
|
|
14
|
+
declare const HoverCardTrigger: React$1.ForwardRefExoticComponent<Omit<react_native52.PressableProps & React$1.RefAttributes<react_native52.View>, "ref"> & {
|
|
15
15
|
asChild?: boolean;
|
|
16
16
|
} & {
|
|
17
17
|
onKeyDown?: (ev: React$1.KeyboardEvent) => void;
|
|
@@ -24,7 +24,7 @@ declare function HoverCardContent({
|
|
|
24
24
|
...props
|
|
25
25
|
}: _rn_primitives_hover_card0.ContentProps & {
|
|
26
26
|
ref?: React$1.RefObject<_rn_primitives_hover_card0.ContentRef>;
|
|
27
|
-
}):
|
|
27
|
+
}): react_jsx_runtime123.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
30
30
|
//# sourceMappingURL=hover-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.d.ts","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":[],"mappings":";;;;;;cAOM,WAAS,OAAA,CAAA,0BAA0B,cAAA,CAA1B,SAAA;;;;EAAT,SAAA,CAAA,EAAmC,MAAA;EAAA,UAAA,CAAA,EAA1B,MAAA;CAAA,wBAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA;cAET,kBAAgB,OAAA,CAAA,0BAAA,KAA6B,cAAA,CAA7B,cAAA,GAAA,OAAA,CAAA,cAAA,cAAA,CAAA,IAAA;EAFP,OAAA,CAAA,EAAA,OAAA;CAAA,GAAA;EAET,SAAA,CAAA,EAAA,CAAA,EAAA,uBAA6C,EAAA,GAAA,IAAA;EAAA,OAAA,CAAA,EAAA,CAAA,EAA7B,uBAAA,EAAA,GAAA,IAAA;CAAA,wBAAA,uCAAA,CAAA;iBAEb,gBAAA,CAFa;EAAA,SAAA;EAAA,KAAA;EAAA,UAAA;EAAA,GAAA;CAAA,EAOnB,0BAAA,CAAmB,YAPA,GAAA;EAAA,GAAA,CAAA,EAQd,OAAA,CAAM,SARQ,CAQE,0BAAA,CAAmB,UARrB,CAAA;IASrB,
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":[],"mappings":";;;;;;cAOM,WAAS,OAAA,CAAA,0BAA0B,cAAA,CAA1B,SAAA;;;;EAAT,SAAA,CAAA,EAAmC,MAAA;EAAA,UAAA,CAAA,EAA1B,MAAA;CAAA,wBAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA;cAET,kBAAgB,OAAA,CAAA,0BAAA,KAA6B,cAAA,CAA7B,cAAA,GAAA,OAAA,CAAA,cAAA,cAAA,CAAA,IAAA;EAFP,OAAA,CAAA,EAAA,OAAA;CAAA,GAAA;EAET,SAAA,CAAA,EAAA,CAAA,EAAA,uBAA6C,EAAA,GAAA,IAAA;EAAA,OAAA,CAAA,EAAA,CAAA,EAA7B,uBAAA,EAAA,GAAA,IAAA;CAAA,wBAAA,uCAAA,CAAA;iBAEb,gBAAA,CAFa;EAAA,SAAA;EAAA,KAAA;EAAA,UAAA;EAAA,GAAA;CAAA,EAOnB,0BAAA,CAAmB,YAPA,GAAA;EAAA,GAAA,CAAA,EAQd,OAAA,CAAM,SARQ,CAQE,0BAAA,CAAmB,UARrB,CAAA;IASrB,oBAAA,CAAA,GAAA,CAAA"}
|
package/dist/ui/hover-card.js
CHANGED
|
@@ -9,7 +9,7 @@ import * as HoverCardPrimitive from "@rn-primitives/hover-card";
|
|
|
9
9
|
//#region ui/hover-card.tsx
|
|
10
10
|
const HoverCard = HoverCardPrimitive.Root;
|
|
11
11
|
const HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
12
|
-
function HoverCardContent({ className, align = "center", sideOffset = 4
|
|
12
|
+
function HoverCardContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
13
13
|
const { open } = HoverCardPrimitive.useRootContext();
|
|
14
14
|
return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { children: /* @__PURE__ */ jsx(HoverCardPrimitive.Overlay, {
|
|
15
15
|
style: Platform.OS !== "web" ? StyleSheet.absoluteFill : void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.js","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":["import * as HoverCardPrimitive from '@rn-primitives/hover-card';\nimport * as React from 'react';\nimport { Platform, StyleSheet } from 'react-native';\nimport Animated, { FadeIn } from 'react-native-reanimated';\nimport { cn } from './utils';\nimport { TextClassContext } from './text';\n\nconst HoverCard = HoverCardPrimitive.Root;\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\nfunction HoverCardContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: HoverCardPrimitive.ContentProps & {\n ref?: React.RefObject<HoverCardPrimitive.ContentRef>;\n}) {\n const { open } = HoverCardPrimitive.useRootContext();\n return (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Overlay\n style={Platform.OS !== 'web' ? StyleSheet.absoluteFill : undefined}\n >\n <Animated.View entering={FadeIn}>\n <TextClassContext.Provider value=\"text-popover-foreground\">\n <HoverCardPrimitive.Content\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'border-border bg-popover shadow-foreground/5 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 web:cursor-auto web:outline-hidden z-50 w-64 rounded-md border p-4 shadow-md',\n open\n ? 'web:animate-in web:fade-in-0 web:zoom-in-95'\n : 'web:animate-out web:fade-out-0 web:zoom-out-95',\n className\n )}\n {...props}\n />\n </TextClassContext.Provider>\n </Animated.View>\n </HoverCardPrimitive.Overlay>\n </HoverCardPrimitive.Portal>\n );\n}\n\nexport { HoverCard, HoverCardContent, HoverCardTrigger };\n"],"mappings":";;;;;;;;;AAOA,MAAM,YAAY,mBAAmB;AAErC,MAAM,mBAAmB,mBAAmB;AAE5C,SAAS,iBAAiB,EACxB,WACA,QAAQ,UACR,aAAa,
|
|
1
|
+
{"version":3,"file":"hover-card.js","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":["import * as HoverCardPrimitive from '@rn-primitives/hover-card';\nimport * as React from 'react';\nimport { Platform, StyleSheet } from 'react-native';\nimport Animated, { FadeIn } from 'react-native-reanimated';\nimport { cn } from './utils';\nimport { TextClassContext } from './text';\n\nconst HoverCard = HoverCardPrimitive.Root;\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\nfunction HoverCardContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: HoverCardPrimitive.ContentProps & {\n ref?: React.RefObject<HoverCardPrimitive.ContentRef>;\n}) {\n const { open } = HoverCardPrimitive.useRootContext();\n return (\n <HoverCardPrimitive.Portal>\n <HoverCardPrimitive.Overlay\n style={Platform.OS !== 'web' ? StyleSheet.absoluteFill : undefined}\n >\n <Animated.View entering={FadeIn}>\n <TextClassContext.Provider value=\"text-popover-foreground\">\n <HoverCardPrimitive.Content\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'border-border bg-popover shadow-foreground/5 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 web:cursor-auto web:outline-hidden z-50 w-64 rounded-md border p-4 shadow-md',\n open\n ? 'web:animate-in web:fade-in-0 web:zoom-in-95'\n : 'web:animate-out web:fade-out-0 web:zoom-out-95',\n className\n )}\n {...props}\n />\n </TextClassContext.Provider>\n </Animated.View>\n </HoverCardPrimitive.Overlay>\n </HoverCardPrimitive.Portal>\n );\n}\n\nexport { HoverCard, HoverCardContent, HoverCardTrigger };\n"],"mappings":";;;;;;;;;AAOA,MAAM,YAAY,mBAAmB;AAErC,MAAM,mBAAmB,mBAAmB;AAE5C,SAAS,iBAAiB,EACxB,WACA,QAAQ,UACR,aAAa,GACb,GAAG,SAGF;CACD,MAAM,EAAE,SAAS,mBAAmB,gBAAgB;AACpD,QACE,oBAAC,mBAAmB,oBAClB,oBAAC,mBAAmB;EAClB,OAAO,SAAS,OAAO,QAAQ,WAAW,eAAe;YAEzD,oBAAC,SAAS;GAAK,UAAU;aACvB,oBAAC,iBAAiB;IAAS,OAAM;cAC/B,oBAAC,mBAAmB;KACX;KACK;KACZ,WAAW,GACT,yRACA,OACI,gDACA,kDACJ,UACD;KACD,GAAI;MACJ;KACwB;IACd;GACW,GACH"}
|
package/dist/ui/input.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { TextInput, TextInputProps } from "react-native";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime125 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region ui/input.d.ts
|
|
6
6
|
declare function Input({
|
|
@@ -9,7 +9,7 @@ declare function Input({
|
|
|
9
9
|
...props
|
|
10
10
|
}: TextInputProps & {
|
|
11
11
|
ref?: React$1.RefObject<TextInput>;
|
|
12
|
-
}):
|
|
12
|
+
}): react_jsx_runtime125.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { Input };
|
|
15
15
|
//# sourceMappingURL=input.d.ts.map
|
package/dist/ui/input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","names":[],"sources":["../../ui/input.tsx"],"sourcesContent":[],"mappings":";;;;;iBAIS,KAAA;;;;GAIN;QACK,OAAA,CAAM,UAAU;IACvB,
|
|
1
|
+
{"version":3,"file":"input.d.ts","names":[],"sources":["../../ui/input.tsx"],"sourcesContent":[],"mappings":";;;;;iBAIS,KAAA;;;;GAIN;QACK,OAAA,CAAM,UAAU;IACvB,oBAAA,CAAA,GAAA,CAAA"}
|
package/dist/ui/input.js
CHANGED
|
@@ -4,7 +4,7 @@ import { TextInput } from "react-native";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region ui/input.tsx
|
|
7
|
-
function Input({ className, placeholderClassName
|
|
7
|
+
function Input({ className, placeholderClassName, ...props }) {
|
|
8
8
|
return /* @__PURE__ */ jsx(TextInput, {
|
|
9
9
|
className: cn("native:h-12 native:text-lg native:leading-tight border-input bg-background text-foreground placeholder:text-muted-foreground web:flex web:w-full web:py-2 web:ring-offset-background web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 h-10 rounded-md border px-3 text-base file:border-0 file:bg-transparent file:font-medium lg:text-sm", props.editable === false && "web:cursor-not-allowed opacity-50", className),
|
|
10
10
|
placeholderClassName: cn("text-muted-foreground", placeholderClassName),
|
package/dist/ui/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","names":[],"sources":["../../ui/input.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TextInput, type TextInputProps } from 'react-native';\nimport { cn } from './utils';\n\nfunction Input({\n className,\n placeholderClassName,\n ...props\n}: TextInputProps & {\n ref?: React.RefObject<TextInput>;\n}) {\n return (\n <TextInput\n className={cn(\n 'native:h-12 native:text-lg native:leading-tight border-input bg-background text-foreground placeholder:text-muted-foreground web:flex web:w-full web:py-2 web:ring-offset-background web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 h-10 rounded-md border px-3 text-base file:border-0 file:bg-transparent file:font-medium lg:text-sm',\n props.editable === false && 'web:cursor-not-allowed opacity-50',\n className\n )}\n placeholderClassName={cn('text-muted-foreground', placeholderClassName)}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":";;;;;;AAIA,SAAS,MAAM,EACb,WACA,
|
|
1
|
+
{"version":3,"file":"input.js","names":[],"sources":["../../ui/input.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TextInput, type TextInputProps } from 'react-native';\nimport { cn } from './utils';\n\nfunction Input({\n className,\n placeholderClassName,\n ...props\n}: TextInputProps & {\n ref?: React.RefObject<TextInput>;\n}) {\n return (\n <TextInput\n className={cn(\n 'native:h-12 native:text-lg native:leading-tight border-input bg-background text-foreground placeholder:text-muted-foreground web:flex web:w-full web:py-2 web:ring-offset-background web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 h-10 rounded-md border px-3 text-base file:border-0 file:bg-transparent file:font-medium lg:text-sm',\n props.editable === false && 'web:cursor-not-allowed opacity-50',\n className\n )}\n placeholderClassName={cn('text-muted-foreground', placeholderClassName)}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":";;;;;;AAIA,SAAS,MAAM,EACb,WACA,sBACA,GAAG,SAGF;AACD,QACE,oBAAC;EACC,WAAW,GACT,kZACA,MAAM,aAAa,SAAS,qCAC5B,UACD;EACD,sBAAsB,GAAG,yBAAyB,qBAAqB;EACvE,GAAI;GACJ"}
|
package/dist/ui/label.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime126 from "react/jsx-runtime";
|
|
2
2
|
import * as LabelPrimitive from "@rn-primitives/label";
|
|
3
3
|
|
|
4
4
|
//#region ui/label.d.ts
|
|
@@ -10,7 +10,7 @@ declare function Label({
|
|
|
10
10
|
onPressOut,
|
|
11
11
|
disabled,
|
|
12
12
|
...props
|
|
13
|
-
}: LabelPrimitive.TextProps & React.RefAttributes<LabelPrimitive.TextRef>):
|
|
13
|
+
}: LabelPrimitive.TextProps & React.RefAttributes<LabelPrimitive.TextRef>): react_jsx_runtime126.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Label };
|
|
16
16
|
//# sourceMappingURL=label.d.ts.map
|
package/dist/ui/label.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","names":[],"sources":["../../ui/label.tsx"],"sourcesContent":[],"mappings":";;;;iBAIS,KAAA;;;;;;;;GAQN,cAAA,CAAe,YAAY,KAAA,CAAM,cAAc,cAAA,CAAe,WAAQ,
|
|
1
|
+
{"version":3,"file":"label.d.ts","names":[],"sources":["../../ui/label.tsx"],"sourcesContent":[],"mappings":";;;;iBAIS,KAAA;;;;;;;;GAQN,cAAA,CAAe,YAAY,KAAA,CAAM,cAAc,cAAA,CAAe,WAAQ,oBAAA,CAAA,GAAA,CAAA"}
|
package/dist/ui/label.js
CHANGED
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import * as LabelPrimitive from "@rn-primitives/label";
|
|
5
5
|
|
|
6
6
|
//#region ui/label.tsx
|
|
7
|
-
function Label({ className, onPress, onLongPress, onPressIn, onPressOut, disabled
|
|
7
|
+
function Label({ className, onPress, onLongPress, onPressIn, onPressOut, disabled, ...props }) {
|
|
8
8
|
return /* @__PURE__ */ jsx(LabelPrimitive.Root, {
|
|
9
9
|
className: cn("flex flex-row items-center gap-2 select-none", Platform.select({ web: "cursor-default leading-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50" }), disabled && "opacity-50"),
|
|
10
10
|
onPress,
|
package/dist/ui/label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","names":[],"sources":["../../ui/label.tsx"],"sourcesContent":["import { cn } from './utils';\nimport * as LabelPrimitive from '@rn-primitives/label';\nimport { Platform } from 'react-native';\n\nfunction Label({\n className,\n onPress,\n onLongPress,\n onPressIn,\n onPressOut,\n disabled,\n ...props\n}: LabelPrimitive.TextProps & React.RefAttributes<LabelPrimitive.TextRef>) {\n return (\n <LabelPrimitive.Root\n className={cn(\n 'flex flex-row items-center gap-2 select-none',\n Platform.select({\n web: 'cursor-default leading-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n }),\n disabled && 'opacity-50'\n )}\n onPress={onPress}\n onLongPress={onLongPress}\n onPressIn={onPressIn}\n onPressOut={onPressOut}\n disabled={disabled}\n >\n <LabelPrimitive.Text\n className={cn(\n 'text-foreground text-sm font-medium',\n Platform.select({ web: 'leading-none' }),\n className\n )}\n {...props}\n />\n </LabelPrimitive.Root>\n );\n}\n\nexport { Label };\n"],"mappings":";;;;;;AAIA,SAAS,MAAM,EACb,WACA,SACA,aACA,WACA,YACA,
|
|
1
|
+
{"version":3,"file":"label.js","names":[],"sources":["../../ui/label.tsx"],"sourcesContent":["import { cn } from './utils';\nimport * as LabelPrimitive from '@rn-primitives/label';\nimport { Platform } from 'react-native';\n\nfunction Label({\n className,\n onPress,\n onLongPress,\n onPressIn,\n onPressOut,\n disabled,\n ...props\n}: LabelPrimitive.TextProps & React.RefAttributes<LabelPrimitive.TextRef>) {\n return (\n <LabelPrimitive.Root\n className={cn(\n 'flex flex-row items-center gap-2 select-none',\n Platform.select({\n web: 'cursor-default leading-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n }),\n disabled && 'opacity-50'\n )}\n onPress={onPress}\n onLongPress={onLongPress}\n onPressIn={onPressIn}\n onPressOut={onPressOut}\n disabled={disabled}\n >\n <LabelPrimitive.Text\n className={cn(\n 'text-foreground text-sm font-medium',\n Platform.select({ web: 'leading-none' }),\n className\n )}\n {...props}\n />\n </LabelPrimitive.Root>\n );\n}\n\nexport { Label };\n"],"mappings":";;;;;;AAIA,SAAS,MAAM,EACb,WACA,SACA,aACA,WACA,YACA,UACA,GAAG,SACsE;AACzE,QACE,oBAAC,eAAe;EACd,WAAW,GACT,gDACA,SAAS,OAAO,EACd,KAAK,8KACN,CAAC,EACF,YAAY,aACb;EACQ;EACI;EACF;EACC;EACF;YAEV,oBAAC,eAAe;GACd,WAAW,GACT,uCACA,SAAS,OAAO,EAAE,KAAK,gBAAgB,CAAC,EACxC,UACD;GACD,GAAI;IACJ;GACkB"}
|
package/dist/ui/link.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime130 from "react/jsx-runtime";
|
|
3
3
|
import { Link as Link$1, LinkProps } from "expo-router";
|
|
4
4
|
|
|
5
5
|
//#region ui/link.d.ts
|
|
@@ -8,7 +8,7 @@ declare function Link({
|
|
|
8
8
|
...props
|
|
9
9
|
}: LinkProps & {
|
|
10
10
|
ref?: React$1.RefObject<typeof Link$1>;
|
|
11
|
-
}):
|
|
11
|
+
}): react_jsx_runtime130.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { Link };
|
|
14
14
|
//# sourceMappingURL=link.d.ts.map
|
package/dist/ui/link.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","names":[],"sources":["../../ui/link.tsx"],"sourcesContent":[],"mappings":";;;;;iBAIS,IAAA;;;GAGN;QACK,OAAA,CAAM,iBAAiB;IAC9B,
|
|
1
|
+
{"version":3,"file":"link.d.ts","names":[],"sources":["../../ui/link.tsx"],"sourcesContent":[],"mappings":";;;;;iBAIS,IAAA;;;GAGN;QACK,OAAA,CAAM,iBAAiB;IAC9B,oBAAA,CAAA,GAAA,CAAA"}
|
package/dist/ui/link.js
CHANGED
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { Link as Link$1 } from "expo-router";
|
|
5
5
|
|
|
6
6
|
//#region ui/link.tsx
|
|
7
|
-
function Link({ className
|
|
7
|
+
function Link({ className, ...props }) {
|
|
8
8
|
return /* @__PURE__ */ jsx(Link$1, {
|
|
9
9
|
className: cn("className=\"text-primary underline\"", className),
|
|
10
10
|
...props
|
package/dist/ui/link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","names":["LinkExpo"],"sources":["../../ui/link.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Link as LinkExpo, type LinkProps } from 'expo-router';\nimport { cn } from './utils';\n\nfunction Link({\n className,\n ...props\n}: LinkProps & {\n ref?: React.RefObject<typeof LinkExpo>;\n}) {\n return (\n <LinkExpo\n className={cn('className=\"text-primary underline\"', className)}\n {...props}\n />\n );\n}\n\nexport { Link };\n"],"mappings":";;;;;;AAIA,SAAS,KAAK,EACZ,
|
|
1
|
+
{"version":3,"file":"link.js","names":["LinkExpo"],"sources":["../../ui/link.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Link as LinkExpo, type LinkProps } from 'expo-router';\nimport { cn } from './utils';\n\nfunction Link({\n className,\n ...props\n}: LinkProps & {\n ref?: React.RefObject<typeof LinkExpo>;\n}) {\n return (\n <LinkExpo\n className={cn('className=\"text-primary underline\"', className)}\n {...props}\n />\n );\n}\n\nexport { Link };\n"],"mappings":";;;;;;AAIA,SAAS,KAAK,EACZ,WACA,GAAG,SAGF;AACD,QACE,oBAACA;EACC,WAAW,GAAG,wCAAsC,UAAU;EAC9D,GAAI;GACJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonProps } from "./button.js";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime127 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region ui/loading-button.d.ts
|
|
6
6
|
interface LoadingButtonProps extends ButtonProps {
|
|
@@ -14,7 +14,7 @@ declare function LoadingButton({
|
|
|
14
14
|
children,
|
|
15
15
|
disabled,
|
|
16
16
|
...props
|
|
17
|
-
}: LoadingButtonProps):
|
|
17
|
+
}: LoadingButtonProps): react_jsx_runtime127.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { LoadingButton };
|
|
20
20
|
//# sourceMappingURL=loading-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading-button.d.ts","names":[],"sources":["../../ui/loading-button.tsx"],"sourcesContent":[],"mappings":";;;;;UAOU,kBAAA,SAA2B;;;EAA3B,QAAA,EAGE,KAAA,CAAM,SAHW;AAM7B;AACE,iBADc,aAAA,CACd;EAAA,SAAA;EAAA,WAAA;EAAA,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAKC,kBALD,CAAA,EAKmB,
|
|
1
|
+
{"version":3,"file":"loading-button.d.ts","names":[],"sources":["../../ui/loading-button.tsx"],"sourcesContent":[],"mappings":";;;;;UAOU,kBAAA,SAA2B;;;EAA3B,QAAA,EAGE,KAAA,CAAM,SAHW;AAM7B;AACE,iBADc,aAAA,CACd;EAAA,SAAA;EAAA,WAAA;EAAA,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAKC,kBALD,CAAA,EAKmB,oBAAA,CAAA,GAAA,CAAA,OALnB"}
|
|
@@ -6,7 +6,7 @@ import { ActivityIndicator } from "react-native";
|
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region ui/loading-button.tsx
|
|
9
|
-
function LoadingButton({ isLoading = false, loadingText, children, disabled
|
|
9
|
+
function LoadingButton({ isLoading = false, loadingText, children, disabled, ...props }) {
|
|
10
10
|
return /* @__PURE__ */ jsx(Button, {
|
|
11
11
|
disabled: disabled || isLoading,
|
|
12
12
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading-button.js","names":["Text"],"sources":["../../ui/loading-button.tsx"],"sourcesContent":["import React from 'react';\nimport { ActivityIndicator } from 'react-native';\nimport type { ButtonProps } from './button';\nimport { Button } from './button';\nimport { Text } from './text';\nimport { HStack } from './stack';\n\ninterface LoadingButtonProps extends ButtonProps {\n isLoading?: boolean;\n loadingText?: string;\n children: React.ReactNode;\n}\n\nexport function LoadingButton({\n isLoading = false,\n loadingText,\n children,\n disabled,\n ...props\n}: LoadingButtonProps) {\n return (\n <Button disabled={disabled || isLoading} {...props}>\n {isLoading ? (\n <HStack className=\"items-center gap-x-2\">\n <ActivityIndicator\n size=\"small\"\n // color={props.variant === 'outline' ? '#6b7280' : '#ffffff'}\n />\n <Text>{loadingText || 'Loading...'}</Text>\n </HStack>\n ) : (\n children\n )}\n </Button>\n );\n}\n"],"mappings":";;;;;;;;AAaA,SAAgB,cAAc,EAC5B,YAAY,OACZ,aACA,UACA,
|
|
1
|
+
{"version":3,"file":"loading-button.js","names":["Text"],"sources":["../../ui/loading-button.tsx"],"sourcesContent":["import React from 'react';\nimport { ActivityIndicator } from 'react-native';\nimport type { ButtonProps } from './button';\nimport { Button } from './button';\nimport { Text } from './text';\nimport { HStack } from './stack';\n\ninterface LoadingButtonProps extends ButtonProps {\n isLoading?: boolean;\n loadingText?: string;\n children: React.ReactNode;\n}\n\nexport function LoadingButton({\n isLoading = false,\n loadingText,\n children,\n disabled,\n ...props\n}: LoadingButtonProps) {\n return (\n <Button disabled={disabled || isLoading} {...props}>\n {isLoading ? (\n <HStack className=\"items-center gap-x-2\">\n <ActivityIndicator\n size=\"small\"\n // color={props.variant === 'outline' ? '#6b7280' : '#ffffff'}\n />\n <Text>{loadingText || 'Loading...'}</Text>\n </HStack>\n ) : (\n children\n )}\n </Button>\n );\n}\n"],"mappings":";;;;;;;;AAaA,SAAgB,cAAc,EAC5B,YAAY,OACZ,aACA,UACA,UACA,GAAG,SACkB;AACrB,QACE,oBAAC;EAAO,UAAU,YAAY;EAAW,GAAI;YAC1C,YACC,qBAAC;GAAO,WAAU;cAChB,oBAAC,qBACC,MAAK,UAEL,EACF,oBAACA,oBAAM,eAAe,eAAoB;IACnC,GAET;GAEK"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime131 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region ui/loading-overlay.d.ts
|
|
4
4
|
interface LoadingOverlayProps {
|
|
@@ -10,7 +10,7 @@ declare function LoadingOverlay({
|
|
|
10
10
|
isVisible,
|
|
11
11
|
title,
|
|
12
12
|
subtitle
|
|
13
|
-
}: LoadingOverlayProps):
|
|
13
|
+
}: LoadingOverlayProps): react_jsx_runtime131.JSX.Element | null;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { LoadingOverlay };
|
|
16
16
|
//# sourceMappingURL=loading-overlay.d.ts.map
|