@lssm/lib.ui-kit-web 1.7.4 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -0
- package/dist/node_modules/sonner/dist/index.js +1 -2
- package/dist/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/accordion.d.ts +5 -5
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +3 -4
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/alert-dialog.d.ts +12 -12
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +8 -9
- package/dist/ui/alert-dialog.js.map +1 -1
- package/dist/ui/alert.d.ts +6 -6
- 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 +2 -2
- package/dist/ui/aspect-ratio.js +0 -1
- package/dist/ui/aspect-ratio.js.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 -4
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge.d.ts +5 -5
- package/dist/ui/badge.d.ts.map +1 -1
- 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 +6 -6
- package/dist/ui/button.js +1 -1
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/calendar.d.ts +3 -3
- package/dist/ui/calendar.js +5 -6
- package/dist/ui/calendar.js.map +1 -1
- package/dist/ui/card.d.ts +8 -8
- package/dist/ui/card.js +7 -7
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/carousel.d.ts +6 -6
- package/dist/ui/carousel.js +5 -6
- package/dist/ui/carousel.js.map +1 -1
- package/dist/ui/checkbox.d.ts +2 -2
- package/dist/ui/checkbox.js +1 -2
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/collapsible.d.ts +4 -4
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +0 -1
- package/dist/ui/collapsible.js.map +1 -1
- package/dist/ui/command.d.ts +10 -10
- package/dist/ui/command.js +8 -9
- package/dist/ui/command.js.map +1 -1
- package/dist/ui/confirm-dialog.d.ts +2 -2
- package/dist/ui/context-menu.d.ts +2 -2
- package/dist/ui/context-menu.js +9 -10
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/cta.d.ts +1 -1
- package/dist/ui/cta.js +1 -1
- package/dist/ui/cta.js.map +1 -1
- package/dist/ui/date-picker.d.ts +2 -2
- package/dist/ui/date-picker.js +0 -1
- package/dist/ui/date-picker.js.map +1 -1
- package/dist/ui/date-range-picker.d.ts +2 -2
- package/dist/ui/date-range-picker.js +0 -1
- package/dist/ui/date-range-picker.js.map +1 -1
- package/dist/ui/datetime-picker.d.ts +2 -2
- package/dist/ui/datetime-picker.d.ts.map +1 -1
- package/dist/ui/datetime-picker.js +0 -1
- package/dist/ui/datetime-picker.js.map +1 -1
- package/dist/ui/dialog.d.ts +11 -11
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +6 -7
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/drawer.d.ts +11 -11
- package/dist/ui/drawer.js +6 -7
- package/dist/ui/drawer.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 -10
- 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/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 +4 -5
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/hover-card.d.ts +4 -4
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +1 -2
- package/dist/ui/hover-card.js.map +1 -1
- package/dist/ui/input-group.d.ts +10 -10
- package/dist/ui/input-group.d.ts.map +1 -1
- package/dist/ui/input-group.js +6 -7
- package/dist/ui/input-group.js.map +1 -1
- package/dist/ui/input-otp.d.ts +2 -2
- package/dist/ui/input-otp.js +3 -4
- package/dist/ui/input-otp.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 -2
- package/dist/ui/label.js.map +1 -1
- package/dist/ui/link.d.ts +3 -3
- package/dist/ui/link.js +1 -1
- package/dist/ui/link.js.map +1 -1
- package/dist/ui/live-region.d.ts +2 -2
- package/dist/ui/live-region.d.ts.map +1 -1
- package/dist/ui/live-region.js +0 -1
- package/dist/ui/live-region.js.map +1 -1
- package/dist/ui/loading-button.d.ts +2 -2
- package/dist/ui/loading-button.js +1 -1
- package/dist/ui/loading-button.js.map +1 -1
- package/dist/ui/map/MapBase.d.ts +2 -2
- package/dist/ui/map/MapBase.d.ts.map +1 -1
- package/dist/ui/map/MapBase.js +0 -1
- package/dist/ui/map/MapBase.js.map +1 -1
- package/dist/ui/map/MapGeoJsonOverlay.d.ts +2 -2
- package/dist/ui/map/MapGeoJsonOverlay.d.ts.map +1 -1
- package/dist/ui/map/MapGeoJsonOverlay.js +0 -1
- package/dist/ui/map/MapGeoJsonOverlay.js.map +1 -1
- package/dist/ui/map/MapHeatmapH3.d.ts +2 -2
- package/dist/ui/map/MapHeatmapH3.d.ts.map +1 -1
- package/dist/ui/map/MapHeatmapH3.js +0 -1
- package/dist/ui/map/MapHeatmapH3.js.map +1 -1
- package/dist/ui/map/MapMarkers.d.ts +2 -2
- package/dist/ui/map/MapMarkers.d.ts.map +1 -1
- package/dist/ui/map/MapMarkers.js +0 -1
- package/dist/ui/map/MapMarkers.js.map +1 -1
- package/dist/ui/marketing/FeatureGrid.d.ts +2 -2
- package/dist/ui/marketing/FeatureGrid.d.ts.map +1 -1
- package/dist/ui/marketing/Hero.d.ts +2 -2
- package/dist/ui/marketing/Hero.d.ts.map +1 -1
- package/dist/ui/marketing/PricingTable.d.ts +2 -2
- package/dist/ui/marketing/PricingTable.d.ts.map +1 -1
- package/dist/ui/menubar.d.ts +17 -17
- package/dist/ui/menubar.js +11 -12
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/molecules/Autocomplete/index.d.ts +2 -2
- package/dist/ui/molecules/Autocomplete/index.js +0 -1
- package/dist/ui/molecules/Autocomplete/index.js.map +1 -1
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +1 -1
- package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +1 -1
- package/dist/ui/molecules/SkeletonList.d.ts +2 -2
- package/dist/ui/molecules/SkeletonList.d.ts.map +1 -1
- package/dist/ui/nav-layout.d.ts +7 -7
- package/dist/ui/nav-layout.d.ts.map +1 -1
- package/dist/ui/nav-layout.js +1 -1
- package/dist/ui/nav-layout.js.map +1 -1
- package/dist/ui/navigation-menu.d.ts +11 -11
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +8 -8
- 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.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 +2 -2
- package/dist/ui/page-header.d.ts.map +1 -1
- package/dist/ui/pagination.d.ts +6 -6
- package/dist/ui/pagination.js +7 -7
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/popover.d.ts +5 -5
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +1 -2
- 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 -2
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/radio-group.d.ts +3 -3
- package/dist/ui/radio-group.d.ts.map +1 -1
- package/dist/ui/radio-group.js +2 -3
- package/dist/ui/radio-group.js.map +1 -1
- package/dist/ui/resizable.d.ts +7 -7
- package/dist/ui/resizable.d.ts.map +1 -1
- package/dist/ui/resizable.js +2 -3
- package/dist/ui/resizable.js.map +1 -1
- package/dist/ui/route-announcer.d.ts +2 -2
- package/dist/ui/route-announcer.d.ts.map +1 -1
- package/dist/ui/route-announcer.js +0 -1
- package/dist/ui/route-announcer.js.map +1 -1
- package/dist/ui/scroll-area.d.ts +3 -3
- package/dist/ui/scroll-area.d.ts.map +1 -1
- package/dist/ui/scroll-area.js +2 -3
- package/dist/ui/scroll-area.js.map +1 -1
- package/dist/ui/section.d.ts +2 -2
- package/dist/ui/section.d.ts.map +1 -1
- package/dist/ui/section.js +1 -1
- package/dist/ui/section.js.map +1 -1
- package/dist/ui/select.d.ts +11 -11
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +7 -8
- 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 -2
- package/dist/ui/separator.js.map +1 -1
- package/dist/ui/sheet.d.ts +9 -9
- package/dist/ui/sheet.js +6 -7
- package/dist/ui/sheet.js.map +1 -1
- package/dist/ui/sidebar.d.ts +28 -28
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +23 -24
- package/dist/ui/sidebar.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/skip-link.d.ts +2 -2
- package/dist/ui/skip-link.js +1 -1
- package/dist/ui/skip-link.js.map +1 -1
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/slider.js +1 -2
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/sonner.d.ts +2 -2
- package/dist/ui/sonner.d.ts.map +1 -1
- package/dist/ui/sonner.js +0 -1
- package/dist/ui/sonner.js.map +1 -1
- package/dist/ui/stack.d.ts +19 -19
- 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/stat-card-group.d.ts +2 -2
- package/dist/ui/stat-card-group.d.ts.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.d.ts.map +1 -1
- package/dist/ui/switch.js +1 -2
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.d.ts +9 -9
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +8 -9
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tabs.d.ts +5 -5
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +4 -5
- 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.d.ts +2 -2
- package/dist/ui/textarea.d.ts.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/time-picker.js +0 -1
- package/dist/ui/time-picker.js.map +1 -1
- package/dist/ui/toast.d.ts +2 -2
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +6 -7
- package/dist/ui/toast.js.map +1 -1
- package/dist/ui/toaster.d.ts +2 -2
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js +1 -2
- package/dist/ui/toaster.js.map +1 -1
- package/dist/ui/toggle-group.d.ts +3 -3
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +2 -3
- package/dist/ui/toggle-group.js.map +1 -1
- package/dist/ui/toggle.d.ts +4 -4
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +1 -2
- package/dist/ui/toggle.js.map +1 -1
- package/dist/ui/tooltip.d.ts +5 -5
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +2 -3
- 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/use-toast.d.ts.map +1 -1
- package/dist/ui/use-toast.js +0 -1
- package/dist/ui/use-toast.js.map +1 -1
- package/dist/ui/usecases/UseCaseCard.d.ts +2 -2
- package/dist/ui/usecases/UserStoryCard.d.ts +2 -2
- package/dist/ui/visually-hidden.js +1 -1
- package/dist/ui/visually-hidden.js.map +1 -1
- package/package.json +8 -9
- package/dist/ui/sidebar-right.d.ts +0 -165
- package/dist/ui/sidebar-right.d.ts.map +0 -1
- package/dist/ui/sidebar-right.js +0 -380
- package/dist/ui/sidebar-right.js.map +0 -1
package/dist/ui/field.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","names":[],"sources":["../../ui/field.tsx"],"sourcesContent":[],"mappings":";;;;;;iBASS,QAAA;;;GAAkC,KAAA,CAAM,6BAA0B,
|
|
1
|
+
{"version":3,"file":"field.d.ts","names":[],"sources":["../../ui/field.tsx"],"sourcesContent":[],"mappings":";;;;;;iBASS,QAAA;;;GAAkC,KAAA,CAAM,6BAA0B,mBAAA,CAAA,GAAA,CAAA;iBAclE,WAAA;;;;GAIN,KAAA,CAAM;;IAA2D,mBAAA,CAAA,GAAA,CAAA;AArBpC,iBAqCvB,UAAA,CAlCQ;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAkC4B,KAAA,CAAM,cAlClC,CAAA,KAAA,CAAA,CAAA,EAkCuD,mBAAA,CAAA,GAAA,CAAA,OAlCvD;cA+CX,aA/Cc,EAAA,CAAA,KAAuD,CAAvD,EAAA,CAAA;EAAuB,WAAM,CAAA,EAAA,UAAA,GAAA,YAAA,GAAA,YAAA,GAAA,IAAA,GAAA,SAAA;CAA0B,GAqE1E,+BAAA,CAAA,SArE0E,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;iBAuElE,KAAA,CAvEkE;EAAA,SAAA;EAAA,WAAA;EAAA,GAAA;AAAA,CAAA,EA2ExE,KAAA,CAAM,cA3EkE,CAAA,KAAA,CAAA,GA2E1C,YA3E0C,CAAA,OA2EtB,aA3EsB,CAAA,CAAA,EA2ER,mBAAA,CAAA,GAAA,CAAA,OA3EQ;AAAA,iBAuFlE,YAAA,CAzEW;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAyE2B,KAAA,CAAM,cAzEjC,CAAA,KAAA,CAAA,CAAA,EAyEsD,mBAAA,CAAA,GAAA,CAAA,OAzEtD;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,KAAA,CAAM,cAtGjD,CAAA,KAAA,CAAA,CAAA,EAsGsE,mBAAA,CAAA,GAAA,CAAA,OAtGtE;iBAmHO,gBAAA,CAjHA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAiH0C,KAAA,CAAM,cAjHhD,CAAA,GAAA,CAAA,CAAA,EAiHmE,mBAAA,CAAA,GAAA,CAAA,OAjHnE;iBAgIA,cAAA,CAhI2D;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAoIjE,KAAA,CAAM,cApI2D,CAAA,KAAA,CAAA,GAAA;EAAA,QAAA,CAAA,EAqIvD,KAAA,CAAM,SArIiD;AAAA,CAAA,CAAA,EAsInE,mBAAA,CAAA,GAAA,CAAA,OAtHkB;iBA8IV,UAAA,CA9Ia;EAAA,SAAA;EAAA,QAAA;EAAA,MAAA;EAAA,GAAA;AAAkD,CAAlD,EAmJnB,KAAA,CAAM,cAnJa,CAAA,KAAA,CAAA,GAAA;EAAuB,MAAM,CAAA,EAAA,CAAA;IAAqB,OAAA,CAAA,EAAA,MAAA;EAAA,CAAA,GAAA,SAAA,CAAA,EAAA;AAAA,CAAA,CAAA,EAqJvE,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 { Label } from "./label.js";
|
|
6
5
|
import { Separator } from "./separator.js";
|
|
@@ -9,14 +8,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
8
|
import { cva } from "class-variance-authority";
|
|
10
9
|
|
|
11
10
|
//#region ui/field.tsx
|
|
12
|
-
function FieldSet({ className
|
|
11
|
+
function FieldSet({ className, ...props }) {
|
|
13
12
|
return /* @__PURE__ */ jsx("fieldset", {
|
|
14
13
|
"data-slot": "field-set",
|
|
15
14
|
className: cn("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
|
|
16
15
|
...props
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
|
-
function FieldLegend({ className, variant = "legend"
|
|
18
|
+
function FieldLegend({ className, variant = "legend", ...props }) {
|
|
20
19
|
return /* @__PURE__ */ jsx("legend", {
|
|
21
20
|
"data-slot": "field-legend",
|
|
22
21
|
"data-variant": variant,
|
|
@@ -24,7 +23,7 @@ function FieldLegend({ className, variant = "legend",...props }) {
|
|
|
24
23
|
...props
|
|
25
24
|
});
|
|
26
25
|
}
|
|
27
|
-
function FieldGroup({ className
|
|
26
|
+
function FieldGroup({ className, ...props }) {
|
|
28
27
|
return /* @__PURE__ */ jsx("div", {
|
|
29
28
|
"data-slot": "field-group",
|
|
30
29
|
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),
|
|
@@ -47,7 +46,7 @@ const fieldVariants = cva("group/field flex w-full gap-3 data-[invalid=true]:tex
|
|
|
47
46
|
} },
|
|
48
47
|
defaultVariants: { orientation: "vertical" }
|
|
49
48
|
});
|
|
50
|
-
function Field({ className, orientation = "vertical"
|
|
49
|
+
function Field({ className, orientation = "vertical", ...props }) {
|
|
51
50
|
return /* @__PURE__ */ jsx("div", {
|
|
52
51
|
role: "group",
|
|
53
52
|
"data-slot": "field",
|
|
@@ -56,35 +55,35 @@ function Field({ className, orientation = "vertical",...props }) {
|
|
|
56
55
|
...props
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
|
-
function FieldContent({ className
|
|
58
|
+
function FieldContent({ className, ...props }) {
|
|
60
59
|
return /* @__PURE__ */ jsx("div", {
|
|
61
60
|
"data-slot": "field-content",
|
|
62
61
|
className: cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className),
|
|
63
62
|
...props
|
|
64
63
|
});
|
|
65
64
|
}
|
|
66
|
-
function FieldLabel({ className
|
|
65
|
+
function FieldLabel({ className, ...props }) {
|
|
67
66
|
return /* @__PURE__ */ jsx(Label, {
|
|
68
67
|
"data-slot": "field-label",
|
|
69
68
|
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),
|
|
70
69
|
...props
|
|
71
70
|
});
|
|
72
71
|
}
|
|
73
|
-
function FieldTitle({ className
|
|
72
|
+
function FieldTitle({ className, ...props }) {
|
|
74
73
|
return /* @__PURE__ */ jsx("div", {
|
|
75
74
|
"data-slot": "field-label",
|
|
76
75
|
className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", className),
|
|
77
76
|
...props
|
|
78
77
|
});
|
|
79
78
|
}
|
|
80
|
-
function FieldDescription({ className
|
|
79
|
+
function FieldDescription({ className, ...props }) {
|
|
81
80
|
return /* @__PURE__ */ jsx("p", {
|
|
82
81
|
"data-slot": "field-description",
|
|
83
82
|
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),
|
|
84
83
|
...props
|
|
85
84
|
});
|
|
86
85
|
}
|
|
87
|
-
function FieldSeparator({ children, className
|
|
86
|
+
function FieldSeparator({ children, className, ...props }) {
|
|
88
87
|
return /* @__PURE__ */ jsxs("div", {
|
|
89
88
|
"data-slot": "field-separator",
|
|
90
89
|
"data-content": !!children,
|
|
@@ -97,7 +96,7 @@ function FieldSeparator({ children, className,...props }) {
|
|
|
97
96
|
})]
|
|
98
97
|
});
|
|
99
98
|
}
|
|
100
|
-
function FieldError({ className, children, errors
|
|
99
|
+
function FieldError({ className, children, errors, ...props }) {
|
|
101
100
|
const content = useMemo(() => {
|
|
102
101
|
if (children) return children;
|
|
103
102
|
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';\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) {\n return (\n <fieldset\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}: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {\n return (\n <legend\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 }: React.ComponentProps<'div'>) {\n return (\n <div\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}: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) {\n return (\n <div\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 }: React.ComponentProps<'div'>) {\n return (\n <div\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 }: React.ComponentProps<'div'>) {\n return (\n <div\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 }: React.ComponentProps<'p'>) {\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}: React.ComponentProps<'div'> & {\n children?: React.ReactNode;\n}) {\n return (\n <div\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 <span\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 </span>\n )}\n </div>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<'div'> & {\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 <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map(\n (error, index) =>\n error?.message && <li key={index}>{error.message}</li>\n )}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </div>\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';\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) {\n return (\n <fieldset\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}: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {\n return (\n <legend\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 }: React.ComponentProps<'div'>) {\n return (\n <div\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}: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) {\n return (\n <div\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 }: React.ComponentProps<'div'>) {\n return (\n <div\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 }: React.ComponentProps<'div'>) {\n return (\n <div\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 }: React.ComponentProps<'p'>) {\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}: React.ComponentProps<'div'> & {\n children?: React.ReactNode;\n}) {\n return (\n <div\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 <span\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 </span>\n )}\n </div>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<'div'> & {\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 <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map(\n (error, index) =>\n error?.message && <li key={index}>{error.message}</li>\n )}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </div>\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":";;;;;;;;;;AASA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA2C;AAC3E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,uBACA,gFACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,WACA,UAAU,UACV,GAAG,SACiE;AACpE,QACE,oBAAC;EACC,aAAU;EACV,gBAAc;EACd,WAAW,GACT,oBACA,mCACA,gCACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;AACxE,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,SACgE;AACnE,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,SAAsC;AAC1E,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,SAAsC;AACxE,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,8GACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAoC;AAC5E,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;IACI;GAEL;;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;GAAG,WAAU;aACX,OAAO,KACL,OAAO,UACN,OAAO,WAAW,oBAAC,kBAAgB,MAAM,WAAd,MAA2B,CACzD;IACE;IAEN,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,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime84 from "react/jsx-runtime";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
4
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5
5
|
import * as react_hook_form0 from "react-hook-form";
|
|
@@ -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_runtime84.JSX.Element;
|
|
14
14
|
declare const useFormField: () => {
|
|
15
15
|
invalid: boolean;
|
|
16
16
|
isDirty: boolean;
|
|
@@ -26,22 +26,22 @@ 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_runtime84.JSX.Element;
|
|
30
30
|
declare function FormLabel({
|
|
31
31
|
className,
|
|
32
32
|
...props
|
|
33
|
-
}: React$1.ComponentProps<typeof LabelPrimitive.Root>):
|
|
33
|
+
}: React$1.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime84.JSX.Element;
|
|
34
34
|
declare function FormControl({
|
|
35
35
|
...props
|
|
36
|
-
}: React$1.ComponentProps<typeof Slot>):
|
|
36
|
+
}: React$1.ComponentProps<typeof Slot>): react_jsx_runtime84.JSX.Element;
|
|
37
37
|
declare function FormDescription({
|
|
38
38
|
className,
|
|
39
39
|
...props
|
|
40
|
-
}: React$1.ComponentProps<'p'>):
|
|
40
|
+
}: React$1.ComponentProps<'p'>): react_jsx_runtime84.JSX.Element;
|
|
41
41
|
declare function FormMessage({
|
|
42
42
|
className,
|
|
43
43
|
...props
|
|
44
|
-
}: React$1.ComponentProps<'p'>):
|
|
44
|
+
}: React$1.ComponentProps<'p'>): react_jsx_runtime84.JSX.Element | null;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type UseFormReturn, useFieldArray, useForm, useFormField, zodResolver };
|
|
47
47
|
//# 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,mBAAA,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,mBAAA,CAAA,GAAA,CAAA,OA3CjC;iBAyD5B,SAAA,CAxDiB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA2DvB,OAAA,CAAM,cA3DiB,CAAA,OA2DK,cAAA,CAAe,IA3DpB,CAAA,CAAA,EA2DyB,mBAAA,CAAA,GAAA,CAAA,OA3DzB;iBAyEjB,WAAA,CAzEO;EAAA,GAAA;AAAA,CAAA,EAyEmB,OAAA,CAAM,cAzEzB,CAAA,OAyE+C,IAzE/C,CAAA,CAAA,EAyEoD,mBAAA,CAAA,GAAA,CAAA,OAzEpD;iBA4FP,eAAA,CA5F2C;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA4FF,OAAA,CAAM,cA5FJ,CAAA,GAAA,CAAA,CAAA,EA4FuB,mBAAA,CAAA,GAAA,CAAA,OA5FvB;iBAyG3C,WAAA,CAzGiC;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAyGI,OAAA,CAAM,cAzGV,CAAA,GAAA,CAAA,CAAA,EAyG6B,mBAAA,CAAA,GAAA,CAAA,OAAA,GAzG7B,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 * as React$1 from "react";
|
|
@@ -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",
|
|
@@ -68,7 +67,7 @@ function FormControl({ ...props }) {
|
|
|
68
67
|
...props
|
|
69
68
|
});
|
|
70
69
|
}
|
|
71
|
-
function FormDescription({ className
|
|
70
|
+
function FormDescription({ className, ...props }) {
|
|
72
71
|
const { formDescriptionId } = useFormField();
|
|
73
72
|
return /* @__PURE__ */ jsx("p", {
|
|
74
73
|
"data-slot": "form-description",
|
|
@@ -77,7 +76,7 @@ function FormDescription({ className,...props }) {
|
|
|
77
76
|
...props
|
|
78
77
|
});
|
|
79
78
|
}
|
|
80
|
-
function FormMessage({ className
|
|
79
|
+
function FormMessage({ className, ...props }) {
|
|
81
80
|
const { error, formMessageId } = useFormField();
|
|
82
81
|
const body = error ? String(error?.message ?? "") : props.children;
|
|
83
82
|
if (!body) return null;
|
package/dist/ui/form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","names":["React"],"sources":["../../ui/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\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 LabelPrimitive.Root>) {\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({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\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"],"sources":["../../ui/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\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 LabelPrimitive.Root>) {\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({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\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,SACgD;CACnD,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,EAAE,GAAG,SAA4C;CACpE,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,20 +1,20 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime45 from "react/jsx-runtime";
|
|
3
3
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
4
4
|
|
|
5
5
|
//#region ui/hover-card.d.ts
|
|
6
6
|
declare function HoverCard({
|
|
7
7
|
...props
|
|
8
|
-
}: React$1.ComponentProps<typeof HoverCardPrimitive.Root>):
|
|
8
|
+
}: React$1.ComponentProps<typeof HoverCardPrimitive.Root>): react_jsx_runtime45.JSX.Element;
|
|
9
9
|
declare function HoverCardTrigger({
|
|
10
10
|
...props
|
|
11
|
-
}: React$1.ComponentProps<typeof HoverCardPrimitive.Trigger>):
|
|
11
|
+
}: React$1.ComponentProps<typeof HoverCardPrimitive.Trigger>): react_jsx_runtime45.JSX.Element;
|
|
12
12
|
declare function HoverCardContent({
|
|
13
13
|
className,
|
|
14
14
|
align,
|
|
15
15
|
sideOffset,
|
|
16
16
|
...props
|
|
17
|
-
}: React$1.ComponentProps<typeof HoverCardPrimitive.Content>):
|
|
17
|
+
}: React$1.ComponentProps<typeof HoverCardPrimitive.Content>): react_jsx_runtime45.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
20
20
|
//# sourceMappingURL=hover-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.d.ts","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":[],"mappings":";;;;;iBAOS,SAAA;;GAEN,OAAA,CAAM,sBAAsB,kBAAA,CAAmB,QAAK,
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":[],"mappings":";;;;;iBAOS,SAAA;;GAEN,OAAA,CAAM,sBAAsB,kBAAA,CAAmB,QAAK,mBAAA,CAAA,GAAA,CAAA;iBAI9C,gBAAA;;GAEN,OAAA,CAAM,sBAAsB,kBAAA,CAAmB,WAAQ,mBAAA,CAAA,GAAA,CAAA;iBAMjD,gBAAA;;;;;GAKN,OAAA,CAAM,sBAAsB,kBAAA,CAAmB,WAAQ,mBAAA,CAAA,GAAA,CAAA"}
|
package/dist/ui/hover-card.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
import { cn } from "./utils.js";
|
|
5
4
|
import "react";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -19,7 +18,7 @@ function HoverCardTrigger({ ...props }) {
|
|
|
19
18
|
...props
|
|
20
19
|
});
|
|
21
20
|
}
|
|
22
|
-
function HoverCardContent({ className, align = "center", sideOffset = 4
|
|
21
|
+
function HoverCardContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
23
22
|
return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, {
|
|
24
23
|
"data-slot": "hover-card-portal",
|
|
25
24
|
children: /* @__PURE__ */ jsx(HoverCardPrimitive.Content, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.js","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\n\nimport { cn } from './utils';\n\nfunction HoverCard({\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Root>) {\n return <HoverCardPrimitive.Root data-slot=\"hover-card\" {...props} />;\n}\n\nfunction HoverCardTrigger({\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {\n return (\n <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />\n );\n}\n\nfunction HoverCardContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {\n return (\n <HoverCardPrimitive.Portal data-slot=\"hover-card-portal\">\n <HoverCardPrimitive.Content\n data-slot=\"hover-card-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n );\n}\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"hover-card.js","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\n\nimport { cn } from './utils';\n\nfunction HoverCard({\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Root>) {\n return <HoverCardPrimitive.Root data-slot=\"hover-card\" {...props} />;\n}\n\nfunction HoverCardTrigger({\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {\n return (\n <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />\n );\n}\n\nfunction HoverCardContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {\n return (\n <HoverCardPrimitive.Portal data-slot=\"hover-card-portal\">\n <HoverCardPrimitive.Content\n data-slot=\"hover-card-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n );\n}\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"],"mappings":";;;;;;;;AAOA,SAAS,UAAU,EACjB,GAAG,SACoD;AACvD,QAAO,oBAAC,mBAAmB;EAAK,aAAU;EAAa,GAAI;GAAS;;AAGtE,SAAS,iBAAiB,EACxB,GAAG,SACuD;AAC1D,QACE,oBAAC,mBAAmB;EAAQ,aAAU;EAAqB,GAAI;GAAS;;AAI5E,SAAS,iBAAiB,EACxB,WACA,QAAQ,UACR,aAAa,GACb,GAAG,SACuD;AAC1D,QACE,oBAAC,mBAAmB;EAAO,aAAU;YACnC,oBAAC,mBAAmB;GAClB,aAAU;GACH;GACK;GACZ,WAAW,GACT,qeACA,UACD;GACD,GAAI;IACJ;GACwB"}
|
package/dist/ui/input-group.d.ts
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { Button } from "./button.js";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime39 from "react/jsx-runtime";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
|
-
import * as
|
|
5
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
6
|
|
|
7
7
|
//#region ui/input-group.d.ts
|
|
8
8
|
declare function InputGroup({
|
|
9
9
|
className,
|
|
10
10
|
...props
|
|
11
|
-
}: React$1.ComponentProps<'div'>):
|
|
11
|
+
}: React$1.ComponentProps<'div'>): react_jsx_runtime39.JSX.Element;
|
|
12
12
|
declare const inputGroupAddonVariants: (props?: ({
|
|
13
13
|
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
14
|
-
} &
|
|
14
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
15
15
|
declare function InputGroupAddon({
|
|
16
16
|
className,
|
|
17
17
|
align,
|
|
18
18
|
...props
|
|
19
|
-
}: React$1.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>):
|
|
19
|
+
}: React$1.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): react_jsx_runtime39.JSX.Element;
|
|
20
20
|
declare const inputGroupButtonVariants: (props?: ({
|
|
21
21
|
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
|
|
22
|
-
} &
|
|
22
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
23
23
|
declare function InputGroupButton({
|
|
24
24
|
className,
|
|
25
25
|
type,
|
|
26
26
|
variant,
|
|
27
27
|
size,
|
|
28
28
|
...props
|
|
29
|
-
}: Omit<React$1.ComponentProps<typeof Button>, 'size'> & VariantProps<typeof inputGroupButtonVariants>):
|
|
29
|
+
}: Omit<React$1.ComponentProps<typeof Button>, 'size'> & VariantProps<typeof inputGroupButtonVariants>): react_jsx_runtime39.JSX.Element;
|
|
30
30
|
declare function InputGroupText({
|
|
31
31
|
className,
|
|
32
32
|
...props
|
|
33
|
-
}: React$1.ComponentProps<'span'>):
|
|
33
|
+
}: React$1.ComponentProps<'span'>): react_jsx_runtime39.JSX.Element;
|
|
34
34
|
declare function InputGroupInput({
|
|
35
35
|
className,
|
|
36
36
|
...props
|
|
37
|
-
}: React$1.ComponentProps<'input'>):
|
|
37
|
+
}: React$1.ComponentProps<'input'>): react_jsx_runtime39.JSX.Element;
|
|
38
38
|
declare function InputGroupTextarea({
|
|
39
39
|
className,
|
|
40
40
|
...props
|
|
41
|
-
}: React$1.ComponentProps<'textarea'>):
|
|
41
|
+
}: React$1.ComponentProps<'textarea'>): react_jsx_runtime39.JSX.Element;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
44
44
|
//# sourceMappingURL=input-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-group.d.ts","names":[],"sources":["../../ui/input-group.tsx"],"sourcesContent":[],"mappings":";;;;;;;iBAUS,UAAA;;;GAAoC,OAAA,CAAM,wBAAqB,
|
|
1
|
+
{"version":3,"file":"input-group.d.ts","names":[],"sources":["../../ui/input-group.tsx"],"sourcesContent":[],"mappings":";;;;;;;iBAUS,UAAA;;;GAAoC,OAAA,CAAM,wBAAqB,mBAAA,CAAA,GAAA,CAAA;cA4BlE;;IAmBL,+BAAA,CAAA;AAnDiC,iBAqDzB,eAAA,CAjDU;EAAA,SAAA;EAAA,KAAA;EAAA,GAAA;AAAA,CAAA,EAqDhB,OAAA,CAAM,cArDU,CAAA,KAAA,CAAA,GAqDc,YArDd,CAAA,OAqDkC,uBArDlC,CAAA,CAAA,EAqD0D,mBAAA,CAAA,GAAA,CAAA,OArD1D;cAuEb,wBAvEgB,EAAA,CAAA,KAAkD,CAAlD,EAAA,CAAA;EAAuB,IAAA,CAAM,EAAA,IAAA,GAAA,IAAA,GAAA,SAAA,GAAA,SAAA,GAAA,IAAA,GAAA,SAAA;CAAqB,GAuFvE,+BAAA,CAAA,SAvFuE,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;iBAyF/D,gBAAA,CAzF+D;EAAA,SAAA;EAAA,IAAA;EAAA,OAAA;EAAA,IAAA;EAAA,GAAA;AAAA,CAAA,EA+FrE,IA/FqE,CA+FhE,OAAA,CAAM,cA/F0D,CAAA,OA+FpC,MA/FoC,CAAA,EAAA,MAAA,CAAA,GAgGtE,YAhGsE,CAAA,OAgGlD,wBAhGkD,CAAA,CAAA,EAgGzB,mBAAA,CAAA,GAAA,CAAA,OAhGyB;AAAA,iBA4G/D,cAAA,CA7DR;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA6DgD,OAAA,CAAM,cA7DtD,CAAA,MAAA,CAAA,CAAA,EA6D4E,mBAAA,CAAA,GAAA,CAAA,OA7D5E;iBAyEQ,eAAA,CAvEe;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA0ErB,OAAA,CAAM,cA1Ee,CAAA,OAAA,CAAA,CAAA,EA0EQ,mBAAA,CAAA,GAAA,CAAA,OA1ER;iBAuFf,kBAAA,CAtFP;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAyFC,OAAA,CAAM,cAzFP,CAAA,UAAA,CAAA,CAAA,EAyFiC,mBAAA,CAAA,GAAA,CAAA,OAzFjC"}
|
package/dist/ui/input-group.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
import { cn } from "./utils.js";
|
|
5
4
|
import { Button } from "./button.js";
|
|
6
5
|
import { Input } from "./input.js";
|
|
@@ -10,7 +9,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
10
9
|
import { cva } from "class-variance-authority";
|
|
11
10
|
|
|
12
11
|
//#region ui/input-group.tsx
|
|
13
|
-
function InputGroup({ className
|
|
12
|
+
function InputGroup({ className, ...props }) {
|
|
14
13
|
return /* @__PURE__ */ jsx("div", {
|
|
15
14
|
"data-slot": "input-group",
|
|
16
15
|
role: "group",
|
|
@@ -27,7 +26,7 @@ const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-te
|
|
|
27
26
|
} },
|
|
28
27
|
defaultVariants: { align: "inline-start" }
|
|
29
28
|
});
|
|
30
|
-
function InputGroupAddon({ className, align = "inline-start"
|
|
29
|
+
function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
31
30
|
return /* @__PURE__ */ jsx("div", {
|
|
32
31
|
role: "group",
|
|
33
32
|
"data-slot": "input-group-addon",
|
|
@@ -49,7 +48,7 @@ const inputGroupButtonVariants = cva("text-sm shadow-none flex gap-2 items-cente
|
|
|
49
48
|
} },
|
|
50
49
|
defaultVariants: { size: "xs" }
|
|
51
50
|
});
|
|
52
|
-
function InputGroupButton({ className, type = "button", variant = "ghost", size = "xs"
|
|
51
|
+
function InputGroupButton({ className, type = "button", variant = "ghost", size = "xs", ...props }) {
|
|
53
52
|
return /* @__PURE__ */ jsx(Button, {
|
|
54
53
|
type,
|
|
55
54
|
"data-size": size,
|
|
@@ -58,20 +57,20 @@ function InputGroupButton({ className, type = "button", variant = "ghost", size
|
|
|
58
57
|
...props
|
|
59
58
|
});
|
|
60
59
|
}
|
|
61
|
-
function InputGroupText({ className
|
|
60
|
+
function InputGroupText({ className, ...props }) {
|
|
62
61
|
return /* @__PURE__ */ jsx("span", {
|
|
63
62
|
className: cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
64
63
|
...props
|
|
65
64
|
});
|
|
66
65
|
}
|
|
67
|
-
function InputGroupInput({ className
|
|
66
|
+
function InputGroupInput({ className, ...props }) {
|
|
68
67
|
return /* @__PURE__ */ jsx(Input, {
|
|
69
68
|
"data-slot": "input-group-control",
|
|
70
69
|
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", className),
|
|
71
70
|
...props
|
|
72
71
|
});
|
|
73
72
|
}
|
|
74
|
-
function InputGroupTextarea({ className
|
|
73
|
+
function InputGroupTextarea({ className, ...props }) {
|
|
75
74
|
return /* @__PURE__ */ jsx(Textarea, {
|
|
76
75
|
"data-slot": "input-group-control",
|
|
77
76
|
className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent", className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-group.js","names":[],"sources":["../../ui/input-group.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from './utils';\nimport { Button } from './button';\nimport { Input } from './input';\nimport { Textarea } from './textarea';\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n 'group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none',\n 'h-9 min-w-0 has-[>textarea]:h-auto',\n\n // Variants based on alignment.\n 'has-[>[data-align=inline-start]]:[&>input]:pl-2',\n 'has-[>[data-align=inline-end]]:[&>input]:pr-2',\n 'has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3',\n 'has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3',\n\n // Focus state.\n 'has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]',\n\n // Error state.\n 'has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40',\n\n className\n )}\n {...props}\n />\n );\n}\n\nconst inputGroupAddonVariants = cva(\n \"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50\",\n {\n variants: {\n align: {\n 'inline-start':\n 'order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]',\n 'inline-end':\n 'order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]',\n 'block-start':\n 'order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5',\n 'block-end':\n 'order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5',\n },\n },\n defaultVariants: {\n align: 'inline-start',\n },\n }\n);\n\nfunction InputGroupAddon({\n className,\n align = 'inline-start',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest('button')) {\n return;\n }\n e.currentTarget.parentElement?.querySelector('input')?.focus();\n }}\n {...props}\n />\n );\n}\n\nconst inputGroupButtonVariants = cva(\n 'text-sm shadow-none flex gap-2 items-center',\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2\",\n sm: 'h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5',\n 'icon-xs':\n 'size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0',\n 'icon-sm': 'size-8 p-0 has-[>svg]:p-0',\n },\n },\n defaultVariants: {\n size: 'xs',\n },\n }\n);\n\nfunction InputGroupButton({\n className,\n type = 'button',\n variant = 'ghost',\n size = 'xs',\n ...props\n}: Omit<React.ComponentProps<typeof Button>, 'size'> &\n VariantProps<typeof inputGroupButtonVariants>) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n );\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n className={cn(\n \"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<'input'>) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n 'flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<'textarea'>) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n 'flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"input-group.js","names":[],"sources":["../../ui/input-group.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from './utils';\nimport { Button } from './button';\nimport { Input } from './input';\nimport { Textarea } from './textarea';\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n 'group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none',\n 'h-9 min-w-0 has-[>textarea]:h-auto',\n\n // Variants based on alignment.\n 'has-[>[data-align=inline-start]]:[&>input]:pl-2',\n 'has-[>[data-align=inline-end]]:[&>input]:pr-2',\n 'has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3',\n 'has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3',\n\n // Focus state.\n 'has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]',\n\n // Error state.\n 'has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40',\n\n className\n )}\n {...props}\n />\n );\n}\n\nconst inputGroupAddonVariants = cva(\n \"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50\",\n {\n variants: {\n align: {\n 'inline-start':\n 'order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]',\n 'inline-end':\n 'order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]',\n 'block-start':\n 'order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5',\n 'block-end':\n 'order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5',\n },\n },\n defaultVariants: {\n align: 'inline-start',\n },\n }\n);\n\nfunction InputGroupAddon({\n className,\n align = 'inline-start',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest('button')) {\n return;\n }\n e.currentTarget.parentElement?.querySelector('input')?.focus();\n }}\n {...props}\n />\n );\n}\n\nconst inputGroupButtonVariants = cva(\n 'text-sm shadow-none flex gap-2 items-center',\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2\",\n sm: 'h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5',\n 'icon-xs':\n 'size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0',\n 'icon-sm': 'size-8 p-0 has-[>svg]:p-0',\n },\n },\n defaultVariants: {\n size: 'xs',\n },\n }\n);\n\nfunction InputGroupButton({\n className,\n type = 'button',\n variant = 'ghost',\n size = 'xs',\n ...props\n}: Omit<React.ComponentProps<typeof Button>, 'size'> &\n VariantProps<typeof inputGroupButtonVariants>) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n );\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n className={cn(\n \"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentProps<'input'>) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n 'flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentProps<'textarea'>) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n 'flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n};\n"],"mappings":";;;;;;;;;;;AAUA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;AACxE,QACE,oBAAC;EACC,aAAU;EACV,MAAK;EACL,WAAW,GACT,4JACA,sCAGA,mDACA,iDACA,kIACA,4HAGA,mMAGA,kLAEA,UACD;EACD,GAAI;GACJ;;AAIN,MAAM,0BAA0B,IAC9B,2PACA;CACE,UAAU,EACR,OAAO;EACL,gBACE;EACF,cACE;EACF,eACE;EACF,aACE;EACH,EACF;CACD,iBAAiB,EACf,OAAO,gBACR;CACF,CACF;AAED,SAAS,gBAAgB,EACvB,WACA,QAAQ,gBACR,GAAG,SAC0E;AAC7E,QACE,oBAAC;EACC,MAAK;EACL,aAAU;EACV,cAAY;EACZ,WAAW,GAAG,wBAAwB,EAAE,OAAO,CAAC,EAAE,UAAU;EAC5D,UAAU,MAAM;AACd,OAAK,EAAE,OAAuB,QAAQ,SAAS,CAC7C;AAEF,KAAE,cAAc,eAAe,cAAc,QAAQ,EAAE,OAAO;;EAEhE,GAAI;GACJ;;AAIN,MAAM,2BAA2B,IAC/B,+CACA;CACE,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,IAAI;EACJ,WACE;EACF,WAAW;EACZ,EACF;CACD,iBAAiB,EACf,MAAM,MACP;CACF,CACF;AAED,SAAS,iBAAiB,EACxB,WACA,OAAO,UACP,UAAU,SACV,OAAO,MACP,GAAG,SAE4C;AAC/C,QACE,oBAAC;EACO;EACN,aAAW;EACF;EACT,WAAW,GAAG,yBAAyB,EAAE,MAAM,CAAC,EAAE,UAAU;EAC5D,GAAI;GACJ;;AAIN,SAAS,eAAe,EAAE,WAAW,GAAG,SAAuC;AAC7E,QACE,oBAAC;EACC,WAAW,GACT,0HACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,gBAAgB,EACvB,WACA,GAAG,SAC6B;AAChC,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,oGACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,mBAAmB,EAC1B,WACA,GAAG,SACgC;AACnC,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,qHACA,UACD;EACD,GAAI;GACJ"}
|
package/dist/ui/input-otp.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React$1 from "react";
|
|
|
2
2
|
import * as input_otp0 from "input-otp";
|
|
3
3
|
|
|
4
4
|
//#region ui/input-otp.d.ts
|
|
5
|
-
declare const InputOTP: React$1.ForwardRefExoticComponent<(Omit<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "onChange" | "
|
|
5
|
+
declare const InputOTP: React$1.ForwardRefExoticComponent<(Omit<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "onChange" | "maxLength" | "value" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
6
6
|
value?: string;
|
|
7
7
|
onChange?: (newValue: string) => unknown;
|
|
8
8
|
maxLength: number;
|
|
@@ -15,7 +15,7 @@ declare const InputOTP: React$1.ForwardRefExoticComponent<(Omit<Omit<React$1.Inp
|
|
|
15
15
|
} & {
|
|
16
16
|
render: (props: input_otp0.RenderProps) => React$1.ReactNode;
|
|
17
17
|
children?: never;
|
|
18
|
-
} & React$1.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "onChange" | "
|
|
18
|
+
} & React$1.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "onChange" | "maxLength" | "value" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
19
19
|
value?: string;
|
|
20
20
|
onChange?: (newValue: string) => unknown;
|
|
21
21
|
maxLength: number;
|
package/dist/ui/input-otp.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
import { cn } from "./utils.js";
|
|
5
4
|
import * as React$1 from "react";
|
|
6
5
|
import { Dot } from "lucide-react";
|
|
@@ -8,20 +7,20 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
7
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
9
8
|
|
|
10
9
|
//#region ui/input-otp.tsx
|
|
11
|
-
const InputOTP = React$1.forwardRef(({ className, containerClassName
|
|
10
|
+
const InputOTP = React$1.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(OTPInput, {
|
|
12
11
|
ref,
|
|
13
12
|
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
|
|
14
13
|
className: cn("disabled:cursor-not-allowed", className),
|
|
15
14
|
...props
|
|
16
15
|
}));
|
|
17
16
|
InputOTP.displayName = "InputOTP";
|
|
18
|
-
const InputOTPGroup = React$1.forwardRef(({ className
|
|
17
|
+
const InputOTPGroup = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
19
18
|
ref,
|
|
20
19
|
className: cn("flex items-center", className),
|
|
21
20
|
...props
|
|
22
21
|
}));
|
|
23
22
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
24
|
-
const InputOTPSlot = React$1.forwardRef(({ index, className
|
|
23
|
+
const InputOTPSlot = React$1.forwardRef(({ index, className, ...props }, ref) => {
|
|
25
24
|
const { char, hasFakeCaret, isActive } = React$1.useContext(OTPInputContext).slots[index] || {};
|
|
26
25
|
return /* @__PURE__ */ jsxs("div", {
|
|
27
26
|
ref,
|
package/dist/ui/input-otp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.js","names":["React"],"sources":["../../ui/input-otp.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { OTPInput, OTPInputContext } from 'input-otp';\nimport { Dot } from 'lucide-react';\n\nimport { cn } from './utils';\n\nconst InputOTP = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n 'flex items-center gap-2 has-disabled:opacity-50',\n containerClassName\n )}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n));\nInputOTP.displayName = 'InputOTP';\n\nconst InputOTPGroup = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center', className)} {...props} />\n));\nInputOTPGroup.displayName = 'InputOTPGroup';\n\nconst InputOTPSlot = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] || {};\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-input relative flex h-10 w-10 items-center justify-center border-y border-r text-base transition-all first:rounded-l-md first:border-l last:rounded-r-md',\n isActive && 'ring-ring ring-offset-background z-10 ring-2',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n});\nInputOTPSlot.displayName = 'InputOTPSlot';\n\nconst InputOTPSeparator = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n));\nInputOTPSeparator.displayName = 'InputOTPSeparator';\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"input-otp.js","names":["React"],"sources":["../../ui/input-otp.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { OTPInput, OTPInputContext } from 'input-otp';\nimport { Dot } from 'lucide-react';\n\nimport { cn } from './utils';\n\nconst InputOTP = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n 'flex items-center gap-2 has-disabled:opacity-50',\n containerClassName\n )}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n));\nInputOTP.displayName = 'InputOTP';\n\nconst InputOTPGroup = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center', className)} {...props} />\n));\nInputOTPGroup.displayName = 'InputOTPGroup';\n\nconst InputOTPSlot = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] || {};\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-input relative flex h-10 w-10 items-center justify-center border-y border-r text-base transition-all first:rounded-l-md first:border-l last:rounded-r-md',\n isActive && 'ring-ring ring-offset-background z-10 ring-2',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n});\nInputOTPSlot.displayName = 'InputOTPSlot';\n\nconst InputOTPSeparator = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n));\nInputOTPSeparator.displayName = 'InputOTPSeparator';\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"mappings":";;;;;;;;;AAQA,MAAM,WAAWA,QAAM,YAGpB,EAAE,WAAW,oBAAoB,GAAG,SAAS,QAC9C,oBAAC;CACM;CACL,oBAAoB,GAClB,mDACA,mBACD;CACD,WAAW,GAAG,+BAA+B,UAAU;CACvD,GAAI;EACJ,CACF;AACF,SAAS,cAAc;AAEvB,MAAM,gBAAgBA,QAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CAAS;CAAK,WAAW,GAAG,qBAAqB,UAAU;CAAE,GAAI;EAAS,CAC3E;AACF,cAAc,cAAc;AAE5B,MAAM,eAAeA,QAAM,YAGxB,EAAE,OAAO,WAAW,GAAG,SAAS,QAAQ;CAEzC,MAAM,EAAE,MAAM,cAAc,aADJA,QAAM,WAAW,gBAAgB,CACA,MAAM,UAAU,EAAE;AAE3E,QACE,qBAAC;EACM;EACL,WAAW,GACT,mKACA,YAAY,gDACZ,UACD;EACD,GAAI;aAEH,MACA,gBACC,oBAAC;GAAI,WAAU;aACb,oBAAC,SAAI,WAAU,6DAA6D;IACxE;GAEJ;EAER;AACF,aAAa,cAAc;AAE3B,MAAM,oBAAoBA,QAAM,YAG7B,EAAE,GAAG,SAAS,QACf,oBAAC;CAAS;CAAK,MAAK;CAAY,GAAI;WAClC,oBAAC,QAAM;EACH,CACN;AACF,kBAAkB,cAAc"}
|
package/dist/ui/input.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime80 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region ui/input.d.ts
|
|
5
5
|
type InputProps = React$1.ComponentProps<'input'>;
|
|
@@ -7,7 +7,7 @@ declare function Input({
|
|
|
7
7
|
className,
|
|
8
8
|
type,
|
|
9
9
|
...props
|
|
10
|
-
}: InputProps):
|
|
10
|
+
}: InputProps): react_jsx_runtime80.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Input, InputProps };
|
|
13
13
|
//# 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":";;;;KAIY,UAAA,GAAa,OAAA,CAAM;iBAEtB,KAAA;;;;GAAqC,aAAU,
|
|
1
|
+
{"version":3,"file":"input.d.ts","names":[],"sources":["../../ui/input.tsx"],"sourcesContent":[],"mappings":";;;;KAIY,UAAA,GAAa,OAAA,CAAM;iBAEtB,KAAA;;;;GAAqC,aAAU,mBAAA,CAAA,GAAA,CAAA"}
|
package/dist/ui/input.js
CHANGED
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';\n\nimport { cn } from './utils';\n\nexport type InputProps = React.ComponentProps<'input'>;\n\nfunction Input({ className, type, ...props }: InputProps) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":";;;;;AAMA,SAAS,MAAM,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"input.js","names":[],"sources":["../../ui/input.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from './utils';\n\nexport type InputProps = React.ComponentProps<'input'>;\n\nfunction Input({ className, type, ...props }: InputProps) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":";;;;;AAMA,SAAS,MAAM,EAAE,WAAW,MAAM,GAAG,SAAqB;AACxD,QACE,oBAAC;EACO;EACN,aAAU;EACV,WAAW,GACT,8bACA,iFACA,0GACA,UACD;EACD,GAAI;GACJ"}
|