@atom-learning/components 3.27.0-beta.5 → 3.27.1
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 +208 -0
- package/dist/components/accordion/AccordionTrigger.d.ts +1 -1
- package/dist/components/accordion/AccordionTrigger.js +1 -1
- package/dist/components/accordion/AccordionTrigger.js.map +1 -1
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/action-icon/ActionIcon.js.map +1 -1
- package/dist/components/banner/banner-regular/BannerRegular.d.ts +0 -1
- package/dist/components/banner/banner-regular/BannerRegularActions.js +1 -1
- package/dist/components/banner/banner-slim/BannerSlim.d.ts +0 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/calendar/Day.js +1 -1
- package/dist/components/calendar/Day.js.map +1 -1
- package/dist/components/create-password-field/CreatePasswordField.js +1 -1
- package/dist/components/data-table/DataTable.d.ts +44 -9
- package/dist/components/data-table/DataTableTable.js +1 -1
- package/dist/components/data-table/DataTableTable.js.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +1 -2
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.d.ts +1 -2
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js.map +1 -1
- package/dist/components/empty-state/EmptyState.context.d.ts +8 -0
- package/dist/components/empty-state/EmptyState.context.js +2 -0
- package/dist/components/empty-state/EmptyState.context.js.map +1 -0
- package/dist/components/empty-state/EmptyState.d.ts +374 -738
- package/dist/components/empty-state/EmptyState.js +1 -1
- package/dist/components/empty-state/EmptyState.js.map +1 -1
- package/dist/components/empty-state/EmptyStateBody.d.ts +9 -4
- package/dist/components/empty-state/EmptyStateBody.js +1 -1
- package/dist/components/empty-state/EmptyStateBody.js.map +1 -1
- package/dist/components/empty-state/EmptyStateImage.d.ts +1 -2
- package/dist/components/empty-state/EmptyStateImage.js +1 -1
- package/dist/components/empty-state/EmptyStateImage.js.map +1 -1
- package/dist/components/empty-state/EmptyStateTitle.d.ts +7 -1
- package/dist/components/empty-state/EmptyStateTitle.js +1 -1
- package/dist/components/empty-state/EmptyStateTitle.js.map +1 -1
- package/dist/components/form/Form.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/input/Input.d.ts +1504 -7
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/link/Link.js +1 -1
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/navigation/NavigationMenuLink.js +1 -1
- package/dist/components/navigation/NavigationMenuLink.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.d.ts +2 -2
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js.map +1 -1
- package/dist/components/side-bar/SideBar.d.ts +360 -364
- package/dist/components/side-bar/SideBarComponents.d.ts +8 -10
- package/dist/components/side-bar/SideBarComponents.js +1 -1
- package/dist/components/side-bar/SideBarComponents.js.map +1 -1
- package/dist/components/stepper/Stepper.js +1 -1
- package/dist/components/table/Table.d.ts +6 -2
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/TableStickyColumnsContainer.d.ts +3 -1
- package/dist/components/table/TableStickyColumnsContainer.js +1 -1
- package/dist/components/table/TableStickyColumnsContainer.js.map +1 -1
- package/dist/components/table/useStickyColumnsCss.d.ts +6 -1
- package/dist/components/table/useStickyColumnsCss.js +1 -1
- package/dist/components/table/useStickyColumnsCss.js.map +1 -1
- package/dist/components/tile-interactive/TileInteractive.d.ts +3 -1
- package/dist/components/tile-interactive/TileInteractive.js +1 -1
- package/dist/components/tile-interactive/TileInteractive.js.map +1 -1
- package/dist/components/tile-toggle-group/TileToggleGroupItem.d.ts +2 -0
- package/dist/components/top-bar/TopBar.d.ts +360 -364
- package/dist/components/top-bar/TopBarBrand.d.ts +1 -2
- package/dist/components/top-bar/TopBarBrand.js +1 -1
- package/dist/components/top-bar/TopBarBrand.js.map +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/dist/types/navigatorActions.types.d.ts +0 -1
- package/dist/utilities/uri/index.d.ts +0 -2
- package/dist/utilities/uri/index.js +1 -1
- package/dist/utilities/uri/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/context/router/index.d.ts +0 -11
- package/dist/context/router/index.js +0 -2
- package/dist/context/router/index.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from"react";import{styled as m}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import"../../utilities/style/keyframe-animations.js";import{overrideStitchesVariantValue as l}from"../../utilities/override-stitches-variant-value/overrideStitchesVariantValue.js";import{disabledStyle as c}from"../../utilities/style/disabledStyle.js";import{Flex as b}from"../flex/Flex.js";import{Text as g}from"../text/Text.js";const s=m(b,{background:"white",color:"$grey1000",border:"1px solid $grey800",borderRadius:"$0",transition:"background 100ms ease-out, borderColor 100ms ease-out",width:"100%","&:focus-within":{borderColor:"$blue800"},variants:{size:{sm:{height:"$3"},md:{height:"$4"},lg:{height:"$5"},xl:{height:"$6"}},disabled:{true:c},state:{error:{borderColor:"$danger"}}}});s.displayName="InputBackground";const h=m.withConfig({shouldForwardStitchesProp:e=>["as"].includes(e)})(g,{appearance:"none",border:"none",background:"none",backgroundImage:"none",backgroundColor:"transparent",boxShadow:"none",boxSizing:"border-box","&:focus":{outline:"none"},px:"$3",size:"100%"}),f={sm:"sm",md:"md",lg:"md",xl:"lg"},a=r.forwardRef(({type:e="text",css:d,size:o,...t},n)=>{const i=r.useMemo(()=>l(o,u=>f[u]),[o]);return r.createElement(h,{ref:n,as:"input",type:e==="number"?"text":e,inputMode:e==="number"?"numeric":void 0,pattern:e==="number"?"[0-9]*":void 0,size:i,...t})});a.displayName="InputText";const p=r.forwardRef(({size:e="md",state:d,disabled:o,css:t,...n},i)=>r.createElement(s,{size:e,disabled:o,state:d,css:t},r.createElement(a,{size:e,ref:i,disabled:o,...n})));p.displayName="Input";export{p as Input,s as InputBackground,a as InputText};
|
|
2
2
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../src/components/input/Input.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { disabledStyle } from '~/utilities'\nimport {
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../src/components/input/Input.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { disabledStyle } from '~/utilities'\nimport { overrideStitchesVariantValue } from '~/utilities/override-stitches-variant-value/overrideStitchesVariantValue'\n\nimport { Flex } from '../flex'\nimport { Text } from '../text'\n\nexport const InputBackground = styled(Flex, {\n background: 'white',\n color: '$grey1000',\n border: '1px solid $grey800',\n borderRadius: '$0',\n transition: 'background 100ms ease-out, borderColor 100ms ease-out',\n width: '100%',\n '&:focus-within': {\n borderColor: '$blue800'\n },\n variants: {\n size: {\n sm: {\n height: '$3'\n },\n md: {\n height: '$4'\n },\n lg: {\n height: '$5'\n },\n xl: {\n height: '$6'\n }\n },\n disabled: {\n true: disabledStyle\n },\n state: {\n error: {\n borderColor: '$danger'\n }\n }\n }\n})\n\nInputBackground.displayName = 'InputBackground'\n\nconst StyledInputText = styled.withConfig({\n shouldForwardStitchesProp: (propName) => ['as'].includes(propName)\n})(Text as unknown as 'input', {\n // unsets\n appearance: 'none',\n border: 'none',\n background: 'none',\n backgroundImage: 'none',\n backgroundColor: 'transparent',\n boxShadow: 'none', // prevent default iOS default styling\n boxSizing: 'border-box',\n '&:focus': {\n outline: 'none'\n },\n //\n px: '$3',\n size: '100%'\n})\n\nexport type InputTextProps = Omit<\n React.ComponentProps<typeof StyledInputText>,\n 'size' | 'type' | 'as'\n> & {\n size: React.ComponentProps<typeof Text>['size']\n // override default 'type' property to prevent Input from being used to render\n // checkboxes, radios etc — we have dedicated components for them\n type?: 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'search'\n as?: never\n}\n\nconst toTextSize = {\n sm: 'sm',\n md: 'md',\n lg: 'md',\n xl: 'lg'\n}\n\nexport const InputText = React.forwardRef(\n (\n { type = 'text', css, size, ...rest }: InputTextProps,\n ref: React.ForwardedRef<HTMLInputElement>\n ) => {\n const textSize = React.useMemo(\n () => overrideStitchesVariantValue(size, (s) => toTextSize[s]),\n [size]\n )\n\n return (\n <StyledInputText\n ref={ref}\n as=\"input\"\n type={type === 'number' ? 'text' : type}\n inputMode={type === 'number' ? 'numeric' : undefined}\n pattern={type === 'number' ? '[0-9]*' : undefined}\n size={textSize}\n {...rest}\n />\n )\n }\n)\n\nInputText.displayName = 'InputText'\n\ntype InputBackgroundProps = React.ComponentProps<typeof InputBackground>\nexport type InputProps = Omit<\n React.ComponentProps<typeof InputText>,\n 'size' | 'state'\n> & {\n size?: InputBackgroundProps['size']\n state?: InputBackgroundProps['state']\n}\n\nexport const Input = React.forwardRef(\n (\n { size = 'md', state, disabled, css, ...rest }: InputProps,\n ref: React.ForwardedRef<HTMLInputElement>\n ) => {\n return (\n <InputBackground size={size} disabled={disabled} state={state} css={css}>\n <InputText size={size} ref={ref} disabled={disabled} {...rest} />\n </InputBackground>\n )\n }\n)\n\nInput.displayName = 'Input'\n"],"names":["InputBackground","styled","Flex","disabledStyle","StyledInputText","propName","Text","toTextSize","InputText","React","type","css","size","rest","ref","textSize","overrideStitchesVariantValue","s","Input","state","disabled"],"mappings":"+gBASO,MAAMA,EAAkBC,EAAOC,EAAM,CAC1C,WAAY,QACZ,MAAO,YACP,OAAQ,qBACR,aAAc,KACd,WAAY,wDACZ,MAAO,OACP,iBAAkB,CAChB,YAAa,UACf,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CACF,OAAQ,IACV,EACA,GAAI,CACF,OAAQ,IACV,EACA,GAAI,CACF,OAAQ,IACV,EACA,GAAI,CACF,OAAQ,IACV,CACF,EACA,SAAU,CACR,KAAMC,CACR,EACA,MAAO,CACL,MAAO,CACL,YAAa,SACf,CACF,CACF,CACF,CAAC,EAEDH,EAAgB,YAAc,kBAE9B,MAAMI,EAAkBH,EAAO,WAAW,CACxC,0BAA4BI,GAAa,CAAC,IAAI,EAAE,SAASA,CAAQ,CACnE,CAAC,EAAEC,EAA4B,CAE7B,WAAY,OACZ,OAAQ,OACR,WAAY,OACZ,gBAAiB,OACjB,gBAAiB,cACjB,UAAW,OACX,UAAW,aACX,UAAW,CACT,QAAS,MACX,EAEA,GAAI,KACJ,KAAM,MACR,CAAC,EAaKC,EAAa,CACjB,GAAI,KACJ,GAAI,KACJ,GAAI,KACJ,GAAI,IACN,EAEaC,EAAYC,EAAM,WAC7B,CACE,CAAE,KAAAC,EAAO,OAAQ,IAAAC,EAAK,KAAAC,KAASC,CAAK,EACpCC,IACG,CACH,MAAMC,EAAWN,EAAM,QACrB,IAAMO,EAA6BJ,EAAOK,GAAMV,EAAWU,EAAE,EAC7D,CAACL,CAAI,CACP,EAEA,OACEH,EAAA,cAACL,EAAA,CACC,IAAKU,EACL,GAAG,QACH,KAAMJ,IAAS,SAAW,OAASA,EACnC,UAAWA,IAAS,SAAW,UAAY,OAC3C,QAASA,IAAS,SAAW,SAAW,OACxC,KAAMK,EACL,GAAGF,CAAAA,CACN,CAEJ,CACF,EAEAL,EAAU,YAAc,YAWX,MAAAU,EAAQT,EAAM,WACzB,CACE,CAAE,KAAAG,EAAO,KAAM,MAAAO,EAAO,SAAAC,EAAU,IAAAT,KAAQE,CAAK,EAC7CC,IAGEL,EAAA,cAACT,EAAgB,CAAA,KAAMY,EAAM,SAAUQ,EAAU,MAAOD,EAAO,IAAKR,CAClEF,EAAAA,EAAA,cAACD,EAAA,CAAU,KAAMI,EAAM,IAAKE,EAAK,SAAUM,EAAW,GAAGP,CAAAA,CAAM,CACjE,CAGN,EAEAK,EAAM,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { InputProps } from './Input';
|
|
2
|
-
export { Input } from './Input';
|
|
2
|
+
export { Input, InputBackground, InputText } from './Input';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as o from"react";import{styled as p}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import"../../utilities/style/keyframe-animations.js";import{disabledStyle as d}from"../../utilities/style/disabledStyle.js";import{getExternalAnchorProps as s}from"../../utilities/uri/index.js";import{StyledHeading as l}from"../heading/Heading.js";import{StyledLi as f}from"../list/List.js";import"../markdown-content/components/MarkdownCode.js";import{StyledMarkdownEmphasis as y}from"../markdown-content/components/MarkdownEmphasis.js";import"../markdown-content/components/MarkdownInlineCode.js";import"../image/Image.js";import{StyledText as c,textVariants as b}from"../text/Text.js";import"../markdown-content/components/MarkdownStrong.js";import"../divider/Divider.js";const t=p("a",{bg:"unset",border:"unset",p:"unset",color:"$primary800",cursor:"pointer",fontFamily:"$body",textDecoration:"none","&:focus, &:hover":{color:"$primary900",textDecoration:"underline"},"&:active":{color:"$primary1000"},"&[disabled]":{...d,pointerEvents:"none"},[`${c} > &, ${l} > &, ${f} > &, ${y} > &`]:{fontSize:"100%",lineHeight:1,"&::before, &::after":{content:"none"}},variants:b,defaultVariants:{size:"md"}}),e=o.forwardRef(({as:i,disabled:n,href:r,...m},a)=>o.createElement(t,{as:i||(r?void 0:"button"),noCapsize:r?void 0:!0,href:r,...n&&{disabled:!0},...m,...s(r),ref:a}));e.displayName="Link";export{e as Link,t as StyledLink};
|
|
2
2
|
//# sourceMappingURL=Link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sources":["../../../src/components/link/Link.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {
|
|
1
|
+
{"version":3,"file":"Link.js","sources":["../../../src/components/link/Link.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { NavigatorActions } from '~/types'\nimport { disabledStyle, Override } from '~/utilities'\nimport { getExternalAnchorProps } from '~/utilities/uri'\n\nimport { StyledHeading } from '../heading/Heading'\nimport { StyledLi } from '../list/List'\nimport { StyledMarkdownEmphasis } from '../markdown-content/components'\nimport { StyledText, textVariants } from '../text/Text'\n\nexport const StyledLink = styled('a', {\n bg: 'unset',\n border: 'unset',\n p: 'unset',\n color: '$primary800',\n cursor: 'pointer',\n fontFamily: '$body',\n textDecoration: 'none',\n '&:focus, &:hover': {\n color: '$primary900',\n textDecoration: 'underline'\n },\n '&:active': {\n color: '$primary1000'\n },\n '&[disabled]': {\n ...disabledStyle,\n pointerEvents: 'none'\n },\n\n [`${StyledText} > &, ${StyledHeading} > &, ${StyledLi} > &, ${StyledMarkdownEmphasis} > &`]:\n {\n fontSize: '100%',\n lineHeight: 1,\n '&::before, &::after': {\n content: 'none'\n }\n },\n variants: textVariants,\n defaultVariants: {\n size: 'md'\n }\n})\n\ntype LinkProps = Override<\n React.ComponentProps<typeof StyledLink>,\n {\n as?: React.ComponentType | React.ElementType\n } & NavigatorActions & { disabled?: boolean }\n>\n\nexport const Link: React.ForwardRefExoticComponent<LinkProps> =\n React.forwardRef(({ as, disabled, href, ...rest }, ref) => (\n <StyledLink\n as={as || (!href ? 'button' : undefined)}\n noCapsize={!href ? true : undefined}\n href={href}\n {...(disabled && { disabled: true })}\n {...rest}\n {...getExternalAnchorProps(href)}\n ref={ref}\n />\n ))\n\nLink.displayName = 'Link'\n"],"names":["StyledLink","styled","disabledStyle","StyledText","StyledHeading","StyledLi","StyledMarkdownEmphasis","textVariants","Link","React","as","disabled","href","rest","ref","getExternalAnchorProps"],"mappings":"y2BAYa,MAAAA,EAAaC,EAAO,IAAK,CACpC,GAAI,QACJ,OAAQ,QACR,EAAG,QACH,MAAO,cACP,OAAQ,UACR,WAAY,QACZ,eAAgB,OAChB,mBAAoB,CAClB,MAAO,cACP,eAAgB,WAClB,EACA,WAAY,CACV,MAAO,cACT,EACA,cAAe,CACb,GAAGC,EACH,cAAe,MACjB,EAEA,CAAC,GAAGC,UAAmBC,UAAsBC,UAAiBC,SAC5D,CACE,SAAU,OACV,WAAY,EACZ,sBAAuB,CACrB,QAAS,MACX,CACF,EACF,SAAUC,EACV,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EASYC,EACXC,EAAM,WAAW,CAAC,CAAE,GAAAC,EAAI,SAAAC,EAAU,KAAAC,KAASC,CAAK,EAAGC,IACjDL,EAAA,cAACT,GACC,GAAIU,IAAQE,EAAkB,OAAX,UACnB,UAAYA,EAAc,OAAP,GACnB,KAAMA,EACL,GAAID,GAAY,CAAE,SAAU,EAAK,EACjC,GAAGE,EACH,GAAGE,EAAuBH,CAAI,EAC/B,IAAKE,CAAAA,CACP,CACD,EAEHN,EAAK,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as n from"@radix-ui/react-navigation-menu";import e from"react";import{styled as t}from"../../stitches.js";import{getExternalAnchorProps as u}from"../../utilities/uri/index.js";import{navigationMenuBaseItemStyles as i,navigationMenuDisabledItemStyles as v,navigationMenuActiveItemStyles as b}from"./NavigationMenu.styles.js";const p=t("button",{...i,...v}),f=t(n.Item),g=t(n.Link,i,{display:"block",textDecoration:"none",lineHeight:1,variants:{elementType:{dropdownItem:{"&[data-active]":{background:"$backgroundSelected",color:"$textSelected","&:hover":{background:"$backgroundSelectedHover",color:"$textSelectedHover"},"&:active":{background:"$backgroundSelectedPressed",color:"$textSelectedPressed"},"&:focus-visible":{boxShadow:"0 0 0 2px $colors$primary800",color:"$textSelectedFocus"}}},link:{"&[data-active]":{...b}}}}}),c=e.forwardRef(({children:o,href:r,disabled:l,css:a,variant:d="link",ref:k,...s},m)=>e.createElement(f,null,l?e.createElement(p,{disabled:!0,css:a},o):e.createElement(g,{href:r,ref:m,elementType:d,css:a,...u(r),...s},o)));c.displayName="NavigationMenuLink";export{c as NavigationMenuLink};
|
|
2
2
|
//# sourceMappingURL=NavigationMenuLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuLink.js","sources":["../../../src/components/navigation/NavigationMenuLink.tsx"],"sourcesContent":["import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport {
|
|
1
|
+
{"version":3,"file":"NavigationMenuLink.js","sources":["../../../src/components/navigation/NavigationMenuLink.tsx"],"sourcesContent":["import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/stitches'\nimport { getExternalAnchorProps } from '~/utilities/uri'\n\nimport {\n navigationMenuActiveItemStyles,\n navigationMenuBaseItemStyles,\n navigationMenuDisabledItemStyles\n} from './NavigationMenu.styles'\n\nconst DisabledButton = styled('button', {\n ...navigationMenuBaseItemStyles,\n ...navigationMenuDisabledItemStyles\n})\n\nconst ListItem = styled(NavigationMenuPrimitive.Item)\n\nconst StyledLink = styled(\n NavigationMenuPrimitive.Link,\n navigationMenuBaseItemStyles,\n {\n display: 'block',\n textDecoration: 'none',\n lineHeight: 1,\n variants: {\n elementType: {\n dropdownItem: {\n '&[data-active]': {\n background: '$backgroundSelected',\n color: '$textSelected',\n '&:hover': {\n background: '$backgroundSelectedHover',\n color: '$textSelectedHover'\n },\n '&:active': {\n background: '$backgroundSelectedPressed',\n color: '$textSelectedPressed'\n },\n '&:focus-visible': {\n boxShadow: '0 0 0 2px $colors$primary800',\n color: '$textSelectedFocus'\n }\n }\n },\n link: {\n '&[data-active]': { ...navigationMenuActiveItemStyles }\n }\n }\n }\n }\n)\n\nexport const NavigationMenuLink: React.ForwardRefExoticComponent<\n Omit<React.ComponentProps<typeof StyledLink>, 'elementType'> & {\n disabled?: boolean\n variant?: React.ComponentProps<typeof StyledLink>['elementType']\n }\n> = React.forwardRef(\n (\n { children, href, disabled, css, variant = 'link', ref, ...props },\n forwardedRef\n ) => (\n <ListItem>\n {disabled ? (\n <DisabledButton disabled css={css}>\n {children}\n </DisabledButton>\n ) : (\n <StyledLink\n href={href}\n ref={forwardedRef}\n elementType={variant}\n css={css}\n {...getExternalAnchorProps(href)}\n {...props}\n >\n {children}\n </StyledLink>\n )}\n </ListItem>\n )\n)\n\nNavigationMenuLink.displayName = 'NavigationMenuLink'\n"],"names":["DisabledButton","styled","navigationMenuBaseItemStyles","navigationMenuDisabledItemStyles","ListItem","NavigationMenuPrimitive","StyledLink","navigationMenuActiveItemStyles","NavigationMenuLink","React","children","href","disabled","css","variant","ref","props","forwardedRef","getExternalAnchorProps"],"mappings":"4UAYA,MAAMA,EAAiBC,EAAO,SAAU,CACtC,GAAGC,EACH,GAAGC,CACL,CAAC,EAEKC,EAAWH,EAAOI,EAAwB,IAAI,EAE9CC,EAAaL,EACjBI,EAAwB,KACxBH,EACA,CACE,QAAS,QACT,eAAgB,OAChB,WAAY,EACZ,SAAU,CACR,YAAa,CACX,aAAc,CACZ,iBAAkB,CAChB,WAAY,sBACZ,MAAO,gBACP,UAAW,CACT,WAAY,2BACZ,MAAO,oBACT,EACA,WAAY,CACV,WAAY,6BACZ,MAAO,sBACT,EACA,kBAAmB,CACjB,UAAW,+BACX,MAAO,oBACT,CACF,CACF,EACA,KAAM,CACJ,iBAAkB,CAAE,GAAGK,CAA+B,CACxD,CACF,CACF,CACF,CACF,EAEaC,EAKTC,EAAM,WACR,CACE,CAAE,SAAAC,EAAU,KAAAC,EAAM,SAAAC,EAAU,IAAAC,EAAK,QAAAC,EAAU,OAAQ,IAAAC,KAAQC,CAAM,EACjEC,IAEAR,EAAA,cAACL,EAAA,KACEQ,EACCH,EAAA,cAACT,EAAA,CAAe,SAAQ,GAAC,IAAKa,GAC3BH,CACH,EAEAD,EAAA,cAACH,EAAA,CACC,KAAMK,EACN,IAAKM,EACL,YAAaH,EACb,IAAKD,EACJ,GAAGK,EAAuBP,CAAI,EAC9B,GAAGK,GAEHN,CACH,CAEJ,CAEJ,EAEAF,EAAmB,YAAc"}
|
|
@@ -368,7 +368,7 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
|
|
|
368
368
|
}>>;
|
|
369
369
|
declare type TNavigationVerticalProps = Omit<React.ComponentProps<typeof StyledRoot>, 'delayDuration' | 'skipDelayDuration' | 'defaultValue' | 'value' | 'onValueChange'>;
|
|
370
370
|
export declare const NavigationMenuVertical: (({ children, ...rest }: TNavigationVerticalProps) => JSX.Element) & {
|
|
371
|
-
Link: ({ as, href,
|
|
371
|
+
Link: ({ as, href, children, ...rest }: Omit<import("@radix-ui/react-navigation-menu").NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>, "size" | "css"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
372
372
|
size?: "md" | "lg" | undefined;
|
|
373
373
|
}, {
|
|
374
374
|
sm: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
declare const StyledNavigationMenuVerticalLink: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-navigation-menu").NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>, {
|
|
3
3
|
size?: "md" | "lg" | undefined;
|
|
4
4
|
}, {
|
|
@@ -371,5 +371,5 @@ declare const StyledNavigationMenuVerticalLink: import("@stitches/react/types/st
|
|
|
371
371
|
declare type NavigationMenuVerticalItemProps = React.ComponentProps<typeof StyledNavigationMenuVerticalLink> & {
|
|
372
372
|
as?: React.ComponentType | React.ElementType;
|
|
373
373
|
};
|
|
374
|
-
export declare const NavigationMenuVerticalLink: ({ as, href,
|
|
374
|
+
export declare const NavigationMenuVerticalLink: ({ as, href, children, ...rest }: NavigationMenuVerticalItemProps) => JSX.Element;
|
|
375
375
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Link as
|
|
1
|
+
import{Link as a}from"@radix-ui/react-navigation-menu";import t from"react";import{styled as l}from"../../stitches.js";import{getExternalAnchorProps as c}from"../../utilities/uri/index.js";import{navigationMenuVerticalItemStyles as p}from"./NavigationMenuVertical.styles.js";import{NavigationMenuVerticalItem as f}from"./NavigationMenuVerticalItem.js";import{NavigationMenuVerticalItemContent as u}from"./NavigationMenuVerticalItemContent.js";import{preventEvent as s}from"../../utilities/event/preventEvent.js";const v=l(a,p),g=({as:r,href:e,children:n,...o})=>{const i=r||(e?"a":"button"),m=r?{}:e?c(e):{type:"button"};return t.createElement(f,null,t.createElement(v,{size:"lg",href:e,...o,...m,onSelect:s,asChild:!0},t.createElement(i,null,t.createElement(u,null,n))))};export{g as NavigationMenuVerticalLink};
|
|
2
2
|
//# sourceMappingURL=NavigationMenuVerticalLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuVerticalLink.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVerticalLink.tsx"],"sourcesContent":["import { Link } from '@radix-ui/react-navigation-menu'\nimport
|
|
1
|
+
{"version":3,"file":"NavigationMenuVerticalLink.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVerticalLink.tsx"],"sourcesContent":["import { Link } from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/stitches'\nimport { preventEvent } from '~/utilities/event'\nimport { getExternalAnchorProps } from '~/utilities/uri'\n\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalLink = styled(\n Link,\n navigationMenuVerticalItemStyles\n)\n\ntype NavigationMenuVerticalItemProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalLink\n> & {\n as?: React.ComponentType | React.ElementType\n}\n\nexport const NavigationMenuVerticalLink = ({\n as,\n href,\n children,\n ...rest\n}: NavigationMenuVerticalItemProps) => {\n const Component = as || (href ? 'a' : 'button')\n const componentProps = as\n ? {}\n : href\n ? getExternalAnchorProps(href)\n : { type: 'button' }\n\n return (\n <NavigationMenuVerticalItem>\n <StyledNavigationMenuVerticalLink\n size=\"lg\"\n href={href}\n {...rest}\n {...componentProps}\n onSelect={preventEvent}\n asChild // ?: Can't use `as` for this as we lose `data-active` etc. attributes when we try to. Using `asChild` and `Component` as a workaround.\n >\n <Component>\n <NavigationMenuVerticalItemContent>\n {children}\n </NavigationMenuVerticalItemContent>\n </Component>\n </StyledNavigationMenuVerticalLink>\n </NavigationMenuVerticalItem>\n )\n}\n"],"names":["StyledNavigationMenuVerticalLink","styled","Link","navigationMenuVerticalItemStyles","NavigationMenuVerticalLink","as","href","children","rest","Component","componentProps","getExternalAnchorProps","React","NavigationMenuVerticalItem","preventEvent","NavigationMenuVerticalItemContent"],"mappings":"ggBAWA,MAAMA,EAAmCC,EACvCC,EACAC,CACF,EAQaC,EAA6B,CAAC,CACzC,GAAAC,EACA,KAAAC,EACA,SAAAC,KACGC,CACL,IAAuC,CACrC,MAAMC,EAAYJ,IAAOC,EAAO,IAAM,UAChCI,EAAiBL,EACnB,CAAC,EACDC,EACAK,EAAuBL,CAAI,EAC3B,CAAE,KAAM,QAAS,EAErB,OACEM,EAAA,cAACC,EAAA,KACCD,EAAA,cAACZ,EAAA,CACC,KAAK,KACL,KAAMM,EACL,GAAGE,EACH,GAAGE,EACJ,SAAUI,EACV,QAAO,EAEPF,EAAAA,EAAA,cAACH,EAAA,KACCG,EAAA,cAACG,EAAA,KACER,CACH,CACF,CACF,CACF,CAEJ"}
|