v12-ui
Version:
A React component library with a focus on utility-first design and accessibility.
2 lines (1 loc) • 2.61 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),u=require("react"),v=require("../utils/utils.cjs"),p=require("class-variance-authority"),d=p.cva("",{variants:{variant:{default:"text-text-default",primary:"text-text-primary",secondary:"text-text-secondary",muted:"text-text-muted",accent:"text-text-accent",success:"text-text-success",warning:"text-text-warning",error:"text-text-error",info:"text-text-info"},hover:{true:"",false:""},textShadow:{none:"",black_p:"text-shadow-shadow-black-p",black_title:"text-shadow-shadow-black-title",success_p:"text-shadow-shadow-success-p",success_title:"text-shadow-shadow-success-title",warning_p:"text-shadow-shadow-warning-p",warning_title:"text-shadow-shadow-warning-title",error_p:"text-shadow-shadow-error-p",error_title:"text-shadow-shadow-error-title",info_p:"text-shadow-shadow-info-p",info_title:"text-shadow-shadow-info-title"},fontSize:{small_responsive:"size-text-small",paragraph_responsive:"size-text-paragraph",subtitle_responsive:"size-text-subtitle",title_responsive:"size-text-title"},fontWeight:{auto:"",small:"font-weight-small",paragraph:"font-weight-paragraph",subtitle:"font-weight-subtitle",title:"font-weight-title"}},compoundVariants:[{variant:"default",hover:!0,className:"hover:text-text-inverse"},{variant:"primary",hover:!0,className:"hover:text-text-primary-hover"},{variant:"secondary",hover:!0,className:"hover:text-text-secondary-hover"},{variant:"muted",hover:!0,className:"hover:text-text-muted-hover"},{variant:"accent",hover:!0,className:"hover:text-text-accent-hover"},{variant:"success",hover:!0,className:"hover:text-text-success-hover"},{variant:"warning",hover:!0,className:"hover:text-text-warning-hover"},{variant:"error",hover:!0,className:"hover:text-text-error-hover"},{variant:"info",hover:!0,className:"hover:text-text-info-hover"},{fontSize:"small_responsive",fontWeight:"auto",className:"font-weight-small"},{fontSize:"paragraph_responsive",fontWeight:"auto",className:"font-weight-paragraph"},{fontSize:"subtitle_responsive",fontWeight:"auto",className:"font-weight-subtitle"},{fontSize:"title_responsive",fontWeight:"auto",className:"font-weight-title"}],defaultVariants:{variant:"default",hover:!1,textShadow:"none",fontSize:"paragraph_responsive",fontWeight:"auto"}});function f({as:t,children:e,variant:a,hover:r,textShadow:s,fontSize:o,fontWeight:i,className:n,...h},l){const c=t||"p";return x.jsx(c,{ref:l,...h,className:v.cn(d({variant:a,hover:r,textShadow:s,fontSize:o,fontWeight:i}),"",n),children:e})}const w=u.forwardRef(f);exports.Text=w;