@customafk/lunas-ui 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -9
- package/ai-docs.md +419 -0
- package/dist/alert-5MxGtf3j.d.mts +88 -0
- package/dist/alert-DIC1_ymv.cjs +2 -0
- package/dist/alert-DIC1_ymv.cjs.map +1 -0
- package/dist/alert-DwdUOFaC.d.cts +88 -0
- package/dist/alert-VP3giy31.mjs +2 -0
- package/dist/alert-VP3giy31.mjs.map +1 -0
- package/dist/avatar-CTS9-raY.cjs +2 -0
- package/dist/avatar-CTS9-raY.cjs.map +1 -0
- package/dist/avatar-DbxqvCjT.mjs +2 -0
- package/dist/avatar-DbxqvCjT.mjs.map +1 -0
- package/dist/badge-B8bw2UEY.mjs +2 -0
- package/dist/badge-B8bw2UEY.mjs.map +1 -0
- package/dist/badge-BFTGDsBm.d.cts +42 -0
- package/dist/badge-sL8O2yfv.d.mts +42 -0
- package/dist/badge-uQ0pIZbQ.cjs +2 -0
- package/dist/badge-uQ0pIZbQ.cjs.map +1 -0
- package/dist/button-BlQb81It.d.mts +174 -0
- package/dist/button-C6ybzxxj.mjs +2 -0
- package/dist/button-C6ybzxxj.mjs.map +1 -0
- package/dist/button-CEOQ3-82.d.cts +174 -0
- package/dist/button-CwDT3m4m.cjs +2 -0
- package/dist/button-CwDT3m4m.cjs.map +1 -0
- package/dist/button.variants-DeCyas1F.mjs +2 -0
- package/dist/button.variants-DeCyas1F.mjs.map +1 -0
- package/dist/button.variants-tnhb123u.cjs +2 -0
- package/dist/button.variants-tnhb123u.cjs.map +1 -0
- package/dist/{calendar-CG-WMM8e.cjs → calendar-CyAPpT2m.cjs} +2 -2
- package/dist/calendar-CyAPpT2m.cjs.map +1 -0
- package/dist/calendar-JKxWM6AF.mjs +2 -0
- package/dist/calendar-JKxWM6AF.mjs.map +1 -0
- package/dist/cards/grid-product-card.cjs +1 -1
- package/dist/cards/grid-product-card.cjs.map +1 -1
- package/dist/cards/grid-product-card.d.cts +23 -0
- package/dist/cards/grid-product-card.d.mts +23 -0
- package/dist/cards/grid-product-card.mjs +1 -1
- package/dist/cards/grid-product-card.mjs.map +1 -1
- package/dist/cards/product-card.cjs +1 -1
- package/dist/cards/product-card.cjs.map +1 -1
- package/dist/cards/product-card.d.cts +23 -0
- package/dist/cards/product-card.d.mts +23 -0
- package/dist/cards/product-card.mjs +1 -1
- package/dist/cards/product-card.mjs.map +1 -1
- package/dist/cards/simple-card.cjs +1 -1
- package/dist/cards/simple-card.cjs.map +1 -1
- package/dist/cards/simple-card.d.cts +16 -0
- package/dist/cards/simple-card.d.mts +16 -0
- package/dist/cards/simple-card.mjs +1 -1
- package/dist/cards/simple-card.mjs.map +1 -1
- package/dist/{checkbox-Bg2FiuQw.mjs → checkbox-DJEdYOjA.mjs} +2 -2
- package/dist/checkbox-DJEdYOjA.mjs.map +1 -0
- package/dist/{checkbox-C0fSWwmD.cjs → checkbox-RZrRNYP2.cjs} +2 -2
- package/dist/checkbox-RZrRNYP2.cjs.map +1 -0
- package/dist/close-BU0kWRVo.mjs +2 -0
- package/dist/{close-DfuHB7kq.mjs.map → close-BU0kWRVo.mjs.map} +1 -1
- package/dist/close-DXk_H3Gt.cjs +2 -0
- package/dist/{close-D_Ge7gnP.cjs.map → close-DXk_H3Gt.cjs.map} +1 -1
- package/dist/cms-layout-Dc4moos1.cjs +2 -0
- package/dist/cms-layout-Dc4moos1.cjs.map +1 -0
- package/dist/cms-layout-HfnOQS16.mjs +2 -0
- package/dist/cms-layout-HfnOQS16.mjs.map +1 -0
- package/dist/{command-_zpTaaIk.cjs → command-SHd-d_o0.cjs} +2 -2
- package/dist/command-SHd-d_o0.cjs.map +1 -0
- package/dist/{command-DhBTNTqz.mjs → command-bpcnKEbR.mjs} +2 -2
- package/dist/command-bpcnKEbR.mjs.map +1 -0
- package/dist/data-display/country.cjs +1 -1
- package/dist/data-display/country.cjs.map +1 -1
- package/dist/data-display/country.d.cts +15 -3
- package/dist/data-display/country.d.mts +15 -3
- package/dist/data-display/country.mjs +1 -1
- package/dist/data-display/country.mjs.map +1 -1
- package/dist/data-display/data-list.cjs +1 -1
- package/dist/data-display/data-list.cjs.map +1 -1
- package/dist/data-display/data-list.d.cts +31 -2
- package/dist/data-display/data-list.d.mts +31 -2
- package/dist/data-display/data-list.mjs +1 -1
- package/dist/data-display/data-list.mjs.map +1 -1
- package/dist/data-display/date-tooltip.cjs +1 -1
- package/dist/data-display/date-tooltip.cjs.map +1 -1
- package/dist/data-display/date-tooltip.d.cts +13 -2
- package/dist/data-display/date-tooltip.d.mts +13 -2
- package/dist/data-display/date-tooltip.mjs +1 -1
- package/dist/data-display/date-tooltip.mjs.map +1 -1
- package/dist/data-display/date.cjs +1 -1
- package/dist/data-display/date.d.cts +28 -2
- package/dist/data-display/date.d.mts +28 -2
- package/dist/data-display/date.mjs +1 -1
- package/dist/data-display/empty.cjs +1 -1
- package/dist/data-display/empty.cjs.map +1 -1
- package/dist/data-display/empty.d.cts +17 -3
- package/dist/data-display/empty.d.mts +17 -3
- package/dist/data-display/empty.mjs +1 -1
- package/dist/data-display/empty.mjs.map +1 -1
- package/dist/data-display/name.cjs +1 -1
- package/dist/data-display/name.cjs.map +1 -1
- package/dist/data-display/name.d.cts +12 -1
- package/dist/data-display/name.d.mts +12 -1
- package/dist/data-display/name.mjs +1 -1
- package/dist/data-display/name.mjs.map +1 -1
- package/dist/data-display/phone-number.cjs +1 -1
- package/dist/data-display/phone-number.cjs.map +1 -1
- package/dist/data-display/phone-number.d.cts +14 -2
- package/dist/data-display/phone-number.d.mts +14 -2
- package/dist/data-display/phone-number.mjs +1 -1
- package/dist/data-display/phone-number.mjs.map +1 -1
- package/dist/data-display/role-badge.cjs +1 -1
- package/dist/data-display/role-badge.cjs.map +1 -1
- package/dist/data-display/role-badge.d.cts +15 -3
- package/dist/data-display/role-badge.d.mts +15 -3
- package/dist/data-display/role-badge.mjs +1 -1
- package/dist/data-display/role-badge.mjs.map +1 -1
- package/dist/data-display/statistic.cjs +1 -1
- package/dist/data-display/statistic.cjs.map +1 -1
- package/dist/data-display/statistic.d.cts +35 -6
- package/dist/data-display/statistic.d.mts +35 -6
- package/dist/data-display/statistic.mjs +1 -1
- package/dist/data-display/statistic.mjs.map +1 -1
- package/dist/data-display/user.cjs +1 -2
- package/dist/data-display/user.d.cts +14 -1
- package/dist/data-display/user.d.mts +14 -1
- package/dist/data-display/user.mjs +1 -2
- package/dist/date-CVz9xdCg.mjs +2 -0
- package/dist/date-CVz9xdCg.mjs.map +1 -0
- package/dist/date-a3RI5Pwo.cjs +2 -0
- package/dist/date-a3RI5Pwo.cjs.map +1 -0
- package/dist/dialog-Bah7jLoO.d.cts +90 -0
- package/dist/dialog-BchwY6-N.mjs +2 -0
- package/dist/dialog-BchwY6-N.mjs.map +1 -0
- package/dist/dialog-DSg5IKmb.d.mts +90 -0
- package/dist/dialog-o_68LQXd.cjs +2 -0
- package/dist/dialog-o_68LQXd.cjs.map +1 -0
- package/dist/dialogs/confirm-dialog.cjs +1 -1
- package/dist/dialogs/confirm-dialog.cjs.map +1 -1
- package/dist/dialogs/confirm-dialog.d.cts +129 -3
- package/dist/dialogs/confirm-dialog.d.mts +129 -3
- package/dist/dialogs/confirm-dialog.mjs +1 -1
- package/dist/dialogs/confirm-dialog.mjs.map +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.cjs +1 -2
- package/dist/dialogs/detail-dialog/components/sidebar.d.cts +71 -24
- package/dist/dialogs/detail-dialog/components/sidebar.d.mts +71 -24
- package/dist/dialogs/detail-dialog/components/sidebar.mjs +1 -2
- package/dist/dialogs/detail-dialog/index.cjs +1 -1
- package/dist/dialogs/detail-dialog/index.cjs.map +1 -1
- package/dist/dialogs/detail-dialog/index.d.cts +37 -8
- package/dist/dialogs/detail-dialog/index.d.mts +37 -8
- package/dist/dialogs/detail-dialog/index.mjs +1 -1
- package/dist/dialogs/detail-dialog/index.mjs.map +1 -1
- package/dist/dialogs/error-dialog.cjs +1 -1
- package/dist/dialogs/error-dialog.cjs.map +1 -1
- package/dist/dialogs/error-dialog.d.cts +18 -4
- package/dist/dialogs/error-dialog.d.mts +18 -4
- package/dist/dialogs/error-dialog.mjs +1 -1
- package/dist/dialogs/error-dialog.mjs.map +1 -1
- package/dist/dialogs/loading-dialog.cjs +1 -1
- package/dist/dialogs/loading-dialog.cjs.map +1 -1
- package/dist/dialogs/loading-dialog.d.cts +15 -3
- package/dist/dialogs/loading-dialog.d.mts +15 -3
- package/dist/dialogs/loading-dialog.mjs +1 -1
- package/dist/dialogs/loading-dialog.mjs.map +1 -1
- package/dist/{dist-CvmzZ_6C.mjs → dist-CIN9T2FB.mjs} +1 -1
- package/dist/{dist-CvmzZ_6C.mjs.map → dist-CIN9T2FB.mjs.map} +1 -1
- package/dist/{dist-BudM04oj.cjs → dist-Dh8WwRa8.cjs} +1 -1
- package/dist/{dist-BudM04oj.cjs.map → dist-Dh8WwRa8.cjs.map} +1 -1
- package/dist/dropdown-menu-Ct9BLGfa.cjs +2 -0
- package/dist/dropdown-menu-Ct9BLGfa.cjs.map +1 -0
- package/dist/dropdown-menu-DWSfXhHo.mjs +2 -0
- package/dist/dropdown-menu-DWSfXhHo.mjs.map +1 -0
- package/dist/features/descriptions/index.cjs +1 -1
- package/dist/features/descriptions/index.cjs.map +1 -1
- package/dist/features/descriptions/index.d.cts +158 -19
- package/dist/features/descriptions/index.d.mts +158 -19
- package/dist/features/descriptions/index.mjs +1 -1
- package/dist/features/descriptions/index.mjs.map +1 -1
- package/dist/features/search-modal/index.cjs +1 -2
- package/dist/features/search-modal/index.d.cts +12 -2
- package/dist/features/search-modal/index.d.mts +12 -2
- package/dist/features/search-modal/index.mjs +1 -2
- package/dist/features/tables/index.cjs +1 -2
- package/dist/features/tables/index.d.cts +746 -24
- package/dist/features/tables/index.d.mts +742 -20
- package/dist/features/tables/index.mjs +1 -2
- package/dist/features/tanstack-form/index.cjs +1 -2
- package/dist/features/tanstack-form/index.d.cts +2 -1786
- package/dist/features/tanstack-form/index.d.mts +2 -1786
- package/dist/features/tanstack-form/index.mjs +1 -2
- package/dist/field-CXVnw75a.mjs +2 -0
- package/dist/field-CXVnw75a.mjs.map +1 -0
- package/dist/field-CppNvoxV.cjs +2 -0
- package/dist/field-CppNvoxV.cjs.map +1 -0
- package/dist/{flex-BP8sTi70.mjs → flex-BLMTj7Ev.mjs} +2 -2
- package/dist/flex-BLMTj7Ev.mjs.map +1 -0
- package/dist/{flex-twCgWyx1.cjs → flex-BbbogTsZ.cjs} +2 -2
- package/dist/flex-BbbogTsZ.cjs.map +1 -0
- package/dist/heading-AKz5ewy-.cjs +2 -0
- package/dist/heading-AKz5ewy-.cjs.map +1 -0
- package/dist/heading-DN67djxs.mjs +2 -0
- package/dist/heading-DN67djxs.mjs.map +1 -0
- package/dist/{image-DuFv8sPr.cjs → image-B1Dm5LWk.cjs} +2 -2
- package/dist/image-B1Dm5LWk.cjs.map +1 -0
- package/dist/{image-CS_Q0WA7.mjs → image-BlzrSaoE.mjs} +2 -2
- package/dist/image-BlzrSaoE.mjs.map +1 -0
- package/dist/index-D4shnfqM.d.cts +2030 -0
- package/dist/index-Dktb6D35.d.mts +2030 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +90 -0
- package/dist/index.d.mts +90 -0
- package/dist/index.mjs +1 -0
- package/dist/{input-DBtIgQB6.mjs → input-Cd0G5y-9.mjs} +2 -2
- package/dist/input-Cd0G5y-9.mjs.map +1 -0
- package/dist/{input-BFWWaN-v.cjs → input-Cl5VkKQh.cjs} +2 -2
- package/dist/input-Cl5VkKQh.cjs.map +1 -0
- package/dist/input-DAGzv97v.d.mts +44 -0
- package/dist/input-DPLvx5x8.d.cts +44 -0
- package/dist/{label-BzfsTrVt.cjs → label-DkMTQ3Ch.cjs} +2 -2
- package/dist/label-DkMTQ3Ch.cjs.map +1 -0
- package/dist/label-OmlGaZ5h.mjs +2 -0
- package/dist/label-OmlGaZ5h.mjs.map +1 -0
- package/dist/layouts/cms-layout/index.cjs +1 -2
- package/dist/layouts/cms-layout/index.d.cts +66 -13
- package/dist/layouts/cms-layout/index.d.mts +66 -13
- package/dist/layouts/cms-layout/index.mjs +1 -2
- package/dist/layouts/flex.cjs +1 -1
- package/dist/layouts/flex.d.cts +90 -6
- package/dist/layouts/flex.d.mts +93 -9
- package/dist/layouts/flex.mjs +1 -1
- package/dist/layouts/grid.cjs +1 -1
- package/dist/layouts/grid.cjs.map +1 -1
- package/dist/layouts/grid.d.cts +14 -0
- package/dist/layouts/grid.d.mts +14 -0
- package/dist/layouts/grid.mjs +1 -1
- package/dist/layouts/grid.mjs.map +1 -1
- package/dist/layouts/payment-layout/index.cjs +1 -2
- package/dist/layouts/payment-layout/index.d.cts +35 -0
- package/dist/layouts/payment-layout/index.d.mts +35 -0
- package/dist/layouts/payment-layout/index.mjs +1 -2
- package/dist/pages/FeatureDeveloping.cjs +1 -1
- package/dist/pages/FeatureDeveloping.cjs.map +1 -1
- package/dist/pages/FeatureDeveloping.d.cts +21 -3
- package/dist/pages/FeatureDeveloping.d.mts +21 -3
- package/dist/pages/FeatureDeveloping.mjs +1 -1
- package/dist/pages/FeatureDeveloping.mjs.map +1 -1
- package/dist/pages/FeatureFixing.cjs +1 -1
- package/dist/pages/FeatureFixing.cjs.map +1 -1
- package/dist/pages/FeatureFixing.d.cts +21 -3
- package/dist/pages/FeatureFixing.d.mts +21 -3
- package/dist/pages/FeatureFixing.mjs +1 -1
- package/dist/pages/FeatureFixing.mjs.map +1 -1
- package/dist/pages/NotAuthorized.cjs +1 -1
- package/dist/pages/NotAuthorized.cjs.map +1 -1
- package/dist/pages/NotAuthorized.d.cts +21 -3
- package/dist/pages/NotAuthorized.d.mts +21 -3
- package/dist/pages/NotAuthorized.mjs +1 -1
- package/dist/pages/NotAuthorized.mjs.map +1 -1
- package/dist/pages/NotFound.cjs +1 -1
- package/dist/pages/NotFound.cjs.map +1 -1
- package/dist/pages/NotFound.d.cts +21 -3
- package/dist/pages/NotFound.d.mts +21 -3
- package/dist/pages/NotFound.mjs +1 -1
- package/dist/pages/NotFound.mjs.map +1 -1
- package/dist/paragraph-Ch5TvEqL.mjs +2 -0
- package/dist/paragraph-Ch5TvEqL.mjs.map +1 -0
- package/dist/paragraph-DN85Huc4.cjs +2 -0
- package/dist/paragraph-DN85Huc4.cjs.map +1 -0
- package/dist/payment-layout-Da29dHJe.cjs +2 -0
- package/dist/payment-layout-Da29dHJe.cjs.map +1 -0
- package/dist/payment-layout-wN5c7MCM.mjs +2 -0
- package/dist/payment-layout-wN5c7MCM.mjs.map +1 -0
- package/dist/{popover-DzDrgttC.cjs → popover-AEt-aSy3.cjs} +2 -2
- package/dist/popover-AEt-aSy3.cjs.map +1 -0
- package/dist/popover-OJXFbqJi.mjs +2 -0
- package/dist/popover-OJXFbqJi.mjs.map +1 -0
- package/dist/{radio-group-CBhRsUjN.cjs → radio-group-BWLdQw7M.cjs} +2 -2
- package/dist/radio-group-BWLdQw7M.cjs.map +1 -0
- package/dist/{radio-group-Cem8O6BK.mjs → radio-group-CAgfOr7-.mjs} +2 -2
- package/dist/radio-group-CAgfOr7-.mjs.map +1 -0
- package/dist/{resizable-mlGS6Zto.cjs → resizable-D6UKwvFa.cjs} +2 -2
- package/dist/resizable-D6UKwvFa.cjs.map +1 -0
- package/dist/{resizable-DXHfkbaz.mjs → resizable-DWh_mp5P.mjs} +2 -2
- package/dist/resizable-DWh_mp5P.mjs.map +1 -0
- package/dist/search-modal-BxjKY8I7.mjs +2 -0
- package/dist/search-modal-BxjKY8I7.mjs.map +1 -0
- package/dist/search-modal-C-jNqQI1.cjs +2 -0
- package/dist/search-modal-C-jNqQI1.cjs.map +1 -0
- package/dist/{select-2CgwiefV.cjs → select-Py_t2nX1.cjs} +2 -2
- package/dist/select-Py_t2nX1.cjs.map +1 -0
- package/dist/{select-CivtMKTM.mjs → select-Ze8Fq88G.mjs} +2 -2
- package/dist/select-Ze8Fq88G.mjs.map +1 -0
- package/dist/separator-BMsbHAVt.mjs +2 -0
- package/dist/separator-BMsbHAVt.mjs.map +1 -0
- package/dist/{separator-C3ip6sbh.cjs → separator-BwZb12bh.cjs} +2 -2
- package/dist/separator-BwZb12bh.cjs.map +1 -0
- package/dist/{sheet-5MJRtrfG.cjs → sheet-CaDXTx7n.cjs} +2 -2
- package/dist/sheet-CaDXTx7n.cjs.map +1 -0
- package/dist/{sheet-oadGRiie.mjs → sheet-DMIqn1iv.mjs} +2 -2
- package/dist/sheet-DMIqn1iv.mjs.map +1 -0
- package/dist/sidebar-C27_pwLR.cjs +2 -0
- package/dist/sidebar-C27_pwLR.cjs.map +1 -0
- package/dist/sidebar-meLttL0V.mjs +2 -0
- package/dist/sidebar-meLttL0V.mjs.map +1 -0
- package/dist/skeleton-BPxcW2yu.mjs +2 -0
- package/dist/skeleton-BPxcW2yu.mjs.map +1 -0
- package/dist/skeleton-BfMCjXYM.cjs +2 -0
- package/dist/skeleton-BfMCjXYM.cjs.map +1 -0
- package/dist/spinner-EgMJOaQi.mjs +2 -0
- package/dist/spinner-EgMJOaQi.mjs.map +1 -0
- package/dist/spinner-MKXqwF9G.cjs +2 -0
- package/dist/spinner-MKXqwF9G.cjs.map +1 -0
- package/dist/systems/google.cjs.map +1 -1
- package/dist/systems/google.d.cts +36 -0
- package/dist/systems/google.d.mts +36 -0
- package/dist/systems/google.mjs.map +1 -1
- package/dist/tables-CmOVrvXM.cjs +2 -0
- package/dist/tables-CmOVrvXM.cjs.map +1 -0
- package/dist/tables-cBo0_szt.mjs +2 -0
- package/dist/tables-cBo0_szt.mjs.map +1 -0
- package/dist/tanstack-form-BmV2BXDz.cjs +2 -0
- package/dist/tanstack-form-BmV2BXDz.cjs.map +1 -0
- package/dist/tanstack-form-CJ43hVb_.mjs +2 -0
- package/dist/tanstack-form-CJ43hVb_.mjs.map +1 -0
- package/dist/{textarea-COQoSVSc.cjs → textarea-BsgmN4jy.cjs} +2 -2
- package/dist/textarea-BsgmN4jy.cjs.map +1 -0
- package/dist/{textarea-bLtmb71c.mjs → textarea-CdGSEkZB.mjs} +2 -2
- package/dist/textarea-CdGSEkZB.mjs.map +1 -0
- package/dist/tooltip-Bj0iOG4s.mjs +2 -0
- package/dist/tooltip-Bj0iOG4s.mjs.map +1 -0
- package/dist/{tooltip-DC6i1A25.cjs → tooltip-itUmYz9k.cjs} +2 -2
- package/dist/tooltip-itUmYz9k.cjs.map +1 -0
- package/dist/{types-Bd0JePtp.d.cts → types-B_32Ieia.d.mts} +1 -1
- package/dist/{types-BpHcqlOI.d.mts → types-CDYHkcOk.d.cts} +1 -1
- package/dist/{types-DBD4LOem.mjs → types-DNphnTW-.mjs} +1 -1
- package/dist/{types-DBD4LOem.mjs.map → types-DNphnTW-.mjs.map} +1 -1
- package/dist/typography/paragraph.cjs +1 -1
- package/dist/typography/paragraph.d.cts +40 -20
- package/dist/typography/paragraph.d.mts +40 -20
- package/dist/typography/paragraph.mjs +1 -1
- package/dist/typography/title.cjs +1 -1
- package/dist/typography/title.cjs.map +1 -1
- package/dist/typography/title.d.cts +33 -5
- package/dist/typography/title.d.mts +33 -5
- package/dist/typography/title.mjs +1 -1
- package/dist/typography/title.mjs.map +1 -1
- package/dist/ui/alert-dialog.cjs +1 -1
- package/dist/ui/alert-dialog.cjs.map +1 -1
- package/dist/ui/alert-dialog.d.cts +54 -12
- package/dist/ui/alert-dialog.d.mts +54 -12
- package/dist/ui/alert-dialog.mjs +1 -1
- package/dist/ui/alert-dialog.mjs.map +1 -1
- package/dist/ui/alert.cjs +1 -2
- package/dist/ui/alert.d.cts +2 -69
- package/dist/ui/alert.d.mts +2 -69
- package/dist/ui/alert.mjs +1 -2
- package/dist/ui/aspect-ratio.cjs +1 -1
- package/dist/ui/aspect-ratio.cjs.map +1 -1
- package/dist/ui/aspect-ratio.d.cts +15 -2
- package/dist/ui/aspect-ratio.d.mts +15 -2
- package/dist/ui/aspect-ratio.mjs +1 -1
- package/dist/ui/aspect-ratio.mjs.map +1 -1
- package/dist/ui/avatar.cjs +1 -1
- package/dist/ui/avatar.d.cts +20 -4
- package/dist/ui/avatar.d.mts +20 -4
- package/dist/ui/avatar.mjs +1 -1
- package/dist/ui/badge.cjs +1 -1
- package/dist/ui/badge.d.cts +2 -21
- package/dist/ui/badge.d.mts +2 -21
- package/dist/ui/badge.mjs +1 -1
- package/dist/ui/breadcrumb.cjs +1 -1
- package/dist/ui/breadcrumb.cjs.map +1 -1
- package/dist/ui/breadcrumb.d.cts +38 -25
- package/dist/ui/breadcrumb.d.mts +38 -25
- package/dist/ui/breadcrumb.mjs +1 -1
- package/dist/ui/breadcrumb.mjs.map +1 -1
- package/dist/ui/button-group.cjs +1 -1
- package/dist/ui/button-group.cjs.map +1 -1
- package/dist/ui/button-group.d.cts +27 -6
- package/dist/ui/button-group.d.mts +27 -6
- package/dist/ui/button-group.mjs +1 -1
- package/dist/ui/button-group.mjs.map +1 -1
- package/dist/ui/button.cjs +1 -1
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.mts +1 -1
- package/dist/ui/button.mjs +1 -1
- package/dist/ui/buttons/add-new.cjs +1 -1
- package/dist/ui/buttons/add-new.cjs.map +1 -1
- package/dist/ui/buttons/add-new.d.cts +9 -0
- package/dist/ui/buttons/add-new.d.mts +9 -0
- package/dist/ui/buttons/add-new.mjs +1 -1
- package/dist/ui/buttons/add-new.mjs.map +1 -1
- package/dist/ui/buttons/edit.cjs +1 -1
- package/dist/ui/buttons/edit.cjs.map +1 -1
- package/dist/ui/buttons/edit.d.cts +9 -0
- package/dist/ui/buttons/edit.d.mts +9 -0
- package/dist/ui/buttons/edit.mjs +1 -1
- package/dist/ui/buttons/edit.mjs.map +1 -1
- package/dist/ui/buttons/refresh.cjs +1 -1
- package/dist/ui/buttons/refresh.cjs.map +1 -1
- package/dist/ui/buttons/refresh.d.cts +9 -0
- package/dist/ui/buttons/refresh.d.mts +9 -0
- package/dist/ui/buttons/refresh.mjs +1 -1
- package/dist/ui/buttons/refresh.mjs.map +1 -1
- package/dist/ui/buttons/trash.cjs +1 -1
- package/dist/ui/buttons/trash.cjs.map +1 -1
- package/dist/ui/buttons/trash.d.cts +9 -0
- package/dist/ui/buttons/trash.d.mts +9 -0
- package/dist/ui/buttons/trash.mjs +1 -1
- package/dist/ui/buttons/trash.mjs.map +1 -1
- package/dist/ui/buttons/upload-image.cjs +1 -1
- package/dist/ui/buttons/upload-image.cjs.map +1 -1
- package/dist/ui/buttons/upload-image.d.cts +13 -0
- package/dist/ui/buttons/upload-image.d.mts +13 -0
- package/dist/ui/buttons/upload-image.mjs +1 -1
- package/dist/ui/buttons/upload-image.mjs.map +1 -1
- package/dist/ui/calendar.cjs +1 -1
- package/dist/ui/calendar.d.cts +22 -4
- package/dist/ui/calendar.d.mts +22 -4
- package/dist/ui/calendar.mjs +1 -1
- package/dist/ui/card.cjs +1 -1
- package/dist/ui/card.cjs.map +1 -1
- package/dist/ui/card.d.cts +37 -8
- package/dist/ui/card.d.mts +37 -8
- package/dist/ui/card.mjs +1 -1
- package/dist/ui/card.mjs.map +1 -1
- package/dist/ui/carousel.cjs +1 -1
- package/dist/ui/carousel.cjs.map +1 -1
- package/dist/ui/carousel.d.cts +31 -7
- package/dist/ui/carousel.d.mts +31 -7
- package/dist/ui/carousel.mjs +1 -1
- package/dist/ui/carousel.mjs.map +1 -1
- package/dist/ui/checkbox.cjs +1 -1
- package/dist/ui/checkbox.d.cts +17 -2
- package/dist/ui/checkbox.d.mts +17 -2
- package/dist/ui/checkbox.mjs +1 -1
- package/dist/ui/collapsible.cjs.map +1 -1
- package/dist/ui/collapsible.d.cts +22 -4
- package/dist/ui/collapsible.d.mts +22 -4
- package/dist/ui/collapsible.mjs.map +1 -1
- package/dist/ui/command.cjs +1 -1
- package/dist/ui/command.d.cts +48 -11
- package/dist/ui/command.d.mts +48 -11
- package/dist/ui/command.mjs +1 -1
- package/dist/ui/context-menu.cjs +1 -1
- package/dist/ui/context-menu.cjs.map +1 -1
- package/dist/ui/context-menu.d.cts +65 -16
- package/dist/ui/context-menu.d.mts +65 -16
- package/dist/ui/context-menu.mjs +1 -1
- package/dist/ui/context-menu.mjs.map +1 -1
- package/dist/ui/dialog.cjs +1 -1
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/dialog.d.mts +1 -1
- package/dist/ui/dialog.mjs +1 -1
- package/dist/ui/drawer.cjs +1 -1
- package/dist/ui/drawer.cjs.map +1 -1
- package/dist/ui/drawer.d.cts +39 -11
- package/dist/ui/drawer.d.mts +39 -11
- package/dist/ui/drawer.mjs +1 -1
- package/dist/ui/drawer.mjs.map +1 -1
- package/dist/ui/dropdown-menu.cjs +1 -1
- package/dist/ui/dropdown-menu.d.cts +65 -16
- package/dist/ui/dropdown-menu.d.mts +65 -16
- package/dist/ui/dropdown-menu.mjs +1 -1
- package/dist/ui/empty.cjs +1 -1
- package/dist/ui/empty.cjs.map +1 -1
- package/dist/ui/empty.d.cts +41 -9
- package/dist/ui/empty.d.mts +41 -9
- package/dist/ui/empty.mjs +1 -1
- package/dist/ui/empty.mjs.map +1 -1
- package/dist/ui/field.cjs +1 -2
- package/dist/ui/field.d.cts +13 -13
- package/dist/ui/field.d.mts +24 -24
- package/dist/ui/field.mjs +1 -2
- package/dist/ui/file-uploader.cjs +2 -2
- package/dist/ui/file-uploader.cjs.map +1 -1
- package/dist/ui/file-uploader.d.cts +27 -2
- package/dist/ui/file-uploader.d.mts +27 -2
- package/dist/ui/file-uploader.mjs +2 -2
- package/dist/ui/file-uploader.mjs.map +1 -1
- package/dist/ui/form.cjs +1 -1
- package/dist/ui/form.cjs.map +1 -1
- package/dist/ui/form.d.cts +51 -7
- package/dist/ui/form.d.mts +55 -11
- package/dist/ui/form.mjs +1 -1
- package/dist/ui/form.mjs.map +1 -1
- package/dist/ui/hover-card.cjs +1 -1
- package/dist/ui/hover-card.cjs.map +1 -1
- package/dist/ui/hover-card.d.cts +22 -4
- package/dist/ui/hover-card.d.mts +22 -4
- package/dist/ui/hover-card.mjs +1 -1
- package/dist/ui/hover-card.mjs.map +1 -1
- package/dist/ui/image.cjs +1 -1
- package/dist/ui/image.d.cts +20 -0
- package/dist/ui/image.d.mts +20 -0
- package/dist/ui/image.mjs +1 -1
- package/dist/ui/input-otp.cjs +1 -1
- package/dist/ui/input-otp.cjs.map +1 -1
- package/dist/ui/input-otp.d.cts +36 -5
- package/dist/ui/input-otp.d.mts +36 -5
- package/dist/ui/input-otp.mjs +1 -1
- package/dist/ui/input-otp.mjs.map +1 -1
- package/dist/ui/input.cjs +1 -1
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.mts +1 -1
- package/dist/ui/input.mjs +1 -1
- package/dist/ui/inputs/search-input.cjs +1 -1
- package/dist/ui/inputs/search-input.cjs.map +1 -1
- package/dist/ui/inputs/search-input.d.cts +20 -3
- package/dist/ui/inputs/search-input.d.mts +20 -3
- package/dist/ui/inputs/search-input.mjs +1 -1
- package/dist/ui/inputs/search-input.mjs.map +1 -1
- package/dist/ui/item.cjs +1 -1
- package/dist/ui/item.cjs.map +1 -1
- package/dist/ui/item.d.cts +56 -16
- package/dist/ui/item.d.mts +56 -16
- package/dist/ui/item.mjs +1 -1
- package/dist/ui/item.mjs.map +1 -1
- package/dist/ui/label.cjs +1 -1
- package/dist/ui/label.d.cts +15 -2
- package/dist/ui/label.d.mts +15 -2
- package/dist/ui/label.mjs +1 -1
- package/dist/ui/menubar.cjs +1 -1
- package/dist/ui/menubar.cjs.map +1 -1
- package/dist/ui/menubar.d.cts +68 -17
- package/dist/ui/menubar.d.mts +68 -17
- package/dist/ui/menubar.mjs +1 -1
- package/dist/ui/menubar.mjs.map +1 -1
- package/dist/ui/multi-select.cjs +1 -1
- package/dist/ui/multi-select.cjs.map +1 -1
- package/dist/ui/multi-select.d.cts +39 -2
- package/dist/ui/multi-select.d.mts +40 -3
- package/dist/ui/multi-select.mjs +1 -1
- package/dist/ui/multi-select.mjs.map +1 -1
- package/dist/ui/navigation-menu.cjs +1 -1
- package/dist/ui/navigation-menu.cjs.map +1 -1
- package/dist/ui/navigation-menu.d.cts +42 -11
- package/dist/ui/navigation-menu.d.mts +42 -11
- package/dist/ui/navigation-menu.mjs +1 -1
- package/dist/ui/navigation-menu.mjs.map +1 -1
- package/dist/ui/pagination.cjs +1 -1
- package/dist/ui/pagination.cjs.map +1 -1
- package/dist/ui/pagination.d.cts +37 -9
- package/dist/ui/pagination.d.mts +37 -9
- package/dist/ui/pagination.mjs +1 -1
- package/dist/ui/pagination.mjs.map +1 -1
- package/dist/ui/popover.cjs +1 -1
- package/dist/ui/popover.d.cts +32 -6
- package/dist/ui/popover.d.mts +32 -6
- package/dist/ui/popover.mjs +1 -1
- package/dist/ui/progress.cjs +1 -1
- package/dist/ui/progress.cjs.map +1 -1
- package/dist/ui/progress.d.cts +13 -2
- package/dist/ui/progress.d.mts +13 -2
- package/dist/ui/progress.mjs +1 -1
- package/dist/ui/progress.mjs.map +1 -1
- package/dist/ui/radio-group.cjs +1 -1
- package/dist/ui/radio-group.d.cts +25 -3
- package/dist/ui/radio-group.d.mts +25 -3
- package/dist/ui/radio-group.mjs +1 -1
- package/dist/ui/resizable.cjs +1 -1
- package/dist/ui/resizable.d.cts +29 -9
- package/dist/ui/resizable.d.mts +29 -9
- package/dist/ui/resizable.mjs +1 -1
- package/dist/ui/scroll-area.cjs +1 -1
- package/dist/ui/scroll-area.cjs.map +1 -1
- package/dist/ui/scroll-area.d.cts +24 -6
- package/dist/ui/scroll-area.d.mts +24 -6
- package/dist/ui/scroll-area.mjs +1 -1
- package/dist/ui/scroll-area.mjs.map +1 -1
- package/dist/ui/select.cjs +1 -1
- package/dist/ui/select.d.cts +43 -9
- package/dist/ui/select.d.mts +43 -9
- package/dist/ui/select.mjs +1 -1
- package/dist/ui/separator.cjs +1 -1
- package/dist/ui/separator.d.cts +23 -2
- package/dist/ui/separator.d.mts +23 -2
- package/dist/ui/separator.mjs +1 -1
- package/dist/ui/sheet.cjs +1 -1
- package/dist/ui/sheet.d.cts +38 -9
- package/dist/ui/sheet.d.mts +38 -9
- package/dist/ui/sheet.mjs +1 -1
- package/dist/ui/sidebar.cjs +1 -1
- package/dist/ui/sidebar.cjs.map +1 -1
- package/dist/ui/sidebar.d.cts +125 -28
- package/dist/ui/sidebar.d.mts +123 -26
- package/dist/ui/sidebar.mjs +1 -1
- package/dist/ui/sidebar.mjs.map +1 -1
- package/dist/ui/skeleton.cjs +1 -1
- package/dist/ui/skeleton.d.cts +19 -2
- package/dist/ui/skeleton.d.mts +19 -2
- package/dist/ui/skeleton.mjs +1 -1
- package/dist/ui/slider.cjs +1 -1
- package/dist/ui/slider.cjs.map +1 -1
- package/dist/ui/slider.d.cts +13 -2
- package/dist/ui/slider.d.mts +13 -2
- package/dist/ui/slider.mjs +1 -1
- package/dist/ui/slider.mjs.map +1 -1
- package/dist/ui/sonner.cjs +1 -1
- package/dist/ui/sonner.cjs.map +1 -1
- package/dist/ui/sonner.d.cts +18 -2
- package/dist/ui/sonner.d.mts +18 -2
- package/dist/ui/sonner.mjs +1 -1
- package/dist/ui/sonner.mjs.map +1 -1
- package/dist/ui/spinner.cjs +1 -1
- package/dist/ui/spinner.d.cts +17 -2
- package/dist/ui/spinner.d.mts +17 -2
- package/dist/ui/spinner.mjs +1 -1
- package/dist/ui/switch.cjs +1 -1
- package/dist/ui/switch.cjs.map +1 -1
- package/dist/ui/switch.d.cts +17 -2
- package/dist/ui/switch.d.mts +17 -2
- package/dist/ui/switch.mjs +1 -1
- package/dist/ui/switch.mjs.map +1 -1
- package/dist/ui/table.cjs +1 -1
- package/dist/ui/table.cjs.map +1 -1
- package/dist/ui/table.d.cts +44 -9
- package/dist/ui/table.d.mts +53 -18
- package/dist/ui/table.mjs +1 -1
- package/dist/ui/table.mjs.map +1 -1
- package/dist/ui/tabs.cjs +1 -1
- package/dist/ui/tabs.cjs.map +1 -1
- package/dist/ui/tabs.d.cts +26 -5
- package/dist/ui/tabs.d.mts +26 -5
- package/dist/ui/tabs.mjs +1 -1
- package/dist/ui/tabs.mjs.map +1 -1
- package/dist/ui/textarea.cjs +1 -1
- package/dist/ui/textarea.d.cts +18 -2
- package/dist/ui/textarea.d.mts +18 -2
- package/dist/ui/textarea.mjs +1 -1
- package/dist/ui/toggle-group.cjs +1 -1
- package/dist/ui/toggle-group.cjs.map +1 -1
- package/dist/ui/toggle-group.d.cts +19 -3
- package/dist/ui/toggle-group.d.mts +19 -3
- package/dist/ui/toggle-group.mjs +1 -1
- package/dist/ui/toggle-group.mjs.map +1 -1
- package/dist/ui/toggle.cjs +1 -1
- package/dist/ui/toggle.cjs.map +1 -1
- package/dist/ui/toggle.d.cts +15 -2
- package/dist/ui/toggle.d.mts +17 -4
- package/dist/ui/toggle.mjs +1 -1
- package/dist/ui/toggle.mjs.map +1 -1
- package/dist/ui/tooltip.cjs +1 -1
- package/dist/ui/tooltip.d.cts +37 -5
- package/dist/ui/tooltip.d.mts +37 -5
- package/dist/ui/tooltip.mjs +1 -1
- package/dist/user-BEyYLDNK.cjs +2 -0
- package/dist/user-BEyYLDNK.cjs.map +1 -0
- package/dist/user-DONsffqr.mjs +2 -0
- package/dist/user-DONsffqr.mjs.map +1 -0
- package/package.json +14 -5
- package/styles/theme.css +44 -23
- package/dist/avatar-DReNH6rV.mjs +0 -2
- package/dist/avatar-DReNH6rV.mjs.map +0 -1
- package/dist/avatar-aVxo69zP.cjs +0 -2
- package/dist/avatar-aVxo69zP.cjs.map +0 -1
- package/dist/badge-B4Fa7-J3.mjs +0 -2
- package/dist/badge-B4Fa7-J3.mjs.map +0 -1
- package/dist/badge-cvLJyaCA.cjs +0 -2
- package/dist/badge-cvLJyaCA.cjs.map +0 -1
- package/dist/button-BFcXpjqF.cjs +0 -2
- package/dist/button-BFcXpjqF.cjs.map +0 -1
- package/dist/button-BQTNG97Y.mjs +0 -2
- package/dist/button-BQTNG97Y.mjs.map +0 -1
- package/dist/button-BX8Kz9y6.d.cts +0 -59
- package/dist/button-Bo4oQsyD.d.mts +0 -59
- package/dist/button.variants-CS-Cmarr.cjs +0 -2
- package/dist/button.variants-CS-Cmarr.cjs.map +0 -1
- package/dist/button.variants-DRWf66hR.mjs +0 -2
- package/dist/button.variants-DRWf66hR.mjs.map +0 -1
- package/dist/calendar-CG-WMM8e.cjs.map +0 -1
- package/dist/calendar-CfOkrubO.mjs +0 -2
- package/dist/calendar-CfOkrubO.mjs.map +0 -1
- package/dist/checkbox-Bg2FiuQw.mjs.map +0 -1
- package/dist/checkbox-C0fSWwmD.cjs.map +0 -1
- package/dist/close-D_Ge7gnP.cjs +0 -2
- package/dist/close-DfuHB7kq.mjs +0 -2
- package/dist/command-DhBTNTqz.mjs.map +0 -1
- package/dist/command-_zpTaaIk.cjs.map +0 -1
- package/dist/data-display/user.cjs.map +0 -1
- package/dist/data-display/user.mjs.map +0 -1
- package/dist/date-By93kONr.mjs +0 -2
- package/dist/date-By93kONr.mjs.map +0 -1
- package/dist/date-em5f7hCx.cjs +0 -2
- package/dist/date-em5f7hCx.cjs.map +0 -1
- package/dist/dialog-CxELDK98.mjs +0 -2
- package/dist/dialog-CxELDK98.mjs.map +0 -1
- package/dist/dialog-DjRiV5vR.cjs +0 -2
- package/dist/dialog-DjRiV5vR.cjs.map +0 -1
- package/dist/dialog-PWeGBpsm.d.mts +0 -47
- package/dist/dialog-aSu9xFOW.d.cts +0 -47
- package/dist/dialogs/detail-dialog/components/sidebar.cjs.map +0 -1
- package/dist/dialogs/detail-dialog/components/sidebar.mjs.map +0 -1
- package/dist/dropdown-menu-B8GUTfTp.mjs +0 -2
- package/dist/dropdown-menu-B8GUTfTp.mjs.map +0 -1
- package/dist/dropdown-menu-BuyuU6uF.cjs +0 -2
- package/dist/dropdown-menu-BuyuU6uF.cjs.map +0 -1
- package/dist/features/search-modal/index.cjs.map +0 -1
- package/dist/features/search-modal/index.mjs.map +0 -1
- package/dist/features/tables/index.cjs.map +0 -1
- package/dist/features/tables/index.mjs.map +0 -1
- package/dist/features/tanstack-form/index.cjs.map +0 -1
- package/dist/features/tanstack-form/index.mjs.map +0 -1
- package/dist/flex-BP8sTi70.mjs.map +0 -1
- package/dist/flex-twCgWyx1.cjs.map +0 -1
- package/dist/heading--VmdIi7C.mjs +0 -2
- package/dist/heading--VmdIi7C.mjs.map +0 -1
- package/dist/heading-BEm5CCSE.cjs +0 -2
- package/dist/heading-BEm5CCSE.cjs.map +0 -1
- package/dist/image-CS_Q0WA7.mjs.map +0 -1
- package/dist/image-DuFv8sPr.cjs.map +0 -1
- package/dist/input-BFWWaN-v.cjs.map +0 -1
- package/dist/input-BgHvD7zf.d.mts +0 -25
- package/dist/input-DBtIgQB6.mjs.map +0 -1
- package/dist/input-DhQmoNrK.d.cts +0 -25
- package/dist/label-BzfsTrVt.cjs.map +0 -1
- package/dist/label-Dqr8nxWi.mjs +0 -2
- package/dist/label-Dqr8nxWi.mjs.map +0 -1
- package/dist/layouts/cms-layout/index.cjs.map +0 -1
- package/dist/layouts/cms-layout/index.mjs.map +0 -1
- package/dist/layouts/payment-layout/index.cjs.map +0 -1
- package/dist/layouts/payment-layout/index.mjs.map +0 -1
- package/dist/paragraph-B72bHMf7.cjs +0 -2
- package/dist/paragraph-B72bHMf7.cjs.map +0 -1
- package/dist/paragraph-moBSTPmT.mjs +0 -2
- package/dist/paragraph-moBSTPmT.mjs.map +0 -1
- package/dist/popover-BckwBuuD.mjs +0 -2
- package/dist/popover-BckwBuuD.mjs.map +0 -1
- package/dist/popover-DzDrgttC.cjs.map +0 -1
- package/dist/radio-group-CBhRsUjN.cjs.map +0 -1
- package/dist/radio-group-Cem8O6BK.mjs.map +0 -1
- package/dist/resizable-DXHfkbaz.mjs.map +0 -1
- package/dist/resizable-mlGS6Zto.cjs.map +0 -1
- package/dist/select-2CgwiefV.cjs.map +0 -1
- package/dist/select-CivtMKTM.mjs.map +0 -1
- package/dist/separator-Bf0gymN4.mjs +0 -2
- package/dist/separator-Bf0gymN4.mjs.map +0 -1
- package/dist/separator-C3ip6sbh.cjs.map +0 -1
- package/dist/sheet-5MJRtrfG.cjs.map +0 -1
- package/dist/sheet-oadGRiie.mjs.map +0 -1
- package/dist/skeleton-Ba6koCVf.mjs +0 -2
- package/dist/skeleton-Ba6koCVf.mjs.map +0 -1
- package/dist/skeleton-CHympz8k.cjs +0 -2
- package/dist/skeleton-CHympz8k.cjs.map +0 -1
- package/dist/spinner-Chm_2fLr.cjs +0 -2
- package/dist/spinner-Chm_2fLr.cjs.map +0 -1
- package/dist/spinner-D1v3Bard.mjs +0 -2
- package/dist/spinner-D1v3Bard.mjs.map +0 -1
- package/dist/textarea-COQoSVSc.cjs.map +0 -1
- package/dist/textarea-bLtmb71c.mjs.map +0 -1
- package/dist/tooltip-B3dTcgcc.mjs +0 -2
- package/dist/tooltip-B3dTcgcc.mjs.map +0 -1
- package/dist/tooltip-DC6i1A25.cjs.map +0 -1
- package/dist/ui/alert.cjs.map +0 -1
- package/dist/ui/alert.mjs.map +0 -1
- package/dist/ui/field.cjs.map +0 -1
- package/dist/ui/field.mjs.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{AlertCircle as e,AlertTriangle as t,CheckCircle as n,Info as r,X as i}from"lucide-react";import{useMemo as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{cn as c}from"@customafk/react-toolkit/utils";import{cva as l}from"class-variance-authority";const u=l([`relative grid w-full items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm`,`grid-cols-[0_1fr]`,`has-[>svg]:grid-cols-[24px_1fr] has-[>svg]:gap-x-3`,`[&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,`transition-colors duration-150`],{variants:{variant:{default:`bg-card text-text-positive-strong border-border`,destructive:`bg-danger-bg-subtle text-danger-intense border-danger-border-subtle [&>svg]:text-danger *:data-[slot=alert-description]:text-danger-strong`,warning:`bg-warning-bg-subtle text-warning-intense border-warning-border-subtle [&>svg]:text-warning *:data-[slot=alert-description]:text-warning-strong`,success:`bg-success-bg-subtle text-success-intense border-success-border-subtle [&>svg]:text-success *:data-[slot=alert-description]:text-success-strong`,info:`bg-info-bg-subtle text-info-intense border-info-border-subtle [&>svg]:text-info *:data-[slot=alert-description]:text-info-strong`}},defaultVariants:{variant:`default`}});function d({className:l,variant:d,children:f,icon:p,dismissible:m,onDismiss:h,...g}){let _=a(()=>{if(!p)switch(d){case`destructive`:return o(e,{});case`warning`:return o(t,{});case`success`:return o(n,{});case`info`:return o(r,{});default:return null}return p},[p,d]);return s(`div`,{"data-slot":`alert`,role:`alert`,"data-variant":d,className:c(u({variant:d}),l),...g,children:[_,f,m&&o(`button`,{type:`button`,onClick:h,"aria-label":`Close alert`,className:`absolute top-2 right-2 size-6 rounded-md p-1 opacity-70 transition-opacity duration-100 hover:opacity-100`,"data-slot":`alert-close`,children:o(i,{size:16})})]})}function f({className:e,...t}){return o(`div`,{"data-slot":`alert-title`,className:c(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function p({className:e,...t}){return o(`div`,{"data-slot":`alert-description`,className:c(`text-text-positive-weak col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}export{p as n,f as r,d as t};
|
|
2
|
+
//# sourceMappingURL=alert-VP3giy31.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-VP3giy31.mjs","names":[],"sources":["../packages/components/ui/alert-variants.ts","../packages/components/ui/alert.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * Alert component variants for styling using class-variance-authority\n */\nexport const alertVariants = cva(\n [\n 'relative grid w-full items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm',\n 'grid-cols-[0_1fr]',\n 'has-[>svg]:grid-cols-[24px_1fr] has-[>svg]:gap-x-3',\n '[&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',\n 'transition-colors duration-150',\n ],\n {\n variants: {\n variant: {\n default: 'bg-card text-text-positive-strong border-border',\n destructive:\n 'bg-danger-bg-subtle text-danger-intense border-danger-border-subtle [&>svg]:text-danger *:data-[slot=alert-description]:text-danger-strong',\n warning:\n 'bg-warning-bg-subtle text-warning-intense border-warning-border-subtle [&>svg]:text-warning *:data-[slot=alert-description]:text-warning-strong',\n success:\n 'bg-success-bg-subtle text-success-intense border-success-border-subtle [&>svg]:text-success *:data-[slot=alert-description]:text-success-strong',\n info: 'bg-info-bg-subtle text-info-intense border-info-border-subtle [&>svg]:text-info *:data-[slot=alert-description]:text-info-strong',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport type AlertVariantProps = VariantProps<typeof alertVariants>;\n","'use client';\n\nimport { useMemo } from 'react';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { AlertCircle, AlertTriangle, CheckCircle, Info, X } from 'lucide-react';\n\nimport { type AlertVariantProps, alertVariants } from './alert-variants';\n\n/**\n * Props for the Alert component.\n */\nexport interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, Omit<AlertVariantProps, 'className'> {\n /**\n * Optional icon to display in the alert; defaults to a variant-appropriate icon when omitted.\n */\n icon?: React.ReactNode;\n /**\n * Whether the alert can be dismissed by the user.\n */\n dismissible?: boolean;\n /**\n * Callback invoked when the dismiss button is clicked.\n */\n onDismiss?: () => void;\n}\n\n/**\n * Displays a contextual feedback message with optional icon, title, description, and dismiss button.\n *\n * @example\n * ```tsx\n * import { Alert, AlertTitle, AlertDescription } from '@customafk/lunas-ui/ui/alert';\n *\n * <Alert variant=\"success\" dismissible onDismiss={() => setOpen(false)}>\n * <AlertTitle>Saved successfully</AlertTitle>\n * <AlertDescription>Your changes have been saved.</AlertDescription>\n * </Alert>\n * ```\n */\nfunction Alert({ className, variant, children, icon, dismissible, onDismiss, ...props }: AlertProps) {\n // Default icons based on variant\n const defaultIcon = useMemo(() => {\n if (!icon) {\n switch (variant) {\n case 'destructive':\n return <AlertCircle />;\n case 'warning':\n return <AlertTriangle />;\n case 'success':\n return <CheckCircle />;\n case 'info':\n return <Info />;\n default:\n return null;\n }\n }\n return icon;\n }, [icon, variant]);\n\n return (\n <div data-slot=\"alert\" role=\"alert\" data-variant={variant} className={cn(alertVariants({ variant }), className)} {...props}>\n {defaultIcon}\n {children}\n {dismissible && (\n <button\n type=\"button\"\n onClick={onDismiss}\n aria-label=\"Close alert\"\n className=\"absolute top-2 right-2 size-6 rounded-md p-1 opacity-70 transition-opacity duration-100 hover:opacity-100\"\n data-slot=\"alert-close\"\n >\n <X size={16} />\n </button>\n )}\n </div>\n );\n}\n\n/**\n * Props for the AlertTitle component.\n */\nexport interface AlertTitleProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Title text or elements to display.\n */\n children: React.ReactNode;\n}\n\n/**\n * Renders the bold title line inside an Alert.\n */\nfunction AlertTitle({ className, ...props }: AlertTitleProps) {\n return <div data-slot=\"alert-title\" className={cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className)} {...props} />;\n}\n\n/**\n * Props for the AlertDescription component.\n */\nexport interface AlertDescriptionProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Descriptive text or elements displayed below the title.\n */\n children: React.ReactNode;\n}\n\n/**\n * Renders the supporting body text inside an Alert.\n */\nfunction AlertDescription({ className, ...props }: AlertDescriptionProps) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn('text-text-positive-weak col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed', className)}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertDescription, AlertTitle };\n"],"mappings":"qRAKA,MAAa,EAAgB,EAC3B,CACE,iFACA,oBACA,qDACA,8DACA,iCACD,CACD,CACE,SAAU,CACR,QAAS,CACP,QAAS,kDACT,YACE,6IACF,QACE,kJACF,QACE,kJACF,KAAM,mIACP,CACF,CACD,gBAAiB,CACf,QAAS,UACV,CACF,CACF,CCUD,SAAS,EAAM,CAAE,YAAW,UAAS,WAAU,OAAM,cAAa,YAAW,GAAG,GAAqB,CAEnG,IAAM,EAAc,MAAc,CAChC,GAAI,CAAC,EACH,OAAQ,EAAR,CACE,IAAK,cACH,OAAO,EAAC,EAAA,EAAA,CAAc,CACxB,IAAK,UACH,OAAO,EAAC,EAAA,EAAA,CAAgB,CAC1B,IAAK,UACH,OAAO,EAAC,EAAA,EAAA,CAAc,CACxB,IAAK,OACH,OAAO,EAAC,EAAA,EAAA,CAAO,CACjB,QACE,OAAO,KAGb,OAAO,GACN,CAAC,EAAM,EAAQ,CAAC,CAEnB,OACE,EAAC,MAAA,CAAI,YAAU,QAAQ,KAAK,QAAQ,eAAc,EAAS,UAAW,EAAG,EAAc,CAAE,UAAS,CAAC,CAAE,EAAU,CAAE,GAAI,YAClH,EACA,EACA,GACC,EAAC,SAAA,CACC,KAAK,SACL,QAAS,EACT,aAAW,cACX,UAAU,4GACV,YAAU,uBAEV,EAAC,EAAA,CAAE,KAAM,GAAA,CAAM,EACR,GAEP,CAiBV,SAAS,EAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OAAO,EAAC,MAAA,CAAI,YAAU,cAAc,UAAW,EAAG,8DAA+D,EAAU,CAAE,GAAI,GAAS,CAgB5I,SAAS,EAAiB,CAAE,YAAW,GAAG,GAAgC,CACxE,OACE,EAAC,MAAA,CACC,YAAU,oBACV,UAAW,EAAG,mGAAoG,EAAU,CAC5H,GAAI,GACJ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react/jsx-runtime`),n=require(`@customafk/react-toolkit/utils`),r=require(`radix-ui`);function i({className:e,...i}){return(0,t.jsx)(r.Avatar.Root,{"data-slot":`avatar`,className:(0,n.cn)(`relative flex size-8 shrink-0 overflow-hidden rounded-full`,e),...i})}function a({className:e,...i}){return(0,t.jsx)(r.Avatar.Image,{"data-slot":`avatar-image`,className:(0,n.cn)(`aspect-square size-full`,e),...i})}function o({className:e,...i}){return(0,t.jsx)(r.Avatar.Fallback,{"data-slot":`avatar-fallback`,className:(0,n.cn)(`bg-muted flex size-full items-center justify-center rounded-full`,e),...i})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
2
|
+
//# sourceMappingURL=avatar-CTS9-raY.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar-CTS9-raY.cjs","names":["AvatarPrimitive"],"sources":["../packages/components/ui/avatar.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Avatar as AvatarPrimitive } from 'radix-ui';\n\n/**\n * Circular user avatar built on Radix UI's Avatar primitives, falling back to initials or an icon when the image fails to load.\n *\n * @example\n * ```tsx\n * import { Avatar, AvatarImage, AvatarFallback } from '@customafk/lunas-ui/ui/avatar';\n *\n * <Avatar>\n * <AvatarImage src=\"https://example.com/avatar.jpg\" alt=\"Jane Doe\" />\n * <AvatarFallback>JD</AvatarFallback>\n * </Avatar>\n * ```\n */\nfunction Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return <AvatarPrimitive.Root data-slot=\"avatar\" className={cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className)} {...props} />;\n}\n\n/** The avatar photo; hidden automatically by Radix UI when the image fails to load, revealing `AvatarFallback`. */\nfunction AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return <AvatarPrimitive.Image data-slot=\"avatar-image\" className={cn('aspect-square size-full', className)} {...props} />;\n}\n\n/** Fallback content (e.g. initials) displayed inside the avatar when the image is unavailable or still loading. */\nfunction AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn('bg-muted flex size-full items-center justify-center rounded-full', className)}\n {...props}\n />\n );\n}\n\nexport { Avatar, AvatarFallback, AvatarImage };\n"],"mappings":"6IAkBA,SAAS,EAAO,CAAE,YAAW,GAAG,GAA4D,CAC1F,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,KAAA,CAAK,YAAU,SAAS,WAAA,EAAA,EAAA,IAAc,6DAA8D,EAAU,CAAE,GAAI,GAAS,CAIvJ,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,WAAA,EAAA,EAAA,IAAc,0BAA2B,EAAU,CAAE,GAAI,GAAS,CAI3H,SAAS,EAAe,CAAE,YAAW,GAAG,GAAgE,CACtG,OACE,EAAA,EAAA,KAACA,EAAAA,OAAgB,SAAA,CACf,YAAU,kBACV,WAAA,EAAA,EAAA,IAAc,mEAAoE,EAAU,CAC5F,GAAI,GACJ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{cn as t}from"@customafk/react-toolkit/utils";import{Avatar as n}from"radix-ui";function r({className:r,...i}){return e(n.Root,{"data-slot":`avatar`,className:t(`relative flex size-8 shrink-0 overflow-hidden rounded-full`,r),...i})}function i({className:r,...i}){return e(n.Image,{"data-slot":`avatar-image`,className:t(`aspect-square size-full`,r),...i})}function a({className:r,...i}){return e(n.Fallback,{"data-slot":`avatar-fallback`,className:t(`bg-muted flex size-full items-center justify-center rounded-full`,r),...i})}export{a as n,i as r,r as t};
|
|
2
|
+
//# sourceMappingURL=avatar-DbxqvCjT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar-DbxqvCjT.mjs","names":["Avatar","AvatarPrimitive"],"sources":["../packages/components/ui/avatar.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Avatar as AvatarPrimitive } from 'radix-ui';\n\n/**\n * Circular user avatar built on Radix UI's Avatar primitives, falling back to initials or an icon when the image fails to load.\n *\n * @example\n * ```tsx\n * import { Avatar, AvatarImage, AvatarFallback } from '@customafk/lunas-ui/ui/avatar';\n *\n * <Avatar>\n * <AvatarImage src=\"https://example.com/avatar.jpg\" alt=\"Jane Doe\" />\n * <AvatarFallback>JD</AvatarFallback>\n * </Avatar>\n * ```\n */\nfunction Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return <AvatarPrimitive.Root data-slot=\"avatar\" className={cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className)} {...props} />;\n}\n\n/** The avatar photo; hidden automatically by Radix UI when the image fails to load, revealing `AvatarFallback`. */\nfunction AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return <AvatarPrimitive.Image data-slot=\"avatar-image\" className={cn('aspect-square size-full', className)} {...props} />;\n}\n\n/** Fallback content (e.g. initials) displayed inside the avatar when the image is unavailable or still loading. */\nfunction AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn('bg-muted flex size-full items-center justify-center rounded-full', className)}\n {...props}\n />\n );\n}\n\nexport { Avatar, AvatarFallback, AvatarImage };\n"],"mappings":"8HAkBA,SAASA,EAAO,CAAE,YAAW,GAAG,GAA4D,CAC1F,OAAO,EAACC,EAAgB,KAAA,CAAK,YAAU,SAAS,UAAW,EAAG,6DAA8D,EAAU,CAAE,GAAI,GAAS,CAIvJ,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,UAAW,EAAG,0BAA2B,EAAU,CAAE,GAAI,GAAS,CAI3H,SAAS,EAAe,CAAE,YAAW,GAAG,GAAgE,CACtG,OACE,EAACA,EAAgB,SAAA,CACf,YAAU,kBACV,UAAW,EAAG,mEAAoE,EAAU,CAC5F,GAAI,GACJ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{cn as t}from"@customafk/react-toolkit/utils";import{cva as n}from"class-variance-authority";const r=n(`inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline`,{variants:{variant:{solid:`shadow-btn`,soft:``,outline:`bg-transparent border`},color:{primary:``,secondary:``,muted:``,accent:``,info:``,success:``,warning:``,danger:``},size:{xs:`text-[10px]/3 px-1.5 py-0.5 gap-1`,sm:`text-xs px-2 py-0.5 gap-1`,md:`text-sm px-2.5 py-0.5 gap-1.5`,lg:`text-base px-3 py-1 gap-1.5`,xl:`text-lg px-3.5 py-1 gap-1.5`},pill:{true:`rounded-full`,false:`rounded-sm`}},defaultVariants:{variant:`solid`,color:`primary`,size:`md`,pill:!0},compoundVariants:[{variant:`solid`,color:`primary`,className:`bg-primary text-primary-foreground`},{variant:`solid`,color:`secondary`,className:`bg-secondary text-secondary-foreground`},{variant:`solid`,color:`muted`,className:`bg-muted text-text-negative`},{variant:`solid`,color:`accent`,className:`bg-accent text-text-negative`},{variant:`solid`,color:`info`,className:`bg-info text-info-foreground`},{variant:`solid`,color:`success`,className:`bg-success text-success-foreground`},{variant:`solid`,color:`warning`,className:`bg-warning text-warning-foreground`},{variant:`solid`,color:`danger`,className:`bg-danger text-danger-foreground`},{variant:`soft`,color:`primary`,className:`bg-primary-bg-subtle text-primary-intense`},{variant:`soft`,color:`secondary`,className:`bg-secondary-bg-subtle text-secondary-intense`},{variant:`soft`,color:`muted`,className:`bg-muted-bg-subtle text-muted-intense`},{variant:`soft`,color:`accent`,className:`bg-accent-bg-subtle text-accent-intense`},{variant:`soft`,color:`info`,className:`bg-info-bg-subtle text-info-intense`},{variant:`soft`,color:`success`,className:`bg-success-bg-subtle text-success-intense`},{variant:`soft`,color:`warning`,className:`bg-warning-bg-subtle text-warning-intense`},{variant:`soft`,color:`danger`,className:`bg-danger-bg-subtle text-danger-intense`},{variant:`outline`,color:`primary`,className:`border-primary text-primary`},{variant:`outline`,color:`secondary`,className:`border-secondary text-secondary`},{variant:`outline`,color:`muted`,className:`border-muted text-muted`},{variant:`outline`,color:`accent`,className:`border-accent text-accent`},{variant:`outline`,color:`info`,className:`border-info text-info`},{variant:`outline`,color:`success`,className:`border-success text-success`},{variant:`outline`,color:`warning`,className:`border-warning text-warning`},{variant:`outline`,color:`danger`,className:`border-danger text-danger`}]});function i({className:n,variant:i,color:a,size:o,pill:s,...c}){return e(`span`,{className:t(r({variant:i,color:a,pill:s,size:o}),n),...c})}export{r as n,i as t};
|
|
2
|
+
//# sourceMappingURL=badge-B8bw2UEY.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-B8bw2UEY.mjs","names":[],"sources":["../packages/components/ui/badge.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline',\n {\n variants: {\n variant: {\n solid: 'shadow-btn',\n soft: '',\n outline: 'bg-transparent border',\n },\n color: {\n primary: '',\n secondary: '',\n muted: '',\n accent: '',\n info: '',\n success: '',\n warning: '',\n danger: '',\n },\n size: {\n xs: 'text-[10px]/3 px-1.5 py-0.5 gap-1',\n sm: 'text-xs px-2 py-0.5 gap-1',\n md: 'text-sm px-2.5 py-0.5 gap-1.5',\n lg: 'text-base px-3 py-1 gap-1.5',\n xl: 'text-lg px-3.5 py-1 gap-1.5',\n },\n pill: {\n true: 'rounded-full',\n false: 'rounded-sm',\n },\n },\n defaultVariants: {\n variant: 'solid',\n color: 'primary',\n size: 'md',\n pill: true,\n },\n compoundVariants: [\n // solid\n { variant: 'solid', color: 'primary', className: 'bg-primary text-primary-foreground' },\n { variant: 'solid', color: 'secondary', className: 'bg-secondary text-secondary-foreground' },\n { variant: 'solid', color: 'muted', className: 'bg-muted text-text-negative' },\n { variant: 'solid', color: 'accent', className: 'bg-accent text-text-negative' },\n { variant: 'solid', color: 'info', className: 'bg-info text-info-foreground' },\n { variant: 'solid', color: 'success', className: 'bg-success text-success-foreground' },\n { variant: 'solid', color: 'warning', className: 'bg-warning text-warning-foreground' },\n { variant: 'solid', color: 'danger', className: 'bg-danger text-danger-foreground' },\n // soft\n { variant: 'soft', color: 'primary', className: 'bg-primary-bg-subtle text-primary-intense' },\n { variant: 'soft', color: 'secondary', className: 'bg-secondary-bg-subtle text-secondary-intense' },\n { variant: 'soft', color: 'muted', className: 'bg-muted-bg-subtle text-muted-intense' },\n { variant: 'soft', color: 'accent', className: 'bg-accent-bg-subtle text-accent-intense' },\n { variant: 'soft', color: 'info', className: 'bg-info-bg-subtle text-info-intense' },\n { variant: 'soft', color: 'success', className: 'bg-success-bg-subtle text-success-intense' },\n { variant: 'soft', color: 'warning', className: 'bg-warning-bg-subtle text-warning-intense' },\n { variant: 'soft', color: 'danger', className: 'bg-danger-bg-subtle text-danger-intense' },\n // outline\n { variant: 'outline', color: 'primary', className: 'border-primary text-primary' },\n { variant: 'outline', color: 'secondary', className: 'border-secondary text-secondary' },\n { variant: 'outline', color: 'muted', className: 'border-muted text-muted' },\n { variant: 'outline', color: 'accent', className: 'border-accent text-accent' },\n { variant: 'outline', color: 'info', className: 'border-info text-info' },\n { variant: 'outline', color: 'success', className: 'border-success text-success' },\n { variant: 'outline', color: 'warning', className: 'border-warning text-warning' },\n { variant: 'outline', color: 'danger', className: 'border-danger text-danger' },\n ],\n }\n);\n\n/**\n * Props for the `Badge` component.\n *\n * @property variant - Visual fill style — `'solid'` (filled, default), `'soft'` (tinted background), or `'outline'` (border only).\n * @property color - Semantic color token — `'primary'` | `'secondary'` | `'muted'` | `'accent'` | `'info'` | `'success'` | `'warning'` | `'danger'`. Defaults to `'primary'`.\n * @property size - Badge size — `'xs'` | `'sm'` | `'md'` (default) | `'lg'` | `'xl'`.\n * @property pill - When `true` (default), renders with fully rounded corners (`rounded-full`); when `false`, uses `rounded-sm`.\n */\nexport type BadgeProps = VariantProps<typeof badgeVariants> & React.ComponentPropsWithoutRef<'span'>;\n\n/**\n * Inline status label rendered as a `<span>` with CVA-driven variant, color, size, and shape options.\n *\n * @example\n * ```tsx\n * import { Badge } from '@customafk/lunas-ui/ui/badge';\n *\n * <Badge variant=\"soft\" color=\"success\" size=\"sm\">Active</Badge>\n * <Badge variant=\"outline\" color=\"danger\">Overdue</Badge>\n * ```\n */\nfunction Badge({ className, variant, color, size, pill, ...props }: BadgeProps) {\n return <span className={cn(badgeVariants({ variant, color, pill, size }), className)} {...props} />;\n}\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport { Badge, badgeVariants };\n"],"mappings":"2IAMA,MAAM,EAAgB,EACpB,iLACA,CACE,SAAU,CACR,QAAS,CACP,MAAO,aACP,KAAM,GACN,QAAS,wBACV,CACD,MAAO,CACL,QAAS,GACT,UAAW,GACX,MAAO,GACP,OAAQ,GACR,KAAM,GACN,QAAS,GACT,QAAS,GACT,OAAQ,GACT,CACD,KAAM,CACJ,GAAI,oCACJ,GAAI,4BACJ,GAAI,gCACJ,GAAI,8BACJ,GAAI,8BACL,CACD,KAAM,CACJ,KAAM,eACN,MAAO,aACR,CACF,CACD,gBAAiB,CACf,QAAS,QACT,MAAO,UACP,KAAM,KACN,KAAM,GACP,CACD,iBAAkB,CAEhB,CAAE,QAAS,QAAS,MAAO,UAAW,UAAW,qCAAsC,CACvF,CAAE,QAAS,QAAS,MAAO,YAAa,UAAW,yCAA0C,CAC7F,CAAE,QAAS,QAAS,MAAO,QAAS,UAAW,8BAA+B,CAC9E,CAAE,QAAS,QAAS,MAAO,SAAU,UAAW,+BAAgC,CAChF,CAAE,QAAS,QAAS,MAAO,OAAQ,UAAW,+BAAgC,CAC9E,CAAE,QAAS,QAAS,MAAO,UAAW,UAAW,qCAAsC,CACvF,CAAE,QAAS,QAAS,MAAO,UAAW,UAAW,qCAAsC,CACvF,CAAE,QAAS,QAAS,MAAO,SAAU,UAAW,mCAAoC,CAEpF,CAAE,QAAS,OAAQ,MAAO,UAAW,UAAW,4CAA6C,CAC7F,CAAE,QAAS,OAAQ,MAAO,YAAa,UAAW,gDAAiD,CACnG,CAAE,QAAS,OAAQ,MAAO,QAAS,UAAW,wCAAyC,CACvF,CAAE,QAAS,OAAQ,MAAO,SAAU,UAAW,0CAA2C,CAC1F,CAAE,QAAS,OAAQ,MAAO,OAAQ,UAAW,sCAAuC,CACpF,CAAE,QAAS,OAAQ,MAAO,UAAW,UAAW,4CAA6C,CAC7F,CAAE,QAAS,OAAQ,MAAO,UAAW,UAAW,4CAA6C,CAC7F,CAAE,QAAS,OAAQ,MAAO,SAAU,UAAW,0CAA2C,CAE1F,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,8BAA+B,CAClF,CAAE,QAAS,UAAW,MAAO,YAAa,UAAW,kCAAmC,CACxF,CAAE,QAAS,UAAW,MAAO,QAAS,UAAW,0BAA2B,CAC5E,CAAE,QAAS,UAAW,MAAO,SAAU,UAAW,4BAA6B,CAC/E,CAAE,QAAS,UAAW,MAAO,OAAQ,UAAW,wBAAyB,CACzE,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,8BAA+B,CAClF,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,8BAA+B,CAClF,CAAE,QAAS,UAAW,MAAO,SAAU,UAAW,4BAA6B,CAChF,CACF,CACF,CAuBD,SAAS,EAAM,CAAE,YAAW,UAAS,QAAO,OAAM,OAAM,GAAG,GAAqB,CAC9E,OAAO,EAAC,OAAA,CAAK,UAAW,EAAG,EAAc,CAAE,UAAS,QAAO,OAAM,OAAM,CAAC,CAAE,EAAU,CAAE,GAAI,GAAS"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as react_jsx_runtime50 from "react/jsx-runtime";
|
|
2
|
+
import * as class_variance_authority_types3 from "class-variance-authority/types";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
|
|
5
|
+
//#region packages/components/ui/badge.d.ts
|
|
6
|
+
declare const badgeVariants: (props?: ({
|
|
7
|
+
variant?: "outline" | "solid" | "soft" | null | undefined;
|
|
8
|
+
color?: "muted" | "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
9
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
|
+
pill?: boolean | null | undefined;
|
|
11
|
+
} & class_variance_authority_types3.ClassProp) | undefined) => string;
|
|
12
|
+
/**
|
|
13
|
+
* Props for the `Badge` component.
|
|
14
|
+
*
|
|
15
|
+
* @property variant - Visual fill style — `'solid'` (filled, default), `'soft'` (tinted background), or `'outline'` (border only).
|
|
16
|
+
* @property color - Semantic color token — `'primary'` | `'secondary'` | `'muted'` | `'accent'` | `'info'` | `'success'` | `'warning'` | `'danger'`. Defaults to `'primary'`.
|
|
17
|
+
* @property size - Badge size — `'xs'` | `'sm'` | `'md'` (default) | `'lg'` | `'xl'`.
|
|
18
|
+
* @property pill - When `true` (default), renders with fully rounded corners (`rounded-full`); when `false`, uses `rounded-sm`.
|
|
19
|
+
*/
|
|
20
|
+
type BadgeProps = VariantProps<typeof badgeVariants> & React.ComponentPropsWithoutRef<'span'>;
|
|
21
|
+
/**
|
|
22
|
+
* Inline status label rendered as a `<span>` with CVA-driven variant, color, size, and shape options.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* import { Badge } from '@customafk/lunas-ui/ui/badge';
|
|
27
|
+
*
|
|
28
|
+
* <Badge variant="soft" color="success" size="sm">Active</Badge>
|
|
29
|
+
* <Badge variant="outline" color="danger">Overdue</Badge>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare function Badge({
|
|
33
|
+
className,
|
|
34
|
+
variant,
|
|
35
|
+
color,
|
|
36
|
+
size,
|
|
37
|
+
pill,
|
|
38
|
+
...props
|
|
39
|
+
}: BadgeProps): react_jsx_runtime50.JSX.Element;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { BadgeProps as n, badgeVariants as r, Badge as t };
|
|
42
|
+
//# sourceMappingURL=badge-BFTGDsBm.d.cts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as react_jsx_runtime199 from "react/jsx-runtime";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as class_variance_authority_types11 from "class-variance-authority/types";
|
|
4
|
+
|
|
5
|
+
//#region packages/components/ui/badge.d.ts
|
|
6
|
+
declare const badgeVariants: (props?: ({
|
|
7
|
+
variant?: "outline" | "solid" | "soft" | null | undefined;
|
|
8
|
+
color?: "muted" | "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
9
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
|
+
pill?: boolean | null | undefined;
|
|
11
|
+
} & class_variance_authority_types11.ClassProp) | undefined) => string;
|
|
12
|
+
/**
|
|
13
|
+
* Props for the `Badge` component.
|
|
14
|
+
*
|
|
15
|
+
* @property variant - Visual fill style — `'solid'` (filled, default), `'soft'` (tinted background), or `'outline'` (border only).
|
|
16
|
+
* @property color - Semantic color token — `'primary'` | `'secondary'` | `'muted'` | `'accent'` | `'info'` | `'success'` | `'warning'` | `'danger'`. Defaults to `'primary'`.
|
|
17
|
+
* @property size - Badge size — `'xs'` | `'sm'` | `'md'` (default) | `'lg'` | `'xl'`.
|
|
18
|
+
* @property pill - When `true` (default), renders with fully rounded corners (`rounded-full`); when `false`, uses `rounded-sm`.
|
|
19
|
+
*/
|
|
20
|
+
type BadgeProps = VariantProps<typeof badgeVariants> & React.ComponentPropsWithoutRef<'span'>;
|
|
21
|
+
/**
|
|
22
|
+
* Inline status label rendered as a `<span>` with CVA-driven variant, color, size, and shape options.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* import { Badge } from '@customafk/lunas-ui/ui/badge';
|
|
27
|
+
*
|
|
28
|
+
* <Badge variant="soft" color="success" size="sm">Active</Badge>
|
|
29
|
+
* <Badge variant="outline" color="danger">Overdue</Badge>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare function Badge({
|
|
33
|
+
className,
|
|
34
|
+
variant,
|
|
35
|
+
color,
|
|
36
|
+
size,
|
|
37
|
+
pill,
|
|
38
|
+
...props
|
|
39
|
+
}: BadgeProps): react_jsx_runtime199.JSX.Element;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { BadgeProps as n, badgeVariants as r, Badge as t };
|
|
42
|
+
//# sourceMappingURL=badge-sL8O2yfv.d.mts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react/jsx-runtime`),n=require(`@customafk/react-toolkit/utils`),r=require(`class-variance-authority`);const i=(0,r.cva)(`inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline`,{variants:{variant:{solid:`shadow-btn`,soft:``,outline:`bg-transparent border`},color:{primary:``,secondary:``,muted:``,accent:``,info:``,success:``,warning:``,danger:``},size:{xs:`text-[10px]/3 px-1.5 py-0.5 gap-1`,sm:`text-xs px-2 py-0.5 gap-1`,md:`text-sm px-2.5 py-0.5 gap-1.5`,lg:`text-base px-3 py-1 gap-1.5`,xl:`text-lg px-3.5 py-1 gap-1.5`},pill:{true:`rounded-full`,false:`rounded-sm`}},defaultVariants:{variant:`solid`,color:`primary`,size:`md`,pill:!0},compoundVariants:[{variant:`solid`,color:`primary`,className:`bg-primary text-primary-foreground`},{variant:`solid`,color:`secondary`,className:`bg-secondary text-secondary-foreground`},{variant:`solid`,color:`muted`,className:`bg-muted text-text-negative`},{variant:`solid`,color:`accent`,className:`bg-accent text-text-negative`},{variant:`solid`,color:`info`,className:`bg-info text-info-foreground`},{variant:`solid`,color:`success`,className:`bg-success text-success-foreground`},{variant:`solid`,color:`warning`,className:`bg-warning text-warning-foreground`},{variant:`solid`,color:`danger`,className:`bg-danger text-danger-foreground`},{variant:`soft`,color:`primary`,className:`bg-primary-bg-subtle text-primary-intense`},{variant:`soft`,color:`secondary`,className:`bg-secondary-bg-subtle text-secondary-intense`},{variant:`soft`,color:`muted`,className:`bg-muted-bg-subtle text-muted-intense`},{variant:`soft`,color:`accent`,className:`bg-accent-bg-subtle text-accent-intense`},{variant:`soft`,color:`info`,className:`bg-info-bg-subtle text-info-intense`},{variant:`soft`,color:`success`,className:`bg-success-bg-subtle text-success-intense`},{variant:`soft`,color:`warning`,className:`bg-warning-bg-subtle text-warning-intense`},{variant:`soft`,color:`danger`,className:`bg-danger-bg-subtle text-danger-intense`},{variant:`outline`,color:`primary`,className:`border-primary text-primary`},{variant:`outline`,color:`secondary`,className:`border-secondary text-secondary`},{variant:`outline`,color:`muted`,className:`border-muted text-muted`},{variant:`outline`,color:`accent`,className:`border-accent text-accent`},{variant:`outline`,color:`info`,className:`border-info text-info`},{variant:`outline`,color:`success`,className:`border-success text-success`},{variant:`outline`,color:`warning`,className:`border-warning text-warning`},{variant:`outline`,color:`danger`,className:`border-danger text-danger`}]});function a({className:e,variant:r,color:a,size:o,pill:s,...c}){return(0,t.jsx)(`span`,{className:(0,n.cn)(i({variant:r,color:a,pill:s,size:o}),e),...c})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
2
|
+
//# sourceMappingURL=badge-uQ0pIZbQ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-uQ0pIZbQ.cjs","names":[],"sources":["../packages/components/ui/badge.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center font-medium transition-colors duration-150 focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-ring forced-colors:outline',\n {\n variants: {\n variant: {\n solid: 'shadow-btn',\n soft: '',\n outline: 'bg-transparent border',\n },\n color: {\n primary: '',\n secondary: '',\n muted: '',\n accent: '',\n info: '',\n success: '',\n warning: '',\n danger: '',\n },\n size: {\n xs: 'text-[10px]/3 px-1.5 py-0.5 gap-1',\n sm: 'text-xs px-2 py-0.5 gap-1',\n md: 'text-sm px-2.5 py-0.5 gap-1.5',\n lg: 'text-base px-3 py-1 gap-1.5',\n xl: 'text-lg px-3.5 py-1 gap-1.5',\n },\n pill: {\n true: 'rounded-full',\n false: 'rounded-sm',\n },\n },\n defaultVariants: {\n variant: 'solid',\n color: 'primary',\n size: 'md',\n pill: true,\n },\n compoundVariants: [\n // solid\n { variant: 'solid', color: 'primary', className: 'bg-primary text-primary-foreground' },\n { variant: 'solid', color: 'secondary', className: 'bg-secondary text-secondary-foreground' },\n { variant: 'solid', color: 'muted', className: 'bg-muted text-text-negative' },\n { variant: 'solid', color: 'accent', className: 'bg-accent text-text-negative' },\n { variant: 'solid', color: 'info', className: 'bg-info text-info-foreground' },\n { variant: 'solid', color: 'success', className: 'bg-success text-success-foreground' },\n { variant: 'solid', color: 'warning', className: 'bg-warning text-warning-foreground' },\n { variant: 'solid', color: 'danger', className: 'bg-danger text-danger-foreground' },\n // soft\n { variant: 'soft', color: 'primary', className: 'bg-primary-bg-subtle text-primary-intense' },\n { variant: 'soft', color: 'secondary', className: 'bg-secondary-bg-subtle text-secondary-intense' },\n { variant: 'soft', color: 'muted', className: 'bg-muted-bg-subtle text-muted-intense' },\n { variant: 'soft', color: 'accent', className: 'bg-accent-bg-subtle text-accent-intense' },\n { variant: 'soft', color: 'info', className: 'bg-info-bg-subtle text-info-intense' },\n { variant: 'soft', color: 'success', className: 'bg-success-bg-subtle text-success-intense' },\n { variant: 'soft', color: 'warning', className: 'bg-warning-bg-subtle text-warning-intense' },\n { variant: 'soft', color: 'danger', className: 'bg-danger-bg-subtle text-danger-intense' },\n // outline\n { variant: 'outline', color: 'primary', className: 'border-primary text-primary' },\n { variant: 'outline', color: 'secondary', className: 'border-secondary text-secondary' },\n { variant: 'outline', color: 'muted', className: 'border-muted text-muted' },\n { variant: 'outline', color: 'accent', className: 'border-accent text-accent' },\n { variant: 'outline', color: 'info', className: 'border-info text-info' },\n { variant: 'outline', color: 'success', className: 'border-success text-success' },\n { variant: 'outline', color: 'warning', className: 'border-warning text-warning' },\n { variant: 'outline', color: 'danger', className: 'border-danger text-danger' },\n ],\n }\n);\n\n/**\n * Props for the `Badge` component.\n *\n * @property variant - Visual fill style — `'solid'` (filled, default), `'soft'` (tinted background), or `'outline'` (border only).\n * @property color - Semantic color token — `'primary'` | `'secondary'` | `'muted'` | `'accent'` | `'info'` | `'success'` | `'warning'` | `'danger'`. Defaults to `'primary'`.\n * @property size - Badge size — `'xs'` | `'sm'` | `'md'` (default) | `'lg'` | `'xl'`.\n * @property pill - When `true` (default), renders with fully rounded corners (`rounded-full`); when `false`, uses `rounded-sm`.\n */\nexport type BadgeProps = VariantProps<typeof badgeVariants> & React.ComponentPropsWithoutRef<'span'>;\n\n/**\n * Inline status label rendered as a `<span>` with CVA-driven variant, color, size, and shape options.\n *\n * @example\n * ```tsx\n * import { Badge } from '@customafk/lunas-ui/ui/badge';\n *\n * <Badge variant=\"soft\" color=\"success\" size=\"sm\">Active</Badge>\n * <Badge variant=\"outline\" color=\"danger\">Overdue</Badge>\n * ```\n */\nfunction Badge({ className, variant, color, size, pill, ...props }: BadgeProps) {\n return <span className={cn(badgeVariants({ variant, color, pill, size }), className)} {...props} />;\n}\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport { Badge, badgeVariants };\n"],"mappings":"6JAMA,MAAM,GAAA,EAAA,EAAA,KACJ,iLACA,CACE,SAAU,CACR,QAAS,CACP,MAAO,aACP,KAAM,GACN,QAAS,wBACV,CACD,MAAO,CACL,QAAS,GACT,UAAW,GACX,MAAO,GACP,OAAQ,GACR,KAAM,GACN,QAAS,GACT,QAAS,GACT,OAAQ,GACT,CACD,KAAM,CACJ,GAAI,oCACJ,GAAI,4BACJ,GAAI,gCACJ,GAAI,8BACJ,GAAI,8BACL,CACD,KAAM,CACJ,KAAM,eACN,MAAO,aACR,CACF,CACD,gBAAiB,CACf,QAAS,QACT,MAAO,UACP,KAAM,KACN,KAAM,GACP,CACD,iBAAkB,CAEhB,CAAE,QAAS,QAAS,MAAO,UAAW,UAAW,qCAAsC,CACvF,CAAE,QAAS,QAAS,MAAO,YAAa,UAAW,yCAA0C,CAC7F,CAAE,QAAS,QAAS,MAAO,QAAS,UAAW,8BAA+B,CAC9E,CAAE,QAAS,QAAS,MAAO,SAAU,UAAW,+BAAgC,CAChF,CAAE,QAAS,QAAS,MAAO,OAAQ,UAAW,+BAAgC,CAC9E,CAAE,QAAS,QAAS,MAAO,UAAW,UAAW,qCAAsC,CACvF,CAAE,QAAS,QAAS,MAAO,UAAW,UAAW,qCAAsC,CACvF,CAAE,QAAS,QAAS,MAAO,SAAU,UAAW,mCAAoC,CAEpF,CAAE,QAAS,OAAQ,MAAO,UAAW,UAAW,4CAA6C,CAC7F,CAAE,QAAS,OAAQ,MAAO,YAAa,UAAW,gDAAiD,CACnG,CAAE,QAAS,OAAQ,MAAO,QAAS,UAAW,wCAAyC,CACvF,CAAE,QAAS,OAAQ,MAAO,SAAU,UAAW,0CAA2C,CAC1F,CAAE,QAAS,OAAQ,MAAO,OAAQ,UAAW,sCAAuC,CACpF,CAAE,QAAS,OAAQ,MAAO,UAAW,UAAW,4CAA6C,CAC7F,CAAE,QAAS,OAAQ,MAAO,UAAW,UAAW,4CAA6C,CAC7F,CAAE,QAAS,OAAQ,MAAO,SAAU,UAAW,0CAA2C,CAE1F,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,8BAA+B,CAClF,CAAE,QAAS,UAAW,MAAO,YAAa,UAAW,kCAAmC,CACxF,CAAE,QAAS,UAAW,MAAO,QAAS,UAAW,0BAA2B,CAC5E,CAAE,QAAS,UAAW,MAAO,SAAU,UAAW,4BAA6B,CAC/E,CAAE,QAAS,UAAW,MAAO,OAAQ,UAAW,wBAAyB,CACzE,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,8BAA+B,CAClF,CAAE,QAAS,UAAW,MAAO,UAAW,UAAW,8BAA+B,CAClF,CAAE,QAAS,UAAW,MAAO,SAAU,UAAW,4BAA6B,CAChF,CACF,CACF,CAuBD,SAAS,EAAM,CAAE,YAAW,UAAS,QAAO,OAAM,OAAM,GAAG,GAAqB,CAC9E,OAAO,EAAA,EAAA,KAAC,OAAA,CAAK,WAAA,EAAA,EAAA,IAAc,EAAc,CAAE,UAAS,QAAO,OAAM,OAAM,CAAC,CAAE,EAAU,CAAE,GAAI,GAAS"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import * as react_jsx_runtime184 from "react/jsx-runtime";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as class_variance_authority_types13 from "class-variance-authority/types";
|
|
4
|
+
|
|
5
|
+
//#region packages/components/ui/button.variants.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Button variants definition for styling using class-variance-authority
|
|
9
|
+
*/
|
|
10
|
+
declare const buttonVariants: (props?: ({
|
|
11
|
+
variant?: "default" | "outline" | "link" | "soft" | "ghost" | "subtle" | null | undefined;
|
|
12
|
+
color?: "muted" | "primary" | "secondary" | "info" | "success" | "warning" | "danger" | "important" | null | undefined;
|
|
13
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types13.ClassProp) | undefined) => string;
|
|
15
|
+
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region packages/components/ui/button.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Props for the {@link Button} component.
|
|
20
|
+
*
|
|
21
|
+
* Extends all native `<button>` attributes except `color`, which is
|
|
22
|
+
* re-declared as a semantic design-token via {@link ButtonVariantProps}.
|
|
23
|
+
*
|
|
24
|
+
* @see {@link https://www.radix-ui.com/primitives/docs/utilities/slot} Radix Slot (asChild pattern)
|
|
25
|
+
*/
|
|
26
|
+
interface ButtonProps extends Omit<React.ComponentProps<'button'>, 'color'> {
|
|
27
|
+
/**
|
|
28
|
+
* When `true`, renders children through Radix's `<Slot>` primitive,
|
|
29
|
+
* merging all button props directly onto the child element.
|
|
30
|
+
*
|
|
31
|
+
* Use this to swap the rendered HTML element while keeping button styling
|
|
32
|
+
* (e.g. render a Next.js `<Link>` that looks like a button).
|
|
33
|
+
*
|
|
34
|
+
* @default false
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <Button asChild variant="ghost">
|
|
38
|
+
* <Link href="/dashboard">Go to Dashboard</Link>
|
|
39
|
+
* </Button>
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
asChild?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* When `true`, shows an animated `Loader2` spinner overlay and sets
|
|
45
|
+
* `aria-busy="true"`. The button is implicitly disabled while loading —
|
|
46
|
+
* no separate `disabled` prop is needed for loading states.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
isLoading?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Visual style variant of the button.
|
|
53
|
+
*
|
|
54
|
+
* | Value | Description |
|
|
55
|
+
* |---|---|
|
|
56
|
+
* | `"default"` | Filled surface — primary call-to-action (default) |
|
|
57
|
+
* | `"outline"` | Transparent background with a visible border |
|
|
58
|
+
* | `"ghost"` | No background or border — minimal footprint |
|
|
59
|
+
* | `"link"` | Styled as an underlined hyperlink |
|
|
60
|
+
* | `"icon"` | Square, padding-free — icon-only buttons |
|
|
61
|
+
* | `"destructive"` | Red-toned filled surface for danger actions |
|
|
62
|
+
*
|
|
63
|
+
* @default "default"
|
|
64
|
+
*/
|
|
65
|
+
variant?: ButtonVariantProps['variant'];
|
|
66
|
+
/**
|
|
67
|
+
* Semantic color token applied to the button's surface and text.
|
|
68
|
+
*
|
|
69
|
+
* | Value | Usage |
|
|
70
|
+
* |---|---|
|
|
71
|
+
* | `"primary"` | Brand primary (default) |
|
|
72
|
+
* | `"success"` | Confirmation / save actions |
|
|
73
|
+
* | `"danger"` | Destructive / delete actions |
|
|
74
|
+
* | `"warning"` | Cautionary / irreversible actions |
|
|
75
|
+
* | `"muted"` | Secondary / low-emphasis actions |
|
|
76
|
+
*
|
|
77
|
+
* @default "primary"
|
|
78
|
+
*/
|
|
79
|
+
color?: ButtonVariantProps['color'];
|
|
80
|
+
/**
|
|
81
|
+
* Controls height, horizontal padding, and font size.
|
|
82
|
+
*
|
|
83
|
+
* | Value | Height |
|
|
84
|
+
* |---|---|
|
|
85
|
+
* | `"sm"` | 32 px |
|
|
86
|
+
* | `"default"` | 36 px |
|
|
87
|
+
* | `"lg"` | 40 px |
|
|
88
|
+
* | `"icon"` | 36 × 36 px (square) |
|
|
89
|
+
*
|
|
90
|
+
* @default "default"
|
|
91
|
+
*/
|
|
92
|
+
size?: ButtonVariantProps['size'];
|
|
93
|
+
/**
|
|
94
|
+
* Additional class names applied to the inner `<div>` that wraps `children`.
|
|
95
|
+
* Use this to style the children's flex container without overriding the
|
|
96
|
+
* button's outer layout or focus-ring classes.
|
|
97
|
+
*/
|
|
98
|
+
innerClassName?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Primary interactive button component for `@customafk/lunas-ui`.
|
|
102
|
+
*
|
|
103
|
+
* Built on Radix UI's `<Slot>` primitive. Supports multiple visual variants,
|
|
104
|
+
* semantic color tokens, a built-in loading state with full accessibility
|
|
105
|
+
* attributes, and polymorphic rendering via `asChild`. All native `<button>`
|
|
106
|
+
* attributes are forwarded to the underlying element.
|
|
107
|
+
*
|
|
108
|
+
* **Import:** `import { Button } from '@customafk/lunas-ui/ui/button'`
|
|
109
|
+
*
|
|
110
|
+
* @example Basic usage
|
|
111
|
+
* ```tsx
|
|
112
|
+
* import { Button } from '@customafk/lunas-ui/ui/button';
|
|
113
|
+
*
|
|
114
|
+
* export function SaveAction() {
|
|
115
|
+
* return <Button color="primary">Save changes</Button>;
|
|
116
|
+
* }
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* @example Async loading state
|
|
120
|
+
* ```tsx
|
|
121
|
+
* import { Button } from '@customafk/lunas-ui/ui/button';
|
|
122
|
+
*
|
|
123
|
+
* export function SubmitButton({ isPending }: { isPending: boolean }) {
|
|
124
|
+
* return (
|
|
125
|
+
* <Button type="submit" isLoading={isPending}>
|
|
126
|
+
* Submit
|
|
127
|
+
* </Button>
|
|
128
|
+
* );
|
|
129
|
+
* }
|
|
130
|
+
* ```
|
|
131
|
+
*
|
|
132
|
+
* @example Destructive outline button
|
|
133
|
+
* ```tsx
|
|
134
|
+
* import { Button } from '@customafk/lunas-ui/ui/button';
|
|
135
|
+
*
|
|
136
|
+
* export function DeleteButton({ onDelete }: { onDelete: () => void }) {
|
|
137
|
+
* return (
|
|
138
|
+
* <Button variant="outline" color="danger" onClick={onDelete}>
|
|
139
|
+
* Delete account
|
|
140
|
+
* </Button>
|
|
141
|
+
* );
|
|
142
|
+
* }
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* @example Polymorphic — render as Next.js Link
|
|
146
|
+
* ```tsx
|
|
147
|
+
* import { Button } from '@customafk/lunas-ui/ui/button';
|
|
148
|
+
* import Link from 'next/link';
|
|
149
|
+
*
|
|
150
|
+
* export function NavLink() {
|
|
151
|
+
* return (
|
|
152
|
+
* <Button asChild variant="ghost" size="sm">
|
|
153
|
+
* <Link href="/settings">Settings</Link>
|
|
154
|
+
* </Button>
|
|
155
|
+
* );
|
|
156
|
+
* }
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
declare function Button({
|
|
160
|
+
className,
|
|
161
|
+
variant,
|
|
162
|
+
size,
|
|
163
|
+
color,
|
|
164
|
+
asChild,
|
|
165
|
+
isLoading,
|
|
166
|
+
children,
|
|
167
|
+
disabled,
|
|
168
|
+
type,
|
|
169
|
+
innerClassName,
|
|
170
|
+
...props
|
|
171
|
+
}: ButtonProps): react_jsx_runtime184.JSX.Element;
|
|
172
|
+
//#endregion
|
|
173
|
+
export { ButtonProps as n, Button as t };
|
|
174
|
+
//# sourceMappingURL=button-BlQb81It.d.mts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./dist-CIN9T2FB.mjs";import{n as t,t as n}from"./button.variants-DeCyas1F.mjs";import{Loader2Icon as r}from"lucide-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cn as o}from"@customafk/react-toolkit/utils";function s({className:s,variant:c,size:l=`default`,color:u,asChild:d=!1,isLoading:f=!1,children:p,disabled:m,type:h=`button`,innerClassName:g,..._}){let v=d?e:`button`,y=m||f;return a(v,{...d?void 0:{type:h,disabled:y},"data-slot":`button`,"data-state":f?`loading`:void 0,"aria-disabled":y?!0:void 0,"aria-busy":f?!0:void 0,className:o(t({variant:c,size:l,color:u,className:s})),..._,children:[f&&a(`div`,{className:n({variant:c,color:u}),children:[i(r,{size:16,className:`animate-spin`}),i(`span`,{className:`sr-only`,children:`Loading`})]}),i(`div`,{className:o(`inline-flex items-center justify-center gap-x-1`,f&&`invisible pointer-events-none`,g),children:p})]})}export{s as t};
|
|
2
|
+
//# sourceMappingURL=button-C6ybzxxj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-C6ybzxxj.mjs","names":[],"sources":["../packages/components/ui/button.tsx"],"sourcesContent":["'use client';\n\nimport { Loader2Icon } from 'lucide-react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn } from '@customafk/react-toolkit/utils';\nimport { type ButtonVariantProps, buttonLoadingVariant, buttonVariants } from './button.variants';\n\n/**\n * Props for the {@link Button} component.\n *\n * Extends all native `<button>` attributes except `color`, which is\n * re-declared as a semantic design-token via {@link ButtonVariantProps}.\n *\n * @see {@link https://www.radix-ui.com/primitives/docs/utilities/slot} Radix Slot (asChild pattern)\n */\nexport interface ButtonProps extends Omit<React.ComponentProps<'button'>, 'color'> {\n /**\n * When `true`, renders children through Radix's `<Slot>` primitive,\n * merging all button props directly onto the child element.\n *\n * Use this to swap the rendered HTML element while keeping button styling\n * (e.g. render a Next.js `<Link>` that looks like a button).\n *\n * @default false\n * @example\n * ```tsx\n * <Button asChild variant=\"ghost\">\n * <Link href=\"/dashboard\">Go to Dashboard</Link>\n * </Button>\n * ```\n */\n asChild?: boolean;\n\n /**\n * When `true`, shows an animated `Loader2` spinner overlay and sets\n * `aria-busy=\"true\"`. The button is implicitly disabled while loading —\n * no separate `disabled` prop is needed for loading states.\n *\n * @default false\n */\n isLoading?: boolean;\n\n /**\n * Visual style variant of the button.\n *\n * | Value | Description |\n * |---|---|\n * | `\"default\"` | Filled surface — primary call-to-action (default) |\n * | `\"outline\"` | Transparent background with a visible border |\n * | `\"ghost\"` | No background or border — minimal footprint |\n * | `\"link\"` | Styled as an underlined hyperlink |\n * | `\"icon\"` | Square, padding-free — icon-only buttons |\n * | `\"destructive\"` | Red-toned filled surface for danger actions |\n *\n * @default \"default\"\n */\n variant?: ButtonVariantProps['variant'];\n\n /**\n * Semantic color token applied to the button's surface and text.\n *\n * | Value | Usage |\n * |---|---|\n * | `\"primary\"` | Brand primary (default) |\n * | `\"success\"` | Confirmation / save actions |\n * | `\"danger\"` | Destructive / delete actions |\n * | `\"warning\"` | Cautionary / irreversible actions |\n * | `\"muted\"` | Secondary / low-emphasis actions |\n *\n * @default \"primary\"\n */\n color?: ButtonVariantProps['color'];\n\n /**\n * Controls height, horizontal padding, and font size.\n *\n * | Value | Height |\n * |---|---|\n * | `\"sm\"` | 32 px |\n * | `\"default\"` | 36 px |\n * | `\"lg\"` | 40 px |\n * | `\"icon\"` | 36 × 36 px (square) |\n *\n * @default \"default\"\n */\n size?: ButtonVariantProps['size'];\n\n /**\n * Additional class names applied to the inner `<div>` that wraps `children`.\n * Use this to style the children's flex container without overriding the\n * button's outer layout or focus-ring classes.\n */\n innerClassName?: string;\n}\n\n/**\n * Primary interactive button component for `@customafk/lunas-ui`.\n *\n * Built on Radix UI's `<Slot>` primitive. Supports multiple visual variants,\n * semantic color tokens, a built-in loading state with full accessibility\n * attributes, and polymorphic rendering via `asChild`. All native `<button>`\n * attributes are forwarded to the underlying element.\n *\n * **Import:** `import { Button } from '@customafk/lunas-ui/ui/button'`\n *\n * @example Basic usage\n * ```tsx\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * export function SaveAction() {\n * return <Button color=\"primary\">Save changes</Button>;\n * }\n * ```\n *\n * @example Async loading state\n * ```tsx\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * export function SubmitButton({ isPending }: { isPending: boolean }) {\n * return (\n * <Button type=\"submit\" isLoading={isPending}>\n * Submit\n * </Button>\n * );\n * }\n * ```\n *\n * @example Destructive outline button\n * ```tsx\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * export function DeleteButton({ onDelete }: { onDelete: () => void }) {\n * return (\n * <Button variant=\"outline\" color=\"danger\" onClick={onDelete}>\n * Delete account\n * </Button>\n * );\n * }\n * ```\n *\n * @example Polymorphic — render as Next.js Link\n * ```tsx\n * import { Button } from '@customafk/lunas-ui/ui/button';\n * import Link from 'next/link';\n *\n * export function NavLink() {\n * return (\n * <Button asChild variant=\"ghost\" size=\"sm\">\n * <Link href=\"/settings\">Settings</Link>\n * </Button>\n * );\n * }\n * ```\n */\nfunction Button({\n className,\n variant,\n size = 'default',\n color,\n asChild = false,\n isLoading = false,\n children,\n disabled,\n type = 'button',\n innerClassName,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot : 'button';\n const isDisabled = disabled || isLoading;\n\n return (\n <Comp\n {...(!asChild ? { type, disabled: isDisabled } : undefined)}\n data-slot=\"button\"\n data-state={isLoading ? 'loading' : undefined}\n aria-disabled={isDisabled ? true : undefined}\n aria-busy={isLoading ? true : undefined}\n className={cn(\n buttonVariants({\n variant,\n size,\n color,\n className,\n })\n )}\n {...props}\n >\n {isLoading && (\n <div className={buttonLoadingVariant({ variant, color })}>\n <Loader2Icon size={16} className=\"animate-spin\" />\n <span className=\"sr-only\">Loading</span>\n </div>\n )}\n <div className={cn('inline-flex items-center justify-center gap-x-1', isLoading && 'invisible pointer-events-none', innerClassName)}>\n {children}\n </div>\n </Comp>\n );\n}\n\nexport { Button };\n"],"mappings":"mPA0JA,SAAS,EAAO,CACd,YACA,UACA,OAAO,UACP,QACA,UAAU,GACV,YAAY,GACZ,WACA,WACA,OAAO,SACP,iBACA,GAAG,GACW,CACd,IAAM,EAAO,EAAU,EAAO,SACxB,EAAa,GAAY,EAE/B,OACE,EAAC,EAAA,CACC,GAAM,EAA2C,IAAA,GAAjC,CAAE,OAAM,SAAU,EAAY,CAC9C,YAAU,SACV,aAAY,EAAY,UAAY,IAAA,GACpC,gBAAe,EAAa,GAAO,IAAA,GACnC,YAAW,EAAY,GAAO,IAAA,GAC9B,UAAW,EACT,EAAe,CACb,UACA,OACA,QACA,YACD,CAAC,CACH,CACD,GAAI,YAEH,GACC,EAAC,MAAA,CAAI,UAAW,EAAqB,CAAE,UAAS,QAAO,CAAC,WACtD,EAAC,EAAA,CAAY,KAAM,GAAI,UAAU,gBAAiB,CAClD,EAAC,OAAA,CAAK,UAAU,mBAAU,WAAc,CAAA,EACpC,CAER,EAAC,MAAA,CAAI,UAAW,EAAG,kDAAmD,GAAa,gCAAiC,EAAe,CAChI,YACG,CAAA,EACD"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import * as react_jsx_runtime54 from "react/jsx-runtime";
|
|
2
|
+
import * as class_variance_authority_types14 from "class-variance-authority/types";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
|
|
5
|
+
//#region packages/components/ui/button.variants.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Button variants definition for styling using class-variance-authority
|
|
9
|
+
*/
|
|
10
|
+
declare const buttonVariants: (props?: ({
|
|
11
|
+
variant?: "default" | "outline" | "link" | "soft" | "ghost" | "subtle" | null | undefined;
|
|
12
|
+
color?: "muted" | "primary" | "secondary" | "info" | "success" | "warning" | "danger" | "important" | null | undefined;
|
|
13
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types14.ClassProp) | undefined) => string;
|
|
15
|
+
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region packages/components/ui/button.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Props for the {@link Button} component.
|
|
20
|
+
*
|
|
21
|
+
* Extends all native `<button>` attributes except `color`, which is
|
|
22
|
+
* re-declared as a semantic design-token via {@link ButtonVariantProps}.
|
|
23
|
+
*
|
|
24
|
+
* @see {@link https://www.radix-ui.com/primitives/docs/utilities/slot} Radix Slot (asChild pattern)
|
|
25
|
+
*/
|
|
26
|
+
interface ButtonProps extends Omit<React.ComponentProps<'button'>, 'color'> {
|
|
27
|
+
/**
|
|
28
|
+
* When `true`, renders children through Radix's `<Slot>` primitive,
|
|
29
|
+
* merging all button props directly onto the child element.
|
|
30
|
+
*
|
|
31
|
+
* Use this to swap the rendered HTML element while keeping button styling
|
|
32
|
+
* (e.g. render a Next.js `<Link>` that looks like a button).
|
|
33
|
+
*
|
|
34
|
+
* @default false
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <Button asChild variant="ghost">
|
|
38
|
+
* <Link href="/dashboard">Go to Dashboard</Link>
|
|
39
|
+
* </Button>
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
asChild?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* When `true`, shows an animated `Loader2` spinner overlay and sets
|
|
45
|
+
* `aria-busy="true"`. The button is implicitly disabled while loading —
|
|
46
|
+
* no separate `disabled` prop is needed for loading states.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
isLoading?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Visual style variant of the button.
|
|
53
|
+
*
|
|
54
|
+
* | Value | Description |
|
|
55
|
+
* |---|---|
|
|
56
|
+
* | `"default"` | Filled surface — primary call-to-action (default) |
|
|
57
|
+
* | `"outline"` | Transparent background with a visible border |
|
|
58
|
+
* | `"ghost"` | No background or border — minimal footprint |
|
|
59
|
+
* | `"link"` | Styled as an underlined hyperlink |
|
|
60
|
+
* | `"icon"` | Square, padding-free — icon-only buttons |
|
|
61
|
+
* | `"destructive"` | Red-toned filled surface for danger actions |
|
|
62
|
+
*
|
|
63
|
+
* @default "default"
|
|
64
|
+
*/
|
|
65
|
+
variant?: ButtonVariantProps['variant'];
|
|
66
|
+
/**
|
|
67
|
+
* Semantic color token applied to the button's surface and text.
|
|
68
|
+
*
|
|
69
|
+
* | Value | Usage |
|
|
70
|
+
* |---|---|
|
|
71
|
+
* | `"primary"` | Brand primary (default) |
|
|
72
|
+
* | `"success"` | Confirmation / save actions |
|
|
73
|
+
* | `"danger"` | Destructive / delete actions |
|
|
74
|
+
* | `"warning"` | Cautionary / irreversible actions |
|
|
75
|
+
* | `"muted"` | Secondary / low-emphasis actions |
|
|
76
|
+
*
|
|
77
|
+
* @default "primary"
|
|
78
|
+
*/
|
|
79
|
+
color?: ButtonVariantProps['color'];
|
|
80
|
+
/**
|
|
81
|
+
* Controls height, horizontal padding, and font size.
|
|
82
|
+
*
|
|
83
|
+
* | Value | Height |
|
|
84
|
+
* |---|---|
|
|
85
|
+
* | `"sm"` | 32 px |
|
|
86
|
+
* | `"default"` | 36 px |
|
|
87
|
+
* | `"lg"` | 40 px |
|
|
88
|
+
* | `"icon"` | 36 × 36 px (square) |
|
|
89
|
+
*
|
|
90
|
+
* @default "default"
|
|
91
|
+
*/
|
|
92
|
+
size?: ButtonVariantProps['size'];
|
|
93
|
+
/**
|
|
94
|
+
* Additional class names applied to the inner `<div>` that wraps `children`.
|
|
95
|
+
* Use this to style the children's flex container without overriding the
|
|
96
|
+
* button's outer layout or focus-ring classes.
|
|
97
|
+
*/
|
|
98
|
+
innerClassName?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Primary interactive button component for `@customafk/lunas-ui`.
|
|
102
|
+
*
|
|
103
|
+
* Built on Radix UI's `<Slot>` primitive. Supports multiple visual variants,
|
|
104
|
+
* semantic color tokens, a built-in loading state with full accessibility
|
|
105
|
+
* attributes, and polymorphic rendering via `asChild`. All native `<button>`
|
|
106
|
+
* attributes are forwarded to the underlying element.
|
|
107
|
+
*
|
|
108
|
+
* **Import:** `import { Button } from '@customafk/lunas-ui/ui/button'`
|
|
109
|
+
*
|
|
110
|
+
* @example Basic usage
|
|
111
|
+
* ```tsx
|
|
112
|
+
* import { Button } from '@customafk/lunas-ui/ui/button';
|
|
113
|
+
*
|
|
114
|
+
* export function SaveAction() {
|
|
115
|
+
* return <Button color="primary">Save changes</Button>;
|
|
116
|
+
* }
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* @example Async loading state
|
|
120
|
+
* ```tsx
|
|
121
|
+
* import { Button } from '@customafk/lunas-ui/ui/button';
|
|
122
|
+
*
|
|
123
|
+
* export function SubmitButton({ isPending }: { isPending: boolean }) {
|
|
124
|
+
* return (
|
|
125
|
+
* <Button type="submit" isLoading={isPending}>
|
|
126
|
+
* Submit
|
|
127
|
+
* </Button>
|
|
128
|
+
* );
|
|
129
|
+
* }
|
|
130
|
+
* ```
|
|
131
|
+
*
|
|
132
|
+
* @example Destructive outline button
|
|
133
|
+
* ```tsx
|
|
134
|
+
* import { Button } from '@customafk/lunas-ui/ui/button';
|
|
135
|
+
*
|
|
136
|
+
* export function DeleteButton({ onDelete }: { onDelete: () => void }) {
|
|
137
|
+
* return (
|
|
138
|
+
* <Button variant="outline" color="danger" onClick={onDelete}>
|
|
139
|
+
* Delete account
|
|
140
|
+
* </Button>
|
|
141
|
+
* );
|
|
142
|
+
* }
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* @example Polymorphic — render as Next.js Link
|
|
146
|
+
* ```tsx
|
|
147
|
+
* import { Button } from '@customafk/lunas-ui/ui/button';
|
|
148
|
+
* import Link from 'next/link';
|
|
149
|
+
*
|
|
150
|
+
* export function NavLink() {
|
|
151
|
+
* return (
|
|
152
|
+
* <Button asChild variant="ghost" size="sm">
|
|
153
|
+
* <Link href="/settings">Settings</Link>
|
|
154
|
+
* </Button>
|
|
155
|
+
* );
|
|
156
|
+
* }
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
declare function Button({
|
|
160
|
+
className,
|
|
161
|
+
variant,
|
|
162
|
+
size,
|
|
163
|
+
color,
|
|
164
|
+
asChild,
|
|
165
|
+
isLoading,
|
|
166
|
+
children,
|
|
167
|
+
disabled,
|
|
168
|
+
type,
|
|
169
|
+
innerClassName,
|
|
170
|
+
...props
|
|
171
|
+
}: ButtonProps): react_jsx_runtime54.JSX.Element;
|
|
172
|
+
//#endregion
|
|
173
|
+
export { ButtonProps as n, Button as t };
|
|
174
|
+
//# sourceMappingURL=button-CEOQ3-82.d.cts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./dist-Dh8WwRa8.cjs`),n=require(`./button.variants-tnhb123u.cjs`);let r=require(`lucide-react`),i=require(`react/jsx-runtime`),a=require(`@customafk/react-toolkit/utils`);function o({className:e,variant:o,size:s=`default`,color:c,asChild:l=!1,isLoading:u=!1,children:d,disabled:f,type:p=`button`,innerClassName:m,...h}){let g=l?t.t:`button`,_=f||u;return(0,i.jsxs)(g,{...l?void 0:{type:p,disabled:_},"data-slot":`button`,"data-state":u?`loading`:void 0,"aria-disabled":_?!0:void 0,"aria-busy":u?!0:void 0,className:(0,a.cn)(n.n({variant:o,size:s,color:c,className:e})),...h,children:[u&&(0,i.jsxs)(`div`,{className:n.t({variant:o,color:c}),children:[(0,i.jsx)(r.Loader2Icon,{size:16,className:`animate-spin`}),(0,i.jsx)(`span`,{className:`sr-only`,children:`Loading`})]}),(0,i.jsx)(`div`,{className:(0,a.cn)(`inline-flex items-center justify-center gap-x-1`,u&&`invisible pointer-events-none`,m),children:d})]})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
|
2
|
+
//# sourceMappingURL=button-CwDT3m4m.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-CwDT3m4m.cjs","names":["Slot","buttonVariants","buttonLoadingVariant","Loader2Icon"],"sources":["../packages/components/ui/button.tsx"],"sourcesContent":["'use client';\n\nimport { Loader2Icon } from 'lucide-react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn } from '@customafk/react-toolkit/utils';\nimport { type ButtonVariantProps, buttonLoadingVariant, buttonVariants } from './button.variants';\n\n/**\n * Props for the {@link Button} component.\n *\n * Extends all native `<button>` attributes except `color`, which is\n * re-declared as a semantic design-token via {@link ButtonVariantProps}.\n *\n * @see {@link https://www.radix-ui.com/primitives/docs/utilities/slot} Radix Slot (asChild pattern)\n */\nexport interface ButtonProps extends Omit<React.ComponentProps<'button'>, 'color'> {\n /**\n * When `true`, renders children through Radix's `<Slot>` primitive,\n * merging all button props directly onto the child element.\n *\n * Use this to swap the rendered HTML element while keeping button styling\n * (e.g. render a Next.js `<Link>` that looks like a button).\n *\n * @default false\n * @example\n * ```tsx\n * <Button asChild variant=\"ghost\">\n * <Link href=\"/dashboard\">Go to Dashboard</Link>\n * </Button>\n * ```\n */\n asChild?: boolean;\n\n /**\n * When `true`, shows an animated `Loader2` spinner overlay and sets\n * `aria-busy=\"true\"`. The button is implicitly disabled while loading —\n * no separate `disabled` prop is needed for loading states.\n *\n * @default false\n */\n isLoading?: boolean;\n\n /**\n * Visual style variant of the button.\n *\n * | Value | Description |\n * |---|---|\n * | `\"default\"` | Filled surface — primary call-to-action (default) |\n * | `\"outline\"` | Transparent background with a visible border |\n * | `\"ghost\"` | No background or border — minimal footprint |\n * | `\"link\"` | Styled as an underlined hyperlink |\n * | `\"icon\"` | Square, padding-free — icon-only buttons |\n * | `\"destructive\"` | Red-toned filled surface for danger actions |\n *\n * @default \"default\"\n */\n variant?: ButtonVariantProps['variant'];\n\n /**\n * Semantic color token applied to the button's surface and text.\n *\n * | Value | Usage |\n * |---|---|\n * | `\"primary\"` | Brand primary (default) |\n * | `\"success\"` | Confirmation / save actions |\n * | `\"danger\"` | Destructive / delete actions |\n * | `\"warning\"` | Cautionary / irreversible actions |\n * | `\"muted\"` | Secondary / low-emphasis actions |\n *\n * @default \"primary\"\n */\n color?: ButtonVariantProps['color'];\n\n /**\n * Controls height, horizontal padding, and font size.\n *\n * | Value | Height |\n * |---|---|\n * | `\"sm\"` | 32 px |\n * | `\"default\"` | 36 px |\n * | `\"lg\"` | 40 px |\n * | `\"icon\"` | 36 × 36 px (square) |\n *\n * @default \"default\"\n */\n size?: ButtonVariantProps['size'];\n\n /**\n * Additional class names applied to the inner `<div>` that wraps `children`.\n * Use this to style the children's flex container without overriding the\n * button's outer layout or focus-ring classes.\n */\n innerClassName?: string;\n}\n\n/**\n * Primary interactive button component for `@customafk/lunas-ui`.\n *\n * Built on Radix UI's `<Slot>` primitive. Supports multiple visual variants,\n * semantic color tokens, a built-in loading state with full accessibility\n * attributes, and polymorphic rendering via `asChild`. All native `<button>`\n * attributes are forwarded to the underlying element.\n *\n * **Import:** `import { Button } from '@customafk/lunas-ui/ui/button'`\n *\n * @example Basic usage\n * ```tsx\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * export function SaveAction() {\n * return <Button color=\"primary\">Save changes</Button>;\n * }\n * ```\n *\n * @example Async loading state\n * ```tsx\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * export function SubmitButton({ isPending }: { isPending: boolean }) {\n * return (\n * <Button type=\"submit\" isLoading={isPending}>\n * Submit\n * </Button>\n * );\n * }\n * ```\n *\n * @example Destructive outline button\n * ```tsx\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * export function DeleteButton({ onDelete }: { onDelete: () => void }) {\n * return (\n * <Button variant=\"outline\" color=\"danger\" onClick={onDelete}>\n * Delete account\n * </Button>\n * );\n * }\n * ```\n *\n * @example Polymorphic — render as Next.js Link\n * ```tsx\n * import { Button } from '@customafk/lunas-ui/ui/button';\n * import Link from 'next/link';\n *\n * export function NavLink() {\n * return (\n * <Button asChild variant=\"ghost\" size=\"sm\">\n * <Link href=\"/settings\">Settings</Link>\n * </Button>\n * );\n * }\n * ```\n */\nfunction Button({\n className,\n variant,\n size = 'default',\n color,\n asChild = false,\n isLoading = false,\n children,\n disabled,\n type = 'button',\n innerClassName,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot : 'button';\n const isDisabled = disabled || isLoading;\n\n return (\n <Comp\n {...(!asChild ? { type, disabled: isDisabled } : undefined)}\n data-slot=\"button\"\n data-state={isLoading ? 'loading' : undefined}\n aria-disabled={isDisabled ? true : undefined}\n aria-busy={isLoading ? true : undefined}\n className={cn(\n buttonVariants({\n variant,\n size,\n color,\n className,\n })\n )}\n {...props}\n >\n {isLoading && (\n <div className={buttonLoadingVariant({ variant, color })}>\n <Loader2Icon size={16} className=\"animate-spin\" />\n <span className=\"sr-only\">Loading</span>\n </div>\n )}\n <div className={cn('inline-flex items-center justify-center gap-x-1', isLoading && 'invisible pointer-events-none', innerClassName)}>\n {children}\n </div>\n </Comp>\n );\n}\n\nexport { Button };\n"],"mappings":"8NA0JA,SAAS,EAAO,CACd,YACA,UACA,OAAO,UACP,QACA,UAAU,GACV,YAAY,GACZ,WACA,WACA,OAAO,SACP,iBACA,GAAG,GACW,CACd,IAAM,EAAO,EAAUA,EAAAA,EAAO,SACxB,EAAa,GAAY,EAE/B,OACE,EAAA,EAAA,MAAC,EAAA,CACC,GAAM,EAA2C,IAAA,GAAjC,CAAE,OAAM,SAAU,EAAY,CAC9C,YAAU,SACV,aAAY,EAAY,UAAY,IAAA,GACpC,gBAAe,EAAa,GAAO,IAAA,GACnC,YAAW,EAAY,GAAO,IAAA,GAC9B,WAAA,EAAA,EAAA,IACEC,EAAAA,EAAe,CACb,UACA,OACA,QACA,YACD,CAAC,CACH,CACD,GAAI,YAEH,IACC,EAAA,EAAA,MAAC,MAAA,CAAI,UAAWC,EAAAA,EAAqB,CAAE,UAAS,QAAO,CAAC,YACtD,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAY,KAAM,GAAI,UAAU,gBAAiB,EAClD,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,mBAAU,WAAc,CAAA,EACpC,EAER,EAAA,EAAA,KAAC,MAAA,CAAI,WAAA,EAAA,EAAA,IAAc,kDAAmD,GAAa,gCAAiC,EAAe,CAChI,YACG,CAAA,EACD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{cva as e}from"class-variance-authority";const t=e([`pointer-events-none absolute inset-0 z-10 flex cursor-default items-center justify-center rounded-sm`],{variants:{variant:{default:``,outline:``,soft:``,subtle:``,ghost:``,link:``},color:{primary:``,secondary:``,muted:``,success:``,important:``,info:``,warning:``,danger:``}},compoundVariants:[{variant:`default`,color:`primary`,className:`bg-primary-weak`},{variant:`default`,color:`secondary`,className:`bg-secondary-weak`},{variant:`default`,color:`muted`,className:`bg-muted-weak`},{variant:`default`,color:`success`,className:`bg-success-weak`},{variant:`default`,color:`important`,className:`bg-important-weak`},{variant:`default`,color:`info`,className:`bg-info-weak`},{variant:`default`,color:`warning`,className:`bg-warning-weak`},{variant:`default`,color:`danger`,className:`bg-danger-weak`},{variant:`outline`,color:`primary`,className:`bg-card outline-1 outline-primary-weak`},{variant:`outline`,color:`secondary`,className:`bg-card outline-1 outline-secondary-weak`},{variant:`outline`,color:`muted`,className:`bg-card outline-1 outline-muted-weak`},{variant:`outline`,color:`success`,className:`bg-card outline-1 outline-success-weak`},{variant:`outline`,color:`important`,className:`bg-card outline-1 outline-important-weak`},{variant:`outline`,color:`info`,className:`bg-card outline-1 outline-info-weak`},{variant:`outline`,color:`warning`,className:`bg-card outline-1 outline-warning-weak`},{variant:`outline`,color:`danger`,className:`bg-card outline-1 outline-danger-weak`},{variant:`soft`,color:`primary`,className:`bg-primary-bg-subtle`},{variant:`soft`,color:`secondary`,className:`bg-secondary-bg-subtle`},{variant:`soft`,color:`muted`,className:`bg-muted-bg-subtle`},{variant:`soft`,color:`success`,className:`bg-success-bg-subtle`},{variant:`soft`,color:`important`,className:`bg-important-bg-subtle`},{variant:`soft`,color:`info`,className:`bg-info-bg-subtle`},{variant:`soft`,color:`warning`,className:`bg-warning-bg-subtle`},{variant:`soft`,color:`danger`,className:`bg-danger-bg-subtle`},{variant:`subtle`,color:`primary`,className:`bg-primary-bg-subtle outline-1 outline-primary-weak`},{variant:`subtle`,color:`secondary`,className:`bg-secondary-bg-subtle outline-1 outline-secondary-weak`},{variant:`subtle`,color:`muted`,className:`bg-muted-bg-subtle outline-1 outline-border-weak`},{variant:`subtle`,color:`success`,className:`bg-success-bg-subtle outline-1 outline-success-weak`},{variant:`subtle`,color:`important`,className:`bg-important-bg-subtle outline-1 outline-important-weak`},{variant:`subtle`,color:`info`,className:`bg-info-bg-subtle outline-1 outline-info-weak`},{variant:`subtle`,color:`warning`,className:`bg-warning-bg-subtle outline-1 outline-warning-weak`},{variant:`subtle`,color:`danger`,className:`bg-danger-bg-subtle outline-1 outline-danger-weak`},{variant:`ghost`,color:`primary`,className:`bg-primary-bg-subtle`},{variant:`ghost`,color:`secondary`,className:`bg-secondary-bg-subtle`},{variant:`ghost`,color:`muted`,className:`bg-muted-bg-subtle`},{variant:`ghost`,color:`success`,className:`bg-success-bg-subtle`},{variant:`ghost`,color:`important`,className:`bg-important-bg-subtle`},{variant:`ghost`,color:`info`,className:`bg-info-bg-subtle`},{variant:`ghost`,color:`warning`,className:`bg-warning-bg-subtle`},{variant:`ghost`,color:`danger`,className:`bg-danger-bg-subtle`}]}),n=e([`relative cursor-pointer rounded-sm transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-in-out`,`whitespace-normal`,`inline-flex items-center justify-center`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,`disabled:pointer-events-none disabled:cursor-default disabled:opacity-60`,`data-[state=loading]:pointer-events-none data-[state=loading]:cursor-default`],{variants:{variant:{default:`border border-transparent outline-none shadow-btn`,outline:`border bg-card outline-none`,soft:`outline-none outline-0`,subtle:`border border-transparent outline-1 -outline-offset-1`,ghost:`border border-transparent outline-none`,link:`border border-transparent outline-none`},color:{primary:``,secondary:``,muted:``,success:``,important:``,info:``,warning:``,danger:``},size:{default:`px-2.5 py-1.5 font-medium text-sm leading-5`,xs:`px-2 py-1 font-medium text-xs leading-4`,sm:`px-2.5 py-1.5 font-medium text-xs leading-4`,md:`px-2.5 py-1.5 font-medium text-sm leading-5`,lg:`px-3 py-2 font-medium text-sm leading-5`,xl:`px-3 py-2 font-medium text-base leading-6`,icon:`size-8`}},defaultVariants:{variant:`default`,color:`primary`,size:`default`},compoundVariants:[{variant:`default`,color:`primary`,className:`bg-primary text-primary-foreground hover:bg-primary-strong focus:ring-2 focus:ring-primary focus:ring-offset-2`},{variant:`default`,color:`secondary`,className:`bg-secondary text-secondary-foreground hover:bg-secondary-strong focus:ring-2 focus:ring-secondary focus:ring-offset-2`},{variant:`default`,color:`muted`,className:`bg-muted text-text-negative hover:opacity-80 focus:ring-2 focus:ring-muted focus:ring-offset-2`},{variant:`default`,color:`success`,className:`bg-success text-success-foreground hover:bg-success-strong focus:ring-2 focus:ring-success focus:ring-offset-2`},{variant:`default`,color:`important`,className:`bg-important text-text-negative hover:opacity-80 focus:ring-2 focus:ring-important focus:ring-offset-2`},{variant:`default`,color:`info`,className:`bg-info text-info-foreground hover:bg-info-strong focus:ring-2 focus:ring-info focus:ring-offset-2`},{variant:`default`,color:`warning`,className:`bg-warning text-warning-foreground hover:bg-warning-strong focus:ring-2 focus:ring-warning focus:ring-offset-2`},{variant:`default`,color:`danger`,className:`bg-danger text-danger-foreground hover:bg-danger-strong focus:ring-2 focus:ring-danger focus:ring-offset-2`},{variant:`outline`,color:`primary`,className:`border-primary text-primary hover:bg-primary-bg-subtle focus:border-primary-strong focus:ring-2 focus:ring-primary-weak`},{variant:`outline`,color:`secondary`,className:`border-secondary text-secondary hover:bg-secondary-muted focus:border-secondary focus:ring-2 focus:ring-secondary-weak`},{variant:`outline`,color:`muted`,className:`border-muted-weak text-muted hover:bg-muted-muted focus:border-muted-weak focus:ring-2 focus:ring-muted-weak`},{variant:`outline`,color:`success`,className:`border-success text-success hover:bg-success-muted focus:border-success-strong focus:ring-2 focus:ring-success-weak`},{variant:`outline`,color:`important`,className:`border-important text-important hover:bg-important-muted focus:border-important-strong focus:ring-2 focus:ring-important-weak`},{variant:`outline`,color:`info`,className:`border-info text-info hover:bg-info-muted focus:border-info-strong focus:ring-2 focus:ring-info-weak`},{variant:`outline`,color:`warning`,className:`border-warning text-warning hover:bg-warning-muted focus:border-warning-strong focus:ring-2 focus:ring-warning-weak`},{variant:`outline`,color:`danger`,className:`border-danger text-danger hover:bg-danger-muted focus:border-danger-strong focus:ring-2 focus:ring-danger-weak`},{variant:`soft`,color:`primary`,className:`bg-primary-bg-subtle text-primary hover:bg-primary-muted hover:text-primary-strong focus:bg-primary-weak`},{variant:`soft`,color:`secondary`,className:`bg-secondary-bg-subtle text-secondary hover:bg-secondary-muted hover:text-secondary-strong focus:bg-secondary-weak`},{variant:`soft`,color:`muted`,className:`bg-muted-bg-subtle text-muted hover:bg-muted-muted hover:text-muted-strong focus:bg-muted-weak`},{variant:`soft`,color:`success`,className:`bg-success-bg-subtle text-success hover:bg-success-muted hover:text-success-strong focus:bg-success-weak`},{variant:`soft`,color:`important`,className:`bg-important-bg-subtle text-important hover:bg-important-muted hover:text-important-strong focus:bg-important-weak`},{variant:`soft`,color:`info`,className:`bg-info-bg-subtle text-info hover:bg-info-muted hover:text-info-strong focus:bg-info-weak`},{variant:`soft`,color:`warning`,className:`bg-warning-bg-subtle text-warning hover:bg-warning-muted hover:text-warning-strong focus:bg-warning-weak`},{variant:`soft`,color:`danger`,className:`bg-danger-bg-subtle text-danger hover:bg-danger-muted hover:text-danger-strong focus:bg-danger-weak`},{variant:`subtle`,color:`primary`,className:`bg-primary-bg-subtle text-primary outline-primary hover:bg-primary-bg-subtle focus:outline-2 focus:outline-primary`},{variant:`subtle`,color:`secondary`,className:`bg-secondary-bg-subtle text-secondary outline-secondary hover:bg-secondary-bg-subtle focus:outline-2 focus:outline-secondary`},{variant:`subtle`,color:`muted`,className:`bg-muted-bg-subtle text-muted outline-border hover:bg-muted-bg-subtle focus:outline-2 focus:outline-border`},{variant:`subtle`,color:`success`,className:`bg-success-bg-subtle text-success outline-success hover:bg-success-bg-subtle focus:outline-2 focus:outline-success`},{variant:`subtle`,color:`important`,className:`bg-important-bg-subtle text-important outline-important hover:bg-important-bg-subtle focus:outline-2 focus:outline-important`},{variant:`subtle`,color:`info`,className:`bg-info-bg-subtle text-info outline-info hover:bg-info-bg-subtle focus:outline-2 focus:outline-info`},{variant:`subtle`,color:`warning`,className:`bg-warning-bg-subtle text-warning outline-warning hover:bg-warning-bg-subtle focus:outline-2 focus:outline-warning`},{variant:`subtle`,color:`danger`,className:`bg-danger-bg-subtle text-danger outline-danger hover:bg-danger-bg-subtle focus:outline-2 focus:outline-danger`},{variant:`ghost`,color:`primary`,className:`text-primary hover:bg-primary-bg-subtle focus:bg-primary-muted`},{variant:`ghost`,color:`secondary`,className:`text-text-positive-weak hover:bg-secondary-bg-subtle focus:bg-secondary-muted`},{variant:`ghost`,color:`muted`,className:`text-text-positive-weak hover:bg-muted-bg-subtle focus:bg-muted-muted`},{variant:`ghost`,color:`success`,className:`text-success hover:bg-success-bg-subtle focus:bg-success-muted`},{variant:`ghost`,color:`important`,className:`text-important hover:bg-important-bg-subtle focus:bg-important-muted`},{variant:`ghost`,color:`info`,className:`text-info hover:bg-info-bg-subtle focus:bg-info-muted`},{variant:`ghost`,color:`warning`,className:`text-warning hover:bg-warning-bg-subtle focus:bg-warning-muted`},{variant:`ghost`,color:`danger`,className:`text-danger hover:bg-danger-bg-subtle focus:bg-danger-muted`},{variant:`link`,color:`primary`,className:`text-primary focus:ring-2 focus:ring-primary focus:ring-offset-2`},{variant:`link`,color:`secondary`,className:`text-secondary focus:ring-2 focus:ring-secondary focus:ring-offset-2`},{variant:`link`,color:`muted`,className:`text-muted focus:ring-2 focus:ring-muted focus:ring-offset-2`},{variant:`link`,color:`success`,className:`text-success focus:ring-2 focus:ring-success focus:ring-offset-2`},{variant:`link`,color:`important`,className:`text-important focus:ring-2 focus:ring-important focus:ring-offset-2`},{variant:`link`,color:`info`,className:`text-info focus:ring-2 focus:ring-info focus:ring-offset-2`},{variant:`link`,color:`warning`,className:`text-warning focus:ring-2 focus:ring-warning focus:ring-offset-2`},{variant:`link`,color:`danger`,className:`text-danger focus:ring-2 focus:ring-danger focus:ring-offset-2`}]});export{n,t};
|
|
2
|
+
//# sourceMappingURL=button.variants-DeCyas1F.mjs.map
|