@anker-in/headless-ui 0.0.27-alpha.1 → 0.0.27-alpha.2
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var H=Object.create;var i=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var z=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},g=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of V(e))!C.call(t,n)&&n!==o&&i(t,n,{get:()=>e[n],enumerable:!(a=R(e,n))||a.enumerable});return t};var E=(t,e,o)=>(o=t!=null?H(w(t)):{},g(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),N=t=>g(i({},"__esModule",{value:!0}),t);var T={};z(T,{Heading:()=>l});module.exports=N(T);var r=require("react/jsx-runtime"),h=require("../helpers/index.js"),x=require("@radix-ui/react-slot"),m=require("class-variance-authority"),c=E(require("react"));const S=(0,m.cva)("leading-tight tracking text-info-primary",{variants:{size:{1:"text-heading-1 lg-desktop:text-[16px]",2:"text-heading-2 lg-desktop:text-[24px]",3:"text-heading-3 lg-desktop:text-[32px]",4:"text-hedaing-4 desktop:text-[36px] lg-desktop:text-[48px]",5:"text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]"},weight:{medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:5,weight:"bold"}}),l=c.default.forwardRef((t,e)=>{const{children:o,className:a,size:n=5,align:f,weight:k,asChild:b,as:y="h1",color:s,html:d,...P}=t,p=d?{dangerouslySetInnerHTML:{__html:d}}:null,u=s?{style:{color:s}}:null;return(0,r.jsx)(x.Slot,{...P,ref:e,className:(0,h.cn)(S({size:n,weight:k,align:f}),a),...p,...u,children:b?o:(0,r.jsx)(y,{children:p?null:o})})});l.displayName="Heading";
|
|
2
2
|
//# sourceMappingURL=heading.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/heading.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('leading-tight tracking text-info-primary', {\n variants: {\n size: {\n 1: 'text-heading-1',\n 2: 'text-heading-2',\n 3: 'text-heading-3',\n 4: 'text-hedaing-4',\n 5: 'text-heading-5',\n },\n weight: {\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extraBold: 'font-extrabold',\n black: 'font-black',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 5,\n weight: 'bold',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size = 5, align, weight, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAwE4B,IAAAI,EAAA,6BAxE5BC,EAAmB,+BACnBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAkB,oBAElB,MAAMC,KAAkB,OAAI,2CAA4C,CACtE,SAAU,CACR,KAAM,CACJ,EAAG,
|
|
4
|
+
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('leading-tight tracking text-info-primary', {\n variants: {\n size: {\n 1: 'text-heading-1 lg-desktop:text-[16px]',\n 2: 'text-heading-2 lg-desktop:text-[24px]',\n 3: 'text-heading-3 lg-desktop:text-[32px]',\n 4: 'text-hedaing-4 desktop:text-[36px] lg-desktop:text-[48px]',\n 5: 'text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]',\n },\n weight: {\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extraBold: 'font-extrabold',\n black: 'font-black',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 5,\n weight: 'bold',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size = 5, align, weight, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAwE4B,IAAAI,EAAA,6BAxE5BC,EAAmB,+BACnBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAkB,oBAElB,MAAMC,KAAkB,OAAI,2CAA4C,CACtE,SAAU,CACR,KAAM,CACJ,EAAG,wCACH,EAAG,wCACH,EAAG,wCACH,EAAG,4DACH,EAAG,2DACL,EACA,OAAQ,CACN,OAAQ,cACR,SAAU,gBACV,KAAM,YACN,UAAW,iBACX,MAAO,YACT,EACA,MAAO,CACL,KAAM,YACN,OAAQ,cACR,MAAO,YACT,CACF,EACA,gBAAiB,CACf,KAAM,EACN,OAAQ,MACV,CACF,CAAC,EAWKP,EAAU,EAAAQ,QAAM,WAAyC,CAACC,EAAOC,IAAiB,CACtF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAO,EAAG,MAAAC,EAAO,OAAAC,EAAQ,QAAAC,EAAS,GAAIC,EAAM,KAAM,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAa,EAAIX,EAC1GY,EAAmBF,EACrB,CACA,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACE,KAEEG,EAAaJ,EACf,CACA,MAAO,CACL,MAAAA,CACF,CACF,EACE,KACJ,SACE,OAAC,QACE,GAAGE,EACJ,IAAKV,EACL,aAAW,MACTH,EAAgB,CACd,KAAAM,EACA,OAAAE,EACA,MAAAD,CACF,CAAC,EACDF,CACF,EACC,GAAGS,EACH,GAAGC,EAEH,SAAAN,EAAUL,KAAW,OAACM,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EAEDX,EAAQ,YAAc",
|
|
6
6
|
"names": ["heading_exports", "__export", "Heading", "__toCommonJS", "import_jsx_runtime", "import_helpers", "import_react_slot", "import_class_variance_authority", "import_react", "headingVariants", "React", "props", "forwardedRef", "children", "className", "size", "align", "weight", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{cn as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{cn as f}from"../helpers/index.js";import{Slot as k}from"@radix-ui/react-slot";import{cva as b}from"class-variance-authority";import y from"react";const P=b("leading-tight tracking text-info-primary",{variants:{size:{1:"text-heading-1 lg-desktop:text-[16px]",2:"text-heading-2 lg-desktop:text-[24px]",3:"text-heading-3 lg-desktop:text-[32px]",4:"text-hedaing-4 desktop:text-[36px] lg-desktop:text-[48px]",5:"text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]"},weight:{medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:5,weight:"bold"}}),a=y.forwardRef((l,r)=>{const{children:t,className:s,size:d=5,align:p,weight:g,asChild:h,as:x="h1",color:e,html:o,...m}=l,n=o?{dangerouslySetInnerHTML:{__html:o}}:null,c=e?{style:{color:e}}:null;return i(k,{...m,ref:r,className:f(P({size:d,weight:g,align:p}),s),...n,...c,children:h?t:i(x,{children:n?null:t})})});a.displayName="Heading";export{a as Heading};
|
|
2
2
|
//# sourceMappingURL=heading.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/heading.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('leading-tight tracking text-info-primary', {\n variants: {\n size: {\n 1: 'text-heading-1',\n 2: 'text-heading-2',\n 3: 'text-heading-3',\n 4: 'text-hedaing-4',\n 5: 'text-heading-5',\n },\n weight: {\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extraBold: 'font-extrabold',\n black: 'font-black',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 5,\n weight: 'bold',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size = 5, align, weight, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
|
|
5
|
-
"mappings": "AAwE4B,cAAAA,MAAA,oBAxE5B,OAAS,MAAAC,MAAU,sBACnB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BACvC,OAAOC,MAAW,QAElB,MAAMC,EAAkBF,EAAI,2CAA4C,CACtE,SAAU,CACR,KAAM,CACJ,EAAG,
|
|
4
|
+
"sourcesContent": ["import { cn } from '../helpers/index.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nconst headingVariants = cva('leading-tight tracking text-info-primary', {\n variants: {\n size: {\n 1: 'text-heading-1 lg-desktop:text-[16px]',\n 2: 'text-heading-2 lg-desktop:text-[24px]',\n 3: 'text-heading-3 lg-desktop:text-[32px]',\n 4: 'text-hedaing-4 desktop:text-[36px] lg-desktop:text-[48px]',\n 5: 'text-heading-5 desktop:text-[48px] lg-desktop:text-[64px]',\n },\n weight: {\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extraBold: 'font-extrabold',\n black: 'font-black',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 5,\n weight: 'bold',\n },\n})\n\ntype HeadingElement = React.ElementRef<'h1'>\n\ninterface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n asChild?: boolean\n color?: string\n html?: string\n}\n\nconst Heading = React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const { children, className, size = 5, align, weight, asChild, as: Tag = 'h1', color, html, ...headingProps } = props\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: html },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n return (\n <Slot\n {...headingProps}\n ref={forwardedRef}\n className={cn(\n headingVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\n\nHeading.displayName = 'Heading'\n\nexport { Heading }\nexport type { HeadingProps }\n"],
|
|
5
|
+
"mappings": "AAwE4B,cAAAA,MAAA,oBAxE5B,OAAS,MAAAC,MAAU,sBACnB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BACvC,OAAOC,MAAW,QAElB,MAAMC,EAAkBF,EAAI,2CAA4C,CACtE,SAAU,CACR,KAAM,CACJ,EAAG,wCACH,EAAG,wCACH,EAAG,wCACH,EAAG,4DACH,EAAG,2DACL,EACA,OAAQ,CACN,OAAQ,cACR,SAAU,gBACV,KAAM,YACN,UAAW,iBACX,MAAO,YACT,EACA,MAAO,CACL,KAAM,YACN,OAAQ,cACR,MAAO,YACT,CACF,EACA,gBAAiB,CACf,KAAM,EACN,OAAQ,MACV,CACF,CAAC,EAWKG,EAAUF,EAAM,WAAyC,CAACG,EAAOC,IAAiB,CACtF,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAO,EAAG,MAAAC,EAAO,OAAAC,EAAQ,QAAAC,EAAS,GAAIC,EAAM,KAAM,MAAAC,EAAO,KAAAC,EAAM,GAAGC,CAAa,EAAIX,EAC1GY,EAAmBF,EACrB,CACA,wBAAyB,CAAE,OAAQA,CAAK,CAC1C,EACE,KAEEG,EAAaJ,EACf,CACA,MAAO,CACL,MAAAA,CACF,CACF,EACE,KACJ,OACEhB,EAACE,EAAA,CACE,GAAGgB,EACJ,IAAKV,EACL,UAAWP,EACTI,EAAgB,CACd,KAAAM,EACA,OAAAE,EACA,MAAAD,CACF,CAAC,EACDF,CACF,EACC,GAAGS,EACH,GAAGC,EAEH,SAAAN,EAAUL,EAAWT,EAACe,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EAEDH,EAAQ,YAAc",
|
|
6
6
|
"names": ["jsx", "cn", "Slot", "cva", "React", "headingVariants", "Heading", "props", "forwardedRef", "children", "className", "size", "align", "weight", "asChild", "Tag", "color", "html", "headingProps", "htmlContentProps", "styleProps"]
|
|
7
7
|
}
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -1242,22 +1242,22 @@ video {
|
|
|
1242
1242
|
line-height: 1.5rem;
|
|
1243
1243
|
}
|
|
1244
1244
|
.text-heading-1 {
|
|
1245
|
-
font-size:
|
|
1245
|
+
font-size: 14px;
|
|
1246
1246
|
line-height: 120%;
|
|
1247
1247
|
letter-spacing: -0.48px;
|
|
1248
1248
|
}
|
|
1249
1249
|
.text-heading-2 {
|
|
1250
|
-
font-size:
|
|
1250
|
+
font-size: 20px;
|
|
1251
1251
|
line-height: 120%;
|
|
1252
1252
|
letter-spacing: -0.64px;
|
|
1253
1253
|
}
|
|
1254
1254
|
.text-heading-3 {
|
|
1255
|
-
font-size:
|
|
1255
|
+
font-size: 24px;
|
|
1256
1256
|
line-height: 120%;
|
|
1257
1257
|
letter-spacing: -0.8px;
|
|
1258
1258
|
}
|
|
1259
1259
|
.text-heading-5 {
|
|
1260
|
-
font-size:
|
|
1260
|
+
font-size: 40px;
|
|
1261
1261
|
line-height: 120%;
|
|
1262
1262
|
letter-spacing: -1.12px;
|
|
1263
1263
|
}
|
|
@@ -1663,6 +1663,12 @@ video {
|
|
|
1663
1663
|
margin-left: 4rem;
|
|
1664
1664
|
margin-right: 4rem;
|
|
1665
1665
|
}
|
|
1666
|
+
.desktop\:text-\[36px\] {
|
|
1667
|
+
font-size: 36px;
|
|
1668
|
+
}
|
|
1669
|
+
.desktop\:text-\[48px\] {
|
|
1670
|
+
font-size: 48px;
|
|
1671
|
+
}
|
|
1666
1672
|
}
|
|
1667
1673
|
@media (min-width: var(--breakpoint-xl)) {
|
|
1668
1674
|
.lg-desktop\:mx-auto {
|
|
@@ -1682,6 +1688,21 @@ video {
|
|
|
1682
1688
|
.lg-desktop\:pt-\[32px\] {
|
|
1683
1689
|
padding-top: 32px;
|
|
1684
1690
|
}
|
|
1691
|
+
.lg-desktop\:text-\[16px\] {
|
|
1692
|
+
font-size: 16px;
|
|
1693
|
+
}
|
|
1694
|
+
.lg-desktop\:text-\[24px\] {
|
|
1695
|
+
font-size: 24px;
|
|
1696
|
+
}
|
|
1697
|
+
.lg-desktop\:text-\[32px\] {
|
|
1698
|
+
font-size: 32px;
|
|
1699
|
+
}
|
|
1700
|
+
.lg-desktop\:text-\[48px\] {
|
|
1701
|
+
font-size: 48px;
|
|
1702
|
+
}
|
|
1703
|
+
.lg-desktop\:text-\[64px\] {
|
|
1704
|
+
font-size: 64px;
|
|
1705
|
+
}
|
|
1685
1706
|
}
|
|
1686
1707
|
.\[\&\>\*\]\:\!invisible>* {
|
|
1687
1708
|
visibility: hidden !important;
|