@customafk/lunas-ui 0.2.70 → 0.2.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{action-submit-Bzw30CUP.cjs → action-submit-C19tPHgf.cjs} +2 -2
- package/dist/{action-submit-Bzw30CUP.cjs.map → action-submit-C19tPHgf.cjs.map} +1 -1
- package/dist/{action-submit-DLv-V1JQ.mjs → action-submit-cOfq0OSY.mjs} +2 -2
- package/dist/{action-submit-DLv-V1JQ.mjs.map → action-submit-cOfq0OSY.mjs.map} +1 -1
- package/dist/{actions-form-CI1WhB90.cjs → actions-form-3ItwYOFj.cjs} +2 -2
- package/dist/{actions-form-CI1WhB90.cjs.map → actions-form-3ItwYOFj.cjs.map} +1 -1
- package/dist/{actions-form-CEBdF1N7.mjs → actions-form-DxbT1lip.mjs} +2 -2
- package/dist/{actions-form-CEBdF1N7.mjs.map → actions-form-DxbT1lip.mjs.map} +1 -1
- package/dist/{checkbox-field-B7Nh2_rB.mjs → checkbox-field-BAQN-Yno.mjs} +2 -2
- package/dist/{checkbox-field-B7Nh2_rB.mjs.map → checkbox-field-BAQN-Yno.mjs.map} +1 -1
- package/dist/{checkbox-field-CTCgnG0a.cjs → checkbox-field-BRqU_dYY.cjs} +2 -2
- package/dist/{checkbox-field-CTCgnG0a.cjs.map → checkbox-field-BRqU_dYY.cjs.map} +1 -1
- package/dist/combobox-field-DnCpN--a.cjs +2 -0
- package/dist/combobox-field-DnCpN--a.cjs.map +1 -0
- package/dist/combobox-field-yvQPJSFC.mjs +2 -0
- package/dist/combobox-field-yvQPJSFC.mjs.map +1 -0
- package/dist/date-field-DLsJBYw8.cjs +2 -0
- package/dist/date-field-DLsJBYw8.cjs.map +1 -0
- package/dist/date-field-O67C78Kw.mjs +2 -0
- package/dist/date-field-O67C78Kw.mjs.map +1 -0
- package/dist/{dialog-form-C6kJPVNp.mjs → dialog-form-BxlLrEeZ.mjs} +2 -2
- package/dist/{dialog-form-C6kJPVNp.mjs.map → dialog-form-BxlLrEeZ.mjs.map} +1 -1
- package/dist/{dialog-form-DalF7KGG.cjs → dialog-form-ClTCyJDD.cjs} +2 -2
- package/dist/{dialog-form-DalF7KGG.cjs.map → dialog-form-ClTCyJDD.cjs.map} +1 -1
- package/dist/{email-field-DH7kK--D.cjs → email-field-DZzkfVj5.cjs} +2 -2
- package/dist/{email-field-DH7kK--D.cjs.map → email-field-DZzkfVj5.cjs.map} +1 -1
- package/dist/{email-field-CadXKVIu.mjs → email-field-DqEDxkp7.mjs} +2 -2
- package/dist/{email-field-CadXKVIu.mjs.map → email-field-DqEDxkp7.mjs.map} +1 -1
- package/dist/features/tanstack-form/index.cjs +1 -1
- package/dist/features/tanstack-form/index.mjs +1 -1
- package/dist/{field-BV5twmKA.cjs → field-BSLi-P0Q.cjs} +2 -2
- package/dist/{field-BV5twmKA.cjs.map → field-BSLi-P0Q.cjs.map} +1 -1
- package/dist/{field-BKyUqvzh.mjs → field-V2DoD8qL.mjs} +2 -2
- package/dist/{field-BKyUqvzh.mjs.map → field-V2DoD8qL.mjs.map} +1 -1
- package/dist/{flex-CdJSaEfY.d.cts → flex-CT71VV-I.d.cts} +2 -2
- package/dist/{flex-CdJSaEfY.d.mts → flex-CT71VV-I.d.mts} +2 -2
- package/dist/{group-field-bviEXmo4.mjs → group-field-gejvx_Td.mjs} +2 -2
- package/dist/{group-field-bviEXmo4.mjs.map → group-field-gejvx_Td.mjs.map} +1 -1
- package/dist/{group-field-0kStiX8n.cjs → group-field-sVykO2JZ.cjs} +2 -2
- package/dist/{group-field-0kStiX8n.cjs.map → group-field-sVykO2JZ.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/layouts/flex.d.cts +1 -1
- package/dist/layouts/flex.d.mts +1 -1
- package/dist/{number-field-CCzUIF-Q.cjs → number-field-BTLobx1F.cjs} +2 -2
- package/dist/{number-field-CCzUIF-Q.cjs.map → number-field-BTLobx1F.cjs.map} +1 -1
- package/dist/{number-field-BglMIz6D.mjs → number-field-Cx-1U_Np.mjs} +2 -2
- package/dist/{number-field-BglMIz6D.mjs.map → number-field-Cx-1U_Np.mjs.map} +1 -1
- package/dist/{password-field-7VRa9-nn.mjs → password-field-CGPjZ5hZ.mjs} +2 -2
- package/dist/{password-field-7VRa9-nn.mjs.map → password-field-CGPjZ5hZ.mjs.map} +1 -1
- package/dist/{password-field-_AoAB7nM.cjs → password-field-CuBcb4mi.cjs} +2 -2
- package/dist/{password-field-_AoAB7nM.cjs.map → password-field-CuBcb4mi.cjs.map} +1 -1
- package/dist/{popover-form-BLuCGa_z.mjs → popover-form-DVJUQ3_T.mjs} +2 -2
- package/dist/{popover-form-BLuCGa_z.mjs.map → popover-form-DVJUQ3_T.mjs.map} +1 -1
- package/dist/{popover-form-C701gLPP.cjs → popover-form-DzvgWQ2Q.cjs} +2 -2
- package/dist/{popover-form-C701gLPP.cjs.map → popover-form-DzvgWQ2Q.cjs.map} +1 -1
- package/dist/{radio-group-field-D570ZDQ1.mjs → radio-group-field-C45y9BQt.mjs} +2 -2
- package/dist/{radio-group-field-D570ZDQ1.mjs.map → radio-group-field-C45y9BQt.mjs.map} +1 -1
- package/dist/{radio-group-field-D7Q5UZNX.cjs → radio-group-field-GiEbZRkS.cjs} +2 -2
- package/dist/{radio-group-field-D7Q5UZNX.cjs.map → radio-group-field-GiEbZRkS.cjs.map} +1 -1
- package/dist/{resizable-koX293wy.d.cts → resizable-CAyWR1At.d.cts} +2 -2
- package/dist/{resizable-koX293wy.d.mts → resizable-CAyWR1At.d.mts} +2 -2
- package/dist/{select-field-Dut7YMVy.cjs → select-field-Cd63KvgR.cjs} +2 -2
- package/dist/{select-field-Dut7YMVy.cjs.map → select-field-Cd63KvgR.cjs.map} +1 -1
- package/dist/{select-field-C5MjnCWH.mjs → select-field-y3Zttb4j.mjs} +2 -2
- package/dist/{select-field-C5MjnCWH.mjs.map → select-field-y3Zttb4j.mjs.map} +1 -1
- package/dist/{simple-array-field-CuwaS9sn.cjs → simple-array-field-BODzA766.cjs} +2 -2
- package/dist/{simple-array-field-CuwaS9sn.cjs.map → simple-array-field-BODzA766.cjs.map} +1 -1
- package/dist/{simple-array-field-Bj86iA_N.mjs → simple-array-field-DI_56dVs.mjs} +2 -2
- package/dist/{simple-array-field-Bj86iA_N.mjs.map → simple-array-field-DI_56dVs.mjs.map} +1 -1
- package/dist/{simple-boolean-field-dshsOUUK.cjs → simple-boolean-field-BjnIh9Mq.cjs} +2 -2
- package/dist/{simple-boolean-field-dshsOUUK.cjs.map → simple-boolean-field-BjnIh9Mq.cjs.map} +1 -1
- package/dist/{simple-boolean-field-BbfHAg60.mjs → simple-boolean-field-oP5yJDQL.mjs} +2 -2
- package/dist/{simple-boolean-field-BbfHAg60.mjs.map → simple-boolean-field-oP5yJDQL.mjs.map} +1 -1
- package/dist/{simple-combobox-field-poFNb-vB.mjs → simple-combobox-field-Bd-xk5kC.mjs} +2 -2
- package/dist/{simple-combobox-field-poFNb-vB.mjs.map → simple-combobox-field-Bd-xk5kC.mjs.map} +1 -1
- package/dist/{simple-combobox-field-CNbTlIg_.cjs → simple-combobox-field-Dgicw0VN.cjs} +2 -2
- package/dist/{simple-combobox-field-CNbTlIg_.cjs.map → simple-combobox-field-Dgicw0VN.cjs.map} +1 -1
- package/dist/{simple-date-field-BMADM_kf.mjs → simple-date-field-DE5Z-Zkc.mjs} +2 -2
- package/dist/{simple-date-field-BMADM_kf.mjs.map → simple-date-field-DE5Z-Zkc.mjs.map} +1 -1
- package/dist/{simple-date-field-B5RRZ_Uo.cjs → simple-date-field-hORsbXHE.cjs} +2 -2
- package/dist/{simple-date-field-B5RRZ_Uo.cjs.map → simple-date-field-hORsbXHE.cjs.map} +1 -1
- package/dist/{simple-email-field-B73GdTF_.mjs → simple-email-field-CFbpYis_.mjs} +2 -2
- package/dist/{simple-email-field-B73GdTF_.mjs.map → simple-email-field-CFbpYis_.mjs.map} +1 -1
- package/dist/{simple-email-field-dskmgGEz.cjs → simple-email-field-DpuMlzxg.cjs} +2 -2
- package/dist/{simple-email-field-dskmgGEz.cjs.map → simple-email-field-DpuMlzxg.cjs.map} +1 -1
- package/dist/{simple-number-field-ggLY5zA7.mjs → simple-number-field-BY0b4BJp.mjs} +2 -2
- package/dist/{simple-number-field-ggLY5zA7.mjs.map → simple-number-field-BY0b4BJp.mjs.map} +1 -1
- package/dist/{simple-number-field-RBxUxq_w.cjs → simple-number-field-C4y4rQcw.cjs} +2 -2
- package/dist/{simple-number-field-RBxUxq_w.cjs.map → simple-number-field-C4y4rQcw.cjs.map} +1 -1
- package/dist/{simple-password-field-BBpfmgoT.cjs → simple-password-field-BUzKJ0fu.cjs} +2 -2
- package/dist/{simple-password-field-BBpfmgoT.cjs.map → simple-password-field-BUzKJ0fu.cjs.map} +1 -1
- package/dist/{simple-password-field-CrGsdjSa.mjs → simple-password-field-CA0FuETK.mjs} +2 -2
- package/dist/{simple-password-field-CrGsdjSa.mjs.map → simple-password-field-CA0FuETK.mjs.map} +1 -1
- package/dist/{simple-radio-group-field-CZ5u-XiY.mjs → simple-radio-group-field-BM7HBTSs.mjs} +2 -2
- package/dist/{simple-radio-group-field-CZ5u-XiY.mjs.map → simple-radio-group-field-BM7HBTSs.mjs.map} +1 -1
- package/dist/{simple-radio-group-field-Dyc3SO9t.cjs → simple-radio-group-field-CCxUaYom.cjs} +2 -2
- package/dist/{simple-radio-group-field-Dyc3SO9t.cjs.map → simple-radio-group-field-CCxUaYom.cjs.map} +1 -1
- package/dist/{simple-select-field-CyFJthFb.mjs → simple-select-field-CeTVQwmP.mjs} +2 -2
- package/dist/{simple-select-field-CyFJthFb.mjs.map → simple-select-field-CeTVQwmP.mjs.map} +1 -1
- package/dist/{simple-select-field-CCmaLlAT.cjs → simple-select-field-CzN4Xb7n.cjs} +2 -2
- package/dist/{simple-select-field-CCmaLlAT.cjs.map → simple-select-field-CzN4Xb7n.cjs.map} +1 -1
- package/dist/{simple-text-field-DxZyRSy5.mjs → simple-text-field-CDsgWUFD.mjs} +2 -2
- package/dist/{simple-text-field-DxZyRSy5.mjs.map → simple-text-field-CDsgWUFD.mjs.map} +1 -1
- package/dist/{simple-text-field-DSX3rP7g.cjs → simple-text-field-DGZL0gML.cjs} +2 -2
- package/dist/{simple-text-field-DSX3rP7g.cjs.map → simple-text-field-DGZL0gML.cjs.map} +1 -1
- package/dist/{simple-textarea-field-BiaAbLgT.mjs → simple-textarea-field-BiuHXtqj.mjs} +2 -2
- package/dist/{simple-textarea-field-BiaAbLgT.mjs.map → simple-textarea-field-BiuHXtqj.mjs.map} +1 -1
- package/dist/{simple-textarea-field--FWXqgy7.cjs → simple-textarea-field-vGYOegPj.cjs} +2 -2
- package/dist/{simple-textarea-field--FWXqgy7.cjs.map → simple-textarea-field-vGYOegPj.cjs.map} +1 -1
- package/dist/{switch-field-aaA3hplb.mjs → switch-field-BVgtm94W.mjs} +2 -2
- package/dist/{switch-field-aaA3hplb.mjs.map → switch-field-BVgtm94W.mjs.map} +1 -1
- package/dist/{switch-field-BS8XStmz.cjs → switch-field-DPB3JDT3.cjs} +2 -2
- package/dist/{switch-field-BS8XStmz.cjs.map → switch-field-DPB3JDT3.cjs.map} +1 -1
- package/dist/tanstack-form-CKAWexet.mjs +2 -0
- package/dist/{tanstack-form-B6mzOylW.mjs.map → tanstack-form-CKAWexet.mjs.map} +1 -1
- package/dist/{tanstack-form-DU-ZKXxZ.cjs → tanstack-form-CX3lC3mC.cjs} +2 -2
- package/dist/{tanstack-form-DU-ZKXxZ.cjs.map → tanstack-form-CX3lC3mC.cjs.map} +1 -1
- package/dist/{text-editor-field-DG0c8wVs.cjs → text-editor-field-Ddvgdo_p.cjs} +2 -2
- package/dist/{text-editor-field-DG0c8wVs.cjs.map → text-editor-field-Ddvgdo_p.cjs.map} +1 -1
- package/dist/{text-editor-field-Dm2yxTUZ.mjs → text-editor-field-qa3t2GBg.mjs} +2 -2
- package/dist/{text-editor-field-Dm2yxTUZ.mjs.map → text-editor-field-qa3t2GBg.mjs.map} +1 -1
- package/dist/text-field-CBUTZKGH.mjs +2 -0
- package/dist/text-field-CBUTZKGH.mjs.map +1 -0
- package/dist/text-field-Cwu0xuXt.cjs +2 -0
- package/dist/text-field-Cwu0xuXt.cjs.map +1 -0
- package/dist/{textarea-field-f8E3HEkw.mjs → textarea-field-Ctj5o5my.mjs} +2 -2
- package/dist/{textarea-field-f8E3HEkw.mjs.map → textarea-field-Ctj5o5my.mjs.map} +1 -1
- package/dist/{textarea-field-DDPqESGM.cjs → textarea-field-jOqHJcAL.cjs} +2 -2
- package/dist/{textarea-field-DDPqESGM.cjs.map → textarea-field-jOqHJcAL.cjs.map} +1 -1
- package/dist/{title-field-CKxwzMOM.cjs → title-field-B2hM3S_S.cjs} +2 -2
- package/dist/{title-field-CKxwzMOM.cjs.map → title-field-B2hM3S_S.cjs.map} +1 -1
- package/dist/{title-field-84EnHPvl.mjs → title-field-oAqHRw59.mjs} +2 -2
- package/dist/{title-field-84EnHPvl.mjs.map → title-field-oAqHRw59.mjs.map} +1 -1
- package/dist/ui/resizable.d.cts +1 -1
- package/dist/ui/resizable.d.mts +1 -1
- package/package.json +1 -1
- package/dist/combobox-field-C9uneq5q.cjs +0 -2
- package/dist/combobox-field-C9uneq5q.cjs.map +0 -1
- package/dist/combobox-field-CLooFS0r.mjs +0 -2
- package/dist/combobox-field-CLooFS0r.mjs.map +0 -1
- package/dist/date-field-CJ7hYY8l.cjs +0 -2
- package/dist/date-field-CJ7hYY8l.cjs.map +0 -1
- package/dist/date-field-uYtNFRrJ.mjs +0 -2
- package/dist/date-field-uYtNFRrJ.mjs.map +0 -1
- package/dist/tanstack-form-B6mzOylW.mjs +0 -2
- package/dist/text-field-Dlbpos_A.mjs +0 -2
- package/dist/text-field-Dlbpos_A.mjs.map +0 -1
- package/dist/text-field-GIn2zAtc.cjs +0 -2
- package/dist/text-field-GIn2zAtc.cjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Button as e}from"./ui/button.mjs";import{Paragraph as t,paragraphVariants as n}from"./typography/paragraph.mjs";import{Card as r,CardAction as i,CardContent as a,CardDescription as o,CardFooter as s,CardHeader as c,CardTitle as l}from"./ui/card.mjs";import{Skeleton as u}from"./ui/skeleton.mjs";import{Image as d}from"./ui/image.mjs";import{GridProductCard as f}from"./cards/grid-product-card.mjs";import{ProductCard as p}from"./cards/product-card.mjs";import{SimpleCard as m}from"./cards/simple-card.mjs";import{Flex as h}from"./layouts/flex.mjs";import{CountryDisplay as g}from"./data-display/country.mjs";import{DataList as _,DataListItem as v}from"./data-display/data-list.mjs";import{t as y}from"./date-Nsz0Pewe.mjs";import{Badge as b,badgeVariants as x}from"./ui/badge.mjs";import{Tooltip as S,TooltipContent as C,TooltipProvider as w,TooltipTrigger as T}from"./ui/tooltip.mjs";import{DateTooltip as E}from"./data-display/date-tooltip.mjs";import{EmptyDisplay as D}from"./data-display/empty.mjs";import{NameDisplay as O}from"./data-display/name.mjs";import{PhoneNumberDisplay as k}from"./data-display/phone-number.mjs";import{RoleBadge as A}from"./data-display/role-badge.mjs";import{Statistic as j}from"./data-display/statistic.mjs";import{Avatar as M,AvatarFallback as N,AvatarImage as P}from"./ui/avatar.mjs";import{UserDataDisplay as F}from"./data-display/user.mjs";import{AlertDialog as I,AlertDialogAction as L,AlertDialogCancel as R,AlertDialogContent as z,AlertDialogDescription as B,AlertDialogFooter as V,AlertDialogHeader as H,AlertDialogOverlay as U,AlertDialogPortal as W,AlertDialogTitle as G,AlertDialogTrigger as K}from"./ui/alert-dialog.mjs";import{ConfirmDialog as q}from"./dialogs/confirm-dialog.mjs";import{Title as J}from"./typography/title.mjs";import{Sheet as Y,SheetClose as X,SheetContent as Z,SheetDescription as Q,SheetFooter as $,SheetHeader as ee,SheetTitle as te,SheetTrigger as ne}from"./ui/sheet.mjs";import{DetailDialog as re}from"./dialogs/detail-dialog/index.mjs";import{ErrorDialog as ie}from"./dialogs/error-dialog.mjs";import{Dialog as ae,DialogClose as oe,DialogContent as se,DialogDescription as ce,DialogFooter as le,DialogHeader as ue,DialogOverlay as de,DialogPortal as fe,DialogTitle as pe,DialogTrigger as me}from"./ui/dialog.mjs";import{LoadingDialog as he}from"./dialogs/loading-dialog.mjs";import{ActivityHeatmapChart as ge,CandlestickChart as _e,ConversionFunnelChart as ve,CorrelationScatterChart as ye,DonutChart as be,GainLossBarChart as xe,IndexedPerformanceLineChart as Se,MetricRadarChart as Ce,MirroredBarChart as we,OrdersBarChart as Te,PortfolioAllocationTreemap as Ee,PriceRangeAreaChart as De,RevenueAreaChart as Oe,RevenueOrdersComposedChart as ke,SalesTargetRadialChart as Ae,SankeyFlowChart as je,SparklineChart as Me,StackedAreaChart as Ne,TopProductsBarChart as Pe,VolumeBarChart as Fe,WaterfallChart as Ie,computeIndexedSeries as Le,formatCompactNumber as Re,formatCurrency as ze,formatPercent as Be,formatSignedPercent as Ve,getChartColor as He,getDirectionColor as Ue,toDateLabel as We}from"./features/charts/index.mjs";import{Description as Ge,DescriptionBadge as Ke,DescriptionBoolean as qe,DescriptionCopy as Je,DescriptionDate as Ye,DescriptionEmpty as Xe,DescriptionHeader as Ze,DescriptionImages as Qe,DescriptionItem as $e,DescriptionLink as et,DescriptionLongText as tt,DescriptionName as nt,DescriptionNumberPhone as rt,DescriptionSection as it,DescriptionStatistic as at,DescriptionStatus as ot,DescriptionTagList as st,DescriptionUser as ct}from"./features/descriptions/index.mjs";import{Command as lt,CommandDialog as ut,CommandEmpty as dt,CommandGroup as ft,CommandInput as pt,CommandItem as mt,CommandList as ht,CommandSeparator as gt,CommandShortcut as _t}from"./ui/command.mjs";import{t as vt}from"./search-modal-Cdmi2iyV.mjs";import{A as yt,C as bt,D as xt,E as St,F as Ct,G as wt,H as Tt,I as Et,K as Dt,L as Ot,M as kt,N as At,O as jt,P as Mt,Q as Nt,R as Pt,S as Ft,T as It,U as Lt,V as Rt,W as zt,_ as Bt,a as Vt,b as Ht,c as Ut,d as Wt,f as Gt,g as Kt,h as qt,i as Jt,j as Yt,k as Xt,l as Zt,m as Qt,n as $t,o as en,p as tn,r as nn,s as rn,t as an,u as on,v as sn,w as cn,x as ln,y as un}from"./tables-BGzwkdFO.mjs";import{Checkbox as dn}from"./ui/checkbox.mjs";import{DropdownMenu as fn,DropdownMenuCheckboxItem as pn,DropdownMenuContent as mn,DropdownMenuGroup as hn,DropdownMenuItem as gn,DropdownMenuLabel as _n,DropdownMenuPortal as vn,DropdownMenuRadioGroup as yn,DropdownMenuRadioItem as bn,DropdownMenuSeparator as xn,DropdownMenuShortcut as Sn,DropdownMenuSub as Cn,DropdownMenuSubContent as wn,DropdownMenuSubTrigger as Tn,DropdownMenuTrigger as En}from"./ui/dropdown-menu.mjs";import{Spinner as Dn}from"./ui/spinner.mjs";import{ResizableHandle as On,ResizablePanel as kn,ResizablePanelGroup as An}from"./ui/resizable.mjs";import{A as jn,B as Mn,C as Nn,D as Pn,E as Fn,F as In,G as Ln,H as Rn,I as zn,K as Bn,L as Vn,M as Hn,N as Un,O as Wn,P as Gn,R as Kn,S as qn,T as Jn,U as Yn,V as Xn,W as Zn,_ as Qn,a as $n,b as er,c as tr,d as nr,f as rr,g as ir,h as ar,i as or,j as sr,k as cr,l as lr,m as ur,n as dr,o as fr,p as pr,r as mr,s as hr,t as gr,u as _r,v as vr,w as yr,x as br,y as xr,z as Sr}from"./tanstack-form-B6mzOylW.mjs";import{Popover as Cr,PopoverAnchor as wr,PopoverClose as Tr,PopoverContent as Er,PopoverTrigger as Dr}from"./ui/popover.mjs";import{n as Or,t as kr}from"./text-editor-BYE2-G5K.mjs";import{Input as Ar}from"./ui/input.mjs";import{Separator as jr}from"./ui/separator.mjs";import{t as Mr}from"./cms-layout-ePySxIQN.mjs";import{t as Nr}from"./payment-layout-DS5CEH1h.mjs";import{Grid as Pr}from"./layouts/grid.mjs";import{FeatureDeveloping as Fr}from"./pages/FeatureDeveloping.mjs";import{FeatureFixing as Ir}from"./pages/FeatureFixing.mjs";import{NotAuthorized as Lr}from"./pages/NotAuthorized.mjs";import{NotFound as Rr}from"./pages/NotFound.mjs";import{n as zr,r as Br,t as Vr}from"./alert-OD1KJTEV.mjs";import{Label as Hr}from"./ui/label.mjs";import{LoginPage as Ur}from"./pages/LoginPage.mjs";import{RegisterPage as Wr}from"./pages/RegisterPage.mjs";import{InputOTP as Gr,InputOTPGroup as Kr,InputOTPSeparator as qr,InputOTPSlot as Jr}from"./ui/input-otp.mjs";import{VerifyEmailPage as Yr}from"./pages/VerifyEmailPage.mjs";import{Google as Xr}from"./systems/google.mjs";import{AddNewBtn as Zr}from"./ui/buttons/add-new.mjs";import{EditBtn as Qr}from"./ui/buttons/edit.mjs";import{RefreshBtn as $r}from"./ui/buttons/refresh.mjs";import{TrashBtn as ei}from"./ui/buttons/trash.mjs";import{UploadImageBtn as ti}from"./ui/buttons/upload-image.mjs";import{SearchInput as ni}from"./ui/inputs/search-input.mjs";import{AspectRatio as ri}from"./ui/aspect-ratio.mjs";import{Breadcrumb as ii,BreadcrumbEllipsis as ai,BreadcrumbItem as oi,BreadcrumbLink as si,BreadcrumbList as ci,BreadcrumbPage as li,BreadcrumbSeparator as ui}from"./ui/breadcrumb.mjs";import{ButtonGroup as di,ButtonGroupSeparator as fi,ButtonGroupText as pi,buttonGroupVariants as mi}from"./ui/button-group.mjs";import{Calendar as hi,CalendarDayButton as gi}from"./ui/calendar.mjs";import{Carousel as _i,CarouselContent as vi,CarouselItem as yi,CarouselNext as bi,CarouselPrevious as xi}from"./ui/carousel.mjs";import{ChartContainer as Si,ChartLegend as Ci,ChartLegendContent as wi,ChartStyle as Ti,ChartTooltip as Ei,ChartTooltipContent as Di,useChart as Oi}from"./ui/chart.mjs";import{Collapsible as ki,CollapsibleContent as Ai,CollapsibleTrigger as ji}from"./ui/collapsible.mjs";import{ContextMenu as Mi,ContextMenuCheckboxItem as Ni,ContextMenuContent as Pi,ContextMenuGroup as Fi,ContextMenuItem as Ii,ContextMenuLabel as Li,ContextMenuPortal as Ri,ContextMenuRadioGroup as zi,ContextMenuRadioItem as Bi,ContextMenuSeparator as Vi,ContextMenuShortcut as Hi,ContextMenuSub as Ui,ContextMenuSubContent as Wi,ContextMenuSubTrigger as Gi,ContextMenuTrigger as Ki}from"./ui/context-menu.mjs";import{Drawer as qi,DrawerClose as Ji,DrawerContent as Yi,DrawerDescription as Xi,DrawerFooter as Zi,DrawerHeader as Qi,DrawerOverlay as $i,DrawerPortal as ea,DrawerTitle as ta,DrawerTrigger as na}from"./ui/drawer.mjs";import{Empty as ra,EmptyContent as ia,EmptyDescription as aa,EmptyHeader as oa,EmptyMedia as sa,EmptyTitle as ca}from"./ui/empty.mjs";import{Progress as la}from"./ui/progress.mjs";import{FileUploader as ua}from"./ui/file-uploader.mjs";import{Form as da,FormControl as fa,FormDescription as pa,FormField as ma,FormItem as ha,FormLabel as ga,FormMessage as _a,useFormField as va}from"./ui/form.mjs";import{HoverCard as ya,HoverCardContent as ba,HoverCardTrigger as xa}from"./ui/hover-card.mjs";import{Item as Sa,ItemActions as Ca,ItemContent as wa,ItemDescription as Ta,ItemFooter as Ea,ItemGroup as Da,ItemHeader as Oa,ItemMedia as ka,ItemSeparator as Aa,ItemTitle as ja}from"./ui/item.mjs";import{Menubar as Ma,MenubarCheckboxItem as Na,MenubarContent as Pa,MenubarGroup as Fa,MenubarItem as Ia,MenubarLabel as La,MenubarMenu as Ra,MenubarPortal as za,MenubarRadioGroup as Ba,MenubarRadioItem as Va,MenubarSeparator as Ha,MenubarShortcut as Ua,MenubarSub as Wa,MenubarSubContent as Ga,MenubarSubTrigger as Ka,MenubarTrigger as qa}from"./ui/menubar.mjs";import{MultipleSelector as Ja,useDebounce as Ya}from"./ui/multi-select.mjs";import{NavigationMenu as Xa,NavigationMenuContent as Za,NavigationMenuIndicator as Qa,NavigationMenuItem as $a,NavigationMenuLink as eo,NavigationMenuList as to,NavigationMenuTrigger as no,NavigationMenuViewport as ro,navigationMenuTriggerStyle as io}from"./ui/navigation-menu.mjs";import{Pagination as ao,PaginationContent as oo,PaginationEllipsis as so,PaginationItem as co,PaginationLink as lo,PaginationNext as uo,PaginationPrevious as fo}from"./ui/pagination.mjs";import{RadioGroup as po,RadioGroupItem as mo}from"./ui/radio-group.mjs";import{ScrollArea as ho,ScrollBar as go}from"./ui/scroll-area.mjs";import{Select as _o,SelectContent as vo,SelectGroup as yo,SelectItem as bo,SelectLabel as xo,SelectSeparator as So,SelectTrigger as Co,SelectValue as wo}from"./ui/select.mjs";import{Slider as To}from"./ui/slider.mjs";import{Toaster as Eo,toast as Do}from"./ui/sonner.mjs";import{Switch as Oo}from"./ui/switch.mjs";import{Table as ko,TableBody as Ao,TableCaption as jo,TableCell as Mo,TableFooter as No,TableHead as Po,TableHeader as Fo,TableRow as Io}from"./ui/table.mjs";import{Tabs as Lo,TabsContent as Ro,TabsList as zo,TabsTrigger as Bo}from"./ui/tabs.mjs";import{Textarea as Vo}from"./ui/textarea.mjs";import{Toggle as Ho,toggleVariants as Uo}from"./ui/toggle.mjs";import{ToggleGroup as Wo,ToggleGroupItem as Go}from"./ui/toggle-group.mjs";export{ge as ActivityHeatmapChart,Zr as AddNewBtn,Vr as Alert,zr as AlertDescription,I as AlertDialog,L as AlertDialogAction,R as AlertDialogCancel,z as AlertDialogContent,B as AlertDialogDescription,V as AlertDialogFooter,H as AlertDialogHeader,U as AlertDialogOverlay,W as AlertDialogPortal,G as AlertDialogTitle,K as AlertDialogTrigger,Br as AlertTitle,gr as ArrayCol,dr as ArrayHeaderRow,ri as AspectRatio,M as Avatar,N as AvatarFallback,P as AvatarImage,b as Badge,ii as Breadcrumb,ai as BreadcrumbEllipsis,oi as BreadcrumbItem,si as BreadcrumbLink,ci as BreadcrumbList,li as BreadcrumbPage,ui as BreadcrumbSeparator,e as Button,di as ButtonGroup,fi as ButtonGroupSeparator,pi as ButtonGroupText,Mr as CMSLayout,hi as Calendar,gi as CalendarDayButton,_e as CandlestickChart,r as Card,i as CardAction,a as CardContent,o as CardDescription,s as CardFooter,c as CardHeader,l as CardTitle,_i as Carousel,vi as CarouselContent,yi as CarouselItem,bi as CarouselNext,xi as CarouselPrevious,Si as ChartContainer,Ci as ChartLegend,wi as ChartLegendContent,Ti as ChartStyle,Ei as ChartTooltip,Di as ChartTooltipContent,dn as Checkbox,mr as CheckboxField,ki as Collapsible,Ai as CollapsibleContent,ji as CollapsibleTrigger,or as ComboboxField,lt as Command,ut as CommandDialog,dt as CommandEmpty,ft as CommandGroup,pt as CommandInput,mt as CommandItem,ht as CommandList,gt as CommandSeparator,_t as CommandShortcut,q as ConfirmDialog,Mi as ContextMenu,Ni as ContextMenuCheckboxItem,Pi as ContextMenuContent,Fi as ContextMenuGroup,Ii as ContextMenuItem,Li as ContextMenuLabel,Ri as ContextMenuPortal,zi as ContextMenuRadioGroup,Bi as ContextMenuRadioItem,Vi as ContextMenuSeparator,Hi as ContextMenuShortcut,Ui as ContextMenuSub,Wi as ContextMenuSubContent,Gi as ContextMenuSubTrigger,Ki as ContextMenuTrigger,ve as ConversionFunnelChart,ye as CorrelationScatterChart,g as CountryDisplay,_ as DataList,v as DataListItem,y as DateDisplay,$n as DateField,E as DateTooltip,Ge as Description,Ke as DescriptionBadge,qe as DescriptionBoolean,Je as DescriptionCopy,Ye as DescriptionDate,Xe as DescriptionEmpty,Ze as DescriptionHeader,Qe as DescriptionImages,$e as DescriptionItem,et as DescriptionLink,tt as DescriptionLongText,nt as DescriptionName,rt as DescriptionNumberPhone,it as DescriptionSection,at as DescriptionStatistic,ot as DescriptionStatus,st as DescriptionTagList,ct as DescriptionUser,re as DetailDialog,ae as Dialog,oe as DialogClose,se as DialogContent,ce as DialogDescription,le as DialogFooter,ue as DialogHeader,de as DialogOverlay,fe as DialogPortal,pe as DialogTitle,me as DialogTrigger,be as DonutChart,qi as Drawer,Ji as DrawerClose,Yi as DrawerContent,Xi as DrawerDescription,Zi as DrawerFooter,Qi as DrawerHeader,$i as DrawerOverlay,ea as DrawerPortal,ta as DrawerTitle,na as DrawerTrigger,fn as DropdownMenu,pn as DropdownMenuCheckboxItem,mn as DropdownMenuContent,hn as DropdownMenuGroup,gn as DropdownMenuItem,_n as DropdownMenuLabel,vn as DropdownMenuPortal,yn as DropdownMenuRadioGroup,bn as DropdownMenuRadioItem,xn as DropdownMenuSeparator,Sn as DropdownMenuShortcut,Cn as DropdownMenuSub,wn as DropdownMenuSubContent,Tn as DropdownMenuSubTrigger,En as DropdownMenuTrigger,Qr as EditBtn,fr as EmailField,ra as Empty,ia as EmptyContent,aa as EmptyDescription,D as EmptyDisplay,oa as EmptyHeader,sa as EmptyMedia,ca as EmptyTitle,ie as ErrorDialog,Fr as FeatureDeveloping,Ir as FeatureFixing,hr as Field,tr as FieldContent,lr as FieldContentMain,_r as FieldError,nr as FieldGroup,rr as FieldLabel,pr as FieldSeparator,ua as FileUploader,h as Flex,da as Form,fa as FormControl,pa as FormDescription,ma as FormField,ha as FormItem,ga as FormLabel,_a as FormMessage,xe as GainLossBarChart,Xr as Google,Pr as Grid,f as GridProductCard,ya as HoverCard,ba as HoverCardContent,xa as HoverCardTrigger,d as Image,Se as IndexedPerformanceLineChart,Ar as Input,Gr as InputOTP,Kr as InputOTPGroup,qr as InputOTPSeparator,Jr as InputOTPSlot,Sa as Item,Ca as ItemActions,wa as ItemContent,Ta as ItemDescription,Ea as ItemFooter,Da as ItemGroup,Oa as ItemHeader,ka as ItemMedia,Aa as ItemSeparator,ja as ItemTitle,Hr as Label,he as LoadingDialog,Ur as LoginPage,Ma as Menubar,Na as MenubarCheckboxItem,Pa as MenubarContent,Fa as MenubarGroup,Ia as MenubarItem,La as MenubarLabel,Ra as MenubarMenu,za as MenubarPortal,Ba as MenubarRadioGroup,Va as MenubarRadioItem,Ha as MenubarSeparator,Ua as MenubarShortcut,Wa as MenubarSub,Ga as MenubarSubContent,Ka as MenubarSubTrigger,qa as MenubarTrigger,Ce as MetricRadarChart,we as MirroredBarChart,Ja as MultipleSelector,O as NameDisplay,Xa as NavigationMenu,Za as NavigationMenuContent,Qa as NavigationMenuIndicator,$a as NavigationMenuItem,eo as NavigationMenuLink,to as NavigationMenuList,no as NavigationMenuTrigger,ro as NavigationMenuViewport,Lr as NotAuthorized,Rr as NotFound,ur as NumberField,Te as OrdersBarChart,ao as Pagination,oo as PaginationContent,so as PaginationEllipsis,co as PaginationItem,lo as PaginationLink,uo as PaginationNext,fo as PaginationPrevious,t as Paragraph,ar as PasswordField,Nr as PaymentLayout,k as PhoneNumberDisplay,Cr as Popover,wr as PopoverAnchor,Tr as PopoverClose,Er as PopoverContent,Dr as PopoverTrigger,Ee as PortfolioAllocationTreemap,De as PriceRangeAreaChart,p as ProductCard,la as Progress,po as RadioGroup,ir as RadioGroupField,mo as RadioGroupItem,$r as RefreshBtn,Wr as RegisterPage,On as ResizableHandle,kn as ResizablePanel,An as ResizablePanelGroup,Oe as RevenueAreaChart,ke as RevenueOrdersComposedChart,A as RoleBadge,Ae as SalesTargetRadialChart,je as SankeyFlowChart,ho as ScrollArea,go as ScrollBar,ni as SearchInput,vt as SearchModal,_o as Select,vo as SelectContent,Qn as SelectField,yo as SelectGroup,bo as SelectItem,xo as SelectLabel,So as SelectSeparator,Co as SelectTrigger,wo as SelectValue,jr as Separator,Y as Sheet,X as SheetClose,Z as SheetContent,Q as SheetDescription,$ as SheetFooter,ee as SheetHeader,te as SheetTitle,ne as SheetTrigger,vr as SimpleArrayField,xr as SimpleBooleanField,m as SimpleCard,er as SimpleComboboxField,br as SimpleDateField,qn as SimpleEmailField,Nn as SimpleNumberField,yr as SimplePasswordField,Jn as SimpleRadioGroupField,Fn as SimpleSelectField,Pn as SimpleTextField,Wn as SimpleTextareaField,u as Skeleton,To as Slider,Me as SparklineChart,Dn as Spinner,Ne as StackedAreaChart,j as Statistic,Oo as Switch,cr as SwitchField,ko as Table,Ao as TableBody,jo as TableCaption,Mo as TableCell,No as TableFooter,Po as TableHead,Fo as TableHeader,Io as TableRow,Lo as Tabs,Ro as TabsContent,zo as TabsList,Bo as TabsTrigger,jn as TanStackActionSubmit,sr as TanStackActionsForm,Hn as TanStackCardForm,Un as TanStackContainerForm,Gn as TanStackDialogForm,In as TanStackFieldGroup,zn as TanStackPopoverForm,Vn as TanStackSectionForm,Kn as TanStackTitleField,kr as TextEditor,Sr as TextEditorField,Or as TextEditorToolbar,Mn as TextField,Vo as Textarea,Xn as TextareaField,J as Title,Eo as Toaster,Ho as Toggle,Wo as ToggleGroup,Go as ToggleGroupItem,S as Tooltip,C as TooltipContent,w as TooltipProvider,T as TooltipTrigger,Pe as TopProductsBarChart,ei as TrashBtn,an as UITableAnalysisPanel,$t as UITableAvatarNameDisplay,nn as UITableBadgeDisplay,Dt as UITableBody,Jt as UITableBooleanDisplay,wt as UITableCell,zt as UITableCellActions,Lt as UITableCellSelect,xt as UITableContainer,Vt as UITableCurrencyDisplay,en as UITableDateDisplay,rn as UITableDescriptionDisplay,Ut as UITableEditButton,Zt as UITableEmailDisplay,Nt as UITableEmpty,Tt as UITableEmptyDisplay,on as UITableFilter,Rt as UITableFooter,Pt as UITableFooterRow,Ot as UITableHead,Ct as UITableHeadCell,Et as UITableHeadCellOption,Mt as UITableHeadCellSelect,At as UITableHeadRow,kt as UITableInnerTable,Yt as UITableInnerWrapper,Wt as UITableListDisplay,yt as UITableLoadMore,Gt as UITableMoreButton,tn as UITableNameDisplay,Qt as UITablePermalink,qt as UITablePhoneNumberDisplay,Kt as UITableProgressDisplay,St as UITableProvider,Bt as UITableRemoveButton,Xt as UITableRow,sn as UITableStatisticDisplay,un as UITableStatusDisplay,Ht as UITableSummaryBar,ln as UITableToggleButton,Ft as UITableTooltip,bt as UITableTooltipActions,cn as UITableTooltipFilter,It as UITableUserDataDisplay,jt as UITableWrapper,ti as UploadImageBtn,F as UserDataDisplay,Yr as VerifyEmailPage,Fe as VolumeBarChart,Ie as WaterfallChart,x as badgeVariants,mi as buttonGroupVariants,Le as computeIndexedSeries,Re as formatCompactNumber,ze as formatCurrency,Be as formatPercent,Ve as formatSignedPercent,He as getChartColor,Ue as getDirectionColor,io as navigationMenuTriggerStyle,n as paragraphVariants,We as toDateLabel,Do as toast,Uo as toggleVariants,Oi as useChart,Ya as useDebounce,va as useFormField,Ln as useTanStackFieldContext,Rn as useTanStackForm,Bn as useTanStackFormContext,Yn as withTanStackFieldGroup,Zn as withTanStackForm};
|
|
1
|
+
import{Button as e}from"./ui/button.mjs";import{Paragraph as t,paragraphVariants as n}from"./typography/paragraph.mjs";import{Card as r,CardAction as i,CardContent as a,CardDescription as o,CardFooter as s,CardHeader as c,CardTitle as l}from"./ui/card.mjs";import{Skeleton as u}from"./ui/skeleton.mjs";import{Image as d}from"./ui/image.mjs";import{GridProductCard as f}from"./cards/grid-product-card.mjs";import{ProductCard as p}from"./cards/product-card.mjs";import{SimpleCard as m}from"./cards/simple-card.mjs";import{Flex as h}from"./layouts/flex.mjs";import{CountryDisplay as g}from"./data-display/country.mjs";import{DataList as _,DataListItem as v}from"./data-display/data-list.mjs";import{t as y}from"./date-Nsz0Pewe.mjs";import{Badge as b,badgeVariants as x}from"./ui/badge.mjs";import{Tooltip as S,TooltipContent as C,TooltipProvider as w,TooltipTrigger as T}from"./ui/tooltip.mjs";import{DateTooltip as E}from"./data-display/date-tooltip.mjs";import{EmptyDisplay as D}from"./data-display/empty.mjs";import{NameDisplay as O}from"./data-display/name.mjs";import{PhoneNumberDisplay as k}from"./data-display/phone-number.mjs";import{RoleBadge as A}from"./data-display/role-badge.mjs";import{Statistic as j}from"./data-display/statistic.mjs";import{Avatar as M,AvatarFallback as N,AvatarImage as P}from"./ui/avatar.mjs";import{UserDataDisplay as F}from"./data-display/user.mjs";import{AlertDialog as I,AlertDialogAction as L,AlertDialogCancel as R,AlertDialogContent as z,AlertDialogDescription as B,AlertDialogFooter as V,AlertDialogHeader as H,AlertDialogOverlay as U,AlertDialogPortal as W,AlertDialogTitle as G,AlertDialogTrigger as K}from"./ui/alert-dialog.mjs";import{ConfirmDialog as q}from"./dialogs/confirm-dialog.mjs";import{Title as J}from"./typography/title.mjs";import{Sheet as Y,SheetClose as X,SheetContent as Z,SheetDescription as Q,SheetFooter as $,SheetHeader as ee,SheetTitle as te,SheetTrigger as ne}from"./ui/sheet.mjs";import{DetailDialog as re}from"./dialogs/detail-dialog/index.mjs";import{ErrorDialog as ie}from"./dialogs/error-dialog.mjs";import{Dialog as ae,DialogClose as oe,DialogContent as se,DialogDescription as ce,DialogFooter as le,DialogHeader as ue,DialogOverlay as de,DialogPortal as fe,DialogTitle as pe,DialogTrigger as me}from"./ui/dialog.mjs";import{LoadingDialog as he}from"./dialogs/loading-dialog.mjs";import{ActivityHeatmapChart as ge,CandlestickChart as _e,ConversionFunnelChart as ve,CorrelationScatterChart as ye,DonutChart as be,GainLossBarChart as xe,IndexedPerformanceLineChart as Se,MetricRadarChart as Ce,MirroredBarChart as we,OrdersBarChart as Te,PortfolioAllocationTreemap as Ee,PriceRangeAreaChart as De,RevenueAreaChart as Oe,RevenueOrdersComposedChart as ke,SalesTargetRadialChart as Ae,SankeyFlowChart as je,SparklineChart as Me,StackedAreaChart as Ne,TopProductsBarChart as Pe,VolumeBarChart as Fe,WaterfallChart as Ie,computeIndexedSeries as Le,formatCompactNumber as Re,formatCurrency as ze,formatPercent as Be,formatSignedPercent as Ve,getChartColor as He,getDirectionColor as Ue,toDateLabel as We}from"./features/charts/index.mjs";import{Description as Ge,DescriptionBadge as Ke,DescriptionBoolean as qe,DescriptionCopy as Je,DescriptionDate as Ye,DescriptionEmpty as Xe,DescriptionHeader as Ze,DescriptionImages as Qe,DescriptionItem as $e,DescriptionLink as et,DescriptionLongText as tt,DescriptionName as nt,DescriptionNumberPhone as rt,DescriptionSection as it,DescriptionStatistic as at,DescriptionStatus as ot,DescriptionTagList as st,DescriptionUser as ct}from"./features/descriptions/index.mjs";import{Command as lt,CommandDialog as ut,CommandEmpty as dt,CommandGroup as ft,CommandInput as pt,CommandItem as mt,CommandList as ht,CommandSeparator as gt,CommandShortcut as _t}from"./ui/command.mjs";import{t as vt}from"./search-modal-Cdmi2iyV.mjs";import{A as yt,C as bt,D as xt,E as St,F as Ct,G as wt,H as Tt,I as Et,K as Dt,L as Ot,M as kt,N as At,O as jt,P as Mt,Q as Nt,R as Pt,S as Ft,T as It,U as Lt,V as Rt,W as zt,_ as Bt,a as Vt,b as Ht,c as Ut,d as Wt,f as Gt,g as Kt,h as qt,i as Jt,j as Yt,k as Xt,l as Zt,m as Qt,n as $t,o as en,p as tn,r as nn,s as rn,t as an,u as on,v as sn,w as cn,x as ln,y as un}from"./tables-BGzwkdFO.mjs";import{Checkbox as dn}from"./ui/checkbox.mjs";import{DropdownMenu as fn,DropdownMenuCheckboxItem as pn,DropdownMenuContent as mn,DropdownMenuGroup as hn,DropdownMenuItem as gn,DropdownMenuLabel as _n,DropdownMenuPortal as vn,DropdownMenuRadioGroup as yn,DropdownMenuRadioItem as bn,DropdownMenuSeparator as xn,DropdownMenuShortcut as Sn,DropdownMenuSub as Cn,DropdownMenuSubContent as wn,DropdownMenuSubTrigger as Tn,DropdownMenuTrigger as En}from"./ui/dropdown-menu.mjs";import{Spinner as Dn}from"./ui/spinner.mjs";import{ResizableHandle as On,ResizablePanel as kn,ResizablePanelGroup as An}from"./ui/resizable.mjs";import{A as jn,B as Mn,C as Nn,D as Pn,E as Fn,F as In,G as Ln,H as Rn,I as zn,K as Bn,L as Vn,M as Hn,N as Un,O as Wn,P as Gn,R as Kn,S as qn,T as Jn,U as Yn,V as Xn,W as Zn,_ as Qn,a as $n,b as er,c as tr,d as nr,f as rr,g as ir,h as ar,i as or,j as sr,k as cr,l as lr,m as ur,n as dr,o as fr,p as pr,r as mr,s as hr,t as gr,u as _r,v as vr,w as yr,x as br,y as xr,z as Sr}from"./tanstack-form-CKAWexet.mjs";import{Popover as Cr,PopoverAnchor as wr,PopoverClose as Tr,PopoverContent as Er,PopoverTrigger as Dr}from"./ui/popover.mjs";import{n as Or,t as kr}from"./text-editor-BYE2-G5K.mjs";import{Input as Ar}from"./ui/input.mjs";import{Separator as jr}from"./ui/separator.mjs";import{t as Mr}from"./cms-layout-ePySxIQN.mjs";import{t as Nr}from"./payment-layout-DS5CEH1h.mjs";import{Grid as Pr}from"./layouts/grid.mjs";import{FeatureDeveloping as Fr}from"./pages/FeatureDeveloping.mjs";import{FeatureFixing as Ir}from"./pages/FeatureFixing.mjs";import{NotAuthorized as Lr}from"./pages/NotAuthorized.mjs";import{NotFound as Rr}from"./pages/NotFound.mjs";import{n as zr,r as Br,t as Vr}from"./alert-OD1KJTEV.mjs";import{Label as Hr}from"./ui/label.mjs";import{LoginPage as Ur}from"./pages/LoginPage.mjs";import{RegisterPage as Wr}from"./pages/RegisterPage.mjs";import{InputOTP as Gr,InputOTPGroup as Kr,InputOTPSeparator as qr,InputOTPSlot as Jr}from"./ui/input-otp.mjs";import{VerifyEmailPage as Yr}from"./pages/VerifyEmailPage.mjs";import{Google as Xr}from"./systems/google.mjs";import{AddNewBtn as Zr}from"./ui/buttons/add-new.mjs";import{EditBtn as Qr}from"./ui/buttons/edit.mjs";import{RefreshBtn as $r}from"./ui/buttons/refresh.mjs";import{TrashBtn as ei}from"./ui/buttons/trash.mjs";import{UploadImageBtn as ti}from"./ui/buttons/upload-image.mjs";import{SearchInput as ni}from"./ui/inputs/search-input.mjs";import{AspectRatio as ri}from"./ui/aspect-ratio.mjs";import{Breadcrumb as ii,BreadcrumbEllipsis as ai,BreadcrumbItem as oi,BreadcrumbLink as si,BreadcrumbList as ci,BreadcrumbPage as li,BreadcrumbSeparator as ui}from"./ui/breadcrumb.mjs";import{ButtonGroup as di,ButtonGroupSeparator as fi,ButtonGroupText as pi,buttonGroupVariants as mi}from"./ui/button-group.mjs";import{Calendar as hi,CalendarDayButton as gi}from"./ui/calendar.mjs";import{Carousel as _i,CarouselContent as vi,CarouselItem as yi,CarouselNext as bi,CarouselPrevious as xi}from"./ui/carousel.mjs";import{ChartContainer as Si,ChartLegend as Ci,ChartLegendContent as wi,ChartStyle as Ti,ChartTooltip as Ei,ChartTooltipContent as Di,useChart as Oi}from"./ui/chart.mjs";import{Collapsible as ki,CollapsibleContent as Ai,CollapsibleTrigger as ji}from"./ui/collapsible.mjs";import{ContextMenu as Mi,ContextMenuCheckboxItem as Ni,ContextMenuContent as Pi,ContextMenuGroup as Fi,ContextMenuItem as Ii,ContextMenuLabel as Li,ContextMenuPortal as Ri,ContextMenuRadioGroup as zi,ContextMenuRadioItem as Bi,ContextMenuSeparator as Vi,ContextMenuShortcut as Hi,ContextMenuSub as Ui,ContextMenuSubContent as Wi,ContextMenuSubTrigger as Gi,ContextMenuTrigger as Ki}from"./ui/context-menu.mjs";import{Drawer as qi,DrawerClose as Ji,DrawerContent as Yi,DrawerDescription as Xi,DrawerFooter as Zi,DrawerHeader as Qi,DrawerOverlay as $i,DrawerPortal as ea,DrawerTitle as ta,DrawerTrigger as na}from"./ui/drawer.mjs";import{Empty as ra,EmptyContent as ia,EmptyDescription as aa,EmptyHeader as oa,EmptyMedia as sa,EmptyTitle as ca}from"./ui/empty.mjs";import{Progress as la}from"./ui/progress.mjs";import{FileUploader as ua}from"./ui/file-uploader.mjs";import{Form as da,FormControl as fa,FormDescription as pa,FormField as ma,FormItem as ha,FormLabel as ga,FormMessage as _a,useFormField as va}from"./ui/form.mjs";import{HoverCard as ya,HoverCardContent as ba,HoverCardTrigger as xa}from"./ui/hover-card.mjs";import{Item as Sa,ItemActions as Ca,ItemContent as wa,ItemDescription as Ta,ItemFooter as Ea,ItemGroup as Da,ItemHeader as Oa,ItemMedia as ka,ItemSeparator as Aa,ItemTitle as ja}from"./ui/item.mjs";import{Menubar as Ma,MenubarCheckboxItem as Na,MenubarContent as Pa,MenubarGroup as Fa,MenubarItem as Ia,MenubarLabel as La,MenubarMenu as Ra,MenubarPortal as za,MenubarRadioGroup as Ba,MenubarRadioItem as Va,MenubarSeparator as Ha,MenubarShortcut as Ua,MenubarSub as Wa,MenubarSubContent as Ga,MenubarSubTrigger as Ka,MenubarTrigger as qa}from"./ui/menubar.mjs";import{MultipleSelector as Ja,useDebounce as Ya}from"./ui/multi-select.mjs";import{NavigationMenu as Xa,NavigationMenuContent as Za,NavigationMenuIndicator as Qa,NavigationMenuItem as $a,NavigationMenuLink as eo,NavigationMenuList as to,NavigationMenuTrigger as no,NavigationMenuViewport as ro,navigationMenuTriggerStyle as io}from"./ui/navigation-menu.mjs";import{Pagination as ao,PaginationContent as oo,PaginationEllipsis as so,PaginationItem as co,PaginationLink as lo,PaginationNext as uo,PaginationPrevious as fo}from"./ui/pagination.mjs";import{RadioGroup as po,RadioGroupItem as mo}from"./ui/radio-group.mjs";import{ScrollArea as ho,ScrollBar as go}from"./ui/scroll-area.mjs";import{Select as _o,SelectContent as vo,SelectGroup as yo,SelectItem as bo,SelectLabel as xo,SelectSeparator as So,SelectTrigger as Co,SelectValue as wo}from"./ui/select.mjs";import{Slider as To}from"./ui/slider.mjs";import{Toaster as Eo,toast as Do}from"./ui/sonner.mjs";import{Switch as Oo}from"./ui/switch.mjs";import{Table as ko,TableBody as Ao,TableCaption as jo,TableCell as Mo,TableFooter as No,TableHead as Po,TableHeader as Fo,TableRow as Io}from"./ui/table.mjs";import{Tabs as Lo,TabsContent as Ro,TabsList as zo,TabsTrigger as Bo}from"./ui/tabs.mjs";import{Textarea as Vo}from"./ui/textarea.mjs";import{Toggle as Ho,toggleVariants as Uo}from"./ui/toggle.mjs";import{ToggleGroup as Wo,ToggleGroupItem as Go}from"./ui/toggle-group.mjs";export{ge as ActivityHeatmapChart,Zr as AddNewBtn,Vr as Alert,zr as AlertDescription,I as AlertDialog,L as AlertDialogAction,R as AlertDialogCancel,z as AlertDialogContent,B as AlertDialogDescription,V as AlertDialogFooter,H as AlertDialogHeader,U as AlertDialogOverlay,W as AlertDialogPortal,G as AlertDialogTitle,K as AlertDialogTrigger,Br as AlertTitle,gr as ArrayCol,dr as ArrayHeaderRow,ri as AspectRatio,M as Avatar,N as AvatarFallback,P as AvatarImage,b as Badge,ii as Breadcrumb,ai as BreadcrumbEllipsis,oi as BreadcrumbItem,si as BreadcrumbLink,ci as BreadcrumbList,li as BreadcrumbPage,ui as BreadcrumbSeparator,e as Button,di as ButtonGroup,fi as ButtonGroupSeparator,pi as ButtonGroupText,Mr as CMSLayout,hi as Calendar,gi as CalendarDayButton,_e as CandlestickChart,r as Card,i as CardAction,a as CardContent,o as CardDescription,s as CardFooter,c as CardHeader,l as CardTitle,_i as Carousel,vi as CarouselContent,yi as CarouselItem,bi as CarouselNext,xi as CarouselPrevious,Si as ChartContainer,Ci as ChartLegend,wi as ChartLegendContent,Ti as ChartStyle,Ei as ChartTooltip,Di as ChartTooltipContent,dn as Checkbox,mr as CheckboxField,ki as Collapsible,Ai as CollapsibleContent,ji as CollapsibleTrigger,or as ComboboxField,lt as Command,ut as CommandDialog,dt as CommandEmpty,ft as CommandGroup,pt as CommandInput,mt as CommandItem,ht as CommandList,gt as CommandSeparator,_t as CommandShortcut,q as ConfirmDialog,Mi as ContextMenu,Ni as ContextMenuCheckboxItem,Pi as ContextMenuContent,Fi as ContextMenuGroup,Ii as ContextMenuItem,Li as ContextMenuLabel,Ri as ContextMenuPortal,zi as ContextMenuRadioGroup,Bi as ContextMenuRadioItem,Vi as ContextMenuSeparator,Hi as ContextMenuShortcut,Ui as ContextMenuSub,Wi as ContextMenuSubContent,Gi as ContextMenuSubTrigger,Ki as ContextMenuTrigger,ve as ConversionFunnelChart,ye as CorrelationScatterChart,g as CountryDisplay,_ as DataList,v as DataListItem,y as DateDisplay,$n as DateField,E as DateTooltip,Ge as Description,Ke as DescriptionBadge,qe as DescriptionBoolean,Je as DescriptionCopy,Ye as DescriptionDate,Xe as DescriptionEmpty,Ze as DescriptionHeader,Qe as DescriptionImages,$e as DescriptionItem,et as DescriptionLink,tt as DescriptionLongText,nt as DescriptionName,rt as DescriptionNumberPhone,it as DescriptionSection,at as DescriptionStatistic,ot as DescriptionStatus,st as DescriptionTagList,ct as DescriptionUser,re as DetailDialog,ae as Dialog,oe as DialogClose,se as DialogContent,ce as DialogDescription,le as DialogFooter,ue as DialogHeader,de as DialogOverlay,fe as DialogPortal,pe as DialogTitle,me as DialogTrigger,be as DonutChart,qi as Drawer,Ji as DrawerClose,Yi as DrawerContent,Xi as DrawerDescription,Zi as DrawerFooter,Qi as DrawerHeader,$i as DrawerOverlay,ea as DrawerPortal,ta as DrawerTitle,na as DrawerTrigger,fn as DropdownMenu,pn as DropdownMenuCheckboxItem,mn as DropdownMenuContent,hn as DropdownMenuGroup,gn as DropdownMenuItem,_n as DropdownMenuLabel,vn as DropdownMenuPortal,yn as DropdownMenuRadioGroup,bn as DropdownMenuRadioItem,xn as DropdownMenuSeparator,Sn as DropdownMenuShortcut,Cn as DropdownMenuSub,wn as DropdownMenuSubContent,Tn as DropdownMenuSubTrigger,En as DropdownMenuTrigger,Qr as EditBtn,fr as EmailField,ra as Empty,ia as EmptyContent,aa as EmptyDescription,D as EmptyDisplay,oa as EmptyHeader,sa as EmptyMedia,ca as EmptyTitle,ie as ErrorDialog,Fr as FeatureDeveloping,Ir as FeatureFixing,hr as Field,tr as FieldContent,lr as FieldContentMain,_r as FieldError,nr as FieldGroup,rr as FieldLabel,pr as FieldSeparator,ua as FileUploader,h as Flex,da as Form,fa as FormControl,pa as FormDescription,ma as FormField,ha as FormItem,ga as FormLabel,_a as FormMessage,xe as GainLossBarChart,Xr as Google,Pr as Grid,f as GridProductCard,ya as HoverCard,ba as HoverCardContent,xa as HoverCardTrigger,d as Image,Se as IndexedPerformanceLineChart,Ar as Input,Gr as InputOTP,Kr as InputOTPGroup,qr as InputOTPSeparator,Jr as InputOTPSlot,Sa as Item,Ca as ItemActions,wa as ItemContent,Ta as ItemDescription,Ea as ItemFooter,Da as ItemGroup,Oa as ItemHeader,ka as ItemMedia,Aa as ItemSeparator,ja as ItemTitle,Hr as Label,he as LoadingDialog,Ur as LoginPage,Ma as Menubar,Na as MenubarCheckboxItem,Pa as MenubarContent,Fa as MenubarGroup,Ia as MenubarItem,La as MenubarLabel,Ra as MenubarMenu,za as MenubarPortal,Ba as MenubarRadioGroup,Va as MenubarRadioItem,Ha as MenubarSeparator,Ua as MenubarShortcut,Wa as MenubarSub,Ga as MenubarSubContent,Ka as MenubarSubTrigger,qa as MenubarTrigger,Ce as MetricRadarChart,we as MirroredBarChart,Ja as MultipleSelector,O as NameDisplay,Xa as NavigationMenu,Za as NavigationMenuContent,Qa as NavigationMenuIndicator,$a as NavigationMenuItem,eo as NavigationMenuLink,to as NavigationMenuList,no as NavigationMenuTrigger,ro as NavigationMenuViewport,Lr as NotAuthorized,Rr as NotFound,ur as NumberField,Te as OrdersBarChart,ao as Pagination,oo as PaginationContent,so as PaginationEllipsis,co as PaginationItem,lo as PaginationLink,uo as PaginationNext,fo as PaginationPrevious,t as Paragraph,ar as PasswordField,Nr as PaymentLayout,k as PhoneNumberDisplay,Cr as Popover,wr as PopoverAnchor,Tr as PopoverClose,Er as PopoverContent,Dr as PopoverTrigger,Ee as PortfolioAllocationTreemap,De as PriceRangeAreaChart,p as ProductCard,la as Progress,po as RadioGroup,ir as RadioGroupField,mo as RadioGroupItem,$r as RefreshBtn,Wr as RegisterPage,On as ResizableHandle,kn as ResizablePanel,An as ResizablePanelGroup,Oe as RevenueAreaChart,ke as RevenueOrdersComposedChart,A as RoleBadge,Ae as SalesTargetRadialChart,je as SankeyFlowChart,ho as ScrollArea,go as ScrollBar,ni as SearchInput,vt as SearchModal,_o as Select,vo as SelectContent,Qn as SelectField,yo as SelectGroup,bo as SelectItem,xo as SelectLabel,So as SelectSeparator,Co as SelectTrigger,wo as SelectValue,jr as Separator,Y as Sheet,X as SheetClose,Z as SheetContent,Q as SheetDescription,$ as SheetFooter,ee as SheetHeader,te as SheetTitle,ne as SheetTrigger,vr as SimpleArrayField,xr as SimpleBooleanField,m as SimpleCard,er as SimpleComboboxField,br as SimpleDateField,qn as SimpleEmailField,Nn as SimpleNumberField,yr as SimplePasswordField,Jn as SimpleRadioGroupField,Fn as SimpleSelectField,Pn as SimpleTextField,Wn as SimpleTextareaField,u as Skeleton,To as Slider,Me as SparklineChart,Dn as Spinner,Ne as StackedAreaChart,j as Statistic,Oo as Switch,cr as SwitchField,ko as Table,Ao as TableBody,jo as TableCaption,Mo as TableCell,No as TableFooter,Po as TableHead,Fo as TableHeader,Io as TableRow,Lo as Tabs,Ro as TabsContent,zo as TabsList,Bo as TabsTrigger,jn as TanStackActionSubmit,sr as TanStackActionsForm,Hn as TanStackCardForm,Un as TanStackContainerForm,Gn as TanStackDialogForm,In as TanStackFieldGroup,zn as TanStackPopoverForm,Vn as TanStackSectionForm,Kn as TanStackTitleField,kr as TextEditor,Sr as TextEditorField,Or as TextEditorToolbar,Mn as TextField,Vo as Textarea,Xn as TextareaField,J as Title,Eo as Toaster,Ho as Toggle,Wo as ToggleGroup,Go as ToggleGroupItem,S as Tooltip,C as TooltipContent,w as TooltipProvider,T as TooltipTrigger,Pe as TopProductsBarChart,ei as TrashBtn,an as UITableAnalysisPanel,$t as UITableAvatarNameDisplay,nn as UITableBadgeDisplay,Dt as UITableBody,Jt as UITableBooleanDisplay,wt as UITableCell,zt as UITableCellActions,Lt as UITableCellSelect,xt as UITableContainer,Vt as UITableCurrencyDisplay,en as UITableDateDisplay,rn as UITableDescriptionDisplay,Ut as UITableEditButton,Zt as UITableEmailDisplay,Nt as UITableEmpty,Tt as UITableEmptyDisplay,on as UITableFilter,Rt as UITableFooter,Pt as UITableFooterRow,Ot as UITableHead,Ct as UITableHeadCell,Et as UITableHeadCellOption,Mt as UITableHeadCellSelect,At as UITableHeadRow,kt as UITableInnerTable,Yt as UITableInnerWrapper,Wt as UITableListDisplay,yt as UITableLoadMore,Gt as UITableMoreButton,tn as UITableNameDisplay,Qt as UITablePermalink,qt as UITablePhoneNumberDisplay,Kt as UITableProgressDisplay,St as UITableProvider,Bt as UITableRemoveButton,Xt as UITableRow,sn as UITableStatisticDisplay,un as UITableStatusDisplay,Ht as UITableSummaryBar,ln as UITableToggleButton,Ft as UITableTooltip,bt as UITableTooltipActions,cn as UITableTooltipFilter,It as UITableUserDataDisplay,jt as UITableWrapper,ti as UploadImageBtn,F as UserDataDisplay,Yr as VerifyEmailPage,Fe as VolumeBarChart,Ie as WaterfallChart,x as badgeVariants,mi as buttonGroupVariants,Le as computeIndexedSeries,Re as formatCompactNumber,ze as formatCurrency,Be as formatPercent,Ve as formatSignedPercent,He as getChartColor,Ue as getDirectionColor,io as navigationMenuTriggerStyle,n as paragraphVariants,We as toDateLabel,Do as toast,Uo as toggleVariants,Oi as useChart,Ya as useDebounce,va as useFormField,Ln as useTanStackFieldContext,Rn as useTanStackForm,Bn as useTanStackFormContext,Yn as withTanStackFieldGroup,Zn as withTanStackForm};
|
package/dist/layouts/flex.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Flex } from "../flex-
|
|
1
|
+
import { t as Flex } from "../flex-CT71VV-I.cjs";
|
|
2
2
|
export { Flex };
|
package/dist/layouts/flex.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Flex } from "../flex-
|
|
1
|
+
import { t as Flex } from "../flex-CT71VV-I.mjs";
|
|
2
2
|
export { Flex };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=number-field-
|
|
1
|
+
const e=require("./tanstack-form-CX3lC3mC.cjs"),t=require("./field-BSLi-P0Q.cjs"),n=require("./number-input-kTh9zzr7.cjs");let r=require("lucide-react"),i=require("react"),a=require("@customafk/react-toolkit/utils"),o=require("react/jsx-runtime"),s=require("@tanstack/react-form");const c=(0,i.memo)(({label:c,description:l,placeholder:u,tooltip:d,helperText:f,orientation:p=`responsive`,showErrorMessage:m=!0,rounding:h,decimalPlaces:g,precision:_,unit:v,required:y=!1,disabled:b=!1,allowNegative:x})=>{let S=(0,i.useId)(),C=(0,i.useId)(),w=e.G(),T=(0,s.useStore)(w.form.store,({isSubmitting:e})=>e),E=b||T,D=w.state.meta.isDirty||w.state.meta.isTouched,O=D&&!w.state.meta.isValid,k=y&&w.state.value===null,A=!!w.state.meta.errors.length,j=(0,i.useCallback)(e=>{E||w.handleChange(e)},[E,w.handleChange]);return(0,o.jsxs)(t.FieldGroup,{className:`gap-y-4 px-4`,children:[(0,o.jsxs)(t.Field,{orientation:p,"data-invalid":O,children:[(0,o.jsxs)(t.FieldContent,{children:[(0,o.jsxs)(t.FieldLabel,{htmlFor:S,"aria-required":k,children:[c,d&&(0,o.jsx)(t.FieldTooltip,{tooltip:d})]}),(0,o.jsx)(t.FieldDescription,{children:l})]}),(0,o.jsxs)(t.FieldContentMain,{children:[(0,o.jsxs)(`div`,{className:`relative w-full`,children:[(0,o.jsx)(n.t,{id:S,value:w.state.value,"aria-invalid":O,"aria-describedby":C,placeholder:u,disabled:E,roundingRule:h,numberAfterDecimalPoint:g,precision:_,unitText:v,allowNegative:x,className:(0,a.cn)(E&&`pointer-events-none opacity-60`),onBlur:w.handleBlur,onValueChange:j}),T&&(0,o.jsx)(`div`,{className:`pointer-events-none absolute inset-s-2 inset-y-0 top-2.5 [&>svg]:size-3.5`,children:(0,o.jsx)(r.Loader2Icon,{className:`animate-spin text-primary-strong`})}),!T&&D&&m&&A&&(0,o.jsx)(`div`,{className:`pointer-events-none absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5`,children:(0,o.jsx)(r.BanIcon,{})}),(0,o.jsx)(`div`,{className:`mt-1 flex w-full items-start justify-between gap-x-2`,children:D&&m?(0,o.jsx)(t.FieldError,{id:C,className:`flex-1`,errors:w.state.meta.errors}):(0,o.jsx)(`div`,{})})]}),(0,o.jsx)(t.FieldNote,{isShow:!!f,children:f})]})]}),(0,o.jsx)(t.FieldSeparator,{})]})});c.displayName=`NumberField`,exports.NumberField=c;
|
|
2
|
+
//# sourceMappingURL=number-field-BTLobx1F.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field-
|
|
1
|
+
{"version":3,"file":"number-field-BTLobx1F.cjs","names":["useTanStackFieldContext","FieldGroup","Field","FieldContent","FieldLabel","FieldTooltip","FieldDescription","FieldContentMain","NumberInput","Loader2Icon","BanIcon","FieldError","FieldNote","FieldSeparator"],"sources":["../packages/components/features/tanstack-form/components/fields/number-field.tsx"],"sourcesContent":["'use client';\n\nimport { memo, useCallback, useId } from 'react';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { BanIcon, Loader2Icon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { NumberInput } from '@/components/ui/inputs/number-input';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTooltip,\n} from '../ui/field';\n\nimport type { NumberFieldProps } from '../../types';\n\n/**\n * A TanStack Form-connected numeric input field supporting rounding rules,\n * decimal precision, unit labels, and submission-state feedback.\n *\n * @example\n * import { NumberField } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <form.Field name=\"quantity\">\n * {() => (\n * <NumberField\n * label=\"Quantity\"\n * placeholder=\"0\"\n * unit=\"pcs\"\n * decimalPlaces={2}\n * required\n * />\n * )}\n * </form.Field>\n */\nexport const NumberField = memo<NumberFieldProps>(\n ({\n label,\n description,\n placeholder,\n tooltip,\n helperText,\n orientation = 'responsive',\n showErrorMessage = true,\n rounding,\n decimalPlaces,\n precision,\n unit,\n required = false,\n disabled = false,\n allowNegative,\n }) => {\n const id = useId();\n const errorId = useId();\n\n const field = useTanStackFieldContext<number | null>();\n\n const isSubmitting = useStore(field.form.store, ({ isSubmitting }) => isSubmitting);\n const isDisabled = disabled || isSubmitting;\n\n const _touched = field.state.meta.isDirty || field.state.meta.isTouched;\n const _invalid = _touched && !field.state.meta.isValid;\n const _isEmpty = required && field.state.value === null;\n const _hasErrors = !!field.state.meta.errors.length;\n\n const onValueChange = useCallback(\n (value: number | null) => {\n if (isDisabled) return;\n field.handleChange(value);\n },\n [isDisabled, field.handleChange]\n );\n\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field orientation={orientation} data-invalid={_invalid}>\n <FieldContent>\n <FieldLabel htmlFor={id} aria-required={_isEmpty}>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n\n <FieldContentMain>\n <div className=\"relative w-full\">\n <NumberInput\n id={id}\n value={field.state.value}\n aria-invalid={_invalid}\n aria-describedby={errorId}\n placeholder={placeholder}\n disabled={isDisabled}\n roundingRule={rounding}\n numberAfterDecimalPoint={decimalPlaces}\n precision={precision}\n unitText={unit}\n allowNegative={allowNegative}\n className={cn(isDisabled && 'pointer-events-none opacity-60')}\n onBlur={field.handleBlur}\n onValueChange={onValueChange}\n />\n {isSubmitting && (\n <div className=\"pointer-events-none absolute inset-s-2 inset-y-0 top-2.5 [&>svg]:size-3.5\">\n <Loader2Icon className=\"animate-spin text-primary-strong\" />\n </div>\n )}\n {!isSubmitting && _touched && showErrorMessage && _hasErrors && (\n <div className=\"pointer-events-none absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5\">\n <BanIcon />\n </div>\n )}\n <div className=\"mt-1 flex w-full items-start justify-between gap-x-2\">\n {_touched && showErrorMessage ? <FieldError id={errorId} className=\"flex-1\" errors={field.state.meta.errors} /> : <div />}\n </div>\n </div>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n }\n);\n\nNumberField.displayName = 'NumberField';\n"],"mappings":"yRA+CA,MAAa,GAAA,EAAA,EAAA,KAAA,EACV,CACC,QACA,cACA,cACA,UACA,aACA,cAAc,aACd,mBAAmB,GACnB,WACA,gBACA,YACA,OACA,WAAW,GACX,WAAW,GACX,mBACI,CACJ,IAAM,GAAA,EAAA,EAAA,MAAA,CAAW,EACX,GAAA,EAAA,EAAA,MAAA,CAAgB,EAEhB,EAAQA,EAAAA,EAAuC,EAE/C,GAAA,EAAA,EAAA,SAAA,CAAwB,EAAM,KAAK,OAAQ,CAAE,kBAAmB,CAAY,EAC5E,EAAa,GAAY,EAEzB,EAAW,EAAM,MAAM,KAAK,SAAW,EAAM,MAAM,KAAK,UACxD,EAAW,GAAY,CAAC,EAAM,MAAM,KAAK,QACzC,EAAW,GAAY,EAAM,MAAM,QAAU,KAC7C,EAAa,CAAC,CAAC,EAAM,MAAM,KAAK,OAAO,OAEvC,GAAA,EAAA,EAAA,YAAA,CACH,GAAyB,CACpB,GACJ,EAAM,aAAa,CAAK,CAC1B,EACA,CAAC,EAAY,EAAM,YAAY,CACjC,EAEA,OACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAY,UAAU,wBAAtB,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,MAAD,CAAoB,cAAa,eAAc,WAA/C,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,aAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAY,QAAS,EAAI,gBAAe,WAAxC,CACG,EACA,IAAW,EAAA,EAAA,IAAA,CAACC,EAAAA,aAAD,CAAuB,SAAU,CAAA,CACnC,KACZ,EAAA,EAAA,IAAA,CAACC,EAAAA,iBAAD,CAAA,SAAmB,CAA8B,CAAA,CACrC,CAAA,CAAA,GAEd,EAAA,EAAA,KAAA,CAACC,EAAAA,iBAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,2BAAf,EACE,EAAA,EAAA,IAAA,CAACC,EAAAA,EAAD,CACM,KACJ,MAAO,EAAM,MAAM,MACnB,eAAc,EACd,mBAAkB,EACL,cACb,SAAU,EACV,aAAc,EACd,wBAAyB,EACd,YACX,SAAU,EACK,gBACf,WAAA,EAAA,EAAA,GAAA,CAAc,GAAc,gCAAgC,EAC5D,OAAQ,EAAM,WACC,eAChB,CAAA,EACA,IACC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,sFACb,EAAA,EAAA,IAAA,CAACC,EAAAA,YAAD,CAAa,UAAU,kCAAoC,CAAA,CACxD,CAAA,EAEN,CAAC,GAAgB,GAAY,GAAoB,IAChD,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,0GACb,EAAA,EAAA,IAAA,CAACC,EAAAA,QAAD,CAAU,CAAA,CACP,CAAA,GAEP,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,gEACZ,GAAY,GAAmB,EAAA,EAAA,IAAA,CAACC,EAAAA,WAAD,CAAY,GAAI,EAAS,UAAU,SAAS,OAAQ,EAAM,MAAM,KAAK,MAAS,CAAA,GAAI,EAAA,EAAA,IAAA,CAAC,MAAD,CAAM,CAAA,CACrH,CAAA,CACF,KACL,EAAA,EAAA,IAAA,CAACC,EAAAA,UAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CACxC,CAAA,CAAA,CACb,KACP,EAAA,EAAA,IAAA,CAACC,EAAAA,eAAD,CAAiB,CAAA,CACP,GAEhB,CACF,EAEA,EAAY,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as e}from"./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=number-field-
|
|
1
|
+
import{G as e}from"./tanstack-form-CKAWexet.mjs";import{Field as t,FieldContent as n,FieldContentMain as r,FieldDescription as i,FieldError as a,FieldGroup as o,FieldLabel as s,FieldNote as c,FieldSeparator as l,FieldTooltip as u}from"./field-V2DoD8qL.mjs";import{t as d}from"./number-input-CqkegUWs.mjs";import{BanIcon as f,Loader2Icon as p}from"lucide-react";import{memo as m,useCallback as h,useId as g}from"react";import{cn as _}from"@customafk/react-toolkit/utils";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{useStore as b}from"@tanstack/react-form";const x=m(({label:m,description:x,placeholder:S,tooltip:C,helperText:w,orientation:T=`responsive`,showErrorMessage:E=!0,rounding:D,decimalPlaces:O,precision:k,unit:A,required:j=!1,disabled:M=!1,allowNegative:N})=>{let P=g(),F=g(),I=e(),L=b(I.form.store,({isSubmitting:e})=>e),R=M||L,z=I.state.meta.isDirty||I.state.meta.isTouched,B=z&&!I.state.meta.isValid,V=j&&I.state.value===null,H=!!I.state.meta.errors.length,U=h(e=>{R||I.handleChange(e)},[R,I.handleChange]);return y(o,{className:`gap-y-4 px-4`,children:[y(t,{orientation:T,"data-invalid":B,children:[y(n,{children:[y(s,{htmlFor:P,"aria-required":V,children:[m,C&&v(u,{tooltip:C})]}),v(i,{children:x})]}),y(r,{children:[y(`div`,{className:`relative w-full`,children:[v(d,{id:P,value:I.state.value,"aria-invalid":B,"aria-describedby":F,placeholder:S,disabled:R,roundingRule:D,numberAfterDecimalPoint:O,precision:k,unitText:A,allowNegative:N,className:_(R&&`pointer-events-none opacity-60`),onBlur:I.handleBlur,onValueChange:U}),L&&v(`div`,{className:`pointer-events-none absolute inset-s-2 inset-y-0 top-2.5 [&>svg]:size-3.5`,children:v(p,{className:`animate-spin text-primary-strong`})}),!L&&z&&E&&H&&v(`div`,{className:`pointer-events-none absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5`,children:v(f,{})}),v(`div`,{className:`mt-1 flex w-full items-start justify-between gap-x-2`,children:z&&E?v(a,{id:F,className:`flex-1`,errors:I.state.meta.errors}):v(`div`,{})})]}),v(c,{isShow:!!w,children:w})]})]}),v(l,{})]})});x.displayName=`NumberField`;export{x as NumberField};
|
|
2
|
+
//# sourceMappingURL=number-field-Cx-1U_Np.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field-
|
|
1
|
+
{"version":3,"file":"number-field-Cx-1U_Np.mjs","names":[],"sources":["../packages/components/features/tanstack-form/components/fields/number-field.tsx"],"sourcesContent":["'use client';\n\nimport { memo, useCallback, useId } from 'react';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { BanIcon, Loader2Icon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { NumberInput } from '@/components/ui/inputs/number-input';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTooltip,\n} from '../ui/field';\n\nimport type { NumberFieldProps } from '../../types';\n\n/**\n * A TanStack Form-connected numeric input field supporting rounding rules,\n * decimal precision, unit labels, and submission-state feedback.\n *\n * @example\n * import { NumberField } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <form.Field name=\"quantity\">\n * {() => (\n * <NumberField\n * label=\"Quantity\"\n * placeholder=\"0\"\n * unit=\"pcs\"\n * decimalPlaces={2}\n * required\n * />\n * )}\n * </form.Field>\n */\nexport const NumberField = memo<NumberFieldProps>(\n ({\n label,\n description,\n placeholder,\n tooltip,\n helperText,\n orientation = 'responsive',\n showErrorMessage = true,\n rounding,\n decimalPlaces,\n precision,\n unit,\n required = false,\n disabled = false,\n allowNegative,\n }) => {\n const id = useId();\n const errorId = useId();\n\n const field = useTanStackFieldContext<number | null>();\n\n const isSubmitting = useStore(field.form.store, ({ isSubmitting }) => isSubmitting);\n const isDisabled = disabled || isSubmitting;\n\n const _touched = field.state.meta.isDirty || field.state.meta.isTouched;\n const _invalid = _touched && !field.state.meta.isValid;\n const _isEmpty = required && field.state.value === null;\n const _hasErrors = !!field.state.meta.errors.length;\n\n const onValueChange = useCallback(\n (value: number | null) => {\n if (isDisabled) return;\n field.handleChange(value);\n },\n [isDisabled, field.handleChange]\n );\n\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field orientation={orientation} data-invalid={_invalid}>\n <FieldContent>\n <FieldLabel htmlFor={id} aria-required={_isEmpty}>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n\n <FieldContentMain>\n <div className=\"relative w-full\">\n <NumberInput\n id={id}\n value={field.state.value}\n aria-invalid={_invalid}\n aria-describedby={errorId}\n placeholder={placeholder}\n disabled={isDisabled}\n roundingRule={rounding}\n numberAfterDecimalPoint={decimalPlaces}\n precision={precision}\n unitText={unit}\n allowNegative={allowNegative}\n className={cn(isDisabled && 'pointer-events-none opacity-60')}\n onBlur={field.handleBlur}\n onValueChange={onValueChange}\n />\n {isSubmitting && (\n <div className=\"pointer-events-none absolute inset-s-2 inset-y-0 top-2.5 [&>svg]:size-3.5\">\n <Loader2Icon className=\"animate-spin text-primary-strong\" />\n </div>\n )}\n {!isSubmitting && _touched && showErrorMessage && _hasErrors && (\n <div className=\"pointer-events-none absolute inset-s-2 inset-y-0 top-2.75 text-danger-strong [&>svg]:size-3.5\">\n <BanIcon />\n </div>\n )}\n <div className=\"mt-1 flex w-full items-start justify-between gap-x-2\">\n {_touched && showErrorMessage ? <FieldError id={errorId} className=\"flex-1\" errors={field.state.meta.errors} /> : <div />}\n </div>\n </div>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n }\n);\n\nNumberField.displayName = 'NumberField';\n"],"mappings":"wjBA+CA,MAAa,EAAc,GACxB,CACC,QACA,cACA,cACA,UACA,aACA,cAAc,aACd,mBAAmB,GACnB,WACA,gBACA,YACA,OACA,WAAW,GACX,WAAW,GACX,mBACI,CACJ,IAAM,EAAK,EAAM,EACX,EAAU,EAAM,EAEhB,EAAQ,EAAuC,EAE/C,EAAe,EAAS,EAAM,KAAK,OAAQ,CAAE,kBAAmB,CAAY,EAC5E,EAAa,GAAY,EAEzB,EAAW,EAAM,MAAM,KAAK,SAAW,EAAM,MAAM,KAAK,UACxD,EAAW,GAAY,CAAC,EAAM,MAAM,KAAK,QACzC,EAAW,GAAY,EAAM,MAAM,QAAU,KAC7C,EAAa,CAAC,CAAC,EAAM,MAAM,KAAK,OAAO,OAEvC,EAAgB,EACnB,GAAyB,CACpB,GACJ,EAAM,aAAa,CAAK,CAC1B,EACA,CAAC,EAAY,EAAM,YAAY,CACjC,EAEA,OACE,EAAC,EAAD,CAAY,UAAU,wBAAtB,CACE,EAAC,EAAD,CAAoB,cAAa,eAAc,WAA/C,CACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAY,QAAS,EAAI,gBAAe,WAAxC,CACG,EACA,GAAW,EAAC,EAAD,CAAuB,SAAU,CAAA,CACnC,IACZ,EAAC,EAAD,CAAA,SAAmB,CAA8B,CAAA,CACrC,CAAA,CAAA,EAEd,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,MAAD,CAAK,UAAU,2BAAf,CACE,EAAC,EAAD,CACM,KACJ,MAAO,EAAM,MAAM,MACnB,eAAc,EACd,mBAAkB,EACL,cACb,SAAU,EACV,aAAc,EACd,wBAAyB,EACd,YACX,SAAU,EACK,gBACf,UAAW,EAAG,GAAc,gCAAgC,EAC5D,OAAQ,EAAM,WACC,eAChB,CAAA,EACA,GACC,EAAC,MAAD,CAAK,UAAU,qFACb,EAAC,EAAD,CAAa,UAAU,kCAAoC,CAAA,CACxD,CAAA,EAEN,CAAC,GAAgB,GAAY,GAAoB,GAChD,EAAC,MAAD,CAAK,UAAU,yGACb,EAAC,EAAD,CAAU,CAAA,CACP,CAAA,EAEP,EAAC,MAAD,CAAK,UAAU,gEACZ,GAAY,EAAmB,EAAC,EAAD,CAAY,GAAI,EAAS,UAAU,SAAS,OAAQ,EAAM,MAAM,KAAK,MAAS,CAAA,EAAI,EAAC,MAAD,CAAM,CAAA,CACrH,CAAA,CACF,IACL,EAAC,EAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CACxC,CAAA,CAAA,CACb,IACP,EAAC,EAAD,CAAiB,CAAA,CACP,GAEhB,CACF,EAEA,EAAY,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as e}from"./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=password-field-
|
|
1
|
+
import{G as e}from"./tanstack-form-CKAWexet.mjs";import{Input as t}from"./ui/input.mjs";import{Field as n,FieldContent as r,FieldContentMain as i,FieldDescription as a,FieldError as o,FieldGroup as s,FieldLabel as c,FieldNote as l,FieldSeparator as u,FieldTooltip as d}from"./field-V2DoD8qL.mjs";import{EyeIcon as f,EyeOffIcon as p}from"lucide-react";import{useCallback as m,useId as h,useState as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{useStore as y}from"@tanstack/react-form";const b=({label:b,description:x,placeholder:S,orientation:C=`responsive`,tooltip:w,helperText:T,showErrorMessage:E=!0})=>{let D=h(),{form:O,name:k,state:A,handleBlur:j,handleChange:M}=e(),N=y(O.store,({isSubmitting:e})=>e),[P,F]=g(!1),I=A.meta.isDirty&&A.meta.isTouched&&!A.meta.isValid,L=m(()=>F(e=>!e),[]),R=m(({target:{value:e}})=>{N||M(e||null)},[N,M]);return v(s,{className:`gap-y-4 px-4`,children:[v(n,{"data-invalid":I,orientation:C,children:[v(r,{children:[v(c,{htmlFor:D,children:[b,w&&_(d,{tooltip:w})]}),_(a,{children:x})]}),v(i,{children:[_(t,{id:D,name:k,type:P?`text`:`password`,placeholder:S,value:A.value??``,"aria-invalid":I,autoComplete:`new-password`,onBlur:j,onChange:R}),_(`button`,{className:`absolute inset-e-0 inset-y-0 flex size-9 items-center justify-center rounded-e-md text-muted outline-none transition-[color,box-shadow] focus:z-10 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:L,"aria-label":P?`Ẩn mật khẩu`:`Hiện mật khẩu`,"aria-pressed":P,"aria-controls":D,children:_(P?p:f,{size:16,"aria-hidden":`true`})}),_(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:E&&A.meta.isDirty&&_(o,{errors:A.meta.errors})}),_(l,{isShow:!!T,children:T})]})]}),_(u,{})]})};export{b as PasswordField};
|
|
2
|
+
//# sourceMappingURL=password-field-CGPjZ5hZ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-field-
|
|
1
|
+
{"version":3,"file":"password-field-CGPjZ5hZ.mjs","names":[],"sources":["../packages/components/features/tanstack-form/components/fields/password-field.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useId, useState } from 'react';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\n\nimport { Input } from '@/components/ui/input';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTooltip,\n} from '../ui/field';\n\nimport type { PasswordFieldProps as Props } from '../../types';\n\n/**\n * A TanStack Form-connected password input field with a show/hide toggle button\n * and inline validation error display.\n *\n * @example\n * import { PasswordField } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <form.Field name=\"password\">\n * {() => (\n * <PasswordField\n * label=\"Password\"\n * placeholder=\"Enter your password\"\n * helperText=\"Must be at least 8 characters\"\n * />\n * )}\n * </form.Field>\n */\nexport const PasswordField: React.FC<Props> = ({\n label,\n description,\n placeholder,\n orientation = 'responsive',\n tooltip,\n helperText,\n showErrorMessage = true,\n}) => {\n const id = useId();\n const { form, name, state, handleBlur, handleChange } = useTanStackFieldContext<string | null>();\n\n const isSubmitting = useStore(form.store, ({ isSubmitting }) => isSubmitting);\n\n const [isVisible, setIsVisible] = useState<boolean>(false);\n\n const _invalid = state.meta.isDirty && state.meta.isTouched && !state.meta.isValid;\n\n const toggleVisibility = useCallback(() => setIsVisible(prev => !prev), []);\n\n const onChange = useCallback<React.ChangeEventHandler<HTMLInputElement>>(\n ({ target: { value } }) => {\n if (isSubmitting) return;\n handleChange(value || null);\n },\n [isSubmitting, handleChange]\n );\n\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field data-invalid={_invalid} orientation={orientation}>\n <FieldContent>\n <FieldLabel htmlFor={id}>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n <FieldContentMain>\n <Input\n id={id}\n name={name}\n type={isVisible ? 'text' : 'password'}\n placeholder={placeholder}\n value={state.value ?? ''}\n aria-invalid={_invalid}\n autoComplete=\"new-password\"\n onBlur={handleBlur}\n onChange={onChange}\n />\n\n <button\n className=\"absolute inset-e-0 inset-y-0 flex size-9 items-center justify-center rounded-e-md text-muted outline-none transition-[color,box-shadow] focus:z-10 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n type=\"button\"\n onClick={toggleVisibility}\n aria-label={isVisible ? 'Ẩn mật khẩu' : 'Hiện mật khẩu'}\n aria-pressed={isVisible}\n aria-controls={id}\n >\n {isVisible ? <EyeOffIcon size={16} aria-hidden=\"true\" /> : <EyeIcon size={16} aria-hidden=\"true\" />}\n </button>\n\n <div className=\"mt-1 flex w-full items-start justify-start\">\n {showErrorMessage && state.meta.isDirty && <FieldError errors={state.meta.errors} />}\n </div>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n};\n"],"mappings":"8fA2CA,MAAa,GAAkC,CAC7C,QACA,cACA,cACA,cAAc,aACd,UACA,aACA,mBAAmB,MACf,CACJ,IAAM,EAAK,EAAM,EACX,CAAE,OAAM,OAAM,QAAO,aAAY,gBAAiB,EAAuC,EAEzF,EAAe,EAAS,EAAK,OAAQ,CAAE,kBAAmB,CAAY,EAEtE,CAAC,EAAW,GAAgB,EAAkB,EAAK,EAEnD,EAAW,EAAM,KAAK,SAAW,EAAM,KAAK,WAAa,CAAC,EAAM,KAAK,QAErE,EAAmB,MAAkB,EAAa,GAAQ,CAAC,CAAI,EAAG,CAAC,CAAC,EAEpE,EAAW,GACd,CAAE,OAAQ,CAAE,YAAc,CACrB,GACJ,EAAa,GAAS,IAAI,CAC5B,EACA,CAAC,EAAc,CAAY,CAC7B,EAEA,OACE,EAAC,EAAD,CAAY,UAAU,wBAAtB,CACE,EAAC,EAAD,CAAO,eAAc,EAAuB,uBAA5C,CACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAY,QAAS,WAArB,CACG,EACA,GAAW,EAAC,EAAD,CAAuB,SAAU,CAAA,CACnC,IACZ,EAAC,EAAD,CAAA,SAAmB,CAA8B,CAAA,CACrC,CAAA,CAAA,EACd,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CACM,KACE,OACN,KAAM,EAAY,OAAS,WACd,cACb,MAAO,EAAM,OAAS,GACtB,eAAc,EACd,aAAa,eACb,OAAQ,EACE,UACX,CAAA,EAED,EAAC,SAAD,CACE,UAAU,kOACV,KAAK,SACL,QAAS,EACT,aAAY,EAAY,cAAgB,gBACxC,eAAc,EACd,gBAAe,WAEF,EAAZ,EAAa,EAA8C,EAA/C,CAAY,KAAM,GAAI,cAAY,MAAQ,CAA2C,CAC5F,CAAA,EAER,EAAC,MAAD,CAAK,UAAU,sDACZ,GAAoB,EAAM,KAAK,SAAW,EAAC,EAAD,CAAY,OAAQ,EAAM,KAAK,MAAS,CAAA,CAChF,CAAA,EACL,EAAC,EAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CACxC,CAAA,CAAA,CACb,IACP,EAAC,EAAD,CAAiB,CAAA,CACP,GAEhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=password-field-
|
|
1
|
+
const e=require("./tanstack-form-CX3lC3mC.cjs"),t=require("./ui/input.cjs"),n=require("./field-BSLi-P0Q.cjs");let r=require("lucide-react"),i=require("react"),a=require("react/jsx-runtime"),o=require("@tanstack/react-form");const s=({label:s,description:c,placeholder:l,orientation:u=`responsive`,tooltip:d,helperText:f,showErrorMessage:p=!0})=>{let m=(0,i.useId)(),{form:h,name:g,state:_,handleBlur:v,handleChange:y}=e.G(),b=(0,o.useStore)(h.store,({isSubmitting:e})=>e),[x,S]=(0,i.useState)(!1),C=_.meta.isDirty&&_.meta.isTouched&&!_.meta.isValid,w=(0,i.useCallback)(()=>S(e=>!e),[]),T=(0,i.useCallback)(({target:{value:e}})=>{b||y(e||null)},[b,y]);return(0,a.jsxs)(n.FieldGroup,{className:`gap-y-4 px-4`,children:[(0,a.jsxs)(n.Field,{"data-invalid":C,orientation:u,children:[(0,a.jsxs)(n.FieldContent,{children:[(0,a.jsxs)(n.FieldLabel,{htmlFor:m,children:[s,d&&(0,a.jsx)(n.FieldTooltip,{tooltip:d})]}),(0,a.jsx)(n.FieldDescription,{children:c})]}),(0,a.jsxs)(n.FieldContentMain,{children:[(0,a.jsx)(t.Input,{id:m,name:g,type:x?`text`:`password`,placeholder:l,value:_.value??``,"aria-invalid":C,autoComplete:`new-password`,onBlur:v,onChange:T}),(0,a.jsx)(`button`,{className:`absolute inset-e-0 inset-y-0 flex size-9 items-center justify-center rounded-e-md text-muted outline-none transition-[color,box-shadow] focus:z-10 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:w,"aria-label":x?`Ẩn mật khẩu`:`Hiện mật khẩu`,"aria-pressed":x,"aria-controls":m,children:x?(0,a.jsx)(r.EyeOffIcon,{size:16,"aria-hidden":`true`}):(0,a.jsx)(r.EyeIcon,{size:16,"aria-hidden":`true`})}),(0,a.jsx)(`div`,{className:`mt-1 flex w-full items-start justify-start`,children:p&&_.meta.isDirty&&(0,a.jsx)(n.FieldError,{errors:_.meta.errors})}),(0,a.jsx)(n.FieldNote,{isShow:!!f,children:f})]})]}),(0,a.jsx)(n.FieldSeparator,{})]})};exports.PasswordField=s;
|
|
2
|
+
//# sourceMappingURL=password-field-CuBcb4mi.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-field-
|
|
1
|
+
{"version":3,"file":"password-field-CuBcb4mi.cjs","names":["useTanStackFieldContext","FieldGroup","Field","FieldContent","FieldLabel","FieldTooltip","FieldDescription","FieldContentMain","Input","EyeOffIcon","EyeIcon","FieldError","FieldNote","FieldSeparator"],"sources":["../packages/components/features/tanstack-form/components/fields/password-field.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useId, useState } from 'react';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\n\nimport { Input } from '@/components/ui/input';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTooltip,\n} from '../ui/field';\n\nimport type { PasswordFieldProps as Props } from '../../types';\n\n/**\n * A TanStack Form-connected password input field with a show/hide toggle button\n * and inline validation error display.\n *\n * @example\n * import { PasswordField } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <form.Field name=\"password\">\n * {() => (\n * <PasswordField\n * label=\"Password\"\n * placeholder=\"Enter your password\"\n * helperText=\"Must be at least 8 characters\"\n * />\n * )}\n * </form.Field>\n */\nexport const PasswordField: React.FC<Props> = ({\n label,\n description,\n placeholder,\n orientation = 'responsive',\n tooltip,\n helperText,\n showErrorMessage = true,\n}) => {\n const id = useId();\n const { form, name, state, handleBlur, handleChange } = useTanStackFieldContext<string | null>();\n\n const isSubmitting = useStore(form.store, ({ isSubmitting }) => isSubmitting);\n\n const [isVisible, setIsVisible] = useState<boolean>(false);\n\n const _invalid = state.meta.isDirty && state.meta.isTouched && !state.meta.isValid;\n\n const toggleVisibility = useCallback(() => setIsVisible(prev => !prev), []);\n\n const onChange = useCallback<React.ChangeEventHandler<HTMLInputElement>>(\n ({ target: { value } }) => {\n if (isSubmitting) return;\n handleChange(value || null);\n },\n [isSubmitting, handleChange]\n );\n\n return (\n <FieldGroup className=\"gap-y-4 px-4\">\n <Field data-invalid={_invalid} orientation={orientation}>\n <FieldContent>\n <FieldLabel htmlFor={id}>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n </FieldContent>\n <FieldContentMain>\n <Input\n id={id}\n name={name}\n type={isVisible ? 'text' : 'password'}\n placeholder={placeholder}\n value={state.value ?? ''}\n aria-invalid={_invalid}\n autoComplete=\"new-password\"\n onBlur={handleBlur}\n onChange={onChange}\n />\n\n <button\n className=\"absolute inset-e-0 inset-y-0 flex size-9 items-center justify-center rounded-e-md text-muted outline-none transition-[color,box-shadow] focus:z-10 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n type=\"button\"\n onClick={toggleVisibility}\n aria-label={isVisible ? 'Ẩn mật khẩu' : 'Hiện mật khẩu'}\n aria-pressed={isVisible}\n aria-controls={id}\n >\n {isVisible ? <EyeOffIcon size={16} aria-hidden=\"true\" /> : <EyeIcon size={16} aria-hidden=\"true\" />}\n </button>\n\n <div className=\"mt-1 flex w-full items-start justify-start\">\n {showErrorMessage && state.meta.isDirty && <FieldError errors={state.meta.errors} />}\n </div>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n};\n"],"mappings":"gOA2CA,MAAa,GAAkC,CAC7C,QACA,cACA,cACA,cAAc,aACd,UACA,aACA,mBAAmB,MACf,CACJ,IAAM,GAAA,EAAA,EAAA,MAAA,CAAW,EACX,CAAE,OAAM,OAAM,QAAO,aAAY,gBAAiBA,EAAAA,EAAuC,EAEzF,GAAA,EAAA,EAAA,SAAA,CAAwB,EAAK,OAAQ,CAAE,kBAAmB,CAAY,EAEtE,CAAC,EAAW,IAAA,EAAA,EAAA,SAAA,CAAkC,EAAK,EAEnD,EAAW,EAAM,KAAK,SAAW,EAAM,KAAK,WAAa,CAAC,EAAM,KAAK,QAErE,GAAA,EAAA,EAAA,YAAA,KAAqC,EAAa,GAAQ,CAAC,CAAI,EAAG,CAAC,CAAC,EAEpE,GAAA,EAAA,EAAA,YAAA,EACH,CAAE,OAAQ,CAAE,YAAc,CACrB,GACJ,EAAa,GAAS,IAAI,CAC5B,EACA,CAAC,EAAc,CAAY,CAC7B,EAEA,OACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAY,UAAU,wBAAtB,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,MAAD,CAAO,eAAc,EAAuB,uBAA5C,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,aAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAY,QAAS,WAArB,CACG,EACA,IAAW,EAAA,EAAA,IAAA,CAACC,EAAAA,aAAD,CAAuB,SAAU,CAAA,CACnC,KACZ,EAAA,EAAA,IAAA,CAACC,EAAAA,iBAAD,CAAA,SAAmB,CAA8B,CAAA,CACrC,CAAA,CAAA,GACd,EAAA,EAAA,KAAA,CAACC,EAAAA,iBAAD,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAACC,EAAAA,MAAD,CACM,KACE,OACN,KAAM,EAAY,OAAS,WACd,cACb,MAAO,EAAM,OAAS,GACtB,eAAc,EACd,aAAa,eACb,OAAQ,EACE,UACX,CAAA,GAED,EAAA,EAAA,IAAA,CAAC,SAAD,CACE,UAAU,kOACV,KAAK,SACL,QAAS,EACT,aAAY,EAAY,cAAgB,gBACxC,eAAc,EACd,gBAAe,WAEd,GAAY,EAAA,EAAA,IAAA,CAACC,EAAAA,WAAD,CAAY,KAAM,GAAI,cAAY,MAAQ,CAAA,GAAI,EAAA,EAAA,IAAA,CAACC,EAAAA,QAAD,CAAS,KAAM,GAAI,cAAY,MAAQ,CAAA,CAC5F,CAAA,GAER,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,sDACZ,GAAoB,EAAM,KAAK,UAAW,EAAA,EAAA,IAAA,CAACC,EAAAA,WAAD,CAAY,OAAQ,EAAM,KAAK,MAAS,CAAA,CAChF,CAAA,GACL,EAAA,EAAA,IAAA,CAACC,EAAAA,UAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CACxC,CAAA,CAAA,CACb,KACP,EAAA,EAAA,IAAA,CAACC,EAAAA,eAAD,CAAiB,CAAA,CACP,GAEhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./close-DYJZ8fkh.mjs";import{K as t}from"./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=popover-form-
|
|
1
|
+
import{t as e}from"./close-DYJZ8fkh.mjs";import{K as t}from"./tanstack-form-CKAWexet.mjs";import{n,t as r}from"./submit-button-CGBaPzE9.mjs";import{cn as i}from"@customafk/react-toolkit/utils";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{Dialog as s}from"radix-ui";const c=({title:c,open:l,contentClassName:u,onOpenChange:d,children:f})=>{let p=t();return a(s.Root,{"data-slot":`dialog`,open:l,onOpenChange:d,children:o(s.Portal,{"data-slot":`dialog-portal`,children:[a(s.Overlay,{"data-slot":`dialog-overlay`,className:i(`fixed inset-0 z-40 bg-black/40 backdrop-blur-sm`,`data-[state=open]:animate-in data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:fade-out`)}),a(s.Content,{"data-slot":`dialog-content`,className:i(`fixed top-4 right-4 z-50 h-[calc(100dvh-2rem)] min-w-sm max-w-xl rounded-md bg-background shadow-lg ring-1 ring-border`,`duration-300`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out`),children:o(`section`,{className:`relative flex size-full flex-col`,children:[a(`header`,{className:`flex h-14 shrink-0 items-center border-b border-border px-5`,children:a(`h2`,{className:`font-semibold text-base tracking-tight text-text-positive`,children:c})}),a(`div`,{className:i(`flex flex-1 flex-col overflow-y-auto py-4`,u),children:f}),o(`div`,{className:`flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3`,children:[a(p.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>a(r,{isSubmitting:e,disabled:t,className:`w-full`,onClick:()=>p.handleSubmit()})}),a(p.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>a(n,{disabled:e,className:`w-full`,onClick:()=>{p.reset(),d?.(!1)}})})]}),a(s.Close,{asChild:!0,children:a(e,{className:`absolute top-2.5 right-3`})})]})})]})})};export{c as TanStackPopoverForm};
|
|
2
|
+
//# sourceMappingURL=popover-form-DVJUQ3_T.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-form-
|
|
1
|
+
{"version":3,"file":"popover-form-DVJUQ3_T.mjs","names":["DialogPrimitive"],"sources":["../packages/components/features/tanstack-form/components/forms/popover-form.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { CloseButton } from '@/components/ui/buttons/close';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { useTanStackFormContext } from '../form-context';\nimport { CancelButton } from '../ui/cancel-button';\nimport { SubmitButton } from '../ui/submit-button';\n\n/**\n * Renders a slide-in side-panel dialog that wraps a TanStack form with built-in submit and cancel actions.\n *\n * @example\n * import { TanStackPopoverForm } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <TanStackPopoverForm\n * title=\"Edit Profile\"\n * open={isOpen}\n * onOpenChange={setIsOpen}\n * >\n * <EmailField />\n * </TanStackPopoverForm>\n */\nexport const TanStackPopoverForm: React.FC<\n React.PropsWithChildren<{\n /** Heading text displayed in the panel header. */\n title: string;\n /** Controlled open state of the popover dialog. */\n open?: boolean;\n /** Additional CSS class names applied to the scrollable content area. */\n contentClassName?: string;\n /** Callback fired when the open state changes. */\n onOpenChange?: (open: boolean) => void;\n }>\n> = ({ title, open, contentClassName, onOpenChange, children }) => {\n const form = useTanStackFormContext();\n\n return (\n <DialogPrimitive.Root data-slot=\"dialog\" open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal data-slot=\"dialog-portal\">\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-40 bg-black/40 backdrop-blur-sm',\n 'data-[state=open]:animate-in data-[state=open]:fade-in',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out'\n )}\n />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-4 right-4 z-50 h-[calc(100dvh-2rem)] min-w-sm max-w-xl rounded-md bg-background shadow-lg ring-1 ring-border',\n 'duration-300',\n 'data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=open]:fade-in',\n 'data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out'\n )}\n >\n <section className=\"relative flex size-full flex-col\">\n <header className=\"flex h-14 shrink-0 items-center border-b border-border px-5\">\n <h2 className=\"font-semibold text-base tracking-tight text-text-positive\">{title}</h2>\n </header>\n\n <div className={cn('flex flex-1 flex-col overflow-y-auto py-4', contentClassName)}>{children}</div>\n\n <div className=\"flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3\">\n <form.Subscribe\n selector={state => ({\n isSubmitting: state.isSubmitting,\n disabled: state.isPristine || !state.isValid || state.isValidating || state.isSubmitting || !state.canSubmit,\n })}\n children={({ isSubmitting, disabled }) => (\n <SubmitButton isSubmitting={isSubmitting} disabled={disabled} className=\"w-full\" onClick={() => form.handleSubmit()} />\n )}\n />\n <form.Subscribe\n selector={state => ({ disabled: state.isPristine || state.isSubmitting })}\n children={({ disabled }) => (\n <CancelButton\n disabled={disabled}\n className=\"w-full\"\n onClick={() => {\n form.reset();\n onOpenChange?.(false);\n }}\n />\n )}\n />\n </div>\n\n <DialogPrimitive.Close asChild>\n <CloseButton className=\"absolute top-2.5 right-3\" />\n </DialogPrimitive.Close>\n </section>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n"],"mappings":"qRAyBA,MAAa,GAWR,CAAE,QAAO,OAAM,mBAAkB,eAAc,cAAe,CACjE,IAAM,EAAO,EAAuB,EAEpC,OACE,EAACA,EAAgB,KAAjB,CAAsB,YAAU,SAAe,OAAoB,wBACjE,EAACA,EAAgB,OAAjB,CAAwB,YAAU,yBAAlC,CACE,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,UAAW,EACT,kDACA,yDACA,8DACF,CACD,CAAA,EACD,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,UAAW,EACT,yHACA,eACA,+FACA,qGACF,WAEA,EAAC,UAAD,CAAS,UAAU,4CAAnB,CACE,EAAC,SAAD,CAAQ,UAAU,uEAChB,EAAC,KAAD,CAAI,UAAU,qEAA6D,CAAU,CAAA,CAC/E,CAAA,EAER,EAAC,MAAD,CAAK,UAAW,EAAG,4CAA6C,CAAgB,EAAI,UAAc,CAAA,EAElG,EAAC,MAAD,CAAK,UAAU,yEAAf,CACE,EAAC,EAAK,UAAN,CACE,SAAU,IAAU,CAClB,aAAc,EAAM,aACpB,SAAU,EAAM,YAAc,CAAC,EAAM,SAAW,EAAM,cAAgB,EAAM,cAAgB,CAAC,EAAM,SACrG,GACA,UAAW,CAAE,eAAc,cACzB,EAAC,EAAD,CAA4B,eAAwB,WAAU,UAAU,SAAS,YAAe,EAAK,aAAa,CAAI,CAAA,CAEzH,CAAA,EACD,EAAC,EAAK,UAAN,CACE,SAAU,IAAU,CAAE,SAAU,EAAM,YAAc,EAAM,YAAa,GACvE,UAAW,CAAE,cACX,EAAC,EAAD,CACY,WACV,UAAU,SACV,YAAe,CACb,EAAK,MAAM,EACX,IAAe,EAAK,CACtB,CACD,CAAA,CAEJ,CAAA,CACE,IAEL,EAACA,EAAgB,MAAjB,CAAuB,QAAA,YACrB,EAAC,EAAD,CAAa,UAAU,0BAA4B,CAAA,CAC9B,CAAA,CAChB,GACc,CAAA,CACH,GACJ,CAAA,CAE1B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./close-BYHgEZvZ.cjs"),t=require("./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=popover-form-
|
|
1
|
+
const e=require("./close-BYHgEZvZ.cjs"),t=require("./tanstack-form-CX3lC3mC.cjs"),n=require("./submit-button-CvINfld5.cjs");let r=require("@customafk/react-toolkit/utils"),i=require("react/jsx-runtime"),a=require("radix-ui");const o=({title:o,open:s,contentClassName:c,onOpenChange:l,children:u})=>{let d=t.K();return(0,i.jsx)(a.Dialog.Root,{"data-slot":`dialog`,open:s,onOpenChange:l,children:(0,i.jsxs)(a.Dialog.Portal,{"data-slot":`dialog-portal`,children:[(0,i.jsx)(a.Dialog.Overlay,{"data-slot":`dialog-overlay`,className:(0,r.cn)(`fixed inset-0 z-40 bg-black/40 backdrop-blur-sm`,`data-[state=open]:animate-in data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:fade-out`)}),(0,i.jsx)(a.Dialog.Content,{"data-slot":`dialog-content`,className:(0,r.cn)(`fixed top-4 right-4 z-50 h-[calc(100dvh-2rem)] min-w-sm max-w-xl rounded-md bg-background shadow-lg ring-1 ring-border`,`duration-300`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=open]:fade-in`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out`),children:(0,i.jsxs)(`section`,{className:`relative flex size-full flex-col`,children:[(0,i.jsx)(`header`,{className:`flex h-14 shrink-0 items-center border-b border-border px-5`,children:(0,i.jsx)(`h2`,{className:`font-semibold text-base tracking-tight text-text-positive`,children:o})}),(0,i.jsx)(`div`,{className:(0,r.cn)(`flex flex-1 flex-col overflow-y-auto py-4`,c),children:u}),(0,i.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3`,children:[(0,i.jsx)(d.Subscribe,{selector:e=>({isSubmitting:e.isSubmitting,disabled:e.isPristine||!e.isValid||e.isValidating||e.isSubmitting||!e.canSubmit}),children:({isSubmitting:e,disabled:t})=>(0,i.jsx)(n.t,{isSubmitting:e,disabled:t,className:`w-full`,onClick:()=>d.handleSubmit()})}),(0,i.jsx)(d.Subscribe,{selector:e=>({disabled:e.isPristine||e.isSubmitting}),children:({disabled:e})=>(0,i.jsx)(n.n,{disabled:e,className:`w-full`,onClick:()=>{d.reset(),l?.(!1)}})})]}),(0,i.jsx)(a.Dialog.Close,{asChild:!0,children:(0,i.jsx)(e.t,{className:`absolute top-2.5 right-3`})})]})})]})})};exports.TanStackPopoverForm=o;
|
|
2
|
+
//# sourceMappingURL=popover-form-DzvgWQ2Q.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-form-
|
|
1
|
+
{"version":3,"file":"popover-form-DzvgWQ2Q.cjs","names":["useTanStackFormContext","DialogPrimitive","SubmitButton","CancelButton","CloseButton"],"sources":["../packages/components/features/tanstack-form/components/forms/popover-form.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { CloseButton } from '@/components/ui/buttons/close';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { useTanStackFormContext } from '../form-context';\nimport { CancelButton } from '../ui/cancel-button';\nimport { SubmitButton } from '../ui/submit-button';\n\n/**\n * Renders a slide-in side-panel dialog that wraps a TanStack form with built-in submit and cancel actions.\n *\n * @example\n * import { TanStackPopoverForm } from '@customafk/lunas-ui/features/tanstack-form';\n *\n * <TanStackPopoverForm\n * title=\"Edit Profile\"\n * open={isOpen}\n * onOpenChange={setIsOpen}\n * >\n * <EmailField />\n * </TanStackPopoverForm>\n */\nexport const TanStackPopoverForm: React.FC<\n React.PropsWithChildren<{\n /** Heading text displayed in the panel header. */\n title: string;\n /** Controlled open state of the popover dialog. */\n open?: boolean;\n /** Additional CSS class names applied to the scrollable content area. */\n contentClassName?: string;\n /** Callback fired when the open state changes. */\n onOpenChange?: (open: boolean) => void;\n }>\n> = ({ title, open, contentClassName, onOpenChange, children }) => {\n const form = useTanStackFormContext();\n\n return (\n <DialogPrimitive.Root data-slot=\"dialog\" open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal data-slot=\"dialog-portal\">\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-40 bg-black/40 backdrop-blur-sm',\n 'data-[state=open]:animate-in data-[state=open]:fade-in',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out'\n )}\n />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-4 right-4 z-50 h-[calc(100dvh-2rem)] min-w-sm max-w-xl rounded-md bg-background shadow-lg ring-1 ring-border',\n 'duration-300',\n 'data-[state=open]:animate-in data-[state=open]:slide-in-from-right data-[state=open]:fade-in',\n 'data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=closed]:fade-out'\n )}\n >\n <section className=\"relative flex size-full flex-col\">\n <header className=\"flex h-14 shrink-0 items-center border-b border-border px-5\">\n <h2 className=\"font-semibold text-base tracking-tight text-text-positive\">{title}</h2>\n </header>\n\n <div className={cn('flex flex-1 flex-col overflow-y-auto py-4', contentClassName)}>{children}</div>\n\n <div className=\"flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3\">\n <form.Subscribe\n selector={state => ({\n isSubmitting: state.isSubmitting,\n disabled: state.isPristine || !state.isValid || state.isValidating || state.isSubmitting || !state.canSubmit,\n })}\n children={({ isSubmitting, disabled }) => (\n <SubmitButton isSubmitting={isSubmitting} disabled={disabled} className=\"w-full\" onClick={() => form.handleSubmit()} />\n )}\n />\n <form.Subscribe\n selector={state => ({ disabled: state.isPristine || state.isSubmitting })}\n children={({ disabled }) => (\n <CancelButton\n disabled={disabled}\n className=\"w-full\"\n onClick={() => {\n form.reset();\n onOpenChange?.(false);\n }}\n />\n )}\n />\n </div>\n\n <DialogPrimitive.Close asChild>\n <CloseButton className=\"absolute top-2.5 right-3\" />\n </DialogPrimitive.Close>\n </section>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n"],"mappings":"iOAyBA,MAAa,GAWR,CAAE,QAAO,OAAM,mBAAkB,eAAc,cAAe,CACjE,IAAM,EAAOA,EAAAA,EAAuB,EAEpC,OACE,EAAA,EAAA,IAAA,CAACC,EAAAA,OAAgB,KAAjB,CAAsB,YAAU,SAAe,OAAoB,yBACjE,EAAA,EAAA,KAAA,CAACA,EAAAA,OAAgB,OAAjB,CAAwB,YAAU,yBAAlC,EACE,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,QAAjB,CACE,YAAU,iBACV,WAAA,EAAA,EAAA,GAAA,CACE,kDACA,yDACA,8DACF,CACD,CAAA,GACD,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,QAAjB,CACE,YAAU,iBACV,WAAA,EAAA,EAAA,GAAA,CACE,yHACA,eACA,+FACA,qGACF,YAEA,EAAA,EAAA,KAAA,CAAC,UAAD,CAAS,UAAU,4CAAnB,EACE,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,UAAU,wEAChB,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qEAA6D,CAAU,CAAA,CAC/E,CAAA,GAER,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,WAAA,EAAA,EAAA,GAAA,CAAc,4CAA6C,CAAgB,EAAI,UAAc,CAAA,GAElG,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,yEAAf,EACE,EAAA,EAAA,IAAA,CAAC,EAAK,UAAN,CACE,SAAU,IAAU,CAClB,aAAc,EAAM,aACpB,SAAU,EAAM,YAAc,CAAC,EAAM,SAAW,EAAM,cAAgB,EAAM,cAAgB,CAAC,EAAM,SACrG,GACA,UAAW,CAAE,eAAc,eACzB,EAAA,EAAA,IAAA,CAACC,EAAAA,EAAD,CAA4B,eAAwB,WAAU,UAAU,SAAS,YAAe,EAAK,aAAa,CAAI,CAAA,CAEzH,CAAA,GACD,EAAA,EAAA,IAAA,CAAC,EAAK,UAAN,CACE,SAAU,IAAU,CAAE,SAAU,EAAM,YAAc,EAAM,YAAa,GACvE,UAAW,CAAE,eACX,EAAA,EAAA,IAAA,CAACC,EAAAA,EAAD,CACY,WACV,UAAU,SACV,YAAe,CACb,EAAK,MAAM,EACX,IAAe,EAAK,CACtB,CACD,CAAA,CAEJ,CAAA,CACE,KAEL,EAAA,EAAA,IAAA,CAACF,EAAAA,OAAgB,MAAjB,CAAuB,QAAA,aACrB,EAAA,EAAA,IAAA,CAACG,EAAAA,EAAD,CAAa,UAAU,0BAA4B,CAAA,CAC9B,CAAA,CAChB,GACc,CAAA,CACH,GACJ,CAAA,CAE1B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as e}from"./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=radio-group-field-
|
|
1
|
+
import{G as e}from"./tanstack-form-CKAWexet.mjs";import{RadioGroup as t,RadioGroupItem as n}from"./ui/radio-group.mjs";import{Field as r,FieldContent as i,FieldContentMain as a,FieldDescription as o,FieldGroup as s,FieldLabel as c,FieldNote as l,FieldSeparator as u,FieldTitle as d,FieldTooltip as f}from"./field-V2DoD8qL.mjs";import{cn as p}from"@customafk/react-toolkit/utils";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useStore as g}from"@tanstack/react-form";const _=({label:_,description:v,orientation:y,options:b,tooltip:x,helperText:S})=>{let C=e(),w=g(C.form.store,({isSubmitting:e})=>e);return h(s,{className:`px-4`,children:[h(r,{orientation:y,className:`flex-col gap-2`,children:[h(i,{children:[h(c,{children:[_,x&&m(f,{tooltip:x})]}),m(o,{children:v}),m(l,{isShow:!!S,children:S})]}),m(a,{children:m(t,{value:C.state.value??``,className:`w-full`,onValueChange:C.handleChange,children:b.map(e=>m(c,{className:p(`h-fit`,C.state.value===e.value&&`border-primary-weak! bg-primary-bg-subtle`,w&&`pointer-events-none bg-muted-muted opacity-60`,C.state.value===e.value&&w&&`border-border-strong!`),children:h(r,{orientation:`horizontal`,className:`items-start gap-3 rounded p-2!`,children:[m(n,{value:e.value,className:`mt-0.5 shrink-0`}),h(i,{className:`gap-0.5!`,children:[m(d,{children:e.label}),m(o,{className:`text-xs`,children:e.description})]})]})},e.value))})})]}),m(u,{})]})};export{_ as RadioGroupField};
|
|
2
|
+
//# sourceMappingURL=radio-group-field-C45y9BQt.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group-field-
|
|
1
|
+
{"version":3,"file":"radio-group-field-C45y9BQt.mjs","names":[],"sources":["../packages/components/features/tanstack-form/components/fields/radio-group-field.tsx"],"sourcesContent":["'use client';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTitle,\n FieldTooltip,\n} from '../ui/field';\nimport { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';\n\nimport type { RadioGroupFieldProps as Props } from '../../types';\n\nexport const RadioGroupField: React.FC<Props> = ({ label, description, orientation, options, tooltip, helperText }) => {\n const field = useTanStackFieldContext<string | null>();\n const isSubmitting = useStore(field.form.store, ({ isSubmitting }) => isSubmitting);\n\n return (\n <FieldGroup className=\"px-4\">\n <Field orientation={orientation} className=\"flex-col gap-2\">\n <FieldContent>\n <FieldLabel>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContent>\n\n <FieldContentMain>\n <RadioGroup value={field.state.value ?? ''} className=\"w-full\" onValueChange={field.handleChange}>\n {options.map(option => (\n <FieldLabel\n key={option.value}\n className={cn(\n 'h-fit',\n field.state.value === option.value && 'border-primary-weak! bg-primary-bg-subtle',\n isSubmitting && 'pointer-events-none bg-muted-muted opacity-60',\n field.state.value === option.value && isSubmitting && 'border-border-strong!'\n )}\n >\n <Field orientation=\"horizontal\" className=\"items-start gap-3 rounded p-2!\">\n <RadioGroupItem value={option.value} className=\"mt-0.5 shrink-0\" />\n <FieldContent className=\"gap-0.5!\">\n <FieldTitle>{option.label}</FieldTitle>\n <FieldDescription className=\"text-xs\">{option.description}</FieldDescription>\n </FieldContent>\n </Field>\n </FieldLabel>\n ))}\n </RadioGroup>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n};\n"],"mappings":"6dAuBA,MAAa,GAAoC,CAAE,QAAO,cAAa,cAAa,UAAS,UAAS,gBAAiB,CACrH,IAAM,EAAQ,EAAuC,EAC/C,EAAe,EAAS,EAAM,KAAK,OAAQ,CAAE,kBAAmB,CAAY,EAElF,OACE,EAAC,EAAD,CAAY,UAAU,gBAAtB,CACE,EAAC,EAAD,CAAoB,cAAa,UAAU,0BAA3C,CACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAA,SAAA,CACG,EACA,GAAW,EAAC,EAAD,CAAuB,SAAU,CAAA,CACnC,CAAA,CAAA,EACZ,EAAC,EAAD,CAAA,SAAmB,CAA8B,CAAA,EACjD,EAAC,EAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CAC5C,CAAA,CAAA,EAEd,EAAC,EAAD,CAAA,SACE,EAAC,EAAD,CAAY,MAAO,EAAM,MAAM,OAAS,GAAI,UAAU,SAAS,cAAe,EAAM,sBACjF,EAAQ,IAAI,GACX,EAAC,EAAD,CAEE,UAAW,EACT,QACA,EAAM,MAAM,QAAU,EAAO,OAAS,4CACtC,GAAgB,gDAChB,EAAM,MAAM,QAAU,EAAO,OAAS,GAAgB,uBACxD,WAEA,EAAC,EAAD,CAAO,YAAY,aAAa,UAAU,0CAA1C,CACE,EAAC,EAAD,CAAgB,MAAO,EAAO,MAAO,UAAU,iBAAmB,CAAA,EAClE,EAAC,EAAD,CAAc,UAAU,oBAAxB,CACE,EAAC,EAAD,CAAA,SAAa,EAAO,KAAkB,CAAA,EACtC,EAAC,EAAD,CAAkB,UAAU,mBAAW,EAAO,WAA8B,CAAA,CAChE,GACT,GACG,EAfL,EAAO,KAeF,CACb,CACS,CAAA,CACI,CAAA,CACb,IACP,EAAC,EAAD,CAAiB,CAAA,CACP,GAEhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=radio-group-field-
|
|
1
|
+
const e=require("./tanstack-form-CX3lC3mC.cjs"),t=require("./ui/radio-group.cjs"),n=require("./field-BSLi-P0Q.cjs");let r=require("@customafk/react-toolkit/utils"),i=require("react/jsx-runtime"),a=require("@tanstack/react-form");const o=({label:o,description:s,orientation:c,options:l,tooltip:u,helperText:d})=>{let f=e.G(),p=(0,a.useStore)(f.form.store,({isSubmitting:e})=>e);return(0,i.jsxs)(n.FieldGroup,{className:`px-4`,children:[(0,i.jsxs)(n.Field,{orientation:c,className:`flex-col gap-2`,children:[(0,i.jsxs)(n.FieldContent,{children:[(0,i.jsxs)(n.FieldLabel,{children:[o,u&&(0,i.jsx)(n.FieldTooltip,{tooltip:u})]}),(0,i.jsx)(n.FieldDescription,{children:s}),(0,i.jsx)(n.FieldNote,{isShow:!!d,children:d})]}),(0,i.jsx)(n.FieldContentMain,{children:(0,i.jsx)(t.RadioGroup,{value:f.state.value??``,className:`w-full`,onValueChange:f.handleChange,children:l.map(e=>(0,i.jsx)(n.FieldLabel,{className:(0,r.cn)(`h-fit`,f.state.value===e.value&&`border-primary-weak! bg-primary-bg-subtle`,p&&`pointer-events-none bg-muted-muted opacity-60`,f.state.value===e.value&&p&&`border-border-strong!`),children:(0,i.jsxs)(n.Field,{orientation:`horizontal`,className:`items-start gap-3 rounded p-2!`,children:[(0,i.jsx)(t.RadioGroupItem,{value:e.value,className:`mt-0.5 shrink-0`}),(0,i.jsxs)(n.FieldContent,{className:`gap-0.5!`,children:[(0,i.jsx)(n.FieldTitle,{children:e.label}),(0,i.jsx)(n.FieldDescription,{className:`text-xs`,children:e.description})]})]})},e.value))})})]}),(0,i.jsx)(n.FieldSeparator,{})]})};exports.RadioGroupField=o;
|
|
2
|
+
//# sourceMappingURL=radio-group-field-GiEbZRkS.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group-field-
|
|
1
|
+
{"version":3,"file":"radio-group-field-GiEbZRkS.cjs","names":["useTanStackFieldContext","FieldGroup","Field","FieldContent","FieldLabel","FieldTooltip","FieldDescription","FieldNote","FieldContentMain","RadioGroup","RadioGroupItem","FieldTitle","FieldSeparator"],"sources":["../packages/components/features/tanstack-form/components/fields/radio-group-field.tsx"],"sourcesContent":["'use client';\n\nimport { useStore } from '@tanstack/react-form';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { useTanStackFieldContext } from '../form-context';\nimport {\n Field,\n FieldContent,\n FieldContentMain,\n FieldDescription,\n FieldGroup,\n FieldLabel,\n FieldNote,\n FieldSeparator,\n FieldTitle,\n FieldTooltip,\n} from '../ui/field';\nimport { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';\n\nimport type { RadioGroupFieldProps as Props } from '../../types';\n\nexport const RadioGroupField: React.FC<Props> = ({ label, description, orientation, options, tooltip, helperText }) => {\n const field = useTanStackFieldContext<string | null>();\n const isSubmitting = useStore(field.form.store, ({ isSubmitting }) => isSubmitting);\n\n return (\n <FieldGroup className=\"px-4\">\n <Field orientation={orientation} className=\"flex-col gap-2\">\n <FieldContent>\n <FieldLabel>\n {label}\n {tooltip && <FieldTooltip tooltip={tooltip} />}\n </FieldLabel>\n <FieldDescription>{description}</FieldDescription>\n <FieldNote isShow={!!helperText}>{helperText}</FieldNote>\n </FieldContent>\n\n <FieldContentMain>\n <RadioGroup value={field.state.value ?? ''} className=\"w-full\" onValueChange={field.handleChange}>\n {options.map(option => (\n <FieldLabel\n key={option.value}\n className={cn(\n 'h-fit',\n field.state.value === option.value && 'border-primary-weak! bg-primary-bg-subtle',\n isSubmitting && 'pointer-events-none bg-muted-muted opacity-60',\n field.state.value === option.value && isSubmitting && 'border-border-strong!'\n )}\n >\n <Field orientation=\"horizontal\" className=\"items-start gap-3 rounded p-2!\">\n <RadioGroupItem value={option.value} className=\"mt-0.5 shrink-0\" />\n <FieldContent className=\"gap-0.5!\">\n <FieldTitle>{option.label}</FieldTitle>\n <FieldDescription className=\"text-xs\">{option.description}</FieldDescription>\n </FieldContent>\n </Field>\n </FieldLabel>\n ))}\n </RadioGroup>\n </FieldContentMain>\n </Field>\n <FieldSeparator />\n </FieldGroup>\n );\n};\n"],"mappings":"qOAuBA,MAAa,GAAoC,CAAE,QAAO,cAAa,cAAa,UAAS,UAAS,gBAAiB,CACrH,IAAM,EAAQA,EAAAA,EAAuC,EAC/C,GAAA,EAAA,EAAA,SAAA,CAAwB,EAAM,KAAK,OAAQ,CAAE,kBAAmB,CAAY,EAElF,OACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAY,UAAU,gBAAtB,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,MAAD,CAAoB,cAAa,UAAU,0BAA3C,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,aAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAA,CAACC,EAAAA,WAAD,CAAA,SAAA,CACG,EACA,IAAW,EAAA,EAAA,IAAA,CAACC,EAAAA,aAAD,CAAuB,SAAU,CAAA,CACnC,CAAA,CAAA,GACZ,EAAA,EAAA,IAAA,CAACC,EAAAA,iBAAD,CAAA,SAAmB,CAA8B,CAAA,GACjD,EAAA,EAAA,IAAA,CAACC,EAAAA,UAAD,CAAW,OAAQ,CAAC,CAAC,WAAa,CAAsB,CAAA,CAC5C,CAAA,CAAA,GAEd,EAAA,EAAA,IAAA,CAACC,EAAAA,iBAAD,CAAA,UACE,EAAA,EAAA,IAAA,CAACC,EAAAA,WAAD,CAAY,MAAO,EAAM,MAAM,OAAS,GAAI,UAAU,SAAS,cAAe,EAAM,sBACjF,EAAQ,IAAI,IACX,EAAA,EAAA,IAAA,CAACL,EAAAA,WAAD,CAEE,WAAA,EAAA,EAAA,GAAA,CACE,QACA,EAAM,MAAM,QAAU,EAAO,OAAS,4CACtC,GAAgB,gDAChB,EAAM,MAAM,QAAU,EAAO,OAAS,GAAgB,uBACxD,YAEA,EAAA,EAAA,KAAA,CAACF,EAAAA,MAAD,CAAO,YAAY,aAAa,UAAU,0CAA1C,EACE,EAAA,EAAA,IAAA,CAACQ,EAAAA,eAAD,CAAgB,MAAO,EAAO,MAAO,UAAU,iBAAmB,CAAA,GAClE,EAAA,EAAA,KAAA,CAACP,EAAAA,aAAD,CAAc,UAAU,oBAAxB,EACE,EAAA,EAAA,IAAA,CAACQ,EAAAA,WAAD,CAAA,SAAa,EAAO,KAAkB,CAAA,GACtC,EAAA,EAAA,IAAA,CAACL,EAAAA,iBAAD,CAAkB,UAAU,mBAAW,EAAO,WAA8B,CAAA,CAChE,GACT,GACG,EAfL,EAAO,KAeF,CACb,CACS,CAAA,CACI,CAAA,CACb,KACP,EAAA,EAAA,IAAA,CAACM,EAAAA,eAAD,CAAiB,CAAA,CACP,GAEhB"}
|
|
@@ -36,7 +36,7 @@ declare const ResizablePanelGroup: import("react").NamedExoticComponent<Omit<imp
|
|
|
36
36
|
children?: import("react").ReactNode | undefined;
|
|
37
37
|
} & import("react").RefAttributes<ResizablePrimitive.ImperativePanelGroupHandle>>;
|
|
38
38
|
/** An individual resizable panel within a ResizablePanelGroup. */
|
|
39
|
-
declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("react").HTMLAttributes<HTMLInputElement | HTMLElement | HTMLParagraphElement | HTMLButtonElement | HTMLDivElement |
|
|
39
|
+
declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("react").HTMLAttributes<HTMLInputElement | HTMLElement | HTMLParagraphElement | HTMLButtonElement | HTMLDivElement | HTMLFieldSetElement | HTMLLegendElement | HTMLLabelElement | HTMLObjectElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement>, "id" | "onResize"> & {
|
|
40
40
|
className?: string;
|
|
41
41
|
collapsedSize?: number | undefined;
|
|
42
42
|
collapsible?: boolean | undefined;
|
|
@@ -61,4 +61,4 @@ declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("
|
|
|
61
61
|
declare const ResizableHandle: import("react").NamedExoticComponent<TResizableHandle>;
|
|
62
62
|
//#endregion
|
|
63
63
|
export { ResizablePanel as n, ResizablePanelGroup as r, ResizableHandle as t };
|
|
64
|
-
//# sourceMappingURL=resizable-
|
|
64
|
+
//# sourceMappingURL=resizable-CAyWR1At.d.cts.map
|
|
@@ -36,7 +36,7 @@ declare const ResizablePanelGroup: import("react").NamedExoticComponent<Omit<imp
|
|
|
36
36
|
children?: import("react").ReactNode | undefined;
|
|
37
37
|
} & import("react").RefAttributes<ResizablePrimitive.ImperativePanelGroupHandle>>;
|
|
38
38
|
/** An individual resizable panel within a ResizablePanelGroup. */
|
|
39
|
-
declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("react").HTMLAttributes<HTMLInputElement | HTMLElement | HTMLParagraphElement | HTMLButtonElement | HTMLDivElement |
|
|
39
|
+
declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("react").HTMLAttributes<HTMLInputElement | HTMLElement | HTMLParagraphElement | HTMLButtonElement | HTMLDivElement | HTMLFieldSetElement | HTMLLegendElement | HTMLLabelElement | HTMLObjectElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement>, "id" | "onResize"> & {
|
|
40
40
|
className?: string;
|
|
41
41
|
collapsedSize?: number | undefined;
|
|
42
42
|
collapsible?: boolean | undefined;
|
|
@@ -61,4 +61,4 @@ declare const ResizablePanel: import("react").NamedExoticComponent<Omit<import("
|
|
|
61
61
|
declare const ResizableHandle: import("react").NamedExoticComponent<TResizableHandle>;
|
|
62
62
|
//#endregion
|
|
63
63
|
export { ResizablePanel as n, ResizablePanelGroup as r, ResizableHandle as t };
|
|
64
|
-
//# sourceMappingURL=resizable-
|
|
64
|
+
//# sourceMappingURL=resizable-CAyWR1At.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./ui/dialog.cjs"),t=require("./tanstack-form-
|
|
2
|
-
//# sourceMappingURL=select-field-
|
|
1
|
+
const e=require("./ui/dialog.cjs"),t=require("./tanstack-form-CX3lC3mC.cjs"),n=require("./ui/select.cjs"),r=require("./field-BSLi-P0Q.cjs");let i=require("lucide-react"),a=require("react"),o=require("@customafk/react-toolkit/utils"),s=require("react/jsx-runtime"),c=require("radix-ui"),l=require("@customafk/react-toolkit/hooks/useMobile"),u=require("@tanstack/react-form");const d=(0,a.memo)(({label:d,description:f,placeholder:p,orientation:m=`responsive`,tooltip:h,options:g,helperText:_,clearable:v=!1,required:y=!1,disabled:b=!1,showErrorMessage:x=!0})=>{let S=(0,a.useId)(),C=t.G(),w=(0,l.useIsMobile)(),[T,E]=(0,a.useState)(!1),D=(0,u.useStore)(C.form.store,({isSubmitting:e})=>e),O=b||D,k=C.state.meta.isDirty||C.state.meta.isTouched,A=k&&!C.state.meta.isValid,j=y&&C.state.value===null,M=v&&!!C.state.value&&!O,N=g.find(e=>e.value===C.state.value)?.label,P=()=>{C.handleChange(null),C.handleBlur()};return(0,s.jsxs)(r.FieldGroup,{className:`gap-y-4 px-4`,children:[(0,s.jsxs)(r.Field,{orientation:m,"data-invalid":A,children:[(0,s.jsxs)(r.FieldContent,{children:[(0,s.jsxs)(r.FieldLabel,{htmlFor:C.name,"aria-required":j,children:[d,h&&(0,s.jsx)(r.FieldTooltip,{tooltip:h})]}),(0,s.jsx)(r.FieldDescription,{children:f})]}),(0,s.jsxs)(r.FieldContentMain,{className:`flex flex-col`,children:[w?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`button`,{id:C.name,type:`button`,disabled:O,"aria-invalid":A?`true`:void 0,"aria-describedby":S,onBlur:C.handleBlur,onClick:()=>E(!0),className:(0,o.cn)(`flex w-full items-center justify-between`,`outline-1 outline-border -outline-offset-1`,`gap-2 rounded bg-transparent px-3 py-2`,`shadow-input transition-all cursor-pointer whitespace-nowrap text-sm`,`focus-visible:outline-primary-strong focus-visible:ring-4 focus-visible:ring-primary-weak`,`disabled:cursor-not-allowed disabled:opacity-50`,A&&`outline-danger bg-danger-bg-subtle ring-danger-weak`,!C.state.value&&`text-text-positive-muted`),children:[(0,s.jsx)(`span`,{className:`line-clamp-1`,children:N??p}),(0,s.jsx)(i.ChevronDownIcon,{size:16,className:`shrink-0 opacity-50`})]}),(0,s.jsx)(e.Dialog,{open:T,onOpenChange:e=>{E(e),e||C.handleBlur()},children:(0,s.jsxs)(e.DialogPortal,{children:[(0,s.jsx)(e.DialogOverlay,{}),(0,s.jsxs)(c.Dialog.Content,{onOpenAutoFocus:e=>e.preventDefault(),className:(0,o.cn)(`fixed inset-x-0 bottom-0 z-50`,`flex flex-col bg-background rounded-t-2xl outline-none`,`max-h-[80dvh] shadow-[0_-4px_24px_rgba(0,0,0,0.08)]`,`data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=closed]:fade-out-0`,`duration-300`),children:[(0,s.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-border shrink-0`,children:[(0,s.jsx)(`span`,{className:`font-semibold text-sm text-text-positive`,children:d??p??`Chọn một tùy chọn`}),(0,s.jsx)(e.DialogClose,{asChild:!0,children:(0,s.jsx)(`button`,{type:`button`,"aria-label":`Đóng`,className:`flex size-7 items-center justify-center rounded-md text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive`,children:(0,s.jsx)(i.XIcon,{size:16})})})]}),(0,s.jsxs)(`div`,{className:`flex flex-col overflow-y-auto`,children:[M&&(0,s.jsx)(e.DialogClose,{asChild:!0,children:(0,s.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-x-2 px-4 py-3 text-left text-sm text-danger-strong transition-colors hover:bg-danger-bg-subtle`,onClick:P,children:[(0,s.jsx)(i.XIcon,{size:14}),`Xóa lựa chọn`]})}),g.length>0?g.map(t=>(0,s.jsx)(e.DialogClose,{asChild:!0,children:(0,s.jsx)(`button`,{type:`button`,className:(0,o.cn)(`flex w-full items-center px-4 py-3 text-left text-sm transition-colors`,`hover:bg-muted-muted active:bg-muted-muted`,C.state.value===t.value&&`bg-primary-bg-subtle font-medium text-primary`),onClick:()=>{C.handleChange(t.value),C.handleBlur()},children:t.label})},t.value)):(0,s.jsxs)(`div`,{className:`flex items-center justify-center gap-x-2 px-4 py-8 text-center text-sm text-text-positive-weak`,children:[(0,s.jsx)(i.PackagePlusIcon,{strokeWidth:1}),`Không có tùy chọn`]})]}),(0,s.jsx)(`div`,{className:`shrink-0 h-safe-bottom`})]})]})})]}):(0,s.jsxs)(`div`,{className:`relative`,children:[(0,s.jsxs)(n.Select,{value:C.state.value??``,disabled:O,onValueChange:C.handleChange,children:[(0,s.jsx)(n.SelectTrigger,{"aria-invalid":A?`true`:void 0,"aria-describedby":S,onBlur:C.handleBlur,children:(0,s.jsx)(n.SelectValue,{placeholder:p})}),(0,s.jsx)(n.SelectContent,{children:g.length>0?g.map(e=>(0,s.jsx)(n.SelectItem,{value:e.value,children:e.label},e.value)):(0,s.jsxs)(`div`,{className:`flex items-center justify-center gap-x-2 rounded border border-border bg-muted-muted px-4 py-6.5 text-center text-sm text-text-positive-weak`,children:[(0,s.jsx)(i.PackagePlusIcon,{strokeWidth:1}),`No options available`]})})]}),M&&(0,s.jsx)(`button`,{type:`button`,"aria-label":`Xóa lựa chọn`,className:`absolute right-7 top-1/2 -translate-y-1/2 flex size-4 cursor-pointer items-center justify-center rounded-md text-text-positive-weak outline-none transition-[color,transform] hover:text-text-positive focus-visible:text-primary-strong focus-visible:[&>svg]:scale-125 [&>svg]:size-3.5 [&>svg]:transition-transform`,onClick:P,children:(0,s.jsx)(i.XIcon,{"aria-hidden":`true`})})]}),k&&x&&(0,s.jsx)(r.FieldError,{id:S,className:`mt-1`,errors:C.state.meta.errors}),(0,s.jsx)(r.FieldNote,{isShow:!!_,children:_})]})]}),(0,s.jsx)(r.FieldSeparator,{})]})});d.displayName=`SelectField`,exports.SelectField=d;
|
|
2
|
+
//# sourceMappingURL=select-field-Cd63KvgR.cjs.map
|