UNPKG

@spark-ui/components

Version:

Spark (Leboncoin design system) components.

1 lines 3.31 kB
{"version":3,"sources":["../../src/link-box/LinkBox.tsx","../../src/link-box/LinkBoxLink.tsx","../../src/link-box/LinkBoxRaised.tsx","../../src/link-box/index.ts"],"sourcesContent":["import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithRef } from 'react'\n\nimport { Slot } from '../slot'\n\nexport interface LinkBoxProps extends ComponentPropsWithRef<'div'> {\n asChild?: boolean\n}\n\nexport const LinkBox = ({ className, asChild, ref, ...props }: LinkBoxProps) => {\n const Component = asChild ? Slot : 'div'\n\n return (\n <Component\n ref={ref}\n data-spark-component=\"link-box\"\n className={cx('relative', className)}\n {...props}\n />\n )\n}\n\nLinkBox.displayName = 'LinkBox'\n","import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithRef } from 'react'\n\nimport { Slot } from '../slot'\n\nexport interface LinkBoxLinkProps extends ComponentPropsWithRef<'a'> {\n asChild?: boolean\n}\n\nexport const LinkBoxLink = ({ className, asChild, ref, ...props }: LinkBoxLinkProps) => {\n const Component = asChild ? Slot : 'a'\n\n return (\n <Component\n ref={ref}\n data-spark-component=\"link-box-link\"\n className={cx(\n \"before:z-base static before:absolute before:top-0 before:left-0 before:block before:size-full before:content-['']\",\n className\n )}\n {...props}\n />\n )\n}\n\nLinkBoxLink.displayName = 'LinkBox.Link'\n","import { cx } from 'class-variance-authority'\nimport { ReactNode } from 'react'\n\nimport { Slot } from '../slot'\n\nexport interface LinkBoxRaisedProps {\n className?: string\n children: ReactNode\n}\n\nexport const LinkBoxRaised = ({ className, ...props }: LinkBoxRaisedProps) => {\n return <Slot className={cx('z-raised relative', className)} {...props} />\n}\n\nLinkBoxRaised.displayName = 'LinkBox.Raised'\n","import { LinkBox as Root } from './LinkBox'\nimport { LinkBoxLink } from './LinkBoxLink'\nimport { LinkBoxRaised } from './LinkBoxRaised'\n\nexport const LinkBox: typeof Root & {\n Link: typeof LinkBoxLink\n Raised: typeof LinkBoxRaised\n} = Object.assign(Root, { Link: LinkBoxLink, Raised: LinkBoxRaised })\n\nLinkBox.displayName = 'LinkBox'\nLinkBox.Link.displayName = 'LinkBox.Link'\nLinkBox.Raised.displayName = 'LinkBox.Raised'\n\nexport { type LinkBoxProps } from './LinkBox'\nexport { type LinkBoxLinkProps } from './LinkBoxLink'\n"],"mappings":";;;;;AAAA,SAAS,UAAU;AAaf;AAJG,IAAM,UAAU,CAAC,EAAE,WAAW,SAAS,KAAK,GAAG,MAAM,MAAoB;AAC9E,QAAM,YAAY,UAAU,OAAO;AAEnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,wBAAqB;AAAA,MACrB,WAAW,GAAG,YAAY,SAAS;AAAA,MAClC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,QAAQ,cAAc;;;ACtBtB,SAAS,MAAAA,WAAU;AAaf,gBAAAC,YAAA;AAJG,IAAM,cAAc,CAAC,EAAE,WAAW,SAAS,KAAK,GAAG,MAAM,MAAwB;AACtF,QAAM,YAAY,UAAU,OAAO;AAEnC,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,wBAAqB;AAAA,MACrB,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,YAAY,cAAc;;;ACzB1B,SAAS,MAAAC,WAAU;AAWV,gBAAAC,YAAA;AADF,IAAM,gBAAgB,CAAC,EAAE,WAAW,GAAG,MAAM,MAA0B;AAC5E,SAAO,gBAAAA,KAAC,QAAK,WAAWC,IAAG,qBAAqB,SAAS,GAAI,GAAG,OAAO;AACzE;AAEA,cAAc,cAAc;;;ACVrB,IAAMC,WAGT,OAAO,OAAO,SAAM,EAAE,MAAM,aAAa,QAAQ,cAAc,CAAC;AAEpEA,SAAQ,cAAc;AACtBA,SAAQ,KAAK,cAAc;AAC3BA,SAAQ,OAAO,cAAc;","names":["cx","jsx","cx","cx","jsx","cx","LinkBox"]}