@atom-learning/components 3.24.0 → 3.25.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 CHANGED
@@ -1,9 +1,10 @@
1
- # [3.24.0](https://github.com/Atom-Learning/components/compare/v3.23.1...v3.24.0) (2024-04-24)
1
+ ## [3.25.1](https://github.com/Atom-Learning/components/compare/v3.25.0...v3.25.1) (2024-04-29)
2
2
 
3
3
 
4
- ### Features
4
+ ### Bug Fixes
5
5
 
6
- * bumping icons library version ([62d1b43](https://github.com/Atom-Learning/components/commit/62d1b435f749ffb5cdf6194e31f648f4443d3b19))
6
+ * added disabled prop to type to allow disabling Link ([4f6a822](https://github.com/Atom-Learning/components/commit/4f6a82219da696c4df82c19ff078a05b09b62fcd))
7
+ * made prop optionand and changed to only add disabled prop if set ([ce476de](https://github.com/Atom-Learning/components/commit/ce476de81415d5dfcb7a29939ffa1950d219e2e0))
7
8
 
8
9
  # [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
9
10
 
@@ -337,6 +337,8 @@ export declare const StyledLink: import("@stitches/react/types/styled-component"
337
337
  }>>;
338
338
  declare type LinkProps = Override<React.ComponentProps<typeof StyledLink>, {
339
339
  as?: React.ComponentType | React.ElementType;
340
- } & NavigatorActions>;
340
+ } & NavigatorActions & {
341
+ disabled?: boolean;
342
+ }>;
341
343
  export declare const Link: React.ForwardRefExoticComponent<LinkProps>;
342
344
  export {};
@@ -1,2 +1,2 @@
1
- import*as o from"react";import{styled as a}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 p}from"../../utilities/style/disabledStyle.js";import{getExternalAnchorProps as s}from"../../utilities/uri/index.js";import{StyledHeading as d}from"../heading/Heading.js";import{StyledLi as f}from"../list/List.js";import"../markdown-content/components/MarkdownCode.js";import{StyledMarkdownEmphasis as l}from"../markdown-content/components/MarkdownEmphasis.js";import"../markdown-content/components/MarkdownInlineCode.js";import"../image/Image.js";import{StyledText as y,textVariants as c}from"../text/Text.js";import"../markdown-content/components/MarkdownStrong.js";import"../divider/Divider.js";const t=a("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]":{...p,pointerEvents:"none"},[`${y} > &, ${d} > &, ${f} > &, ${l} > &`]:{fontSize:"100%",lineHeight:1,"&::before, &::after":{content:"none"}},variants:c,defaultVariants:{size:"md"}}),e=o.forwardRef(({as:i,href:r,...n},m)=>o.createElement(t,{as:i||(r?void 0:"button"),noCapsize:r?void 0:!0,href:r,...n,...s(r),ref:m}));e.displayName="Link";export{e as Link,t as StyledLink};
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 { 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\n>\n\nexport const Link: React.ForwardRefExoticComponent<LinkProps> =\n React.forwardRef(({ as, href, ...rest }, ref) => (\n <StyledLink\n as={as || (!href ? 'button' : undefined)}\n noCapsize={!href ? true : undefined}\n href={href}\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","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,KAAAC,KAASC,CAAK,EAAGC,IACvCJ,EAAA,cAACT,EACC,CAAA,GAAIU,IAAQC,EAAkB,OAAX,UACnB,UAAYA,EAAc,OAAP,GACnB,KAAMA,EACL,GAAGC,EACH,GAAGE,EAAuBH,CAAI,EAC/B,IAAKE,CAAAA,CACP,CACD,EAEHL,EAAK,YAAc"}
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"}