xertica-ui 2.7.0 → 2.9.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/CHANGELOG.md +114 -0
- package/README.md +20 -12
- package/bin/cli.ts +327 -87
- package/bin/generate-tokens.ts +25 -9
- package/bin/language-config.ts +58 -18
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +1 -1
- package/components/blocks/auth/AuthPageShell.tsx +63 -18
- package/components/blocks/auth/SocialLoginButtons.tsx +3 -3
- package/components/blocks/index.ts +1 -0
- package/components/blocks/marketing/CTASection.tsx +73 -0
- package/components/blocks/marketing/ComplianceBadgeRow.tsx +49 -0
- package/components/blocks/marketing/EvidenceTimeline.tsx +91 -0
- package/components/blocks/marketing/FeatureRow.tsx +78 -0
- package/components/blocks/marketing/Hero.tsx +125 -0
- package/components/blocks/marketing/HowItWorksSteps.tsx +90 -0
- package/components/blocks/marketing/LogoCloud.tsx +47 -0
- package/components/blocks/marketing/MarketingFooter.tsx +109 -0
- package/components/blocks/marketing/MarketingNavbar.tsx +192 -0
- package/components/blocks/marketing/PillBadge.tsx +96 -0
- package/components/blocks/marketing/SectionHeading.tsx +82 -0
- package/components/blocks/marketing/ServiceCardGrid.tsx +238 -0
- package/components/blocks/marketing/StatBand.tsx +99 -0
- package/components/blocks/marketing/TopAccentCards.tsx +91 -0
- package/components/blocks/marketing/index.ts +41 -0
- package/components/brand/index.ts +1 -0
- package/components/brand/isotype/Isotype.tsx +64 -0
- package/components/brand/isotype/IsotypeDiagonal.tsx +51 -0
- package/components/brand/isotype/IsotypeFrames.tsx +82 -0
- package/components/brand/isotype/IsotypeMini.tsx +65 -0
- package/components/brand/isotype/IsotypeTwist.tsx +68 -0
- package/components/brand/isotype/frame-variants.ts +20 -0
- package/components/brand/isotype/index.ts +9 -0
- package/components/brand/isotype/isotype-diagonal.mdx +52 -0
- package/components/brand/isotype/isotype-diagonal.stories.tsx +44 -0
- package/components/brand/isotype/isotype-diagonal.test.tsx +180 -0
- package/components/brand/isotype/isotype-frames.mdx +50 -0
- package/components/brand/isotype/isotype-frames.stories.tsx +63 -0
- package/components/brand/isotype/isotype-frames.test.tsx +92 -0
- package/components/brand/isotype/isotype-mini.mdx +61 -0
- package/components/brand/isotype/isotype-mini.stories.tsx +75 -0
- package/components/brand/isotype/isotype-mini.test.tsx +45 -0
- package/components/brand/isotype/isotype-twist.test.tsx +71 -0
- package/components/brand/isotype/isotype.mdx +61 -0
- package/components/brand/isotype/isotype.stories.tsx +74 -0
- package/components/brand/isotype/isotype.test.tsx +41 -0
- package/components/brand/isotype/mini-patterns.ts +50 -0
- package/components/brand/isotype/patterns.ts +83 -0
- package/components/brand/isotype/twist-variants.ts +20 -0
- package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +3 -6
- package/components/pages/index.ts +1 -0
- package/components/pages/landing-page/LandingPage.tsx +360 -0
- package/components/pages/landing-page/index.ts +1 -0
- package/components/pages/login-page/LoginPage.tsx +3 -6
- package/components/pages/reset-password-page/ResetPasswordPage.tsx +1 -4
- package/components/pages/verify-email-page/VerifyEmailPage.tsx +2 -5
- package/components/ui/button/button.test.tsx +3 -3
- package/components/ui/button/button.tsx +5 -4
- package/components/ui/card/card.test.tsx +12 -0
- package/components/ui/card/card.tsx +16 -2
- package/components/ui/input/input.tsx +1 -1
- package/components/ui/input-otp/input-otp.tsx +1 -1
- package/components/ui/search/search.tsx +1 -1
- package/components/ui/select/select.tsx +2 -2
- package/components/ui/switch/switch.tsx +1 -1
- package/components/ui/textarea/textarea.tsx +1 -1
- package/contexts/BrandColorsContext.tsx +59 -7
- package/contexts/theme-data.ts +127 -3
- package/dist/AssistantChart-BFBJXVcm.js +3383 -0
- package/dist/AssistantChart-BTnE94FR.cjs +3551 -0
- package/dist/AssistantChart-BU48lxL2.js +3383 -0
- package/dist/AssistantChart-BvccsQMx.cjs +3551 -0
- package/dist/AssistantChart-CkskcBVD.js +3383 -0
- package/dist/AssistantChart-CoN6ga6Z.js +3383 -0
- package/dist/AssistantChart-CrPkO9ip.js +3383 -0
- package/dist/AssistantChart-DIRYJ7WY.js +3383 -0
- package/dist/AssistantChart-DKz2O1R8.cjs +3551 -0
- package/dist/AssistantChart-DOnY1ZlD.cjs +3551 -0
- package/dist/AssistantChart-DYL6UEvo.cjs +3551 -0
- package/dist/AssistantChart-DjM3qnp5.cjs +3551 -0
- package/dist/AssistantChart-hxPyE1S9.cjs +3551 -0
- package/dist/AssistantChart-keo-ogKi.js +3383 -0
- package/dist/AudioPlayer-AoU5MTiM.cjs +1282 -0
- package/dist/AudioPlayer-Bx1vrblm.js +1278 -0
- package/dist/AudioPlayer-CpihsbaD.js +1278 -0
- package/dist/AudioPlayer-CvGajzMC.cjs +1282 -0
- package/dist/AudioPlayer-CvHpFqDG.cjs +1282 -0
- package/dist/AudioPlayer-D0-I6J3J.cjs +1282 -0
- package/dist/AudioPlayer-D4S7GQou.js +1278 -0
- package/dist/AudioPlayer-DIWX_Yg7.cjs +1282 -0
- package/dist/AudioPlayer-DrWJnS7c.js +1278 -0
- package/dist/AudioPlayer-_P-Z7pAK.js +1278 -0
- package/dist/BrandColorsContext-B25Bpr3b.cjs +819 -0
- package/dist/BrandColorsContext-BCieATdW.js +812 -0
- package/dist/BrandColorsContext-BNKLUVcU.js +829 -0
- package/dist/BrandColorsContext-DNZGHItQ.cjs +836 -0
- package/dist/BrandColorsContext-DP0DXAXS.js +824 -0
- package/dist/BrandColorsContext-DjpC9wR_.cjs +798 -0
- package/dist/BrandColorsContext-MpXFhte7.cjs +831 -0
- package/dist/BrandColorsContext-Ug_TZ8yn.cjs +846 -0
- package/dist/BrandColorsContext-V3tOc-Zw.js +791 -0
- package/dist/BrandColorsContext-z0O2LlZz.js +839 -0
- package/dist/CodeBlock-BkaZf-R8.cjs +223 -0
- package/dist/CodeBlock-CK4rO6lM.js +221 -0
- package/dist/CodeBlock-CKXamfVd.cjs +223 -0
- package/dist/CodeBlock-CKu8LgbP.cjs +223 -0
- package/dist/CodeBlock-CVmE7isS.cjs +223 -0
- package/dist/CodeBlock-D7i5-cMv.js +221 -0
- package/dist/CodeBlock-Dg56j2ut.cjs +223 -0
- package/dist/CodeBlock-DiLS5LLI.js +221 -0
- package/dist/CodeBlock-Dt6nUQoo.js +221 -0
- package/dist/CodeBlock-zdylBGdZ.js +221 -0
- package/dist/CustomTooltipContent-BAR5qCQg.js +33 -0
- package/dist/CustomTooltipContent-Bxynuq7T.js +33 -0
- package/dist/CustomTooltipContent-BzjOSA0P.cjs +54 -0
- package/dist/CustomTooltipContent-C-ZeCNsf.js +33 -0
- package/dist/CustomTooltipContent-CBLHBxX8.cjs +54 -0
- package/dist/CustomTooltipContent-CON_QrXm.cjs +54 -0
- package/dist/CustomTooltipContent-CjWm3jjV.js +33 -0
- package/dist/CustomTooltipContent-DTV9MN9E.cjs +54 -0
- package/dist/CustomTooltipContent-UR_n2QfW.js +33 -0
- package/dist/CustomTooltipContent-v1SXjoFn.cjs +54 -0
- package/dist/EvidenceTimeline-DrRk4yqb.cjs +560 -0
- package/dist/EvidenceTimeline-l4MaV4C7.js +546 -0
- package/dist/FeatureCard-4n_8a63v.cjs +497 -0
- package/dist/FeatureCard-BLiAWT3w.js +485 -0
- package/dist/FeatureCard-BXRW97Ef.cjs +497 -0
- package/dist/FeatureCard-CDgLlWE2.js +485 -0
- package/dist/FeatureCard-CIbBHqeY.cjs +497 -0
- package/dist/FeatureCard-CgQ8lq-I.cjs +497 -0
- package/dist/FeatureCard-Cp8cVC6T.cjs +497 -0
- package/dist/FeatureCard-D0MwrTRP.js +485 -0
- package/dist/FeatureCard-DtoKPSfW.cjs +497 -0
- package/dist/FeatureCard-P4iEpBmB.js +485 -0
- package/dist/FeatureCard-e3f8bnF0.js +485 -0
- package/dist/FeatureCard-uE5i0in_.js +485 -0
- package/dist/ImageWithFallback-BOh1FM3I.js +98 -0
- package/dist/ImageWithFallback-BQO7952C.js +98 -0
- package/dist/ImageWithFallback-BkMXHCvV.cjs +122 -0
- package/dist/ImageWithFallback-C1ww9Hg3.cjs +122 -0
- package/dist/ImageWithFallback-C72nwszA.cjs +122 -0
- package/dist/ImageWithFallback-CBrkAEo3.cjs +122 -0
- package/dist/ImageWithFallback-CCUMDuEC.cjs +122 -0
- package/dist/ImageWithFallback-CGk5zPH-.js +98 -0
- package/dist/ImageWithFallback-CfnoFFSP.js +98 -0
- package/dist/ImageWithFallback-DQD5TTlY.js +98 -0
- package/dist/Isotype--fRZWwS6.js +85 -0
- package/dist/Isotype-0dpLqetB.js +85 -0
- package/dist/Isotype-B8XLEXSB.cjs +92 -0
- package/dist/Isotype-ChKwN7e-.cjs +91 -0
- package/dist/IsotypeDiagonal-CuPYPP4f.js +84 -0
- package/dist/IsotypeDiagonal-eNcOXRAc.cjs +91 -0
- package/dist/IsotypeDiagonal-oiwpXZhE.js +104 -0
- package/dist/IsotypeDiagonal-xMFoFXkb.cjs +109 -0
- package/dist/IsotypeFrames-BcWtyAWp.cjs +83 -0
- package/dist/IsotypeFrames-BnvSJKiH.cjs +73 -0
- package/dist/IsotypeFrames-iDRTRuIu.js +79 -0
- package/dist/IsotypeFrames-qoXOvOJt.js +69 -0
- package/dist/IsotypeMini-CQtWVo3h.js +126 -0
- package/dist/IsotypeMini-Cu_sW5yN.cjs +134 -0
- package/dist/IsotypeTwist-BTdNL4iV.js +106 -0
- package/dist/IsotypeTwist-DvsUgZs_.cjs +115 -0
- package/dist/LanguageContext-B1aOXO-K.js +1987 -0
- package/dist/LanguageContext-BP0k7AzI.js +1993 -0
- package/dist/LanguageContext-CChcIHIG.cjs +1998 -0
- package/dist/LanguageContext-ubC7TSs_.cjs +1992 -0
- package/dist/LanguageSelector-1XhM7R1i.cjs +48 -0
- package/dist/LanguageSelector-B3ZVNc55.js +46 -0
- package/dist/LanguageSelector-BLFPXGo8.cjs +48 -0
- package/dist/LanguageSelector-CYRzWkRZ.cjs +48 -0
- package/dist/LanguageSelector-Cj6zl0CM.js +46 -0
- package/dist/LanguageSelector-CyHjZgC4.cjs +48 -0
- package/dist/LanguageSelector-DE8lIySO.js +46 -0
- package/dist/LanguageSelector-DK1zD4VH.cjs +48 -0
- package/dist/LanguageSelector-DUr1hjBW.js +46 -0
- package/dist/LanguageSelector-DjbWIKWC.js +46 -0
- package/dist/LanguageSelector-DseCAa0p.cjs +48 -0
- package/dist/LanguageSelector-Du09anfM.js +46 -0
- package/dist/LanguageSelector-PZHlFfEs.cjs +48 -0
- package/dist/LanguageSelector-SB-NJSmx.js +46 -0
- package/dist/LogoCloud-C_uMKVNg.cjs +513 -0
- package/dist/LogoCloud-DJsMPNPh.js +500 -0
- package/dist/MarketingFooter-B_ycEdTJ.cjs +727 -0
- package/dist/MarketingFooter-Bhx-2Vlr.cjs +727 -0
- package/dist/MarketingFooter-Br1MGK9e.js +699 -0
- package/dist/MarketingFooter-BwE1vmeX.cjs +700 -0
- package/dist/MarketingFooter-CsZ1_xL9.js +709 -0
- package/dist/MarketingFooter-DCwf78Q4.cjs +716 -0
- package/dist/MarketingFooter-KH2r-OOL.js +709 -0
- package/dist/MarketingFooter-nB7G7gQ5.js +682 -0
- package/dist/PasswordStrengthMeter-B3S6i_k4.cjs +179 -0
- package/dist/PasswordStrengthMeter-B8ky1nJI.js +173 -0
- package/dist/PasswordStrengthMeter-C5VEopH-.cjs +179 -0
- package/dist/PasswordStrengthMeter-CIm7_jNT.js +173 -0
- package/dist/PasswordStrengthMeter-DKSAbQzu.js +173 -0
- package/dist/PasswordStrengthMeter-DxLu54p-.cjs +179 -0
- package/dist/PasswordStrengthMeter-k-e9Pole.cjs +179 -0
- package/dist/PasswordStrengthMeter-pAi2viq5.js +173 -0
- package/dist/SectionHeading-DEeOKcAd.cjs +857 -0
- package/dist/SectionHeading-DMNObcwm.js +838 -0
- package/dist/ThemeToggle--CGJjQJv.cjs +219 -0
- package/dist/ThemeToggle-4pQbVkpK.js +215 -0
- package/dist/ThemeToggle-B6rIVLvC.cjs +219 -0
- package/dist/ThemeToggle-BUOTps5l.cjs +219 -0
- package/dist/ThemeToggle-Bn_7Pmfe.js +215 -0
- package/dist/ThemeToggle-CO5mPl6e.js +215 -0
- package/dist/ThemeToggle-CoL8Ady7.js +215 -0
- package/dist/ThemeToggle-D2Wzm5bn.cjs +219 -0
- package/dist/ThemeToggle-DbZQ0JSV.cjs +219 -0
- package/dist/ThemeToggle-vLXEq2TS.js +215 -0
- package/dist/VerifyEmailPage-90lK6pP4.js +3258 -0
- package/dist/VerifyEmailPage-BJX1Rter.cjs +3320 -0
- package/dist/VerifyEmailPage-BSWvOgry.js +3310 -0
- package/dist/VerifyEmailPage-BTjI2c9n.js +2954 -0
- package/dist/VerifyEmailPage-CDqIkhx-.js +3224 -0
- package/dist/VerifyEmailPage-CJGfDSOx.js +2954 -0
- package/dist/VerifyEmailPage-Crxje3ZB.js +3323 -0
- package/dist/VerifyEmailPage-D2ShbuEN.cjs +3333 -0
- package/dist/VerifyEmailPage-DEBZXQ7c.cjs +3310 -0
- package/dist/VerifyEmailPage-DGaX-jZv.cjs +3268 -0
- package/dist/VerifyEmailPage-DOlZUNc0.cjs +2963 -0
- package/dist/VerifyEmailPage-DQPRl_RJ.js +2954 -0
- package/dist/VerifyEmailPage-DrdqMbLC.cjs +2963 -0
- package/dist/VerifyEmailPage-ZtOPkgOA.cjs +3234 -0
- package/dist/VerifyEmailPage-hyDfeCRa.cjs +2963 -0
- package/dist/VerifyEmailPage-kKSXl8vu.cjs +2963 -0
- package/dist/VerifyEmailPage-s927GSiR.js +3300 -0
- package/dist/VerifyEmailPage-w4N-bDhU.js +2954 -0
- package/dist/XerticaOrbe-B9tegV1n.js +1925 -0
- package/dist/XerticaOrbe-BHex09xs.js +1925 -0
- package/dist/XerticaOrbe-BKW3LJEz.js +1925 -0
- package/dist/XerticaOrbe-BQ_NjwPS.cjs +1927 -0
- package/dist/XerticaOrbe-BdUX171Q.cjs +1927 -0
- package/dist/XerticaOrbe-BdlKXRHU.cjs +1927 -0
- package/dist/XerticaOrbe-Br2i99U_.cjs +1927 -0
- package/dist/XerticaOrbe-CByPAFE5.js +1925 -0
- package/dist/XerticaOrbe-Ccu9eFMu.js +1925 -0
- package/dist/XerticaOrbe-kjFmuyx-.cjs +1927 -0
- package/dist/XerticaProvider-BVid1oqn.cjs +46 -0
- package/dist/XerticaProvider-Bi5lKC9N.js +44 -0
- package/dist/XerticaProvider-BrPMVhiv.js +44 -0
- package/dist/XerticaProvider-Bz_YfNY4.js +44 -0
- package/dist/XerticaProvider-CnX5kt5W.cjs +46 -0
- package/dist/XerticaProvider-CtvYfRbZ.cjs +46 -0
- package/dist/XerticaProvider-DEKNJTlN.js +44 -0
- package/dist/XerticaProvider-DMiyExQS.js +44 -0
- package/dist/XerticaProvider-DP2lzKip.cjs +46 -0
- package/dist/XerticaProvider-De79hhgp.js +44 -0
- package/dist/XerticaProvider-Dkk1Vbsy.js +44 -0
- package/dist/XerticaProvider-EdzH9Nrw.cjs +46 -0
- package/dist/XerticaProvider-X_wavDYA.cjs +46 -0
- package/dist/XerticaProvider-b3n_oL8w.cjs +46 -0
- package/dist/alert-dialog--qdlmB5i.cjs +872 -0
- package/dist/alert-dialog-9XYAn5z5.js +819 -0
- package/dist/alert-dialog-B281hud0.cjs +872 -0
- package/dist/alert-dialog-BVWbrcrw.cjs +872 -0
- package/dist/alert-dialog-B_Ko1xpu.js +819 -0
- package/dist/alert-dialog-C48TOdYU.cjs +872 -0
- package/dist/alert-dialog-CEPpnpXt.js +819 -0
- package/dist/alert-dialog-CIxE8T-J.cjs +872 -0
- package/dist/alert-dialog-DW-_iPuf.js +819 -0
- package/dist/alert-dialog-NjflitDa.js +819 -0
- package/dist/assistant.cjs.js +2 -2
- package/dist/assistant.es.js +2 -2
- package/dist/avatar-BJwIMbZ_.js +54 -0
- package/dist/avatar-C4Zh5fAJ.cjs +77 -0
- package/dist/avatar-CTEUKZUT.js +54 -0
- package/dist/avatar-CtEKgg7s.cjs +77 -0
- package/dist/avatar-D03MNQxs.js +54 -0
- package/dist/avatar-D1bZhlhL.cjs +77 -0
- package/dist/avatar-DKIxHeKG.cjs +77 -0
- package/dist/avatar-Df7KgSvs.js +54 -0
- package/dist/avatar-Gy0_Xu9i.cjs +77 -0
- package/dist/avatar-v16eZC8p.js +54 -0
- package/dist/blocks.cjs.js +33 -18
- package/dist/blocks.es.js +2 -2
- package/dist/brand.cjs.js +110 -4
- package/dist/brand.es.js +98 -4
- package/dist/breadcrumb-B1mUiaWB.cjs +98 -0
- package/dist/breadcrumb-BGO5PZPG.js +90 -0
- package/dist/breadcrumb-BIRgmem-.js +90 -0
- package/dist/breadcrumb-BSng-oUf.cjs +98 -0
- package/dist/breadcrumb-BvGAY4ne.cjs +98 -0
- package/dist/breadcrumb-CES7furU.js +90 -0
- package/dist/breadcrumb-CP275kbF.cjs +98 -0
- package/dist/breadcrumb-CU-punra.js +90 -0
- package/dist/breadcrumb-D7hr1EvJ.js +90 -0
- package/dist/breadcrumb-DjV9wfX1.cjs +98 -0
- package/dist/button-B05czY_8.js +62 -0
- package/dist/button-B3SE1liJ.js +62 -0
- package/dist/button-BMDlWZR8.cjs +85 -0
- package/dist/button-BYtQygX5.cjs +85 -0
- package/dist/button-BnAW-a_w.js +62 -0
- package/dist/button-CUPDQews.js +62 -0
- package/dist/button-DFa-rtPy.js +62 -0
- package/dist/button-DV1G6XrI.cjs +85 -0
- package/dist/button-DVhloDtr.cjs +85 -0
- package/dist/button-Kd9Fj53S.cjs +85 -0
- package/dist/cli.js +367 -65
- package/dist/components/blocks/auth/AuthPageShell.d.ts +21 -5
- package/dist/components/blocks/index.d.ts +1 -0
- package/dist/components/blocks/marketing/CTASection.d.ts +28 -0
- package/dist/components/blocks/marketing/ComplianceBadgeRow.d.ts +23 -0
- package/dist/components/blocks/marketing/EvidenceTimeline.d.ts +26 -0
- package/dist/components/blocks/marketing/FeatureRow.d.ts +25 -0
- package/dist/components/blocks/marketing/Hero.d.ts +35 -0
- package/dist/components/blocks/marketing/HowItWorksSteps.d.ts +29 -0
- package/dist/components/blocks/marketing/LogoCloud.d.ts +22 -0
- package/dist/components/blocks/marketing/MarketingFooter.d.ts +42 -0
- package/dist/components/blocks/marketing/MarketingNavbar.d.ts +47 -0
- package/dist/components/blocks/marketing/PillBadge.d.ts +21 -0
- package/dist/components/blocks/marketing/SectionHeading.d.ts +23 -0
- package/dist/components/blocks/marketing/ServiceCardGrid.d.ts +65 -0
- package/dist/components/blocks/marketing/StatBand.d.ts +25 -0
- package/dist/components/blocks/marketing/TopAccentCards.d.ts +29 -0
- package/dist/components/blocks/marketing/index.d.ts +28 -0
- package/dist/components/brand/index.d.ts +1 -0
- package/dist/components/brand/isotype/Isotype.d.ts +27 -0
- package/dist/components/brand/isotype/IsotypeDiagonal.d.ts +19 -0
- package/dist/components/brand/isotype/IsotypeFrames.d.ts +21 -0
- package/dist/components/brand/isotype/IsotypeMini.d.ts +26 -0
- package/dist/components/brand/isotype/IsotypeTwist.d.ts +22 -0
- package/dist/components/brand/isotype/frame-variants.d.ts +11 -0
- package/dist/components/brand/isotype/index.d.ts +9 -0
- package/dist/components/brand/isotype/mini-patterns.d.ts +25 -0
- package/dist/components/brand/isotype/patterns.d.ts +42 -0
- package/dist/components/brand/isotype/twist-variants.d.ts +11 -0
- package/dist/components/pages/forgot-password-page/ForgotPasswordPage.d.ts +2 -2
- package/dist/components/pages/index.d.ts +1 -0
- package/dist/components/pages/landing-page/LandingPage.d.ts +18 -0
- package/dist/components/pages/landing-page/index.d.ts +1 -0
- package/dist/components/pages/login-page/LoginPage.d.ts +2 -2
- package/dist/components/pages/verify-email-page/VerifyEmailPage.d.ts +1 -1
- package/dist/components/ui/card/card.d.ts +13 -1
- package/dist/contexts/theme-data.d.ts +21 -1
- package/dist/dropdown-menu-B9wTZ0uX.cjs +225 -0
- package/dist/dropdown-menu-BeBtZOrs.cjs +225 -0
- package/dist/dropdown-menu-ChQa9zW3.cjs +225 -0
- package/dist/dropdown-menu-D7mRDGis.js +190 -0
- package/dist/dropdown-menu-D8ZmqHB7.js +190 -0
- package/dist/dropdown-menu-DRvnsQAt.cjs +225 -0
- package/dist/dropdown-menu-DUk81i5Y.js +190 -0
- package/dist/dropdown-menu-NlUHhVmK.js +190 -0
- package/dist/dropdown-menu-_AWBeOts.cjs +225 -0
- package/dist/dropdown-menu-qGzLO_HO.js +190 -0
- package/dist/hooks.cjs.js +2 -2
- package/dist/hooks.es.js +2 -2
- package/dist/index.cjs.js +57 -41
- package/dist/index.es.js +25 -25
- package/dist/input-B53E6K8G.js +65 -0
- package/dist/input-B7Q7vcoG.cjs +91 -0
- package/dist/input-BysqLMK1.js +65 -0
- package/dist/input-CStdFsaH.cjs +91 -0
- package/dist/input-CXYth6nW.cjs +91 -0
- package/dist/input-CX_fWE2D.cjs +91 -0
- package/dist/input-CitUVnEn.js +65 -0
- package/dist/input-Csp_Metb.cjs +91 -0
- package/dist/input-DVRwGVLx.js +65 -0
- package/dist/input-Dqyj7Hdw.cjs +91 -0
- package/dist/input-dOgrFQ-3.js +65 -0
- package/dist/input-wkBYTp-B.js +65 -0
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +1 -1
- package/dist/media.cjs.js +1 -1
- package/dist/media.es.js +1 -1
- package/dist/pages.cjs.js +2 -1
- package/dist/pages.es.js +1 -1
- package/dist/rich-text-editor-7K7UjLJN.cjs +2968 -0
- package/dist/rich-text-editor-B3jLP2bm.cjs +2968 -0
- package/dist/rich-text-editor-BHiRUzWZ.js +2894 -0
- package/dist/rich-text-editor-BWMRUMJ2.js +2894 -0
- package/dist/rich-text-editor-BntMVQsB.js +2894 -0
- package/dist/rich-text-editor-BoE6Ks5x.cjs +2968 -0
- package/dist/rich-text-editor-BzuEwR_X.js +2894 -0
- package/dist/rich-text-editor-CcopGbQ-.js +2894 -0
- package/dist/rich-text-editor-CmxSRJIi.cjs +2968 -0
- package/dist/rich-text-editor-Diz_onyB.js +2894 -0
- package/dist/rich-text-editor-DyYAu28v.cjs +2968 -0
- package/dist/rich-text-editor-JS_eMQCC.cjs +2968 -0
- package/dist/rich-text-editor-RWvK4hd3.cjs +2968 -0
- package/dist/rich-text-editor-gauEkzPM.js +2894 -0
- package/dist/select-B6PygS38.cjs +161 -0
- package/dist/select-BD763J5Y.cjs +161 -0
- package/dist/select-BNfFJwYp.js +130 -0
- package/dist/select-CN8IDjGB.js +130 -0
- package/dist/select-CwRzQHA7.cjs +161 -0
- package/dist/select-CwgD3nMD.js +130 -0
- package/dist/select-DEHUm_AC.cjs +161 -0
- package/dist/select-DJDgpVm3.cjs +161 -0
- package/dist/select-DSLWQLmo.cjs +161 -0
- package/dist/select-QJDKZITN.js +130 -0
- package/dist/select-YFx0wCYT.js +130 -0
- package/dist/select-q7aDfuPn.js +130 -0
- package/dist/sidebar-BF7JEL7U.js +1151 -0
- package/dist/sidebar-Bjr2doX5.cjs +1154 -0
- package/dist/sidebar-Bkk1YAsD.cjs +1154 -0
- package/dist/sidebar-CMrNCmhb.cjs +1154 -0
- package/dist/sidebar-CO9x8AVn.cjs +1154 -0
- package/dist/sidebar-Cn_KB4c6.js +1151 -0
- package/dist/sidebar-CuzYeOSz.cjs +1154 -0
- package/dist/sidebar-CwlW3LXE.js +1151 -0
- package/dist/sidebar-DNkf-Ug6.js +1151 -0
- package/dist/sidebar-DaS3fplw.cjs +1154 -0
- package/dist/sidebar-Db_C30ph.cjs +1154 -0
- package/dist/sidebar-FDCY42oP.js +1151 -0
- package/dist/sidebar-miPHsRz4.js +1151 -0
- package/dist/sidebar-pZF8mLLu.js +1151 -0
- package/dist/skeleton-BX2XTjMO.cjs +87 -0
- package/dist/skeleton-BoLK0iV7.js +78 -0
- package/dist/skeleton-BtBwJ39W.js +79 -0
- package/dist/skeleton-Bysq8yeB.js +79 -0
- package/dist/skeleton-C7nspYnC.cjs +87 -0
- package/dist/skeleton-CJyg0eJ1.cjs +88 -0
- package/dist/skeleton-D8WaauK0.cjs +88 -0
- package/dist/skeleton-DBYtjaZW.cjs +88 -0
- package/dist/skeleton-DL4V5Vub.cjs +87 -0
- package/dist/skeleton-DSMhdqp1.js +78 -0
- package/dist/skeleton-DY_lSFWf.js +79 -0
- package/dist/skeleton-Df65Ox10.js +79 -0
- package/dist/skeleton-DhJswvTW.cjs +88 -0
- package/dist/skeleton-DicUfozA.js +78 -0
- package/dist/slider-77T_Eqw4.js +56 -0
- package/dist/slider-B6puMLXS.cjs +78 -0
- package/dist/slider-B785N7lZ.js +56 -0
- package/dist/slider-BKV_vvsh.cjs +78 -0
- package/dist/slider-B_lUjFNa.cjs +78 -0
- package/dist/slider-C6yssKyZ.cjs +78 -0
- package/dist/slider-CKZO9gVh.cjs +78 -0
- package/dist/slider-Cn-ImSze.js +56 -0
- package/dist/slider-CtBpIaU4.js +56 -0
- package/dist/slider-KgWmSJbx.js +56 -0
- package/dist/tooltip-BPttuPxU.js +48 -0
- package/dist/tooltip-BiJVGob3.cjs +72 -0
- package/dist/tooltip-CIKRzQqE.cjs +72 -0
- package/dist/tooltip-CoDByjE_.cjs +72 -0
- package/dist/tooltip-D2OPn-1v.cjs +72 -0
- package/dist/tooltip-DlCHQuh1.js +48 -0
- package/dist/tooltip-_MAwsiOL.js +48 -0
- package/dist/tooltip-fQ2Va0G8.cjs +72 -0
- package/dist/tooltip-oAw00FX2.js +48 -0
- package/dist/tooltip-u147L0wD.js +48 -0
- package/dist/ui.cjs.js +13 -13
- package/dist/ui.es.js +13 -13
- package/dist/xertica-assistant-B1xAl2Vn.js +2173 -0
- package/dist/xertica-assistant-BBUMaUXw.js +2173 -0
- package/dist/xertica-assistant-C2A0R94j.js +2173 -0
- package/dist/xertica-assistant-CSUprvTR.js +2173 -0
- package/dist/xertica-assistant-CWuBwfzt.cjs +2180 -0
- package/dist/xertica-assistant-Caubm0HR.js +2173 -0
- package/dist/xertica-assistant-D2hlwiEP.js +2173 -0
- package/dist/xertica-assistant-DEexPM2u.cjs +2180 -0
- package/dist/xertica-assistant-DN2J_sQQ.cjs +2180 -0
- package/dist/xertica-assistant-DdYS6WXT.cjs +2180 -0
- package/dist/xertica-assistant-Dh1dmEx3.cjs +2180 -0
- package/dist/xertica-assistant-GGcyHEZG.cjs +2180 -0
- package/dist/xertica-assistant-USefPe2L.js +2173 -0
- package/dist/xertica-assistant-cwSHFwfv.cjs +2180 -0
- package/dist/xertica-ui.css +1 -1
- package/llms-compact.txt +1 -1
- package/llms.txt +1 -1
- package/package.json +3 -2
- package/styles/xertica/base.css +46 -0
- package/styles/xertica/tokens.css +10 -0
- package/templates/package.json +1 -1
- package/templates/src/app/App.tsx +5 -1
- package/templates/src/app/components/AuthGuard.tsx +6 -0
- package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +1 -4
- package/templates/src/features/auth/ui/LoginContent.tsx +1 -4
- package/templates/src/features/auth/ui/ResetPasswordContent.tsx +1 -4
- package/templates/src/features/auth/ui/VerifyEmailContent.tsx +1 -4
- package/templates/src/features/home/ui/HomeContent.tsx +12 -13
- package/templates/src/features/template/ui/TemplateContent.tsx +569 -26
- package/templates/src/locales/en/pages/landing.json +175 -0
- package/templates/src/locales/en/pages/templates.json +112 -4
- package/templates/src/locales/es/pages/landing.json +175 -0
- package/templates/src/locales/es/pages/templates.json +112 -4
- package/templates/src/locales/pt-BR/pages/landing.json +175 -0
- package/templates/src/locales/pt-BR/pages/templates.json +112 -4
- package/templates/src/pages/LandingPage.tsx +3 -0
- package/templates/src/styles/xertica/tokens.css +10 -0
- package/templates/vite.config.ts +25 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
const reactSlot = require('@radix-ui/react-slot');
|
|
5
|
+
const classVarianceAuthority = require('class-variance-authority');
|
|
6
|
+
const button = require('./button-BYtQygX5.cjs');
|
|
7
|
+
const ProgressPrimitive = require('@radix-ui/react-progress');
|
|
8
|
+
const React = require('react');
|
|
9
|
+
|
|
10
|
+
function _interopNamespaceDefault(e) {
|
|
11
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
|
12
|
+
if (e) {
|
|
13
|
+
for (const k in e) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: () => e[k]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(ProgressPrimitive);
|
|
28
|
+
|
|
29
|
+
const badgeVariants = classVarianceAuthority.cva(
|
|
30
|
+
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
31
|
+
{
|
|
32
|
+
variants: {
|
|
33
|
+
variant: {
|
|
34
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
35
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
36
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
37
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
38
|
+
success: "border-transparent bg-success text-success-foreground",
|
|
39
|
+
warning: "border-transparent bg-warning text-warning-foreground",
|
|
40
|
+
info: "border-transparent bg-info text-info-foreground"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
defaultVariants: {
|
|
44
|
+
variant: "default"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
function Badge({
|
|
49
|
+
className,
|
|
50
|
+
variant,
|
|
51
|
+
asChild = false,
|
|
52
|
+
children,
|
|
53
|
+
...props
|
|
54
|
+
}) {
|
|
55
|
+
const Comp = asChild ? reactSlot.Slot : "span";
|
|
56
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { "data-slot": "badge", className: button.cn(badgeVariants({ variant }), className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slottable, { children }) });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const trackVariants = {
|
|
60
|
+
default: "bg-primary/20",
|
|
61
|
+
success: "bg-success/20",
|
|
62
|
+
info: "bg-info/20",
|
|
63
|
+
warning: "bg-warning/20",
|
|
64
|
+
destructive: "bg-destructive/20"
|
|
65
|
+
};
|
|
66
|
+
const indicatorVariants = {
|
|
67
|
+
default: "bg-primary",
|
|
68
|
+
success: "bg-success",
|
|
69
|
+
info: "bg-info",
|
|
70
|
+
warning: "bg-warning",
|
|
71
|
+
destructive: "bg-destructive"
|
|
72
|
+
};
|
|
73
|
+
function Progress({
|
|
74
|
+
className,
|
|
75
|
+
value,
|
|
76
|
+
variant = "default",
|
|
77
|
+
...props
|
|
78
|
+
}) {
|
|
79
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
80
|
+
ProgressPrimitive__namespace.Root,
|
|
81
|
+
{
|
|
82
|
+
"data-slot": "progress",
|
|
83
|
+
"aria-label": props["aria-label"] || "Progresso",
|
|
84
|
+
className: button.cn(
|
|
85
|
+
"relative h-2 w-full overflow-hidden rounded-full",
|
|
86
|
+
trackVariants[variant],
|
|
87
|
+
className
|
|
88
|
+
),
|
|
89
|
+
...props,
|
|
90
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
91
|
+
ProgressPrimitive__namespace.Indicator,
|
|
92
|
+
{
|
|
93
|
+
"data-slot": "progress-indicator",
|
|
94
|
+
className: button.cn("h-full w-full flex-1 transition-all", indicatorVariants[variant]),
|
|
95
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const ERROR_IMG_SRC = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjciPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjU2IiBoZWlnaHQ9IjU2IiByeD0iNiIvPjxwYXRoIGQ9Im0xNiA1OCAxNi0xOCAzMiAzMiIvPjxjaXJjbGUgY3g9IjUzIiBjeT0iMzUiIHI9IjciLz48L3N2Zz4KCg==";
|
|
103
|
+
function ImageWithFallback(props) {
|
|
104
|
+
const [didError, setDidError] = React.useState(false);
|
|
105
|
+
const handleError = () => {
|
|
106
|
+
setDidError(true);
|
|
107
|
+
};
|
|
108
|
+
const { src, alt, style, className, ...rest } = props;
|
|
109
|
+
return didError ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
className: `inline-block bg-gray-100 text-center align-middle ${className ?? ""}`,
|
|
113
|
+
style,
|
|
114
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: ERROR_IMG_SRC, alt: "Error loading image", ...rest, "data-original-url": src }) })
|
|
115
|
+
}
|
|
116
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt, className, style, ...rest, onError: handleError });
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
exports.Badge = Badge;
|
|
120
|
+
exports.ImageWithFallback = ImageWithFallback;
|
|
121
|
+
exports.Progress = Progress;
|
|
122
|
+
exports.badgeVariants = badgeVariants;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Slot, Slottable } from '@radix-ui/react-slot';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { c as cn } from './button-B05czY_8.js';
|
|
5
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
|
|
8
|
+
const badgeVariants = cva(
|
|
9
|
+
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
14
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
15
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
16
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
17
|
+
success: "border-transparent bg-success text-success-foreground",
|
|
18
|
+
warning: "border-transparent bg-warning text-warning-foreground",
|
|
19
|
+
info: "border-transparent bg-info text-info-foreground"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
function Badge({
|
|
28
|
+
className,
|
|
29
|
+
variant,
|
|
30
|
+
asChild = false,
|
|
31
|
+
children,
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
const Comp = asChild ? Slot : "span";
|
|
35
|
+
return /* @__PURE__ */ jsx(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant }), className), ...props, children: /* @__PURE__ */ jsx(Slottable, { children }) });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const trackVariants = {
|
|
39
|
+
default: "bg-primary/20",
|
|
40
|
+
success: "bg-success/20",
|
|
41
|
+
info: "bg-info/20",
|
|
42
|
+
warning: "bg-warning/20",
|
|
43
|
+
destructive: "bg-destructive/20"
|
|
44
|
+
};
|
|
45
|
+
const indicatorVariants = {
|
|
46
|
+
default: "bg-primary",
|
|
47
|
+
success: "bg-success",
|
|
48
|
+
info: "bg-info",
|
|
49
|
+
warning: "bg-warning",
|
|
50
|
+
destructive: "bg-destructive"
|
|
51
|
+
};
|
|
52
|
+
function Progress({
|
|
53
|
+
className,
|
|
54
|
+
value,
|
|
55
|
+
variant = "default",
|
|
56
|
+
...props
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
ProgressPrimitive.Root,
|
|
60
|
+
{
|
|
61
|
+
"data-slot": "progress",
|
|
62
|
+
"aria-label": props["aria-label"] || "Progresso",
|
|
63
|
+
className: cn(
|
|
64
|
+
"relative h-2 w-full overflow-hidden rounded-full",
|
|
65
|
+
trackVariants[variant],
|
|
66
|
+
className
|
|
67
|
+
),
|
|
68
|
+
...props,
|
|
69
|
+
children: /* @__PURE__ */ jsx(
|
|
70
|
+
ProgressPrimitive.Indicator,
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "progress-indicator",
|
|
73
|
+
className: cn("h-full w-full flex-1 transition-all", indicatorVariants[variant]),
|
|
74
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const ERROR_IMG_SRC = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjciPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjU2IiBoZWlnaHQ9IjU2IiByeD0iNiIvPjxwYXRoIGQ9Im0xNiA1OCAxNi0xOCAzMiAzMiIvPjxjaXJjbGUgY3g9IjUzIiBjeT0iMzUiIHI9IjciLz48L3N2Zz4KCg==";
|
|
82
|
+
function ImageWithFallback(props) {
|
|
83
|
+
const [didError, setDidError] = useState(false);
|
|
84
|
+
const handleError = () => {
|
|
85
|
+
setDidError(true);
|
|
86
|
+
};
|
|
87
|
+
const { src, alt, style, className, ...rest } = props;
|
|
88
|
+
return didError ? /* @__PURE__ */ jsx(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
className: `inline-block bg-gray-100 text-center align-middle ${className ?? ""}`,
|
|
92
|
+
style,
|
|
93
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx("img", { src: ERROR_IMG_SRC, alt: "Error loading image", ...rest, "data-original-url": src }) })
|
|
94
|
+
}
|
|
95
|
+
) : /* @__PURE__ */ jsx("img", { src, alt, className, style, ...rest, onError: handleError });
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export { Badge as B, ImageWithFallback as I, Progress as P, badgeVariants as b };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Slot, Slottable } from '@radix-ui/react-slot';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { c as cn } from './button-B3SE1liJ.js';
|
|
5
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
|
|
8
|
+
const badgeVariants = cva(
|
|
9
|
+
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
14
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
15
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
16
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
17
|
+
success: "border-transparent bg-success text-success-foreground",
|
|
18
|
+
warning: "border-transparent bg-warning text-warning-foreground",
|
|
19
|
+
info: "border-transparent bg-info text-info-foreground"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
function Badge({
|
|
28
|
+
className,
|
|
29
|
+
variant,
|
|
30
|
+
asChild = false,
|
|
31
|
+
children,
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
const Comp = asChild ? Slot : "span";
|
|
35
|
+
return /* @__PURE__ */ jsx(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant }), className), ...props, children: /* @__PURE__ */ jsx(Slottable, { children }) });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const trackVariants = {
|
|
39
|
+
default: "bg-primary/20",
|
|
40
|
+
success: "bg-success/20",
|
|
41
|
+
info: "bg-info/20",
|
|
42
|
+
warning: "bg-warning/20",
|
|
43
|
+
destructive: "bg-destructive/20"
|
|
44
|
+
};
|
|
45
|
+
const indicatorVariants = {
|
|
46
|
+
default: "bg-primary",
|
|
47
|
+
success: "bg-success",
|
|
48
|
+
info: "bg-info",
|
|
49
|
+
warning: "bg-warning",
|
|
50
|
+
destructive: "bg-destructive"
|
|
51
|
+
};
|
|
52
|
+
function Progress({
|
|
53
|
+
className,
|
|
54
|
+
value,
|
|
55
|
+
variant = "default",
|
|
56
|
+
...props
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
ProgressPrimitive.Root,
|
|
60
|
+
{
|
|
61
|
+
"data-slot": "progress",
|
|
62
|
+
"aria-label": props["aria-label"] || "Progresso",
|
|
63
|
+
className: cn(
|
|
64
|
+
"relative h-2 w-full overflow-hidden rounded-full",
|
|
65
|
+
trackVariants[variant],
|
|
66
|
+
className
|
|
67
|
+
),
|
|
68
|
+
...props,
|
|
69
|
+
children: /* @__PURE__ */ jsx(
|
|
70
|
+
ProgressPrimitive.Indicator,
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "progress-indicator",
|
|
73
|
+
className: cn("h-full w-full flex-1 transition-all", indicatorVariants[variant]),
|
|
74
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const ERROR_IMG_SRC = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjciPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjU2IiBoZWlnaHQ9IjU2IiByeD0iNiIvPjxwYXRoIGQ9Im0xNiA1OCAxNi0xOCAzMiAzMiIvPjxjaXJjbGUgY3g9IjUzIiBjeT0iMzUiIHI9IjciLz48L3N2Zz4KCg==";
|
|
82
|
+
function ImageWithFallback(props) {
|
|
83
|
+
const [didError, setDidError] = useState(false);
|
|
84
|
+
const handleError = () => {
|
|
85
|
+
setDidError(true);
|
|
86
|
+
};
|
|
87
|
+
const { src, alt, style, className, ...rest } = props;
|
|
88
|
+
return didError ? /* @__PURE__ */ jsx(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
className: `inline-block bg-gray-100 text-center align-middle ${className ?? ""}`,
|
|
92
|
+
style,
|
|
93
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx("img", { src: ERROR_IMG_SRC, alt: "Error loading image", ...rest, "data-original-url": src }) })
|
|
94
|
+
}
|
|
95
|
+
) : /* @__PURE__ */ jsx("img", { src, alt, className, style, ...rest, onError: handleError });
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export { Badge as B, ImageWithFallback as I, Progress as P, badgeVariants as b };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Slot, Slottable } from '@radix-ui/react-slot';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { c as cn } from './button-CUPDQews.js';
|
|
5
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
|
|
8
|
+
const badgeVariants = cva(
|
|
9
|
+
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
14
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
15
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
16
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
17
|
+
success: "border-transparent bg-success text-success-foreground",
|
|
18
|
+
warning: "border-transparent bg-warning text-warning-foreground",
|
|
19
|
+
info: "border-transparent bg-info text-info-foreground"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
function Badge({
|
|
28
|
+
className,
|
|
29
|
+
variant,
|
|
30
|
+
asChild = false,
|
|
31
|
+
children,
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
const Comp = asChild ? Slot : "span";
|
|
35
|
+
return /* @__PURE__ */ jsx(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant }), className), ...props, children: /* @__PURE__ */ jsx(Slottable, { children }) });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const trackVariants = {
|
|
39
|
+
default: "bg-primary/20",
|
|
40
|
+
success: "bg-success/20",
|
|
41
|
+
info: "bg-info/20",
|
|
42
|
+
warning: "bg-warning/20",
|
|
43
|
+
destructive: "bg-destructive/20"
|
|
44
|
+
};
|
|
45
|
+
const indicatorVariants = {
|
|
46
|
+
default: "bg-primary",
|
|
47
|
+
success: "bg-success",
|
|
48
|
+
info: "bg-info",
|
|
49
|
+
warning: "bg-warning",
|
|
50
|
+
destructive: "bg-destructive"
|
|
51
|
+
};
|
|
52
|
+
function Progress({
|
|
53
|
+
className,
|
|
54
|
+
value,
|
|
55
|
+
variant = "default",
|
|
56
|
+
...props
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
ProgressPrimitive.Root,
|
|
60
|
+
{
|
|
61
|
+
"data-slot": "progress",
|
|
62
|
+
"aria-label": props["aria-label"] || "Progresso",
|
|
63
|
+
className: cn(
|
|
64
|
+
"relative h-2 w-full overflow-hidden rounded-full",
|
|
65
|
+
trackVariants[variant],
|
|
66
|
+
className
|
|
67
|
+
),
|
|
68
|
+
...props,
|
|
69
|
+
children: /* @__PURE__ */ jsx(
|
|
70
|
+
ProgressPrimitive.Indicator,
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "progress-indicator",
|
|
73
|
+
className: cn("h-full w-full flex-1 transition-all", indicatorVariants[variant]),
|
|
74
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const ERROR_IMG_SRC = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjciPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjU2IiBoZWlnaHQ9IjU2IiByeD0iNiIvPjxwYXRoIGQ9Im0xNiA1OCAxNi0xOCAzMiAzMiIvPjxjaXJjbGUgY3g9IjUzIiBjeT0iMzUiIHI9IjciLz48L3N2Zz4KCg==";
|
|
82
|
+
function ImageWithFallback(props) {
|
|
83
|
+
const [didError, setDidError] = useState(false);
|
|
84
|
+
const handleError = () => {
|
|
85
|
+
setDidError(true);
|
|
86
|
+
};
|
|
87
|
+
const { src, alt, style, className, ...rest } = props;
|
|
88
|
+
return didError ? /* @__PURE__ */ jsx(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
className: `inline-block bg-gray-100 text-center align-middle ${className ?? ""}`,
|
|
92
|
+
style,
|
|
93
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx("img", { src: ERROR_IMG_SRC, alt: "Error loading image", ...rest, "data-original-url": src }) })
|
|
94
|
+
}
|
|
95
|
+
) : /* @__PURE__ */ jsx("img", { src, alt, className, style, ...rest, onError: handleError });
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export { Badge as B, ImageWithFallback as I, Progress as P, badgeVariants as b };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { c as cn } from './button-B3SE1liJ.js';
|
|
3
|
+
|
|
4
|
+
const ISOTYPE_COLORS = {
|
|
5
|
+
purple: "#5A4A96",
|
|
6
|
+
blue: "#1899AF",
|
|
7
|
+
magenta: "#C45BAA",
|
|
8
|
+
yellow: "#FAF338",
|
|
9
|
+
green: "#2E8B5A",
|
|
10
|
+
red: "#DE5B48",
|
|
11
|
+
brown: "#2A2415"
|
|
12
|
+
};
|
|
13
|
+
const ISOTYPE_PATTERNS = {
|
|
14
|
+
core: [
|
|
15
|
+
"purple",
|
|
16
|
+
"blue",
|
|
17
|
+
"blue",
|
|
18
|
+
"blue",
|
|
19
|
+
"magenta",
|
|
20
|
+
"blank",
|
|
21
|
+
"yellow",
|
|
22
|
+
"green",
|
|
23
|
+
"magenta",
|
|
24
|
+
"yellow",
|
|
25
|
+
"yellow",
|
|
26
|
+
"green",
|
|
27
|
+
"magenta",
|
|
28
|
+
"red",
|
|
29
|
+
"red",
|
|
30
|
+
"brown"
|
|
31
|
+
]
|
|
32
|
+
};
|
|
33
|
+
const ISOTYPE_PATTERN_IDS = Object.keys(ISOTYPE_PATTERNS);
|
|
34
|
+
function mulberry32(seed) {
|
|
35
|
+
let a = seed >>> 0;
|
|
36
|
+
return () => {
|
|
37
|
+
a |= 0;
|
|
38
|
+
a = a + 1831565813 | 0;
|
|
39
|
+
let t = Math.imul(a ^ a >>> 15, 1 | a);
|
|
40
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
41
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function getIsotypeVariant(patternId, seed) {
|
|
45
|
+
const base = ISOTYPE_PATTERNS[patternId];
|
|
46
|
+
const candidateIndices = base.reduce(
|
|
47
|
+
(acc, cell, i) => cell === "blank" ? acc : [...acc, i],
|
|
48
|
+
[]
|
|
49
|
+
);
|
|
50
|
+
const rng = mulberry32(seed);
|
|
51
|
+
const chosen = candidateIndices[Math.floor(rng() * candidateIndices.length)];
|
|
52
|
+
return base.map((cell, i) => i === chosen ? "blank" : cell);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function Isotype({
|
|
56
|
+
pattern = "core",
|
|
57
|
+
variantSeed,
|
|
58
|
+
className,
|
|
59
|
+
"aria-label": ariaLabel,
|
|
60
|
+
...props
|
|
61
|
+
}) {
|
|
62
|
+
const cells = variantSeed === void 0 ? ISOTYPE_PATTERNS[pattern] : getIsotypeVariant(pattern, variantSeed);
|
|
63
|
+
return /* @__PURE__ */ jsx(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
role: ariaLabel ? "img" : void 0,
|
|
67
|
+
"aria-label": ariaLabel,
|
|
68
|
+
"aria-hidden": ariaLabel ? void 0 : true,
|
|
69
|
+
className: cn(
|
|
70
|
+
"grid aspect-square grid-cols-4 grid-rows-4",
|
|
71
|
+
className
|
|
72
|
+
),
|
|
73
|
+
...props,
|
|
74
|
+
children: cells.map((cell, index) => /* @__PURE__ */ jsx(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
style: { backgroundColor: cell === "blank" ? void 0 : ISOTYPE_COLORS[cell] }
|
|
78
|
+
},
|
|
79
|
+
index
|
|
80
|
+
))
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { ISOTYPE_COLORS as I, ISOTYPE_PATTERNS as a, ISOTYPE_PATTERN_IDS as b, Isotype as c, getIsotypeVariant as g, mulberry32 as m };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { c as cn } from './button-DFa-rtPy.js';
|
|
3
|
+
|
|
4
|
+
const ISOTYPE_COLORS = {
|
|
5
|
+
purple: "#5A4A96",
|
|
6
|
+
blue: "#1899AF",
|
|
7
|
+
magenta: "#C45BAA",
|
|
8
|
+
yellow: "#FAF338",
|
|
9
|
+
green: "#2E8B5A",
|
|
10
|
+
red: "#DE5B48",
|
|
11
|
+
brown: "#2A2415"
|
|
12
|
+
};
|
|
13
|
+
const ISOTYPE_PATTERNS = {
|
|
14
|
+
core: [
|
|
15
|
+
"purple",
|
|
16
|
+
"blue",
|
|
17
|
+
"blue",
|
|
18
|
+
"blue",
|
|
19
|
+
"magenta",
|
|
20
|
+
"blank",
|
|
21
|
+
"yellow",
|
|
22
|
+
"green",
|
|
23
|
+
"magenta",
|
|
24
|
+
"yellow",
|
|
25
|
+
"yellow",
|
|
26
|
+
"green",
|
|
27
|
+
"magenta",
|
|
28
|
+
"red",
|
|
29
|
+
"red",
|
|
30
|
+
"brown"
|
|
31
|
+
]
|
|
32
|
+
};
|
|
33
|
+
const ISOTYPE_PATTERN_IDS = Object.keys(ISOTYPE_PATTERNS);
|
|
34
|
+
function mulberry32(seed) {
|
|
35
|
+
let a = seed >>> 0;
|
|
36
|
+
return () => {
|
|
37
|
+
a |= 0;
|
|
38
|
+
a = a + 1831565813 | 0;
|
|
39
|
+
let t = Math.imul(a ^ a >>> 15, 1 | a);
|
|
40
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
41
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function getIsotypeVariant(patternId, seed) {
|
|
45
|
+
const base = ISOTYPE_PATTERNS[patternId];
|
|
46
|
+
const candidateIndices = base.reduce(
|
|
47
|
+
(acc, cell, i) => cell === "blank" ? acc : [...acc, i],
|
|
48
|
+
[]
|
|
49
|
+
);
|
|
50
|
+
const rng = mulberry32(seed);
|
|
51
|
+
const chosen = candidateIndices[Math.floor(rng() * candidateIndices.length)];
|
|
52
|
+
return base.map((cell, i) => i === chosen ? "blank" : cell);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function Isotype({
|
|
56
|
+
pattern = "core",
|
|
57
|
+
variantSeed,
|
|
58
|
+
className,
|
|
59
|
+
"aria-label": ariaLabel,
|
|
60
|
+
...props
|
|
61
|
+
}) {
|
|
62
|
+
const cells = variantSeed === void 0 ? ISOTYPE_PATTERNS[pattern] : getIsotypeVariant(pattern, variantSeed);
|
|
63
|
+
return /* @__PURE__ */ jsx(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
role: ariaLabel ? "img" : void 0,
|
|
67
|
+
"aria-label": ariaLabel,
|
|
68
|
+
"aria-hidden": ariaLabel ? void 0 : true,
|
|
69
|
+
className: cn(
|
|
70
|
+
"grid aspect-square grid-cols-4 grid-rows-4 ring-1 ring-foreground/15",
|
|
71
|
+
className
|
|
72
|
+
),
|
|
73
|
+
...props,
|
|
74
|
+
children: cells.map((cell, index) => /* @__PURE__ */ jsx(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
style: { backgroundColor: cell === "blank" ? void 0 : ISOTYPE_COLORS[cell] }
|
|
78
|
+
},
|
|
79
|
+
index
|
|
80
|
+
))
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { ISOTYPE_COLORS as I, ISOTYPE_PATTERNS as a, ISOTYPE_PATTERN_IDS as b, Isotype as c, getIsotypeVariant as g };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
const button = require('./button-DVhloDtr.cjs');
|
|
5
|
+
|
|
6
|
+
const ISOTYPE_COLORS = {
|
|
7
|
+
purple: "#5A4A96",
|
|
8
|
+
blue: "#1899AF",
|
|
9
|
+
magenta: "#C45BAA",
|
|
10
|
+
yellow: "#FAF338",
|
|
11
|
+
green: "#2E8B5A",
|
|
12
|
+
red: "#DE5B48",
|
|
13
|
+
brown: "#2A2415"
|
|
14
|
+
};
|
|
15
|
+
const ISOTYPE_PATTERNS = {
|
|
16
|
+
core: [
|
|
17
|
+
"purple",
|
|
18
|
+
"blue",
|
|
19
|
+
"blue",
|
|
20
|
+
"blue",
|
|
21
|
+
"magenta",
|
|
22
|
+
"blank",
|
|
23
|
+
"yellow",
|
|
24
|
+
"green",
|
|
25
|
+
"magenta",
|
|
26
|
+
"yellow",
|
|
27
|
+
"yellow",
|
|
28
|
+
"green",
|
|
29
|
+
"magenta",
|
|
30
|
+
"red",
|
|
31
|
+
"red",
|
|
32
|
+
"brown"
|
|
33
|
+
]
|
|
34
|
+
};
|
|
35
|
+
const ISOTYPE_PATTERN_IDS = Object.keys(ISOTYPE_PATTERNS);
|
|
36
|
+
function mulberry32(seed) {
|
|
37
|
+
let a = seed >>> 0;
|
|
38
|
+
return () => {
|
|
39
|
+
a |= 0;
|
|
40
|
+
a = a + 1831565813 | 0;
|
|
41
|
+
let t = Math.imul(a ^ a >>> 15, 1 | a);
|
|
42
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
43
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function getIsotypeVariant(patternId, seed) {
|
|
47
|
+
const base = ISOTYPE_PATTERNS[patternId];
|
|
48
|
+
const candidateIndices = base.reduce(
|
|
49
|
+
(acc, cell, i) => cell === "blank" ? acc : [...acc, i],
|
|
50
|
+
[]
|
|
51
|
+
);
|
|
52
|
+
const rng = mulberry32(seed);
|
|
53
|
+
const chosen = candidateIndices[Math.floor(rng() * candidateIndices.length)];
|
|
54
|
+
return base.map((cell, i) => i === chosen ? "blank" : cell);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function Isotype({
|
|
58
|
+
pattern = "core",
|
|
59
|
+
variantSeed,
|
|
60
|
+
className,
|
|
61
|
+
"aria-label": ariaLabel,
|
|
62
|
+
...props
|
|
63
|
+
}) {
|
|
64
|
+
const cells = variantSeed === void 0 ? ISOTYPE_PATTERNS[pattern] : getIsotypeVariant(pattern, variantSeed);
|
|
65
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
role: ariaLabel ? "img" : void 0,
|
|
69
|
+
"aria-label": ariaLabel,
|
|
70
|
+
"aria-hidden": ariaLabel ? void 0 : true,
|
|
71
|
+
className: button.cn(
|
|
72
|
+
"grid aspect-square grid-cols-4 grid-rows-4",
|
|
73
|
+
className
|
|
74
|
+
),
|
|
75
|
+
...props,
|
|
76
|
+
children: cells.map((cell, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
style: { backgroundColor: cell === "blank" ? void 0 : ISOTYPE_COLORS[cell] }
|
|
80
|
+
},
|
|
81
|
+
index
|
|
82
|
+
))
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
exports.ISOTYPE_COLORS = ISOTYPE_COLORS;
|
|
88
|
+
exports.ISOTYPE_PATTERNS = ISOTYPE_PATTERNS;
|
|
89
|
+
exports.ISOTYPE_PATTERN_IDS = ISOTYPE_PATTERN_IDS;
|
|
90
|
+
exports.Isotype = Isotype;
|
|
91
|
+
exports.getIsotypeVariant = getIsotypeVariant;
|
|
92
|
+
exports.mulberry32 = mulberry32;
|