@atom-learning/components 5.13.0 → 5.14.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,15 +1,11 @@
1
- # [5.13.0](https://github.com/Atom-Learning/components/compare/v5.12.1...v5.13.0) (2025-11-21)
1
+ ## [5.14.1](https://github.com/Atom-Learning/components/compare/v5.14.0...v5.14.1) (2026-01-15)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * made table container optional ([1f20c17](https://github.com/Atom-Learning/components/commit/1f20c17f7382686780fe5f7369e702aad3f051ad))
7
- * updated snapshots ([c56d81a](https://github.com/Atom-Learning/components/commit/c56d81a5218c66e4c1a1f9fd4ba81205a6bfa38e))
8
-
9
-
10
- ### Features
11
-
12
- * ui improvements for datatable ([37376d8](https://github.com/Atom-Learning/components/commit/37376d8118f7720581bf8917eee644f2a55dd149))
6
+ * docs layout, additional ui vr tests ([8ba5b31](https://github.com/Atom-Learning/components/commit/8ba5b31b848105a646e2b29a62636b252e757d2c))
7
+ * ensure section message does not collapse in flex containers ([c17868b](https://github.com/Atom-Learning/components/commit/c17868b2e11ad8444ebe5db16058d4325954e6cd))
8
+ * snapshots ([88f8d1c](https://github.com/Atom-Learning/components/commit/88f8d1c464ac164ff26b1a63db11595ee3d95c0e))
13
9
 
14
10
  # [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
15
11
 
@@ -1,6 +1,11 @@
1
1
  import React from 'react';
2
+ import { Badge } from '../badge';
3
+ type BadgeProps = React.ComponentProps<typeof Badge>;
2
4
  type NotificationBadgeProps = {
3
5
  value: number | string;
6
+ emphasis?: BadgeProps['emphasis'];
7
+ theme?: BadgeProps['theme'];
8
+ icon?: React.FC<React.SVGProps<SVGSVGElement>>;
4
9
  };
5
- export declare const NotificationBadge: ({ value, children }: React.PropsWithChildren<NotificationBadgeProps>) => React.JSX.Element;
10
+ export declare const NotificationBadge: ({ value, emphasis, theme, icon, children }: React.PropsWithChildren<NotificationBadgeProps>) => React.JSX.Element;
6
11
  export {};
@@ -1,2 +1,2 @@
1
- import e from"react";import{styled as o}from"../../stitches.js";import{Box as i}from"../box/Box.js";import{Flex as n}from"../flex/Flex.js";const l=o(i,{position:"relative"}),a=o(n,{fontFamily:"$body",fontSize:"$sm",flexDirection:"column",justifyContent:"center",position:"absolute",top:"0",right:"0",transform:"translate(calc($sizes$2 / 2), -50%)",borderRadius:"$round",p:"$2",height:"$2",minWidth:"$2",textAlign:"center",color:"#fff",bg:"$primary800"}),m=({value:t,children:r})=>e.createElement(l,null,!!t&&e.createElement(a,{role:"status"},t),r);export{m as NotificationBadge};
1
+ import e from"react";import{styled as a}from"../../stitches.js";import{Badge as m}from"../badge/Badge.js";import{Box as s}from"../box/Box.js";import{Icon as l}from"../icon/Icon.js";const c=a(s,{position:"relative"}),d={fontFamily:"$body",fontSize:"$sm",flexDirection:"row",justifyContent:"center",position:"absolute",top:"0",right:"0",transform:"translate(calc($sizes$2 / 2), -50%)",borderRadius:"$round",height:"$2",minWidth:"$2",textAlign:"center"},f=({value:t,emphasis:i="bold",theme:r="primary",icon:o,children:n})=>e.createElement(c,null,!!t&&e.createElement(m,{role:"status",emphasis:i,theme:r,css:d},o&&e.createElement(l,{is:o,role:"img","aria-hidden":"false"}),t),n);export{f as NotificationBadge};
2
2
  //# sourceMappingURL=NotificationBadge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationBadge.js","sources":["../../../src/components/notification-badge/NotificationBadge.tsx"],"sourcesContent":["import React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { Box } from '../box'\nimport { Flex } from '../flex'\n\nconst StyledWrapper = styled(Box, {\n position: 'relative'\n})\n\nconst StyledBadge = styled(Flex, {\n fontFamily: '$body',\n fontSize: '$sm',\n flexDirection: 'column',\n justifyContent: 'center',\n position: 'absolute',\n top: '0',\n right: '0',\n transform: 'translate(calc($sizes$2 / 2), -50%)',\n borderRadius: '$round',\n p: '$2',\n height: '$2',\n minWidth: '$2',\n textAlign: 'center',\n color: '#fff',\n bg: '$primary800'\n})\n\ntype NotificationBadgeProps = {\n value: number | string\n}\n\nexport const NotificationBadge = ({\n value,\n children\n}: React.PropsWithChildren<NotificationBadgeProps>) => (\n <StyledWrapper>\n {!!value && <StyledBadge role=\"status\">{value}</StyledBadge>}\n {children}\n </StyledWrapper>\n)\n"],"names":["StyledWrapper","styled","Box","StyledBadge","Flex","NotificationBadge","value","children","React"],"mappings":"2IAOA,MAAMA,EAAgBC,EAAOC,EAAK,CAChC,SAAU,UACZ,CAAC,EAEKC,EAAcF,EAAOG,EAAM,CAC/B,WAAY,QACZ,SAAU,MACV,cAAe,SACf,eAAgB,SAChB,SAAU,WACV,IAAK,IACL,MAAO,IACP,UAAW,sCACX,aAAc,SACd,EAAG,KACH,OAAQ,KACR,SAAU,KACV,UAAW,SACX,MAAO,OACP,GAAI,aACN,CAAC,EAMYC,EAAoB,CAAC,CAChC,MAAAC,EACA,SAAAC,CACF,IACEC,EAAA,cAACR,EAAA,KACE,CAAC,CAACM,GAASE,EAAA,cAACL,EAAA,CAAY,KAAK,QAAUG,EAAAA,CAAM,EAC7CC,CACH"}
1
+ {"version":3,"file":"NotificationBadge.js","sources":["../../../src/components/notification-badge/NotificationBadge.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CSS, styled } from '~/stitches'\n\nimport { Badge } from '../badge'\nimport { Box } from '../box'\nimport { Flex } from '../flex'\nimport { Icon } from '../icon'\n\nconst StyledWrapper = styled(Box, {\n position: 'relative'\n})\n\nconst badgeCss: CSS = {\n fontFamily: '$body',\n fontSize: '$sm',\n flexDirection: 'row',\n justifyContent: 'center',\n position: 'absolute',\n top: '0',\n right: '0',\n transform: 'translate(calc($sizes$2 / 2), -50%)',\n borderRadius: '$round',\n height: '$2',\n minWidth: '$2',\n textAlign: 'center'\n}\n\ntype BadgeProps = React.ComponentProps<typeof Badge>\n\ntype NotificationBadgeProps = {\n value: number | string\n emphasis?: BadgeProps['emphasis']\n theme?: BadgeProps['theme']\n icon?: React.FC<React.SVGProps<SVGSVGElement>>\n}\n\nexport const NotificationBadge = ({\n value,\n emphasis = 'bold',\n theme = 'primary',\n icon,\n children\n}: React.PropsWithChildren<NotificationBadgeProps>) => (\n <StyledWrapper>\n {!!value && (\n <Badge role=\"status\" emphasis={emphasis} theme={theme} css={badgeCss}>\n {icon && <Icon is={icon} role=\"img\" aria-hidden=\"false\" />}\n {value}\n </Badge>\n )}\n {children}\n </StyledWrapper>\n)\n"],"names":["StyledWrapper","styled","Box","badgeCss","NotificationBadge","value","emphasis","theme","icon","children","React","Badge","Icon"],"mappings":"qLASA,MAAMA,EAAgBC,EAAOC,EAAK,CAChC,SAAU,UACZ,CAAC,EAEKC,EAAgB,CACpB,WAAY,QACZ,SAAU,MACV,cAAe,MACf,eAAgB,SAChB,SAAU,WACV,IAAK,IACL,MAAO,IACP,UAAW,sCACX,aAAc,SACd,OAAQ,KACR,SAAU,KACV,UAAW,QACb,EAWaC,EAAoB,CAAC,CAChC,MAAAC,EACA,SAAAC,EAAW,OACX,MAAAC,EAAQ,UACR,KAAAC,EACA,SAAAC,CACF,IACEC,EAAA,cAACV,EAAA,KACE,CAAC,CAACK,GACDK,EAAA,cAACC,EAAA,CAAM,KAAK,SAAS,SAAUL,EAAU,MAAOC,EAAO,IAAKJ,CAAAA,EACzDK,GAAQE,EAAA,cAACE,EAAA,CAAK,GAAIJ,EAAM,KAAK,MAAM,cAAY,OAAQ,CAAA,EACvDH,CACH,EAEDI,CACH"}
@@ -1,2 +1,2 @@
1
- import{TooltipProvider as c}from"@radix-ui/react-tooltip";import o from"react";import{styled as m}from"../../stitches.js";import{Dismissible as a}from"../dismissible/index.js";import{Flex as g}from"../flex/Flex.js";import{SectionMessageProvider as l,useSectionMessageContext as p}from"./SectionMessageContext.js";import{SectionMessageDescription as f}from"./SectionMessageDescription.js";import{SectionMessageDismiss as h}from"./SectionMessageDismiss.js";import{SectionMessageIcon as $}from"./SectionMessageIcon.js";import{SectionMessageContent as u,SectionMessageActions as d}from"./SectionMessageLayout.js";import{SectionMessageTitle as D}from"./SectionMessageTitle.js";const b=m(a,{position:"relative",borderRadius:"$1",display:"flex",minHeight:"$5",p:"$4",border:"1px solid white",variants:{theme:{success:{bg:"$successLight",color:"$successDark"},warning:{bg:"$warningLight",color:"$warningText"},error:{bg:"$dangerLight",color:"$dangerDark"},neutral:{bg:"$grey100",color:"$grey1000"},info:{bg:"$infoLight",color:"$infoDark"}},hasIcon:{true:{pl:"$6"}},hasDismiss:{true:{pr:"$7"}}}}),M=({children:t,...s})=>{const{theme:i,hasIcon:r,hasDismiss:n}=p();return o.createElement(b,{...s,theme:i,hasIcon:r,hasDismiss:n},o.createElement(g,{gap:3,justify:"space-between",css:{flexGrow:1}},t))},e=({theme:t="info",...s})=>o.createElement(c,null,o.createElement(l,{theme:t},o.createElement(M,{...s})));e.Title=D,e.Description=f,e.Icon=$,e.Dismiss=h,e.Content=u,e.Actions=d;export{e as SectionMessage};
1
+ import{TooltipProvider as c}from"@radix-ui/react-tooltip";import o from"react";import{styled as m}from"../../stitches.js";import{Dismissible as a}from"../dismissible/index.js";import{Flex as l}from"../flex/Flex.js";import{SectionMessageProvider as g,useSectionMessageContext as p}from"./SectionMessageContext.js";import{SectionMessageDescription as f}from"./SectionMessageDescription.js";import{SectionMessageDismiss as h}from"./SectionMessageDismiss.js";import{SectionMessageIcon as $}from"./SectionMessageIcon.js";import{SectionMessageContent as u,SectionMessageActions as d}from"./SectionMessageLayout.js";import{SectionMessageTitle as D}from"./SectionMessageTitle.js";const S=m(a,{position:"relative",borderRadius:"$1",display:"flex",minHeight:"$5",flexShrink:0,p:"$4",border:"1px solid white",variants:{theme:{success:{bg:"$successLight",color:"$successDark"},warning:{bg:"$warningLight",color:"$warningText"},error:{bg:"$dangerLight",color:"$dangerDark"},neutral:{bg:"$grey100",color:"$grey1000"},info:{bg:"$infoLight",color:"$infoDark"}},hasIcon:{true:{pl:"$6"}},hasDismiss:{true:{pr:"$7"}}}}),b=({children:t,...i})=>{const{theme:s,hasIcon:r,hasDismiss:n}=p();return o.createElement(S,{...i,theme:s,hasIcon:r,hasDismiss:n},o.createElement(l,{gap:3,justify:"space-between",css:{flexGrow:1}},t))},e=({theme:t="info",...i})=>o.createElement(c,null,o.createElement(g,{theme:t},o.createElement(b,{...i})));e.Title=D,e.Description=f,e.Icon=$,e.Dismiss=h,e.Content=u,e.Actions=d;export{e as SectionMessage};
2
2
  //# sourceMappingURL=SectionMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionMessage.js","sources":["../../../src/components/section-message/SectionMessage.tsx"],"sourcesContent":["import { TooltipProvider } from '@radix-ui/react-tooltip'\nimport React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { Dismissible } from '../dismissible'\nimport { Flex } from '../flex'\nimport {\n SectionMessageProvider,\n useSectionMessageContext\n} from './SectionMessageContext'\nimport { SectionMessageDescription } from './SectionMessageDescription'\nimport { SectionMessageDismiss } from './SectionMessageDismiss'\nimport { SectionMessageIcon } from './SectionMessageIcon'\nimport {\n SectionMessageActions,\n SectionMessageContent\n} from './SectionMessageLayout'\nimport { SectionMessageTitle } from './SectionMessageTitle'\n\nconst StyledSectionMessage = styled(Dismissible, {\n position: 'relative',\n borderRadius: '$1',\n display: 'flex',\n minHeight: '$5',\n p: '$4',\n border: '1px solid white',\n variants: {\n theme: {\n success: {\n bg: '$successLight',\n color: '$successDark'\n },\n warning: {\n bg: '$warningLight',\n color: '$warningText'\n },\n error: {\n bg: '$dangerLight',\n color: '$dangerDark'\n },\n neutral: {\n bg: '$grey100',\n color: '$grey1000'\n },\n info: {\n bg: '$infoLight',\n color: '$infoDark'\n }\n },\n hasIcon: {\n true: {\n pl: '$6'\n }\n },\n hasDismiss: {\n true: {\n pr: '$7'\n }\n }\n }\n})\n\nconst SectionMessageRoot = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledSectionMessage>): JSX.Element => {\n const { theme, hasIcon, hasDismiss } = useSectionMessageContext()\n\n return (\n <StyledSectionMessage\n {...rest}\n theme={theme}\n hasIcon={hasIcon}\n hasDismiss={hasDismiss}\n >\n <Flex gap={3} justify=\"space-between\" css={{ flexGrow: 1 }}>\n {children}\n </Flex>\n </StyledSectionMessage>\n )\n}\n\nexport type SectionMessageTheme =\n | 'success'\n | 'warning'\n | 'error'\n | 'neutral'\n | 'info'\n\nexport interface SectionMessageProps\n extends React.ComponentProps<typeof SectionMessageRoot> {\n theme?: SectionMessageTheme\n}\n\nexport const SectionMessage = ({\n theme = 'info',\n ...rest\n}: SectionMessageProps): JSX.Element => {\n return (\n <TooltipProvider>\n <SectionMessageProvider theme={theme}>\n <SectionMessageRoot {...rest} />\n </SectionMessageProvider>\n </TooltipProvider>\n )\n}\n\nSectionMessage.Title = SectionMessageTitle\nSectionMessage.Description = SectionMessageDescription\nSectionMessage.Icon = SectionMessageIcon\nSectionMessage.Dismiss = SectionMessageDismiss\nSectionMessage.Content = SectionMessageContent\nSectionMessage.Actions = SectionMessageActions\n"],"names":["StyledSectionMessage","styled","Dismissible","SectionMessageRoot","children","rest","theme","hasIcon","hasDismiss","useSectionMessageContext","React","Flex","SectionMessage","TooltipProvider","SectionMessageProvider","SectionMessageTitle","SectionMessageDescription","SectionMessageIcon","SectionMessageDismiss","SectionMessageContent","SectionMessageActions"],"mappings":"gqBAoBA,MAAMA,EAAuBC,EAAOC,EAAa,CAC/C,SAAU,WACV,aAAc,KACd,QAAS,OACT,UAAW,KACX,EAAG,KACH,OAAQ,kBACR,SAAU,CACR,MAAO,CACL,QAAS,CACP,GAAI,gBACJ,MAAO,cACT,EACA,QAAS,CACP,GAAI,gBACJ,MAAO,cACT,EACA,MAAO,CACL,GAAI,eACJ,MAAO,aACT,EACA,QAAS,CACP,GAAI,WACJ,MAAO,WACT,EACA,KAAM,CACJ,GAAI,aACJ,MAAO,WACT,CACF,EACA,QAAS,CACP,KAAM,CACJ,GAAI,IACN,CACF,EACA,WAAY,CACV,KAAM,CACJ,GAAI,IACN,CACF,CACF,CACF,CAAC,EAEKC,EAAqB,CAAC,CAC1B,SAAAC,KACGC,CACL,IAAsE,CACpE,KAAM,CAAE,MAAAC,EAAO,QAAAC,EAAS,WAAAC,CAAW,EAAIC,EAAyB,EAEhE,OACEC,EAAA,cAACV,EAAA,CACE,GAAGK,EACJ,MAAOC,EACP,QAASC,EACT,WAAYC,CAEZE,EAAAA,EAAA,cAACC,EAAA,CAAK,IAAK,EAAG,QAAQ,gBAAgB,IAAK,CAAE,SAAU,CAAE,CACtDP,EAAAA,CACH,CACF,CAEJ,EAcaQ,EAAiB,CAAC,CAC7B,MAAAN,EAAQ,UACLD,CACL,IAEIK,EAAA,cAACG,EAAA,KACCH,EAAA,cAACI,EAAA,CAAuB,MAAOR,GAC7BI,EAAA,cAACP,EAAA,CAAoB,GAAGE,CAAAA,CAAM,CAChC,CACF,EAIJO,EAAe,MAAQG,EACvBH,EAAe,YAAcI,EAC7BJ,EAAe,KAAOK,EACtBL,EAAe,QAAUM,EACzBN,EAAe,QAAUO,EACzBP,EAAe,QAAUQ"}
1
+ {"version":3,"file":"SectionMessage.js","sources":["../../../src/components/section-message/SectionMessage.tsx"],"sourcesContent":["import { TooltipProvider } from '@radix-ui/react-tooltip'\nimport React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { Dismissible } from '../dismissible'\nimport { Flex } from '../flex'\nimport {\n SectionMessageProvider,\n useSectionMessageContext\n} from './SectionMessageContext'\nimport { SectionMessageDescription } from './SectionMessageDescription'\nimport { SectionMessageDismiss } from './SectionMessageDismiss'\nimport { SectionMessageIcon } from './SectionMessageIcon'\nimport {\n SectionMessageActions,\n SectionMessageContent\n} from './SectionMessageLayout'\nimport { SectionMessageTitle } from './SectionMessageTitle'\n\nconst StyledSectionMessage = styled(Dismissible, {\n position: 'relative',\n borderRadius: '$1',\n display: 'flex',\n minHeight: '$5',\n flexShrink: 0,\n p: '$4',\n border: '1px solid white',\n variants: {\n theme: {\n success: {\n bg: '$successLight',\n color: '$successDark'\n },\n warning: {\n bg: '$warningLight',\n color: '$warningText'\n },\n error: {\n bg: '$dangerLight',\n color: '$dangerDark'\n },\n neutral: {\n bg: '$grey100',\n color: '$grey1000'\n },\n info: {\n bg: '$infoLight',\n color: '$infoDark'\n }\n },\n hasIcon: {\n true: {\n pl: '$6'\n }\n },\n hasDismiss: {\n true: {\n pr: '$7'\n }\n }\n }\n})\n\nconst SectionMessageRoot = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledSectionMessage>): JSX.Element => {\n const { theme, hasIcon, hasDismiss } = useSectionMessageContext()\n\n return (\n <StyledSectionMessage\n {...rest}\n theme={theme}\n hasIcon={hasIcon}\n hasDismiss={hasDismiss}\n >\n <Flex gap={3} justify=\"space-between\" css={{ flexGrow: 1 }}>\n {children}\n </Flex>\n </StyledSectionMessage>\n )\n}\n\nexport type SectionMessageTheme =\n | 'success'\n | 'warning'\n | 'error'\n | 'neutral'\n | 'info'\n\nexport interface SectionMessageProps\n extends React.ComponentProps<typeof SectionMessageRoot> {\n theme?: SectionMessageTheme\n}\n\nexport const SectionMessage = ({\n theme = 'info',\n ...rest\n}: SectionMessageProps): JSX.Element => {\n return (\n <TooltipProvider>\n <SectionMessageProvider theme={theme}>\n <SectionMessageRoot {...rest} />\n </SectionMessageProvider>\n </TooltipProvider>\n )\n}\n\nSectionMessage.Title = SectionMessageTitle\nSectionMessage.Description = SectionMessageDescription\nSectionMessage.Icon = SectionMessageIcon\nSectionMessage.Dismiss = SectionMessageDismiss\nSectionMessage.Content = SectionMessageContent\nSectionMessage.Actions = SectionMessageActions\n"],"names":["StyledSectionMessage","styled","Dismissible","SectionMessageRoot","children","rest","theme","hasIcon","hasDismiss","useSectionMessageContext","React","Flex","SectionMessage","TooltipProvider","SectionMessageProvider","SectionMessageTitle","SectionMessageDescription","SectionMessageIcon","SectionMessageDismiss","SectionMessageContent","SectionMessageActions"],"mappings":"gqBAoBA,MAAMA,EAAuBC,EAAOC,EAAa,CAC/C,SAAU,WACV,aAAc,KACd,QAAS,OACT,UAAW,KACX,WAAY,EACZ,EAAG,KACH,OAAQ,kBACR,SAAU,CACR,MAAO,CACL,QAAS,CACP,GAAI,gBACJ,MAAO,cACT,EACA,QAAS,CACP,GAAI,gBACJ,MAAO,cACT,EACA,MAAO,CACL,GAAI,eACJ,MAAO,aACT,EACA,QAAS,CACP,GAAI,WACJ,MAAO,WACT,EACA,KAAM,CACJ,GAAI,aACJ,MAAO,WACT,CACF,EACA,QAAS,CACP,KAAM,CACJ,GAAI,IACN,CACF,EACA,WAAY,CACV,KAAM,CACJ,GAAI,IACN,CACF,CACF,CACF,CAAC,EAEKC,EAAqB,CAAC,CAC1B,SAAAC,KACGC,CACL,IAAsE,CACpE,KAAM,CAAE,MAAAC,EAAO,QAAAC,EAAS,WAAAC,CAAW,EAAIC,IAEvC,OACEC,EAAA,cAACV,EAAA,CACE,GAAGK,EACJ,MAAOC,EACP,QAASC,EACT,WAAYC,CAAAA,EAEZE,EAAA,cAACC,EAAA,CAAK,IAAK,EAAG,QAAQ,gBAAgB,IAAK,CAAE,SAAU,CAAE,CACtDP,EAAAA,CACH,CACF,CAEJ,EAcaQ,EAAiB,CAAC,CAC7B,MAAAN,EAAQ,UACLD,CACL,IAEIK,EAAA,cAACG,EAAA,KACCH,EAAA,cAACI,EAAA,CAAuB,MAAOR,GAC7BI,EAAA,cAACP,EAAA,CAAoB,GAAGE,CAAAA,CAAM,CAChC,CACF,EAIJO,EAAe,MAAQG,EACvBH,EAAe,YAAcI,EAC7BJ,EAAe,KAAOK,EACtBL,EAAe,QAAUM,EACzBN,EAAe,QAAUO,EACzBP,EAAe,QAAUQ"}