@atom-learning/components 1.18.0 → 1.19.0

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +26 -7
  2. package/dist/components/accordion/AccordionContent.js +1 -1
  3. package/dist/components/accordion/AccordionItem.js +1 -1
  4. package/dist/components/action-icon/ActionIcon.js +1 -1
  5. package/dist/components/alert-dialog/AlertDialogContent.js +1 -1
  6. package/dist/components/badge/Badge.js +1 -1
  7. package/dist/components/button/Button.js +1 -1
  8. package/dist/components/calendar/Calendar.js +1 -1
  9. package/dist/components/carousel/CarouselArrows.js +1 -1
  10. package/dist/components/checkbox/Checkbox.js +1 -1
  11. package/dist/components/checkbox-field/CheckboxField.js +1 -1
  12. package/dist/components/combobox/Combobox.js +1 -1
  13. package/dist/components/date-field/DateField.js +1 -1
  14. package/dist/components/date-input/DateInput.js +1 -1
  15. package/dist/components/dialog/DialogContent.js +1 -1
  16. package/dist/components/divider/Divider.js +1 -1
  17. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
  18. package/dist/components/field-wrapper/FieldDescription.js +1 -1
  19. package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
  20. package/dist/components/file-input/FileInput.js +1 -1
  21. package/dist/components/grid/Grid.js +1 -1
  22. package/dist/components/heading/Heading.js +1 -1
  23. package/dist/components/input-field/InputField.js +1 -1
  24. package/dist/components/label/Label.js +1 -1
  25. package/dist/components/link/Link.js +1 -1
  26. package/dist/components/markdown-content/MarkdownContent.js +1 -1
  27. package/dist/components/markdown-content/components/MarkdownCode.js +1 -1
  28. package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
  29. package/dist/components/markdown-content/components/MarkdownHeading.js +1 -1
  30. package/dist/components/markdown-content/components/MarkdownImage.js +1 -1
  31. package/dist/components/markdown-content/components/MarkdownLink.js +1 -1
  32. package/dist/components/markdown-content/components/MarkdownListItem.js +1 -1
  33. package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -1
  34. package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
  35. package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
  36. package/dist/components/notification-badge/NotificationBadge.js +1 -1
  37. package/dist/components/password-field/PasswordField.js +1 -1
  38. package/dist/components/radio-button-field/RadioButtonField.js +1 -1
  39. package/dist/components/radio-card/RadioCardGroup.js +1 -1
  40. package/dist/components/search-input/SearchInput.js +1 -1
  41. package/dist/components/select-field/SelectField.js +1 -1
  42. package/dist/components/slider/Slider.js +1 -1
  43. package/dist/components/slider-field/SliderField.js +1 -1
  44. package/dist/components/stack/Stack.js +1 -1
  45. package/dist/components/stack-content/StackContent.js +1 -1
  46. package/dist/components/stepper/Stepper.js +1 -1
  47. package/dist/components/stepper/StepperStepBack.js +1 -1
  48. package/dist/components/stepper/StepperStepBullet.d.ts +531 -0
  49. package/dist/components/stepper/StepperStepBullet.js +1 -0
  50. package/dist/components/stepper/StepperStepContainer.d.ts +532 -0
  51. package/dist/components/stepper/StepperStepContainer.js +1 -0
  52. package/dist/components/stepper/StepperStepForward.js +1 -1
  53. package/dist/components/stepper/StepperStepLabel.d.ts +541 -0
  54. package/dist/components/stepper/StepperStepLabel.js +1 -0
  55. package/dist/components/stepper/StepperSteps.js +1 -1
  56. package/dist/components/stepper/stepper-context/StepperContext.js +1 -1
  57. package/dist/components/stepper/types.d.ts +22 -6
  58. package/dist/components/stepper/types.js +1 -0
  59. package/dist/components/switch/Switch.js +1 -1
  60. package/dist/components/table/TableBody.js +1 -1
  61. package/dist/components/table/TableHeader.js +1 -1
  62. package/dist/components/tabs/TabTrigger.js +1 -1
  63. package/dist/components/tabs/Tabs.js +1 -1
  64. package/dist/components/tabs/utils.js +1 -1
  65. package/dist/components/textarea-field/TextareaField.js +1 -1
  66. package/dist/components/toast/Toast.js +1 -1
  67. package/dist/components/toast/ToastProvider.js +1 -1
  68. package/dist/components/toggle-group/ToggleGroupButton.js +1 -1
  69. package/dist/components/toggle-group/ToggleGroupRoot.js +1 -1
  70. package/dist/components/validation-error/ValidationError.js +1 -1
  71. package/dist/docgen.json +1 -1
  72. package/dist/docs/Stepper.mdx +55 -8
  73. package/dist/index.cjs.js +1 -1
  74. package/package.json +1 -1
@@ -1 +1 @@
1
- import{Error as g,Close as h}from"@atom-learning/icons";import*as e from"react";import{toast as $}from"react-hot-toast";import{keyframes as i,styled as a}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as s}from"../icon/Icon.js";import{Loader as y}from"../loader/Loader.js";import{Text as w}from"../text/Text.js";const n=400,x=i({"0%":{transform:"translate3d(0,-100%,0)",opacity:0},"100%":{transform:"translate3d(0,0,0)",opacity:1}}),E=i({"0%":{transform:"translate3d(0,0,0)",opacity:1},"100%":{transform:"translate3d(0,-100%,0)",opacity:0}}),k=a("div",{position:"absolute",width:"100%",variants:{visible:{true:{"@allowMotion":{animation:`${x} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}},false:{opacity:0,"@allowMotion":{animation:`${E} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}}}}}),I=a("div",{pointerEvents:"auto",alignItems:"center",borderRadius:"$0",boxShadow:"$1",boxSizing:"border-box",color:"white",display:"flex",minHeight:"$5",pl:"$4",position:"relative",pr:"$6",py:"$4",transition:"background-color 50ms ease-out",width:"100%","@sm":{width:n},"@allowMotion":{transition:"background-color 50ms ease-out, transform 150ms ease-out"},variants:{status:{blank:{bg:"$primary"},error:{bg:"$danger"},loading:{bg:"$primary"},success:{bg:"$success"}}}}),T=e.memo(({ariaLive:l,height:m,id:t,message:c,role:p,type:o="blank",visible:d,calculateOffset:u,updateHeight:b})=>{const f=u(t,{reverseOrder:!0,margin:8});return e.createElement(k,{visible:d},e.createElement(I,{ref:r=>{r&&m===void 0&&b(t,r.getBoundingClientRect().height)},status:o,role:p,"aria-live":l,style:{transform:`translateY(${f}px)`}},o==="error"&&e.createElement(s,{size:"sm",css:{mr:"$3",flex:"0 0 auto"},is:g}),e.createElement(w,{css:{color:"inherit"}},c),o==="loading"?e.createElement(y,{css:{flex:"0 0 auto",ml:"auto"}}):e.createElement(v,{css:{position:"absolute",top:"$2",right:"$2",color:"white","&:hover,&:focus":{color:"white",opacity:.5}},label:"Close alert",onClick:()=>$.dismiss(t)},e.createElement(s,{is:h}))))});export{n as TOAST_WIDTH,T as Toast};
1
+ import{Error as g,Close as h}from"@atom-learning/icons";import*as t from"react";import{toast as $}from"react-hot-toast";import{keyframes as i,styled as a}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as s}from"../icon/Icon.js";import{Loader as y}from"../loader/Loader.js";import{Text as w}from"../text/Text.js";const n=400,x=i({"0%":{transform:"translate3d(0,-100%,0)",opacity:0},"100%":{transform:"translate3d(0,0,0)",opacity:1}}),E=i({"0%":{transform:"translate3d(0,0,0)",opacity:1},"100%":{transform:"translate3d(0,-100%,0)",opacity:0}}),k=a("div",{position:"absolute",width:"100%",variants:{visible:{true:{"@allowMotion":{animation:`${x} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}},false:{opacity:0,"@allowMotion":{animation:`${E} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}}}}}),I=a("div",{pointerEvents:"auto",alignItems:"center",borderRadius:"$0",boxShadow:"$1",boxSizing:"border-box",color:"white",display:"flex",minHeight:"$5",pl:"$4",position:"relative",pr:"$6",py:"$4",transition:"background-color 50ms ease-out",width:"100%","@sm":{width:n},"@allowMotion":{transition:"background-color 50ms ease-out, transform 150ms ease-out"},variants:{status:{blank:{bg:"$primary"},error:{bg:"$danger"},loading:{bg:"$primary"},success:{bg:"$success"}}}}),T=t.memo(({ariaLive:l,height:m,id:e,message:c,role:p,type:o="blank",visible:d,calculateOffset:u,updateHeight:b})=>{const f=u(e,{reverseOrder:!0,margin:8});return t.createElement(k,{visible:d},t.createElement(I,{ref:r=>{r&&m===void 0&&b(e,r.getBoundingClientRect().height)},status:o,role:p,"aria-live":l,style:{transform:`translateY(${f}px)`}},o==="error"&&t.createElement(s,{size:"sm",css:{mr:"$3",flex:"0 0 auto"},is:g}),t.createElement(w,{css:{color:"inherit"}},c),o==="loading"?t.createElement(y,{css:{flex:"0 0 auto",ml:"auto"}}):t.createElement(v,{css:{position:"absolute",top:"$2",right:"$2",color:"white","&:hover,&:focus":{color:"white",opacity:.5}},label:"Close alert",onClick:()=>$.dismiss(e)},t.createElement(s,{is:h}))))});export{n as TOAST_WIDTH,T as Toast};
@@ -1 +1 @@
1
- import*as e from"react";import{useToaster as p}from"react-hot-toast";import{default as E}from"react-hot-toast";import{styled as c}from"../../stitches.js";import{TOAST_WIDTH as d,Toast as f}from"./Toast.js";const u=2147483647,T=c("div",{left:"$2",position:"fixed",top:"$2",right:"$2",zIndex:u,"@sm":{top:"$3",right:"auto",left:`calc(50% - ${d/2}px)`}}),a=({children:o})=>{const{toasts:r,handlers:s}=p(),{startPause:i,endPause:l,calculateOffset:n,updateHeight:m}=s;return e.createElement(e.Fragment,null,e.createElement(T,{onMouseEnter:i,onMouseLeave:l},r.map(t=>e.createElement(f,{key:t.id,calculateOffset:n,updateHeight:m,...t}))),o)};a.displayName="ToastProvider";export{a as ToastProvider,E as toast};
1
+ import*as e from"react";import{useToaster as p}from"react-hot-toast";import{default as P}from"react-hot-toast";import{styled as c}from"../../stitches.js";import{TOAST_WIDTH as d,Toast as f}from"./Toast.js";const u=2147483647,T=c("div",{left:"$2",position:"fixed",top:"$2",right:"$2",zIndex:u,"@sm":{top:"$3",right:"auto",left:`calc(50% - ${d/2}px)`}}),o=({children:a})=>{const{toasts:r,handlers:s}=p(),{startPause:i,endPause:l,calculateOffset:n,updateHeight:m}=s;return e.createElement(e.Fragment,null,e.createElement(T,{onMouseEnter:i,onMouseLeave:l},r.map(t=>e.createElement(f,{key:t.id,calculateOffset:n,updateHeight:m,...t}))),a)};o.displayName="ToastProvider";export{o as ToastProvider,P as toast};
@@ -1 +1 @@
1
- import*as n from"react";import{styled as a}from"../../stitches.js";import{StyledIcon as g,Icon as r}from"../icon/Icon.js";import{StyledItem as f}from"./ToggleGroupItem.js";const t={sm:"32px",md:"40px",lg:"48px"},h={sm:"$4",md:"$5",lg:"$5"},u={sm:"$2",md:"$3",lg:"$3"},l=i=>({fontSize:`$${i}`,px:h[i],minHeight:t[i],"& > *:not(:last-child)":{mr:u[i]}}),d=a(f,{flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,lineHeight:1,py:"$1",[`& ${g}`]:{flexShrink:0},variants:{size:{sm:l("sm"),md:l("md"),lg:l("lg")},isIconOnly:{true:{}}},compoundVariants:[{isIconOnly:!0,size:"sm",css:{minWidth:t.sm,p:0}},{isIconOnly:!0,size:"md",css:{minWidth:t.md,p:0}},{isIconOnly:!0,size:"lg",css:{minWidth:t.lg,p:0}}]}),$=({size:i,children:p,...c})=>{var m;const s=n.Children.toArray(p),o=s.length<=1,y=o&&n.isValidElement(s[0])&&((m=s[0])==null?void 0:m.type)===r;return n.createElement(d,{size:i,isIconOnly:y,...c},s.map(e=>!o&&typeof e=="string"?n.createElement("span",{key:e},e):n.isValidElement(e)&&e?.type===r?n.cloneElement(e,{...e.props,size:i}):e))};export{d as StyledButton,$ as ToggleGroupButton};
1
+ import*as n from"react";import{styled as a}from"../../stitches.js";import{StyledIcon as g,Icon as r}from"../icon/Icon.js";import{StyledItem as f}from"./ToggleGroupItem.js";const t={sm:"32px",md:"40px",lg:"48px"},h={sm:"$4",md:"$5",lg:"$5"},$={sm:"$2",md:"$3",lg:"$3"},l=i=>({fontSize:`$${i}`,px:h[i],minHeight:t[i],"& > *:not(:last-child)":{mr:$[i]}}),d=a(f,{flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,lineHeight:1,py:"$1",[`& ${g}`]:{flexShrink:0},variants:{size:{sm:l("sm"),md:l("md"),lg:l("lg")},isIconOnly:{true:{}}},compoundVariants:[{isIconOnly:!0,size:"sm",css:{minWidth:t.sm,p:0}},{isIconOnly:!0,size:"md",css:{minWidth:t.md,p:0}},{isIconOnly:!0,size:"lg",css:{minWidth:t.lg,p:0}}]}),u=({size:i,children:p,...c})=>{var o;const s=n.Children.toArray(p),m=s.length<=1,y=m&&n.isValidElement(s[0])&&((o=s[0])==null?void 0:o.type)===r;return n.createElement(d,{size:i,isIconOnly:y,...c},s.map(e=>!m&&typeof e=="string"?n.createElement("span",{key:e},e):n.isValidElement(e)&&(e==null?void 0:e.type)===r?n.cloneElement(e,{...e.props,size:i}):e))};export{d as StyledButton,u as ToggleGroupButton};
@@ -1 +1 @@
1
- import*as f from"@radix-ui/react-toggle-group";import*as t from"react";import{Stack as u}from"../stack/Stack.js";import{styled as b}from"../../stitches.js";import{StyledItem as o}from"./ToggleGroupItem.js";const d=b(f.Root,{width:"fit-content",variants:{isFullWidth:{true:{width:"100%",[`& ${o}`]:{flexBasis:0,flexGrow:1}}},hasGap:{true:{[`& ${o}`]:{borderRadius:"$0"}},false:{borderRadius:"$0",bg:"white",[`& ${o}`]:{bg:"transparent",borderRadius:0,position:"relative","&:not(:last-child)::before":{content:"",position:"absolute"}}}},direction:{column:{},row:{}}},compoundVariants:[{hasGap:!1,direction:"row",css:{[`& ${o}`]:{"&:not(:last-child)::before":{top:"-1px",height:"calc(100% + 2px)",width:"1px",right:"0",transform:"translateX(150%)"},"&:not(:first-child)":{borderLeftColor:"transparent"},"&:not(:last-child)":{borderRightColor:"transparent"},"&:first-child":{borderTopLeftRadius:"$0",borderBottomLeftRadius:"$0"},"&:last-child":{borderTopRightRadius:"$0",borderBottomRightRadius:"$0"}}}},{hasGap:!1,direction:"column",css:{[`& ${o}`]:{"&:not(:last-child)::before":{bottom:0,left:"-1px",height:"1px",width:"calc(100% + 2px)",transform:"translateY(150%)"},"&:first-child":{borderTopLeftRadius:"$0",borderTopRightRadius:"$0"},"&:last-child":{borderBottomLeftRadius:"$0",borderBottomRightRadius:"$0"},"&:not(:first-child)":{borderTopColor:"transparent"},"&:not(:last-child)":{borderBottomColor:"transparent"}}}}]}),R=e=>e==="horizontal"?"row":"column",g=({size:e="md",orientation:i="horizontal",gap:a=!1,isFullWidth:l,children:p,wrap:h="no-wrap",...c})=>{const s=typeof a=="number",m=t.Children.toArray(p),n=R(i);return t.createElement(d,{direction:n,hasGap:s,isFullWidth:l,orientation:i,...c},t.createElement(u,{direction:n,gap:s&&a,align:!1,wrap:h},m.map(r=>t.isValidElement(r)?t.cloneElement(r,{...r.props,size:e}):r)))};export{d as StyledRoot,g as ToggleGroupRoot};
1
+ import*as f from"@radix-ui/react-toggle-group";import*as t from"react";import{Stack as u}from"../stack/Stack.js";import{styled as b}from"../../stitches.js";import{StyledItem as o}from"./ToggleGroupItem.js";const d=b(f.Root,{width:"fit-content",variants:{isFullWidth:{true:{width:"100%",[`& ${o}`]:{flexBasis:0,flexGrow:1}}},hasGap:{true:{[`& ${o}`]:{borderRadius:"$0"}},false:{borderRadius:"$0",bg:"white",[`& ${o}`]:{bg:"transparent",borderRadius:0,position:"relative","&:not(:last-child)::before":{content:"",position:"absolute"}}}},direction:{column:{},row:{}}},compoundVariants:[{hasGap:!1,direction:"row",css:{[`& ${o}`]:{"&:not(:last-child)::before":{top:"-1px",height:"calc(100% + 2px)",width:"1px",right:"0",transform:"translateX(150%)"},"&:not(:first-child)":{borderLeftColor:"transparent"},"&:not(:last-child)":{borderRightColor:"transparent"},"&:first-child":{borderTopLeftRadius:"$0",borderBottomLeftRadius:"$0"},"&:last-child":{borderTopRightRadius:"$0",borderBottomRightRadius:"$0"}}}},{hasGap:!1,direction:"column",css:{[`& ${o}`]:{"&:not(:last-child)::before":{bottom:0,left:"-1px",height:"1px",width:"calc(100% + 2px)",transform:"translateY(150%)"},"&:first-child":{borderTopLeftRadius:"$0",borderTopRightRadius:"$0"},"&:last-child":{borderBottomLeftRadius:"$0",borderBottomRightRadius:"$0"},"&:not(:first-child)":{borderTopColor:"transparent"},"&:not(:last-child)":{borderBottomColor:"transparent"}}}}]}),R=i=>i==="horizontal"?"row":"column",g=({size:i="md",orientation:e="horizontal",gap:a=!1,isFullWidth:l,children:p,wrap:h="no-wrap",...c})=>{const s=typeof a=="number",m=t.Children.toArray(p),n=R(e);return t.createElement(d,{direction:n,hasGap:s,isFullWidth:l,orientation:e,...c},t.createElement(u,{direction:n,gap:s&&a,align:!1,wrap:h},m.map(r=>t.isValidElement(r)?t.cloneElement(r,{...r.props,size:i}):r)))};export{d as StyledRoot,g as ToggleGroupRoot};
@@ -1 +1 @@
1
- import{Error as s}from"@atom-learning/icons";import*as r from"react";import{Flex as m}from"../flex/Flex.js";import{Icon as i}from"../icon/Icon.js";import{Text as a}from"../text/Text.js";const n=({css:e,children:t,...o})=>r.createElement(m,{css:{color:"$danger",alignItems:"flex-start",...e},...o},r.createElement(i,{is:s,size:"sm",css:{mr:"$2",flexShrink:0},"aria-hidden":!0}),r.createElement(a,{css:{color:"inherit",transform:"translateY($space$1)"},size:"sm"},t));export{n as ValidationError};
1
+ import{Error as s}from"@atom-learning/icons";import*as r from"react";import{Flex as m}from"../flex/Flex.js";import{Icon as i}from"../icon/Icon.js";import{Text as a}from"../text/Text.js";const n=({css:e,children:o,...t})=>r.createElement(m,{css:{color:"$danger",alignItems:"flex-start",...e},...t},r.createElement(i,{is:s,size:"sm",css:{mr:"$2",flexShrink:0},"aria-hidden":!0}),r.createElement(a,{css:{color:"inherit",transform:"translateY($space$1)"},size:"sm"},o));export{n as ValidationError};