@atom-learning/components 1.22.2 → 1.24.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +2 -2
  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/alert-dialog/alert-context/AlertContext.js +1 -1
  7. package/dist/components/badge/Badge.js +1 -1
  8. package/dist/components/button/Button.js +1 -1
  9. package/dist/components/calendar/Calendar.d.ts +3 -0
  10. package/dist/components/calendar/Calendar.js +1 -1
  11. package/dist/components/calendar/constants.d.ts +7 -0
  12. package/dist/components/calendar/constants.js +1 -1
  13. package/dist/components/carousel/CarouselArrows.js +1 -1
  14. package/dist/components/checkbox/Checkbox.js +1 -1
  15. package/dist/components/combobox/Combobox.js +1 -1
  16. package/dist/components/date-input/DateInput.js +1 -1
  17. package/dist/components/dialog/DialogContent.js +1 -1
  18. package/dist/components/divider/Divider.js +1 -1
  19. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
  20. package/dist/components/field-wrapper/FieldDescription.js +1 -1
  21. package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
  22. package/dist/components/file-input/FileInput.js +1 -1
  23. package/dist/components/grid/Grid.js +1 -1
  24. package/dist/components/heading/Heading.js +1 -1
  25. package/dist/components/label/Label.js +1 -1
  26. package/dist/components/link/Link.js +1 -1
  27. package/dist/components/markdown-content/MarkdownContent.js +1 -1
  28. package/dist/components/markdown-content/components/MarkdownCode.js +1 -1
  29. package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
  30. package/dist/components/markdown-content/components/MarkdownHeading.js +1 -1
  31. package/dist/components/markdown-content/components/MarkdownImage.js +1 -1
  32. package/dist/components/markdown-content/components/MarkdownLink.js +1 -1
  33. package/dist/components/markdown-content/components/MarkdownListItem.js +1 -1
  34. package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -1
  35. package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
  36. package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
  37. package/dist/components/notification-badge/NotificationBadge.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/slider-field/SliderField.js +1 -1
  42. package/dist/components/stack/Stack.js +1 -1
  43. package/dist/components/stack-content/StackContent.js +1 -1
  44. package/dist/components/stepper/StepperStepBullet.d.ts +1 -1
  45. package/dist/components/stepper/StepperStepBullet.js +1 -1
  46. package/dist/components/stepper/StepperStepContainer.d.ts +1 -0
  47. package/dist/components/stepper/StepperStepContainer.js +1 -1
  48. package/dist/components/stepper/StepperStepForward.js +1 -1
  49. package/dist/components/stepper/StepperStepLabel.d.ts +1 -1
  50. package/dist/components/stepper/StepperStepLabel.js +1 -1
  51. package/dist/components/stepper/StepperSteps.js +1 -1
  52. package/dist/components/stepper/stepper-context/StepperContext.js +1 -1
  53. package/dist/components/stepper/types.d.ts +4 -1
  54. package/dist/components/stepper/types.js +1 -1
  55. package/dist/components/switch/Switch.js +1 -1
  56. package/dist/components/table/TableBody.js +1 -1
  57. package/dist/components/table/TableHeader.js +1 -1
  58. package/dist/components/tabs/TabTrigger.js +1 -1
  59. package/dist/components/tabs/Tabs.js +1 -1
  60. package/dist/components/tabs/utils.js +1 -1
  61. package/dist/components/toast/Toast.js +1 -1
  62. package/dist/components/toast/ToastProvider.js +1 -1
  63. package/dist/components/toggle-group/ToggleGroupButton.js +1 -1
  64. package/dist/components/validation-error/ValidationError.js +1 -1
  65. package/dist/docgen.json +1 -1
  66. package/dist/index.cjs.js +1 -1
  67. package/dist/utilities/hooks/useCallbackRef.d.ts +9 -0
  68. package/dist/utilities/hooks/useCallbackRef.js +1 -0
  69. package/dist/utilities/{use-is-mounted-ref/index.d.ts → hooks/useIsMountedRef.d.ts} +0 -0
  70. package/dist/utilities/{use-is-mounted-ref/index.js → hooks/useIsMountedRef.js} +0 -0
  71. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,9 +1,9 @@
1
- ## [1.22.2](https://github.com/Atom-Learning/components/compare/v1.22.1...v1.22.2) (2022-08-01)
1
+ ## [1.24.1](https://github.com/Atom-Learning/components/compare/v1.24.0...v1.24.1) (2022-08-26)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * reduce dialog z-index value ([b4d678a](https://github.com/Atom-Learning/components/commit/b4d678a7b06819733c729219ff19a929a2f4a84b))
6
+ * **search-input:** throw onChange actual event on clear ([00c1bc6](https://github.com/Atom-Learning/components/commit/00c1bc63b8c297bfe99fd465d630d2ff77034c97))
7
7
 
8
8
  # [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
9
9
 
@@ -1 +1 @@
1
- import{Content as i}from"@radix-ui/react-accordion";import t from"react";import{keyframes as o,styled as n}from"../../stitches.js";import{CSSWrapper as c}from"../../utilities/css-wrapper/CSSWrapper.js";const d=o({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),m=o({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),s=n(i,{border:0,width:"100%",bg:"#fff",'&[data-state="open"]':{borderRadius:"0 0 $0 $0"},"@allowMotion":{'&[data-state="open"]':{animation:`${d} 300ms ease-out`},'&[data-state="closed"]':{animation:`${m} 300ms ease-out`}}}),h=({children:e,css:a,...r})=>t.createElement(s,{...r},t.createElement(c,{css:a},e));export{h as AccordionContent};
1
+ import{Content as i}from"@radix-ui/react-accordion";import t from"react";import{keyframes as e,styled as n}from"../../stitches.js";import{CSSWrapper as c}from"../../utilities/css-wrapper/CSSWrapper.js";const d=e({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),m=e({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),s=n(i,{border:0,width:"100%",bg:"#fff",'&[data-state="open"]':{borderRadius:"0 0 $0 $0"},"@allowMotion":{'&[data-state="open"]':{animation:`${d} 300ms ease-out`},'&[data-state="closed"]':{animation:`${m} 300ms ease-out`}}}),h=({children:o,css:a,...r})=>t.createElement(s,{...r},t.createElement(c,{css:a},o));export{h as AccordionContent};
@@ -1 +1 @@
1
- import{Item as r}from"@radix-ui/react-accordion";import m from"react";import{styled as d}from"../../stitches.js";const l=d(r,{width:"100%",overflow:"hidden","&:not(:last-child)":{mb:"$1"}}),i=({children:o,value:t,...e})=>m.createElement(l,{value:t,...e},o);export{i as AccordionItem};
1
+ import{Item as r}from"@radix-ui/react-accordion";import m from"react";import{styled as d}from"../../stitches.js";const l=d(r,{width:"100%",overflow:"hidden","&:not(:last-child)":{mb:"$1"}}),i=({children:e,value:t,...o})=>m.createElement(l,{value:t,...o},e);export{i as AccordionItem};
@@ -1 +1 @@
1
- import{darken as i}from"color2k";import g from"invariant";import*as n from"react";import{styled as D,theme as o}from"../../stitches.js";import{Icon as m}from"../icon/Icon.js";const c=(e,r,a)=>({bg:"transparent",color:e,"&:not(:disabled):hover, &:not(:disabled):focus":{color:r},"&:not(:disabled):active":{color:a},"&[disabled]":{color:"$tonal400",cursor:"not-allowed"}}),l=(e,r,a)=>({bg:e,color:"white","&:not(:disabled):hover, &:not(:disabled):focus":{bg:r,color:"white"},"&:not(:disabled):active":{bg:a},"&[disabled]":{bg:"$tonal100",color:"$tonal400",cursor:"not-allowed"}}),p=(e,r,a)=>({border:"1px solid",borderColor:"currentColor",color:e,"&:not(:disabled):hover, &:not(:disabled):focus":{color:r},"&:not(:disabled):active":{color:a},"&[disabled]":{borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"}}),w=D("button",{alignItems:"center",appearance:"none",bg:"white",border:"unset",borderRadius:"$0",boxSizing:"border-box",cursor:"pointer",display:"flex",justifyContent:"center",p:"unset",transition:"all 100ms ease-out",variants:{theme:{neutral:{},primary:{},success:{},warning:{},danger:{}},appearance:{simple:{},outline:{},solid:{}},size:{md:{size:"$3"},lg:{size:"$4"},xl:{size:"$5"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"neutral",appearance:"simple",css:c("$tonal300","$primaryMid","$primaryDark")},{theme:"primary",appearance:"simple",css:c("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"simple",css:c("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"simple",css:c("$success","$successMid","$successDark")},{theme:"warning",appearance:"simple",css:c("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"simple",css:c("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"solid",css:l("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"solid",css:l("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"solid",css:l("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:l("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"solid",css:l("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"outline",css:p("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"outline",css:p("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"outline",css:p("$success","$successMid","$successDark")},{theme:"warning",appearance:"outline",css:p("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"outline",css:p("$danger","$dangerMid","$dangerDark")}]}),t=n.forwardRef(({children:e,theme:r="primary",appearance:a="simple",size:$="md",label:h,href:u,disabled:d,...b},k)=>{const y=`A single ${m.displayName} component is permitted as a child of ${t.displayName}`;return g(n.Children.count(e)===1,y),n.createElement(w,{...b,...u?{as:"a",href:d?null:u,onClick:void 0,"aria-disabled":!!d}:{type:"button"},"aria-label":h,theme:r,appearance:a,size:$,ref:k,disabled:d},n.Children.map(e,s=>{if(!n.isValidElement(s))throw new Error(y);return g(s.type===m,`Children of type ${s==null?void 0:s.type} aren't permitted. Only an ${m.displayName} component is allowed in ${t.displayName}`),n.cloneElement(s,{css:{size:["lg","xl"].includes($)?20:16,...s.props.css?s.props.css:{}}})}))});t.displayName="ActionIcon";export{t as ActionIcon};
1
+ import{darken as i}from"color2k";import g from"invariant";import*as n from"react";import{styled as D,theme as o}from"../../stitches.js";import{Icon as m}from"../icon/Icon.js";const c=(e,r,a)=>({bg:"transparent",color:e,"&:not(:disabled):hover, &:not(:disabled):focus":{color:r},"&:not(:disabled):active":{color:a},"&[disabled]":{color:"$tonal400",cursor:"not-allowed"}}),l=(e,r,a)=>({bg:e,color:"white","&:not(:disabled):hover, &:not(:disabled):focus":{bg:r,color:"white"},"&:not(:disabled):active":{bg:a},"&[disabled]":{bg:"$tonal100",color:"$tonal400",cursor:"not-allowed"}}),p=(e,r,a)=>({border:"1px solid",borderColor:"currentColor",color:e,"&:not(:disabled):hover, &:not(:disabled):focus":{color:r},"&:not(:disabled):active":{color:a},"&[disabled]":{borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"}}),w=D("button",{alignItems:"center",appearance:"none",bg:"white",border:"unset",borderRadius:"$0",boxSizing:"border-box",cursor:"pointer",display:"flex",justifyContent:"center",p:"unset",transition:"all 100ms ease-out",variants:{theme:{neutral:{},primary:{},success:{},warning:{},danger:{}},appearance:{simple:{},outline:{},solid:{}},size:{md:{size:"$3"},lg:{size:"$4"},xl:{size:"$5"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"neutral",appearance:"simple",css:c("$tonal300","$primaryMid","$primaryDark")},{theme:"primary",appearance:"simple",css:c("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"simple",css:c("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"simple",css:c("$success","$successMid","$successDark")},{theme:"warning",appearance:"simple",css:c("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"simple",css:c("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"solid",css:l("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"solid",css:l("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"solid",css:l("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:l("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"solid",css:l("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"outline",css:p("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"outline",css:p("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"outline",css:p("$success","$successMid","$successDark")},{theme:"warning",appearance:"outline",css:p("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"outline",css:p("$danger","$dangerMid","$dangerDark")}]}),t=n.forwardRef(({children:e,theme:r="primary",appearance:a="simple",size:u="md",label:h,href:$,disabled:d,...b},k)=>{const y=`A single ${m.displayName} component is permitted as a child of ${t.displayName}`;return g(n.Children.count(e)===1,y),n.createElement(w,{...b,...$?{as:"a",href:d?null:$,onClick:void 0,"aria-disabled":!!d}:{type:"button"},"aria-label":h,theme:r,appearance:a,size:u,ref:k,disabled:d},n.Children.map(e,s=>{if(!n.isValidElement(s))throw new Error(y);return g(s.type===m,`Children of type ${s==null?void 0:s.type} aren't permitted. Only an ${m.displayName} component is allowed in ${t.displayName}`),n.cloneElement(s,{css:{size:["lg","xl"].includes(u)?20:16,...s.props.css?s.props.css:{}}})}))});t.displayName="ActionIcon";export{t as ActionIcon};
@@ -1 +1 @@
1
- import{Overlay as m,Content as d,Portal as l}from"@radix-ui/react-alert-dialog";import*as t from"react";import{DIALOG_Z_INDEX as e}from"../../constants/dialog.js";import{keyframes as a,styled as n}from"../../stitches.js";import{fadeIn as f,fadeOut as p}from"../../utilities/style/keyframe-animations.js";const o="translate3d(-50%, -50%, 0)",i="translate3d(-50%, 50vh, 0)",c=a({"0%":{transform:i},"100%":{transform:o}}),x=a({"0%":{transform:o},"100%":{transform:i}}),b=n(m,{backgroundColor:"$alpha600",inset:0,position:"fixed",zIndex:e,"@allowMotion":{'&[data-state="open"]':{animation:`${f} 250ms ease-out`},'&[data-state="closed"]':{animation:`${p} 550ms ease-out`}}}),u=n(d,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",p:"$5",position:"fixed",top:"50%",transform:o,"&:focus":{outline:"none"},zIndex:e,"@allowMotion":{'&[data-state="open"]':{animation:`${c} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${x} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{sm:{width:"380px"},md:{width:"480px"},lg:{width:"600px"}}}}),$=({size:r="sm",...s})=>t.createElement(l,null,t.createElement(b,null),t.createElement(u,{size:r,...s}));export{$ as AlertDialogContent};
1
+ import{Overlay as m,Content as d,Portal as l}from"@radix-ui/react-alert-dialog";import*as t from"react";import{DIALOG_Z_INDEX as e}from"../../constants/dialog.js";import{keyframes as a,styled as n}from"../../stitches.js";import{fadeIn as f,fadeOut as p}from"../../utilities/style/keyframe-animations.js";const o="translate3d(-50%, -50%, 0)",i="translate3d(-50%, 50vh, 0)",c=a({"0%":{transform:i},"100%":{transform:o}}),x=a({"0%":{transform:o},"100%":{transform:i}}),b=n(m,{backgroundColor:"$alpha600",inset:0,position:"fixed",zIndex:e,"@allowMotion":{'&[data-state="open"]':{animation:`${f} 250ms ease-out`},'&[data-state="closed"]':{animation:`${p} 550ms ease-out`}}}),u=n(d,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",p:"$5",position:"fixed",top:"50%",transform:o,"&:focus":{outline:"none"},zIndex:e,"@allowMotion":{'&[data-state="open"]':{animation:`${c} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${x} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{sm:{width:"380px"},md:{width:"480px"},lg:{width:"600px"}}}}),h=({size:r="sm",...s})=>t.createElement(l,null,t.createElement(b,null),t.createElement(u,{size:r,...s}));export{h as AlertDialogContent};
@@ -1 +1 @@
1
- import*as e from"react";import{useIsMountedRef as s}from"../../../utilities/use-is-mounted-ref/index.js";import{Alert as u}from"./AlertDialog.js";import{reducer as a,initialState as d}from"./reducer.js";const n=e.createContext({showAlert:()=>null}),c=({children:r})=>{const[t,o]=e.useReducer(a,d),l=s();return e.createElement(n.Provider,{value:{showAlert:i=>o({payload:i,type:"ADD"})}},Boolean(t.length)&&e.createElement(u,{...t[0],key:t[0].id,onClose:()=>{l.current&&o({payload:t[0].id,type:"REMOVE"})}}),r)},m=()=>{const r=e.useContext(n);if(r===void 0)throw new Error("useAlert must be used within a AlertProvider");return r};export{c as AlertProvider,m as useAlert};
1
+ import*as e from"react";import{useIsMountedRef as s}from"../../../utilities/hooks/useIsMountedRef.js";import{Alert as u}from"./AlertDialog.js";import{reducer as a,initialState as d}from"./reducer.js";const n=e.createContext({showAlert:()=>null}),c=({children:r})=>{const[t,o]=e.useReducer(a,d),l=s();return e.createElement(n.Provider,{value:{showAlert:i=>o({payload:i,type:"ADD"})}},Boolean(t.length)&&e.createElement(u,{...t[0],key:t[0].id,onClose:()=>{l.current&&o({payload:t[0].id,type:"REMOVE"})}}),r)},m=()=>{const r=e.useContext(n);if(r===void 0)throw new Error("useAlert must be used within a AlertProvider");return r};export{c as AlertProvider,m as useAlert};
@@ -1 +1 @@
1
- import*as e from"react";import{styled as n}from"../../stitches.js";import{Box as a}from"../box/Box.js";import{Flex as m}from"../flex/Flex.js";const l=n(m,{justifyContent:"center",alignItems:"center",borderRadius:"$0",border:"1px solid #FFFFFF",fontFamily:"$body",variants:{theme:{success:{bg:"$successLight",color:"$successDark"},warning:{bg:"$warningLight",color:"$tonal600"},danger:{bg:"$dangerLight",color:"$dangerDark"},neutral:{bg:"$tonal50",color:"$tonal400"},info:{bg:"$primaryLight",color:"$primaryMid"}},size:{xs:{fontSize:"$sm",px:"$3",height:"$2"},sm:{fontSize:"$md",px:"$4",height:"$3"},md:{fontSize:"$md",px:"$4",height:"$4"}}}}),o=({theme:t="info",size:r="sm",children:i,...s})=>e.createElement(l,{role:"status",theme:t,size:r,...s},e.createElement(a,{as:"div",css:{whiteSpace:"nowrap",overflowX:"hidden",textOverflow:"ellipsis",py:"$0"}},i));o.displayName="Badge";export{o as Badge};
1
+ import*as e from"react";import{styled as n}from"../../stitches.js";import{Box as a}from"../box/Box.js";import{Flex as m}from"../flex/Flex.js";const l=n(m,{justifyContent:"center",alignItems:"center",borderRadius:"$0",border:"1px solid #FFFFFF",fontFamily:"$body",variants:{theme:{success:{bg:"$successLight",color:"$successDark"},warning:{bg:"$warningLight",color:"$tonal600"},danger:{bg:"$dangerLight",color:"$dangerDark"},neutral:{bg:"$tonal50",color:"$tonal400"},info:{bg:"$primaryLight",color:"$primaryMid"}},size:{xs:{fontSize:"$sm",px:"$3",height:"$2"},sm:{fontSize:"$md",px:"$4",height:"$3"},md:{fontSize:"$md",px:"$4",height:"$4"}}}}),t=({theme:o="info",size:r="sm",children:i,...s})=>e.createElement(l,{role:"status",theme:o,size:r,...s},e.createElement(a,{as:"div",css:{whiteSpace:"nowrap",overflowX:"hidden",textOverflow:"ellipsis",py:"$0"}},i));t.displayName="Badge";export{t as Badge};
@@ -1 +1 @@
1
- import{darken as i,opacify as s}from"color2k";import*as o from"react";import{Box as b}from"../box/Box.js";import{Icon as w}from"../icon/Icon.js";import{Loader as k}from"../loader/Loader.js";import{styled as v,theme as l}from"../../stitches.js";const d=(e,r,a)=>({border:"1px solid",borderColor:"currentColor",color:e,"&[disabled]":{borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"},"&:not([disabled]):hover, &:not([disabled]):focus":{textDecoration:"none",color:r},"&:not([disabled]):active":{color:a}}),n=(e,r,a,t="white")=>({bg:e,color:t,"&[disabled]":{bg:"$tonal100",color:"$tonal400",cursor:"not-allowed"},"&:not([disabled]):hover, &:not([disabled]):focus":{bg:r,color:t},"&:not([disabled]):active":{bg:a}}),p=v("button",{alignItems:"center",bg:"unset",border:"unset",borderRadius:"$0",cursor:"pointer",display:"flex",fontFamily:"$body",fontWeight:600,justifyContent:"center",p:"unset",textDecoration:"none",transition:"all 100ms ease-out",whiteSpace:"nowrap",width:"max-content",variants:{theme:{primary:{},secondary:{},success:{},warning:{},danger:{},neutral:{}},appearance:{solid:{},outline:{}},size:{sm:{fontSize:"$sm",lineHeight:1.53,height:"$3",px:"$4"},md:{fontSize:"$md",lineHeight:1.5,height:"$4",px:"$5"},lg:{fontSize:"$lg",lineHeight:1.5,height:"$5",px:"$5"}},isLoading:{true:{cursor:"not-allowed",opacity:.6,pointerEvents:"none"}},fullWidth:{false:{width:"max-content"},true:{width:"100%"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"primary",appearance:"solid",css:n("$primary","$primaryMid","$primaryDark")},{theme:"secondary",appearance:"solid",css:n("$primaryDark",i(l.colors.primaryDark.value,.1),i(l.colors.primaryDark.value,.15))},{theme:"success",appearance:"solid",css:n("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:n("$warning","$warningMid","$warningDark","$tonal500")},{theme:"danger",appearance:"solid",css:n("$danger","$dangerMid","$dangerDark")},{theme:"neutral",appearance:"solid",css:n("white",s("white",-.1),s("white",-.25),"$primary")},{theme:"primary",appearance:"outline",css:d("$primary","$primaryMid","$primaryDark")},{theme:"neutral",appearance:"outline",css:d("white",s("white",-.2),s("white",-.35))},{theme:"secondary",appearance:"outline",css:d("$primaryDark",i(l.colors.primaryDark.value,.1),i(l.colors.primaryDark.value,.15))}]}),D=({isLoading:e,children:r})=>o.createElement(o.Fragment,null,o.createElement(k,{css:{opacity:e?1:0,position:"absolute",transition:"opacity 150ms"}}),o.createElement(b,{as:"span",css:e?{opacity:0,transition:"opacity 150ms"}:{}},r)),x=e=>{switch(e){case"lg":return 22;case"md":return 20;case"sm":default:return 16}},m=(e,r)=>o.Children.map(e,(a,t)=>(a==null?void 0:a.type)===w?o.cloneElement(a,{css:{[t===0?"mr":"ml"]:r==="sm"?"$2":"$3",size:x(r),...a.props.css?a.props.css:{}}}):a),u=o.forwardRef(({children:e,isLoading:r,onClick:a,href:t,appearance:h="solid",size:c="md",theme:y="primary",type:g="button",...$},f)=>o.createElement(p,{isLoading:r||!1,onClick:r?void 0:a,appearance:h,size:c,theme:y,...$,...t?{as:"a",href:t,onClick:void 0}:{},...t?{}:{type:g},ref:f},typeof r=="boolean"?o.createElement(D,{isLoading:r},m(e,c)):m(e,c)));u.displayName="Button";export{u as Button,p as StyledButton};
1
+ import{darken as i,opacify as s}from"color2k";import*as o from"react";import{Box as b}from"../box/Box.js";import{Icon as w}from"../icon/Icon.js";import{Loader as k}from"../loader/Loader.js";import{styled as v,theme as l}from"../../stitches.js";const d=(e,r,a)=>({border:"1px solid",borderColor:"currentColor",color:e,"&[disabled]":{borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"},"&:not([disabled]):hover, &:not([disabled]):focus":{textDecoration:"none",color:r},"&:not([disabled]):active":{color:a}}),n=(e,r,a,t="white")=>({bg:e,color:t,"&[disabled]":{bg:"$tonal100",color:"$tonal400",cursor:"not-allowed"},"&:not([disabled]):hover, &:not([disabled]):focus":{bg:r,color:t},"&:not([disabled]):active":{bg:a}}),p=v("button",{alignItems:"center",bg:"unset",border:"unset",borderRadius:"$0",cursor:"pointer",display:"flex",fontFamily:"$body",fontWeight:600,justifyContent:"center",p:"unset",textDecoration:"none",transition:"all 100ms ease-out",whiteSpace:"nowrap",width:"max-content",variants:{theme:{primary:{},secondary:{},success:{},warning:{},danger:{},neutral:{}},appearance:{solid:{},outline:{}},size:{sm:{fontSize:"$sm",lineHeight:1.53,height:"$3",px:"$4"},md:{fontSize:"$md",lineHeight:1.5,height:"$4",px:"$5"},lg:{fontSize:"$lg",lineHeight:1.5,height:"$5",px:"$5"}},isLoading:{true:{cursor:"not-allowed",opacity:.6,pointerEvents:"none"}},fullWidth:{false:{width:"max-content"},true:{width:"100%"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"primary",appearance:"solid",css:n("$primary","$primaryMid","$primaryDark")},{theme:"secondary",appearance:"solid",css:n("$primaryDark",i(l.colors.primaryDark.value,.1),i(l.colors.primaryDark.value,.15))},{theme:"success",appearance:"solid",css:n("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:n("$warning","$warningMid","$warningDark","$tonal500")},{theme:"danger",appearance:"solid",css:n("$danger","$dangerMid","$dangerDark")},{theme:"neutral",appearance:"solid",css:n("white",s("white",-.1),s("white",-.25),"$primary")},{theme:"primary",appearance:"outline",css:d("$primary","$primaryMid","$primaryDark")},{theme:"neutral",appearance:"outline",css:d("white",s("white",-.2),s("white",-.35))},{theme:"secondary",appearance:"outline",css:d("$primaryDark",i(l.colors.primaryDark.value,.1),i(l.colors.primaryDark.value,.15))}]}),D=({isLoading:e,children:r})=>o.createElement(o.Fragment,null,o.createElement(k,{css:{opacity:e?1:0,position:"absolute",transition:"opacity 150ms"}}),o.createElement(b,{as:"span",css:e?{opacity:0,transition:"opacity 150ms"}:{}},r)),x=e=>{switch(e){case"lg":return 22;case"md":return 20;case"sm":default:return 16}},m=(e,r)=>o.Children.map(e,(a,t)=>(a==null?void 0:a.type)===w?o.cloneElement(a,{css:{[t===0?"mr":"ml"]:r==="sm"?"$2":"$3",size:x(r),...a.props.css?a.props.css:{}}}):a),u=o.forwardRef(({children:e,isLoading:r,onClick:a,href:t,appearance:h="solid",size:c="md",theme:y="primary",type:$="button",...g},f)=>o.createElement(p,{isLoading:r||!1,onClick:r?void 0:a,appearance:h,size:c,theme:y,...g,...t?{as:"a",href:t,onClick:void 0}:{},...t?{}:{type:$},ref:f},typeof r=="boolean"?o.createElement(D,{isLoading:r},m(e,c)):m(e,c)));u.displayName="Button";export{u as Button,p as StyledButton};
@@ -8,12 +8,15 @@ export declare type CalendarTranslationProps = {
8
8
  open: string;
9
9
  next: string;
10
10
  previous: string;
11
+ nextYear: string;
12
+ previousYear: string;
11
13
  };
12
14
  };
13
15
  declare type CalendarProps = DayzedInterface & CalendarTranslationProps & {
14
16
  css?: CSS;
15
17
  refDateToday?: React.RefObject<HTMLButtonElement>;
16
18
  refDateSelected?: React.RefObject<HTMLButtonElement>;
19
+ setYear: (date: Date) => Promise<void>;
17
20
  };
18
21
  export declare const Calendar: React.FC<CalendarProps>;
19
22
  export {};
@@ -1 +1 @@
1
- import{ChevronLeft as I,ChevronRight as S}from"@atom-learning/icons";import{useDayzed as B}from"dayzed";import*as e from"react";import{ActionIcon as h}from"../action-icon/ActionIcon.js";import{Box as y}from"../box/Box.js";import{Flex as g}from"../flex/Flex.js";import{Heading as M}from"../heading/Heading.js";import{Icon as u}from"../icon/Icon.js";import{Text as W}from"../text/Text.js";import{styled as j}from"../../stitches.js";import{monthNamesShort as A,weekdayNamesShort as F}from"./constants.js";import{Day as G}from"./Day.js";const $=j("div",{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gridGap:"$1 $2"}),H=(t,r)=>{const s=t.slice(0,r);return t.slice(r).concat(s)},E=({css:t,refDateSelected:r,refDateToday:s,firstDayOfWeek:l=0,monthNames:x=A,weekdayNames:k=F,labels:c={next:"Next month",previous:"Previous month"},...v})=>{const{calendars:o,getBackProps:D,getForwardProps:b,getDateProps:N}=B({firstDayOfWeek:l,showOutsideDays:!0,...v});return o.length?e.createElement(y,{css:{position:"relative",width:"min-content",mt:"-$1",...t}},e.createElement(g,{css:{position:"absolute",top:0,right:"-$1"}},e.createElement(h,{label:c.previous,theme:"neutral",size:"lg",...D({calendars:o})},e.createElement(u,{is:I})),e.createElement(h,{label:c.next,theme:"neutral",size:"lg",...b({calendars:o})},e.createElement(u,{is:S}))),o.map(({month:a,year:m,weeks:w})=>e.createElement(y,{key:`${a}${m}`},e.createElement(g,{css:{height:"$4",alignItems:"center",mb:"$4"}},e.createElement(M,{size:"xs"},x[a]," ",m)),e.createElement($,{css:{mb:"$3"}},H(k,l).map(n=>e.createElement(W,{as:"span",size:"sm",key:`${a}${m}${n}`,css:{fontWeight:600,textAlign:"center"}},n))),e.createElement($,null,w.map((n,z)=>n.map((i,C)=>{const p=`${a}${m}${z}${C}`;if(!i)return e.createElement("div",{key:p});const{date:O,selected:d,today:f,prevMonth:P,nextMonth:T}=i;return e.createElement(G,{isOutsideMonth:P||T,isSelected:d,isToday:f,key:p,ref:d?r:f?s:null,...N({dateObj:i}),type:"button"},O.getDate())})))))):null};E.displayName="Calendar";export{E as Calendar};
1
+ import{ChevronLeft as q,ChevronRight as H}from"@atom-learning/icons";import{useDayzed as J}from"dayzed";import*as e from"react";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Box as h}from"../box/Box.js";import{Flex as C}from"../flex/Flex.js";import{Icon as Y}from"../icon/Icon.js";import{Text as K}from"../text/Text.js";import{Button as w}from"../button/Button.js";import{styled as F}from"../../stitches.js";import{monthNamesShort as Q,weekdayNamesShort as V,DEFAULT_LABELS as X}from"./constants.js";import{Day as Z}from"./Day.js";const g=F("div",{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gridGap:"$1 $2"}),ee=F(w,{color:"$tonal600",p:"$3",width:"$6",variants:{selected:{false:{color:"$tonal600 !important",fontWeight:"400","&:hover":{bg:"$tonal100 !important",color:"$tonal600 !important"},"&[disabled]":{bg:"white !important"}}}}}),te=(i,c)=>{const u=i.slice(0,c);return i.slice(c).concat(u)},S=({css:i,refDateSelected:c,refDateToday:u,firstDayOfWeek:f=0,monthNames:N=Q,weekdayNames:T=V,labels:y=X,date:o=new Date,minDate:l,maxDate:s,setYear:A,...L})=>{const[a,E]=e.useState(!1),[m,k]=e.useState(o==null?void 0:o.getFullYear()),O=t=>{const r=o;r.setFullYear(t),A(r),E(!1)},W=l&&m-16<=l.getFullYear(),z=s&&m>=s.getFullYear(),B=Array.from({length:16},(t,r)=>{const n=m-r;return s&&n>s.getFullYear()||l&&n<l.getFullYear()?0:n}),{calendars:d,getBackProps:I,getForwardProps:M,getDateProps:G}=J({firstDayOfWeek:f,showOutsideDays:!0,date:o,minDate:l,maxDate:s,...L});return d.length?e.createElement(h,{css:{position:"relative",width:"min-content",mt:"-$1",...i}},e.createElement(C,{css:{position:"absolute",top:0,right:"-$1"}},e.createElement(x,{label:y[a?"previousYear":"previous"],theme:"neutral",size:"lg",...!a&&I({calendars:d}),...a&&{onClick:()=>k(m-16)},disabled:a&&W},e.createElement(Y,{is:q})),e.createElement(x,{label:y[a?"nextYear":"next"],theme:"neutral",size:"lg",...!a&&M({calendars:d}),...a&&{onClick:()=>k(m+16)},disabled:a&&z},e.createElement(Y,{is:H}))),a&&e.createElement(g,{css:{gridTemplateColumns:"repeat(4, 1fr)",pt:"$7",direction:"rtl",gridGap:"$3 $1"}},B.map((t,r)=>{const n=t===o.getFullYear();return t?e.createElement(ee,{key:`${t}${r}`,theme:n?"primary":"neutral",isRounded:!0,onClick:()=>O(t),selected:n},t):e.createElement(h,{key:r,css:{width:"$6",height:"$4"}})})),!a&&d.map(({month:t,year:r,weeks:n})=>e.createElement(h,{key:`${t}${r}`},e.createElement(C,{css:{height:"$4",alignItems:"center",mb:"$4"}},e.createElement(w,{theme:"neutral",css:{px:"0",color:"$tonal600"},onClick:()=>E(!0)},N[t]," ",r)),e.createElement(g,{css:{mb:"$3"}},te(T,f).map(p=>e.createElement(K,{as:"span",size:"sm",key:`${t}${r}${p}`,css:{fontWeight:600,textAlign:"center"}},p))),e.createElement(g,null,n.map((p,P)=>p.map(($,R)=>{const D=`${t}${r}${P}${R}`;if(!$)return e.createElement("div",{key:D});const{date:j,selected:b,today:v,prevMonth:U,nextMonth:_}=$;return e.createElement(Z,{isOutsideMonth:U||_,isSelected:b,isToday:v,key:D,ref:b?c:v?u:null,...G({dateObj:$}),type:"button"},j.getDate())})))))):null};S.displayName="Calendar";export{S as Calendar};
@@ -1,2 +1,9 @@
1
1
  export declare const monthNamesShort: string[];
2
2
  export declare const weekdayNamesShort: string[];
3
+ export declare const DEFAULT_LABELS: {
4
+ open: string;
5
+ next: string;
6
+ previous: string;
7
+ nextYear: string;
8
+ previousYear: string;
9
+ };
@@ -1 +1 @@
1
- const e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];export{e as monthNamesShort,a as weekdayNamesShort};
1
+ const e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o={open:"Open calendar",next:"Next month",previous:"Previous month",nextYear:"Next year",previousYear:"Previous year"};export{o as DEFAULT_LABELS,e as monthNamesShort,r as weekdayNamesShort};
@@ -1 +1 @@
1
- import{ChevronLeft as s,ChevronRight as i}from"@atom-learning/icons";import{ButtonBack as a,ButtonNext as l}from"pure-react-carousel";import*as r from"react";import{Icon as o}from"../icon/Icon.js";import{styled as t}from"../../stitches.js";const n={alignItems:"center",bg:"unset",border:"unset",color:"$primary",cursor:"pointer",display:"flex",justifyContent:"center",p:"unset",size:"$5",top:"50%",transform:"translateY(-50%)",transition:"color 0.15s ease-in-out","&:hover":{color:"$primaryMid"},"&:active":{color:"$primaryDark"},"&:disabled":{color:"$tonal100"}},m=t(a,n),c=t(l,n),p=e=>r.createElement(m,{...e},r.createElement(o,{is:s})),u=e=>r.createElement(c,{...e},r.createElement(o,{is:i}));export{u as CarouselArrowNext,p as CarouselArrowPrevious};
1
+ import{ChevronLeft as s,ChevronRight as i}from"@atom-learning/icons";import{ButtonBack as a,ButtonNext as l}from"pure-react-carousel";import*as r from"react";import{Icon as t}from"../icon/Icon.js";import{styled as o}from"../../stitches.js";const n={alignItems:"center",bg:"unset",border:"unset",color:"$primary",cursor:"pointer",display:"flex",justifyContent:"center",p:"unset",size:"$5",top:"50%",transform:"translateY(-50%)",transition:"color 0.15s ease-in-out","&:hover":{color:"$primaryMid"},"&:active":{color:"$primaryDark"},"&:disabled":{color:"$tonal100"}},m=o(a,n),c=o(l,n),p=e=>r.createElement(m,{...e},r.createElement(t,{is:s})),u=e=>r.createElement(c,{...e},r.createElement(t,{is:i}));export{u as CarouselArrowNext,p as CarouselArrowPrevious};
@@ -1 +1 @@
1
- import{Minus as i,Ok as l}from"@atom-learning/icons";import*as e from"@radix-ui/react-checkbox";import*as o from"react";import{styled as t}from"../../stitches.js";import{Icon as s}from"../icon/Icon.js";const d=t(e.Indicator,{display:"flex",alignItems:"center",justifyContent:"center"}),c=t(e.Root,{appearance:"none",backgroundColor:"transparent",border:"1px solid $colors$tonal400",borderRadius:"3px",color:"white",cursor:"pointer",size:"$1",p:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 50ms ease-out",'&[data-state="checked"]':{backgroundColor:"$primary",borderColor:"$primary"},'&[data-state="indeterminate"]':{backgroundColor:"$primary",borderColor:"$primary"},"&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},"&[disabled]":{backgroundColor:"$tonal100",borderColor:"$tonal400",cursor:"not-allowed",color:"$tonal400"},variants:{state:{error:{borderColor:"$danger"}}}}),a=o.forwardRef((r,n)=>o.createElement(c,{...r,ref:n},o.createElement(d,null,o.createElement(s,{is:r.checked==="indeterminate"?i:l,css:{pointerEvents:"none",position:"absolute",strokeWidth:"3",size:14}}))));a.displayName="Checkbox";export{a as Checkbox};
1
+ import{Minus as i,Ok as l}from"@atom-learning/icons";import*as r from"@radix-ui/react-checkbox";import*as o from"react";import{styled as t}from"../../stitches.js";import{Icon as s}from"../icon/Icon.js";const d=t(r.Indicator,{display:"flex",alignItems:"center",justifyContent:"center"}),c=t(r.Root,{appearance:"none",backgroundColor:"transparent",border:"1px solid $colors$tonal400",borderRadius:"3px",color:"white",cursor:"pointer",size:"$1",p:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 50ms ease-out",'&[data-state="checked"]':{backgroundColor:"$primary",borderColor:"$primary"},'&[data-state="indeterminate"]':{backgroundColor:"$primary",borderColor:"$primary"},"&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},"&[disabled]":{backgroundColor:"$tonal100",borderColor:"$tonal400",cursor:"not-allowed",color:"$tonal400"},variants:{state:{error:{borderColor:"$danger"}}}}),a=o.forwardRef((e,n)=>o.createElement(c,{...e,ref:n},o.createElement(d,null,o.createElement(s,{is:e.checked==="indeterminate"?i:l,css:{pointerEvents:"none",position:"absolute",strokeWidth:"3",size:14}}))));a.displayName="Checkbox";export{a as Checkbox};
@@ -1 +1 @@
1
- import{Combobox as t,ComboboxOptionText as b}from"@reach/combobox";import*as r from"react";import{globalCss as p,styled as i}from"../../stitches.js";import{ComboboxInput as x}from"./ComboboxInput.js";import{ComboboxList as e}from"./ComboboxList.js";import{ComboboxOption as n}from"./ComboboxOption.js";import{ComboboxPopover as s}from"./ComboboxPopover.js";p({":root":{"--reach-combobox":1}})();const C=i(t,{}),o=m=>r.createElement(C,{...m});o.displayName="Combobox",o.Option=n,o.Input=x,o.Popover=s,o.List=e,o.OptionText=b;export{o as Combobox};
1
+ import{Combobox as t,ComboboxOptionText as b}from"@reach/combobox";import*as r from"react";import{globalCss as p,styled as i}from"../../stitches.js";import{ComboboxInput as e}from"./ComboboxInput.js";import{ComboboxList as x}from"./ComboboxList.js";import{ComboboxOption as n}from"./ComboboxOption.js";import{ComboboxPopover as s}from"./ComboboxPopover.js";p({":root":{"--reach-combobox":1}})();const C=i(t,{}),o=m=>r.createElement(C,{...m});o.displayName="Combobox",o.Option=n,o.Input=e,o.Popover=s,o.List=x,o.OptionText=b;export{o as Combobox};
@@ -1 +1 @@
1
- import{CalendarEvent as N}from"@atom-learning/icons";import*as e from"react";import{ActionIcon as z}from"../action-icon/ActionIcon.js";import{Box as A}from"../box/Box.js";import{Calendar as I}from"../calendar/Calendar.js";import{Icon as T}from"../icon/Icon.js";import{Input as k}from"../input/Input.js";import{Popover as n}from"../popover/Popover.js";import{DEFAULT_DATE_FORMAT as x}from"./constants.js";import{useDate as F}from"./use-date.js";const D=e.forwardRef(({initialDate:E,dateFormat:h=x,firstDayOfWeek:g=1,disabled:r,monthNames:v,weekdayNames:b,size:s="md",labels:m={open:"Open calendar",next:"Next month",previous:"Previous month"},revalidate:l,onChange:o,...C},y)=>{const{date:t,dateString:O,setDate:i}=F(E,h),[w,d]=e.useState(!1),p=e.useRef(null),u=e.useRef(null);return e.useEffect(()=>{o==null||o(t)},[t,o]),e.createElement(A,{css:{position:"relative"}},e.createElement(k,{name:"date",disabled:r,size:s,...C,onChange:a=>i(a.target.value,!0),value:O,ref:y}),e.createElement(n,{modal:!0,open:w,onOpenChange:d},e.createElement(n.Trigger,{asChild:!0},e.createElement(z,{css:{position:"absolute",top:0,right:0},disabled:r,label:m.open,size:s==="sm"?"md":"lg",theme:"neutral"},e.createElement(T,{size:"sm",is:N}))),e.createElement(n.Content,{css:{pr:"$sizes$2"},side:"bottom",align:"end",showCloseButton:!1,onOpenAutoFocus:a=>{var c,f;a.preventDefault(),t?(c=u.current)==null||c.focus():(f=p.current)==null||f.focus()}},e.createElement(I,{date:t||new Date,selected:t,onDateSelected:async a=>{d(!1),await i(a.date,!1),l&&l()},refDateToday:p,refDateSelected:u,firstDayOfWeek:g,monthNames:v,weekdayNames:b,labels:m}))))});D.displayName="DateInput";export{D as DateInput};
1
+ import{CalendarEvent as I}from"@atom-learning/icons";import*as e from"react";import{ActionIcon as L}from"../action-icon/ActionIcon.js";import{Box as N}from"../box/Box.js";import{Calendar as O}from"../calendar/Calendar.js";import{DEFAULT_LABELS as S}from"../calendar/constants.js";import{Icon as k}from"../icon/Icon.js";import{Input as x}from"../input/Input.js";import{Popover as m}from"../popover/Popover.js";import{DEFAULT_DATE_FORMAT as R}from"./constants.js";import{useDate as B}from"./use-date.js";const D=e.forwardRef(({initialDate:E,dateFormat:g=R,firstDayOfWeek:h=1,disabled:s,monthNames:b,weekdayNames:v,size:l="md",labels:y,revalidate:o,onChange:n,minDate:C,maxDate:w,...A},z)=>{const{date:a,dateString:T,setDate:r}=B(E,g),i={...S,...y},[F,d]=e.useState(!1),f=e.useRef(null),c=e.useRef(null);return e.useEffect(()=>{n==null||n(a)},[a,n]),e.createElement(N,{css:{position:"relative"}},e.createElement(x,{name:"date",disabled:s,size:l,...A,onChange:t=>r(t.target.value,!0),value:T,ref:z}),e.createElement(m,{modal:!0,open:F,onOpenChange:d},e.createElement(m.Trigger,{asChild:!0},e.createElement(L,{css:{position:"absolute",top:0,right:0},disabled:s,label:i.open,size:l==="sm"?"md":"lg",theme:"neutral"},e.createElement(k,{size:"sm",is:I}))),e.createElement(m.Content,{css:{pr:"$sizes$2"},side:"bottom",align:"end",showCloseButton:!1,onOpenAutoFocus:t=>{var p,u;t.preventDefault(),a?(p=c.current)==null||p.focus():(u=f.current)==null||u.focus()}},e.createElement(O,{date:a||new Date,selected:a,onDateSelected:async t=>{d(!1),await r(t.date,!1),o&&o()},setYear:async t=>{await r(t,!1),o&&o()},minDate:C,maxDate:w,refDateToday:f,refDateSelected:c,firstDayOfWeek:h,monthNames:b,weekdayNames:v,labels:i}))))});D.displayName="DateInput";export{D as DateInput};
@@ -1 +1 @@
1
- import{Close as h}from"@atom-learning/icons";import{Overlay as x,Content as b,Portal as g,Close as w}from"@radix-ui/react-dialog";import*as t from"react";import{DIALOG_Z_INDEX as r}from"../../constants/dialog.js";import{keyframes as n,styled as l}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as $}from"../icon/Icon.js";import{DialogBackground as s}from"./DialogBackground.js";import{fadeIn as z,fadeOut as C}from"../../utilities/style/keyframe-animations.js";const e="translate3d(-50%, -50%, 0)",m="translate3d(-50%, 50vh, 0)",d="modal_overlay",D=n({"0%":{transform:m},"100%":{transform:e}}),I=n({"0%":{transform:e},"100%":{transform:m}}),y=l(x,{backgroundColor:"$alpha600",inset:0,position:"fixed",overflowY:"auto",zIndex:r,"@allowMotion":{'&[data-state="open"]':{animation:`${z} 250ms ease-out`},'&[data-state="closed"]':{animation:`${C} 550ms ease-out`}}}),E=l(b,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",maxHeight:"90vh",overflowY:"auto",p:"$5",position:"fixed",top:"50%",transform:e,zIndex:r,"&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${D} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${I} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{xs:{width:"380px"},sm:{width:"480px"},md:{width:"600px"},lg:{width:"800px"},xl:{width:"1100px"}}}}),O=({size:p="sm",children:a,closeDialogText:f="Close dialog",showCloseButton:c=!0,...u})=>t.createElement(g,null,t.createElement(y,{id:d},t.Children.map(a,o=>(o==null?void 0:o.type)===s&&o),t.createElement(E,{size:p,"aria-label":"Dialog",onPointerDownOutside:o=>{const i=o.target;(i==null?void 0:i.id)!==d&&o.preventDefault()},...u},c&&t.createElement(v,{as:w,css:{position:"absolute",right:"$4",top:"$4"},label:f,size:"lg",theme:"neutral"},t.createElement($,{is:h})),t.Children.map(a,o=>(o==null?void 0:o.type)!==s&&o))));export{O as DialogContent};
1
+ import{Close as h}from"@atom-learning/icons";import{Overlay as x,Content as b,Portal as g,Close as w}from"@radix-ui/react-dialog";import*as o from"react";import{DIALOG_Z_INDEX as r}from"../../constants/dialog.js";import{keyframes as n,styled as l}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as $}from"../icon/Icon.js";import{DialogBackground as s}from"./DialogBackground.js";import{fadeIn as z,fadeOut as C}from"../../utilities/style/keyframe-animations.js";const e="translate3d(-50%, -50%, 0)",m="translate3d(-50%, 50vh, 0)",d="modal_overlay",D=n({"0%":{transform:m},"100%":{transform:e}}),I=n({"0%":{transform:e},"100%":{transform:m}}),y=l(x,{backgroundColor:"$alpha600",inset:0,position:"fixed",overflowY:"auto",zIndex:r,"@allowMotion":{'&[data-state="open"]':{animation:`${z} 250ms ease-out`},'&[data-state="closed"]':{animation:`${C} 550ms ease-out`}}}),E=l(b,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",maxHeight:"90vh",overflowY:"auto",p:"$5",position:"fixed",top:"50%",transform:e,zIndex:r,"&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${D} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${I} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{xs:{width:"380px"},sm:{width:"480px"},md:{width:"600px"},lg:{width:"800px"},xl:{width:"1100px"}}}}),O=({size:p="sm",children:a,closeDialogText:f="Close dialog",showCloseButton:c=!0,...u})=>o.createElement(g,null,o.createElement(y,{id:d},o.Children.map(a,t=>(t==null?void 0:t.type)===s&&t),o.createElement(E,{size:p,"aria-label":"Dialog",onPointerDownOutside:t=>{const i=t.target;(i==null?void 0:i.id)!==d&&t.preventDefault()},...u},c&&o.createElement(v,{as:w,css:{position:"absolute",right:"$4",top:"$4"},label:f,size:"lg",theme:"neutral"},o.createElement($,{is:h})),o.Children.map(a,t=>(t==null?void 0:t.type)!==s&&t))));export{O as DialogContent};
@@ -1 +1 @@
1
- import t from"react";import{styled as n}from"../../stitches.js";const i=n("hr",{border:0,bg:"$tonal200",variants:{orientation:{horizontal:{height:1,width:"100%"},vertical:{height:"100%",width:1,minHeight:"$3"}}}}),a=t.forwardRef(({orientation:r="horizontal",...e},o)=>t.createElement(i,{ref:o,orientation:r,...e}));export{a as Divider,i as StyledDivider};
1
+ import t from"react";import{styled as n}from"../../stitches.js";const i=n("hr",{border:0,bg:"$tonal200",variants:{orientation:{horizontal:{height:1,width:"100%"},vertical:{height:"100%",width:1,minHeight:"$3"}}}}),a=t.forwardRef(({orientation:e="horizontal",...r},o)=>t.createElement(i,{ref:o,orientation:e,...r}));export{a as Divider,i as StyledDivider};
@@ -1 +1 @@
1
- import e from"react";import{styled as n}from"../../stitches.js";import{DropdownMenuItem as m}from"./DropdownMenuItem.js";const i=n("a",{textDecoration:"none"}),l=({children:o,href:t,...r})=>e.createElement(m,{...r,asChild:!0},e.createElement(i,{href:t,role:"menuitem"},o));export{l as DropdownMenuLinkItem};
1
+ import e from"react";import{styled as n}from"../../stitches.js";import{DropdownMenuItem as m}from"./DropdownMenuItem.js";const i=n("a",{textDecoration:"none"}),l=({children:t,href:o,...r})=>e.createElement(m,{...r,asChild:!0},e.createElement(i,{href:o,role:"menuitem"},t));export{l as DropdownMenuLinkItem};
@@ -1 +1 @@
1
- import*as e from"react";import{Text as r}from"../text/Text.js";const s=({children:o,css:t})=>e.createElement(r,{size:"sm",css:{color:"$tonal300",maxWidth:"80ch",...t}},o);export{s as Description};
1
+ import*as t from"react";import{Text as r}from"../text/Text.js";const s=({children:e,css:o})=>t.createElement(r,{size:"sm",css:{color:"$tonal300",maxWidth:"80ch",...o}},e);export{s as Description};
@@ -1 +1 @@
1
- import*as e from"react";import{Box as m}from"../box/Box.js";import{Checkbox as d}from"../checkbox/Checkbox.js";import{Label as f}from"../label/Label.js";import{RadioButton as $}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";import{ValidationError as E}from"../validation-error/ValidationError.js";import{Description as u}from"./FieldDescription.js";const l=({align:n="start",children:a,css:s,description:i,direction:t="row",error:o,label:p,required:c})=>e.createElement(m,{css:s},e.createElement(f,{align:n,direction:t,required:c,type:"inline"},e.Children.map(a,r=>e.createElement(m,{css:{[t==="reverse"?"ml":"mr"]:"$3",...((r==null?void 0:r.type)===d||(r==null?void 0:r.type)===$)&&{transform:"translateY($space$1)"}}},r)),p),o&&e.createElement(E,{css:{mt:"$2"}},o),i&&e.createElement(u,{css:{mt:"$2",[t==="reverse"?"mr":"ml"]:"calc($space$3 + $sizes$1)"}},i));l.displayName="InlineFieldWrapper";export{l as InlineFieldWrapper};
1
+ import*as e from"react";import{Box as m}from"../box/Box.js";import{Checkbox as d}from"../checkbox/Checkbox.js";import{Label as $}from"../label/Label.js";import{RadioButton as f}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";import{ValidationError as E}from"../validation-error/ValidationError.js";import{Description as u}from"./FieldDescription.js";const l=({align:n="start",children:a,css:s,description:i,direction:t="row",error:o,label:p,required:c})=>e.createElement(m,{css:s},e.createElement($,{align:n,direction:t,required:c,type:"inline"},e.Children.map(a,r=>e.createElement(m,{css:{[t==="reverse"?"ml":"mr"]:"$3",...((r==null?void 0:r.type)===d||(r==null?void 0:r.type)===f)&&{transform:"translateY($space$1)"}}},r)),p),o&&e.createElement(E,{css:{mt:"$2"}},o),i&&e.createElement(u,{css:{mt:"$2",[t==="reverse"?"mr":"ml"]:"calc($space$3 + $sizes$1)"}},i));l.displayName="InlineFieldWrapper";export{l as InlineFieldWrapper};
@@ -1 +1 @@
1
- import{Upload as c}from"@atom-learning/icons";import*as e from"react";import{Button as s}from"../button/Button.js";import{Icon as u}from"../icon/Icon.js";const t=({accept:l,children:o,multiple:i=!1,onFileSelect:n,...r})=>{const p=a=>{const{files:m}=a.target;n(m)};return e.createElement(s,{as:"label",...r},e.createElement(u,{is:c}),o,e.createElement("input",{type:"file",onChange:p,accept:l,multiple:i,hidden:!0}))};t.displayName="FileInput";export{t as FileInput};
1
+ import{Upload as c}from"@atom-learning/icons";import*as e from"react";import{Button as s}from"../button/Button.js";import{Icon as u}from"../icon/Icon.js";const t=({accept:l,children:i,multiple:n=!1,onFileSelect:o,...r})=>{const p=a=>{const{files:m}=a.target;o(m)};return e.createElement(s,{as:"label",...r},e.createElement(u,{is:c}),i,e.createElement("input",{type:"file",onChange:p,accept:l,multiple:n,hidden:!0}))};t.displayName="FileInput";export{t as FileInput};
@@ -1 +1 @@
1
- import*as p from"react";import{theme as r,styled as d}from"../../stitches.js";const o=Object.keys(r.space).reduce((a,e)=>({...a,[e]:{gap:`$space$${e}`}}),{}),c=d("div",{display:"grid",variants:{gap:o}}),i=({css:a,gap:e=2,minItemSize:t,maxItemSize:m="1fr",...s})=>p.createElement(c,{css:{...t&&{gridTemplateColumns:`repeat(auto-fit, minmax(${t}, ${m}))`},...a},gap:e,...s});i.displayName="Grid";export{i as Grid};
1
+ import*as p from"react";import{theme as r,styled as d}from"../../stitches.js";const c=Object.keys(r.space).reduce((a,e)=>({...a,[e]:{gap:`$space$${e}`}}),{}),o=d("div",{display:"grid",variants:{gap:c}}),i=({css:a,gap:e=2,minItemSize:t,maxItemSize:m="1fr",...s})=>p.createElement(o,{css:{...t&&{gridTemplateColumns:`repeat(auto-fit, minmax(${t}, ${m}))`},...a},gap:e,...s});i.displayName="Grid";export{i as Grid};
@@ -1 +1 @@
1
- import*as i from"react";import{styled as a}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const t=a("h2",{color:"$tonal600",fontFamily:"$display",fontWeight:700,m:0,variants:{size:{xs:{fontFamily:"$body",fontWeight:600,fontSize:"$md",lineHeight:1.5,...e(.3864)},sm:{fontSize:"$lg",lineHeight:1.14,...e(.2174,.2254)},md:{fontSize:"$xl",lineHeight:1.14,...e(.2174,.2254)},lg:{fontSize:"$2xl",lineHeight:1.08,...e(.1865,.1945)},xl:{fontSize:"$3xl",lineHeight:1.12,...e(.206,.214)},xxl:{fontSize:"$4xl",lineHeight:1.06,...e(.1793,.1873)}}}}),o=i.forwardRef(({size:l="md",...n},f)=>i.createElement(t,{ref:f,size:l,...n}));o.displayName="Heading";export{o as Heading,t as StyledHeading};
1
+ import*as i from"react";import{styled as a}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const t=a("h2",{color:"$tonal600",fontFamily:"$display",fontWeight:700,m:0,variants:{size:{xs:{fontFamily:"$body",fontWeight:600,fontSize:"$md",lineHeight:1.5,...e(.3864)},sm:{fontSize:"$lg",lineHeight:1.14,...e(.2174,.2254)},md:{fontSize:"$xl",lineHeight:1.14,...e(.2174,.2254)},lg:{fontSize:"$2xl",lineHeight:1.08,...e(.1865,.1945)},xl:{fontSize:"$3xl",lineHeight:1.12,...e(.206,.214)},xxl:{fontSize:"$4xl",lineHeight:1.06,...e(.1793,.1873)}}}}),l=i.forwardRef(({size:n="md",...o},f)=>i.createElement(t,{ref:f,size:n,...o}));l.displayName="Heading";export{l as Heading,t as StyledHeading};
@@ -1 +1 @@
1
- import*as e from"react";import{styled as t}from"../../stitches.js";import{textVariantSize as d}from"../text/Text.js";const{sm:p,md:y}=d(),f=t("label",{color:"$tonal500",fontFamily:"$body",m:0,variants:{size:{sm:p,md:y},type:{block:{display:"block",fontWeight:600},inline:{display:"flex",fontWeight:400,maxWidth:"max-content"}},align:{start:{},center:{}},direction:{reverse:{},row:{}}},compoundVariants:[{type:"inline",align:"start",css:{alignItems:"flex-start"}},{type:"inline",align:"center",css:{alignItems:"center"}},{type:"inline",direction:"reverse",css:{flexDirection:"row-reverse"}},{type:"inline",direction:"row",css:{flexDirection:"row"}}]}),g=t("span",{color:"$danger",ml:"$1",fontWeight:400}),i=({align:n="start",as:r="label",direction:a="row",size:o="md",type:l="block",children:s,required:c,...m})=>e.createElement(f,{as:r,size:o,type:l,align:n,direction:a,...m},s,c&&e.createElement(g,{"aria-hidden":!0},"*"));i.displayName="Label";export{i as Label};
1
+ import*as e from"react";import{styled as t}from"../../stitches.js";import{textVariantSize as d}from"../text/Text.js";const{sm:p,md:y}=d(),f=t("label",{color:"$tonal500",fontFamily:"$body",m:0,variants:{size:{sm:p,md:y},type:{block:{display:"block",fontWeight:600},inline:{display:"flex",fontWeight:400,maxWidth:"max-content"}},align:{start:{},center:{}},direction:{reverse:{},row:{}}},compoundVariants:[{type:"inline",align:"start",css:{alignItems:"flex-start"}},{type:"inline",align:"center",css:{alignItems:"center"}},{type:"inline",direction:"reverse",css:{flexDirection:"row-reverse"}},{type:"inline",direction:"row",css:{flexDirection:"row"}}]}),g=t("span",{color:"$danger",ml:"$1",fontWeight:400}),i=({align:n="start",as:r="label",direction:a="row",size:l="md",type:o="block",children:s,required:c,...m})=>e.createElement(f,{as:r,size:l,type:o,align:n,direction:a,...m},s,c&&e.createElement(g,{"aria-hidden":!0},"*"));i.displayName="Label";export{i as Label};
@@ -1 +1 @@
1
- import*as e from"react";import{styled as f}from"../../stitches.js";import{StyledHeading as l}from"../heading/Heading.js";import{StyledLi as s}from"../list/List.js";import{StyledText as c,textVariantSize as d}from"../text/Text.js";const r=f("a",{bg:"unset",border:"unset",p:"unset",color:"$primary",cursor:"pointer",fontFamily:"$body",textDecoration:"none","&:focus, &:hover":{color:"$primaryMid",textDecoration:"underline"},"&:active":{color:"$primaryDark"},[`${c} > &, ${l} > &, ${s} > &`]:{fontSize:"100%",lineHeight:1,"&::before, &::after":{content:"none"}},variants:{size:d()}}),a=e.forwardRef(({size:o="md",onClick:m,href:t,...i},n)=>t?e.createElement(r,{size:o,...i,ref:n,href:t}):e.createElement(r,{as:"button",size:o,...i,ref:n,onClick:m}));a.displayName="Link";export{a as Link,r as StyledLink};
1
+ import*as e from"react";import{styled as f}from"../../stitches.js";import{StyledHeading as l}from"../heading/Heading.js";import{StyledLi as s}from"../list/List.js";import{StyledText as c,textVariantSize as d}from"../text/Text.js";const r=f("a",{bg:"unset",border:"unset",p:"unset",color:"$primary",cursor:"pointer",fontFamily:"$body",textDecoration:"none","&:focus, &:hover":{color:"$primaryMid",textDecoration:"underline"},"&:active":{color:"$primaryDark"},[`${c} > &, ${l} > &, ${s} > &`]:{fontSize:"100%",lineHeight:1,"&::before, &::after":{content:"none"}},variants:{size:d()}}),a=e.forwardRef(({size:t="md",onClick:m,href:o,...i},n)=>o?e.createElement(r,{size:t,...i,ref:n,href:o}):e.createElement(r,{as:"button",size:t,...i,ref:n,onClick:m}));a.displayName="Link";export{a as Link,r as StyledLink};
@@ -1 +1 @@
1
- import d from"mdast-util-directive";import k from"mdast-util-from-markdown";import f from"micromark-extension-directive";import*as p from"react";import{StackContent as l}from"../stack-content/StackContent.js";import{MarkdownCode as c}from"./components/MarkdownCode.js";import{MarkdownEmphasis as w}from"./components/MarkdownEmphasis.js";import{MarkdownHeading as M}from"./components/MarkdownHeading.js";import{MarkdownInlineCode as h}from"./components/MarkdownInlineCode.js";import{MarkdownImage as u}from"./components/MarkdownImage.js";import{MarkdownLink as g}from"./components/MarkdownLink.js";import{MarkdownList as C}from"./components/MarkdownList.js";import{MarkdownListItem as $}from"./components/MarkdownListItem.js";import{MarkdownParagraph as x}from"./components/MarkdownParagraph.js";import{MarkdownStrong as y}from"./components/MarkdownStrong.js";import{MarkdownText as E}from"./components/MarkdownText.js";import{MarkdownThematicBreak as I}from"./components/MarkdownThematicBreak.js";const L={code:c,emphasis:w,heading:M,inlineCode:h,image:u,link:g,list:C,listItem:$,paragraph:x,strong:y,text:E,thematicBreak:I},v=o=>{var r,t;if((r=o.position)!=null&&r.start){const{line:e,column:m,offset:n}=(t=o.position)==null?void 0:t.start;return`${o.type}${e}${m}${n}`}return`${o.type}${+new Date}`},s=({content:o,customComponents:r={},css:t})=>{const e=k(o,{extensions:[f()],mdastExtensions:[d.fromMarkdown]}),m={...L,...r},n=a=>{const i=m[a.type];return i?p.createElement(i,{key:v(a),node:a,handleNode:n}):null};return p.createElement(l,{css:t},e.children.map(n))};s.displayName="MarkdownContent";export{s as MarkdownContent};
1
+ import d from"mdast-util-directive";import k from"mdast-util-from-markdown";import f from"micromark-extension-directive";import*as p from"react";import{StackContent as l}from"../stack-content/StackContent.js";import{MarkdownCode as c}from"./components/MarkdownCode.js";import{MarkdownEmphasis as w}from"./components/MarkdownEmphasis.js";import{MarkdownHeading as M}from"./components/MarkdownHeading.js";import{MarkdownInlineCode as h}from"./components/MarkdownInlineCode.js";import{MarkdownImage as u}from"./components/MarkdownImage.js";import{MarkdownLink as g}from"./components/MarkdownLink.js";import{MarkdownList as $}from"./components/MarkdownList.js";import{MarkdownListItem as C}from"./components/MarkdownListItem.js";import{MarkdownParagraph as x}from"./components/MarkdownParagraph.js";import{MarkdownStrong as y}from"./components/MarkdownStrong.js";import{MarkdownText as E}from"./components/MarkdownText.js";import{MarkdownThematicBreak as I}from"./components/MarkdownThematicBreak.js";const L={code:c,emphasis:w,heading:M,inlineCode:h,image:u,link:g,list:$,listItem:C,paragraph:x,strong:y,text:E,thematicBreak:I},v=o=>{var r,t;if((r=o.position)!=null&&r.start){const{line:e,column:m,offset:n}=(t=o.position)==null?void 0:t.start;return`${o.type}${e}${m}${n}`}return`${o.type}${+new Date}`},s=({content:o,customComponents:r={},css:t})=>{const e=k(o,{extensions:[f()],mdastExtensions:[d.fromMarkdown]}),m={...L,...r},n=a=>{const i=m[a.type];return i?p.createElement(i,{key:v(a),node:a,handleNode:n}):null};return p.createElement(l,{css:t},e.children.map(n))};s.displayName="MarkdownContent";export{s as MarkdownContent};
@@ -1 +1 @@
1
- import*as t from"react";import{styled as e}from"../../../stitches.js";import{Box as r}from"../../box/Box.js";const m=e(r,{bg:"$tonal100",borderRadius:"$1",color:"$tonal600",fontFamily:"$mono",fontSize:"$sm",lineHeight:1.4,my:"$4",p:"$3"}),n=({node:o})=>t.createElement(m,{as:"pre"},o.value);export{n as MarkdownCode};
1
+ import*as e from"react";import{styled as t}from"../../../stitches.js";import{Box as r}from"../../box/Box.js";const m=t(r,{bg:"$tonal100",borderRadius:"$1",color:"$tonal600",fontFamily:"$mono",fontSize:"$sm",lineHeight:1.4,my:"$4",p:"$3"}),n=({node:o})=>e.createElement(m,{as:"pre"},o.value);export{n as MarkdownCode};
@@ -1 +1 @@
1
- import*as t from"react";import{styled as r}from"../../../stitches.js";const l=r("em",{fontStyle:"italic"}),a=({node:e,handleNode:n})=>{var o;return t.createElement(l,null,(o=e.children)==null?void 0:o.map(n))};export{a as MarkdownEmphasis};
1
+ import*as t from"react";import{styled as r}from"../../../stitches.js";const l=r("em",{fontStyle:"italic"}),a=({node:o,handleNode:n})=>{var e;return t.createElement(l,null,(e=o.children)==null?void 0:e.map(n))};export{a as MarkdownEmphasis};
@@ -1 +1 @@
1
- import*as i from"react";import{Heading as o}from"../../heading/Heading.js";const c=s=>{switch(s){case 1:return{size:"xl",as:"h1"};case 2:return{size:"lg",as:"h2"};case 3:return{size:"md",as:"h3"};case 4:return{size:"sm",as:"h4"};case 5:return{size:"xs",as:"h5"};default:return{size:"xs",as:"h6"}}},d=({node:s,handleNode:r,css:a})=>{var e;const{as:n,size:t}=c(s.depth);return i.createElement(o,{as:n,size:t,css:{color:"inherit",...a}},(e=s.children)==null?void 0:e.map(r))};export{d as MarkdownHeading};
1
+ import*as i from"react";import{Heading as c}from"../../heading/Heading.js";const o=e=>{switch(e){case 1:return{size:"xl",as:"h1"};case 2:return{size:"lg",as:"h2"};case 3:return{size:"md",as:"h3"};case 4:return{size:"sm",as:"h4"};case 5:return{size:"xs",as:"h5"};default:return{size:"xs",as:"h6"}}},d=({node:e,handleNode:r,css:a})=>{var s;const{as:n,size:t}=o(e.depth);return i.createElement(c,{as:n,size:t,css:{color:"inherit",...a}},(s=e.children)==null?void 0:s.map(r))};export{d as MarkdownHeading};
@@ -1 +1 @@
1
- import*as e from"react";import{Image as t}from"../../image/Image.js";const m=({node:r,css:a})=>{var o;return e.createElement(t,{src:r.url,alt:(o=r.alt)!=null?o:void 0,css:a})};export{m as MarkdownImage};
1
+ import*as o from"react";import{Image as t}from"../../image/Image.js";const m=({node:r,css:a})=>{var e;return o.createElement(t,{src:r.url,alt:(e=r.alt)!=null?e:void 0,css:a})};export{m as MarkdownImage};
@@ -1 +1 @@
1
- import*as l from"react";import{Link as i}from"../../link/Link.js";const n=({node:e,handleNode:t})=>{var r,o;return l.createElement(i,{title:(r=e.title)!=null?r:void 0,href:e.url},(o=e.children)==null?void 0:o.map(t))};export{n as MarkdownLink};
1
+ import*as l from"react";import{Link as i}from"../../link/Link.js";const n=({node:e,handleNode:o})=>{var r,t;return l.createElement(i,{title:(r=e.title)!=null?r:void 0,href:e.url},(t=e.children)==null?void 0:t.map(o))};export{n as MarkdownLink};
@@ -1 +1 @@
1
- import*as r from"react";import{List as n}from"../../list/List.js";const m=({node:t,handleNode:o})=>{var e;return r.createElement(n.Item,null,(e=t.children)==null?void 0:e.map(o))};export{m as MarkdownListItem};
1
+ import*as o from"react";import{List as n}from"../../list/List.js";const m=({node:t,handleNode:r})=>{var e;return o.createElement(n.Item,null,(e=t.children)==null?void 0:e.map(r))};export{m as MarkdownListItem};
@@ -1 +1 @@
1
- import*as n from"react";import{Text as t}from"../../text/Text.js";const c=({node:o,handleNode:e,css:a})=>{var r;return n.createElement(t,{css:{color:"inherit",...a}},(r=o.children)==null?void 0:r.map(e))};export{c as MarkdownParagraph};
1
+ import*as n from"react";import{Text as t}from"../../text/Text.js";const c=({node:e,handleNode:o,css:a})=>{var r;return n.createElement(t,{css:{color:"inherit",...a}},(r=e.children)==null?void 0:r.map(o))};export{c as MarkdownParagraph};
@@ -1 +1 @@
1
- import*as t from"react";import{styled as e}from"../../../stitches.js";const d=e("strong",{fontWeight:600}),l=({node:n,handleNode:r})=>{var o;return t.createElement(d,null,(o=n.children)==null?void 0:o.map(r))};export{l as MarkdownStrong};
1
+ import*as r from"react";import{styled as t}from"../../../stitches.js";const d=t("strong",{fontWeight:600}),l=({node:e,handleNode:n})=>{var o;return r.createElement(d,null,(o=e.children)==null?void 0:o.map(n))};export{l as MarkdownStrong};
@@ -1 +1 @@
1
- import*as e from"react";import{Divider as o}from"../../divider/Divider.js";const t=({css:r})=>e.createElement(o,{css:{width:"100%",...r}});export{t as MarkdownThematicBreak};
1
+ import*as r from"react";import{Divider as t}from"../../divider/Divider.js";const o=({css:e})=>r.createElement(t,{css:{width:"100%",...e}});export{o as MarkdownThematicBreak};
@@ -1 +1 @@
1
- import o from"react";import{styled as e}from"../../stitches.js";import{Box as i}from"../box/Box.js";import{Flex as n}from"../flex/Flex.js";const l=e(i,{position:"relative"}),a=e(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:"$primary"}),m=({value:t,children:r})=>o.createElement(l,null,!!t&&o.createElement(a,{role:"status"},t),r);export{m as NotificationBadge};
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:"$primary"}),m=({value:t,children:r})=>e.createElement(l,null,!!t&&e.createElement(a,{role:"status"},t),r);export{m as NotificationBadge};
@@ -1 +1 @@
1
- import*as e from"react";import{useFormContext as V,Controller as C}from"react-hook-form";import{Description as F}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{Label as g}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as h}from"../radio-button/RadioButtonGroup.js";import{ValidationError as v}from"../validation-error/ValidationError.js";import{styled as B}from"../../stitches.js";import{RadioField as R}from"./RadioField.js";const $=B("fieldset",{all:"unset"}),r=({children:d,css:u,direction:s="column",defaultValue:t,description:l,label:c,name:n,validation:o,onValueChange:a})=>{const{control:p}=V(),{error:i}=b(n);return e.createElement($,{css:u},e.createElement(g,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(o==null?void 0:o.required)},c),l&&e.createElement(F,{css:{mb:"$3"}},l),e.createElement(C,{control:p,name:n,rules:o,defaultValue:t,render:({onChange:f,value:E})=>e.createElement(h,{direction:s,defaultValue:t,onValueChange:m=>{f(m),a==null||a(m)},value:E},d)}),i&&e.createElement(v,{css:{mt:"$2"}},i))};r.Item=R,r.displayName="RadioButtonField";export{r as RadioButtonField};
1
+ import*as e from"react";import{useFormContext as V,Controller as C}from"react-hook-form";import{Description as F}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{Label as g}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as h}from"../radio-button/RadioButtonGroup.js";import{ValidationError as v}from"../validation-error/ValidationError.js";import{styled as B}from"../../stitches.js";import{RadioField as R}from"./RadioField.js";const q=B("fieldset",{all:"unset"}),r=({children:d,css:u,direction:s="column",defaultValue:t,description:l,label:c,name:n,validation:o,onValueChange:a})=>{const{control:p}=V(),{error:i}=b(n);return e.createElement(q,{css:u},e.createElement(g,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(o==null?void 0:o.required)},c),l&&e.createElement(F,{css:{mb:"$3"}},l),e.createElement(C,{control:p,name:n,rules:o,defaultValue:t,render:({onChange:f,value:E})=>e.createElement(h,{direction:s,defaultValue:t,onValueChange:m=>{f(m),a==null||a(m)},value:E},d)}),i&&e.createElement(v,{css:{mt:"$2"}},i))};r.Item=R,r.displayName="RadioButtonField";export{r as RadioButtonField};
@@ -1 +1 @@
1
- import*as d from"@radix-ui/react-radio-group";import*as e from"react";import{Stack as p}from"../stack/Stack.js";import{RadioCard as c}from"./RadioCard.js";const f=({css:t,children:r,size:o,isFullWidth:l,align:a,gap:s="3",justify:m,...n})=>e.createElement(d.Root,{...n},e.createElement(p,{direction:"row",justify:m,gap:s,css:t},e.Children.map(r,i=>e.isValidElement(i)&&(i==null?void 0:i.type)===c?e.cloneElement(i,{size:o,isFullWidth:l,align:a}):i)));export{f as RadioCardGroup};
1
+ import*as d from"@radix-ui/react-radio-group";import*as e from"react";import{Stack as p}from"../stack/Stack.js";import{RadioCard as c}from"./RadioCard.js";const f=({css:t,children:r,size:l,isFullWidth:o,align:a,gap:s="3",justify:m,...n})=>e.createElement(d.Root,{...n},e.createElement(p,{direction:"row",justify:m,gap:s,css:t},e.Children.map(r,i=>e.isValidElement(i)&&(i==null?void 0:i.type)===c?e.cloneElement(i,{size:l,isFullWidth:o,align:a}):i)));export{f as RadioCardGroup};
@@ -1 +1 @@
1
- import{Search as R,Close as b}from"@atom-learning/icons";import*as t from"react";import{ActionIcon as g}from"../action-icon/ActionIcon.js";import{Box as v}from"../box/Box.js";import{Icon as i}from"../icon/Icon.js";import{Input as d}from"../input/Input.js";import{styled as l}from"../../stitches.js";var z=(e=>(e.SEARCH="SEARCH",e.CLEAR="CLEAR",e))(z||{});const f=l(i,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),$=l(d,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),c=({size:e="md",css:m,value:s,clearText:p="Clear",onChange:r,...u})=>{const[E,a]=t.useState(s||""),[C,n]=t.useState(s?"CLEAR":"SEARCH"),h=()=>{a(""),n("SEARCH"),r==null||r({currentTarget:{value:""},target:{value:""}})},S=o=>{a(o.target.value),n(o.target.value?"CLEAR":"SEARCH"),r==null||r(o)},A=()=>C==="SEARCH"?t.createElement(f,{is:R,size:e,css:{size:e=="sm"?"$1":20}}):t.createElement(g,{label:p,theme:"neutral",size:e=="sm"?"md":"lg",css:{position:"absolute",top:0,right:0},onClick:h},t.createElement(i,{is:b}));return t.createElement(v,{css:{position:"relative",...m}},t.createElement($,{size:e,type:"search",...u,value:E,onChange:S,css:{pr:e==="sm"?"$5":"$6"}}),A())};c.displayName="SearchInput";export{c as SearchInput};
1
+ import{Search as w,Close as z}from"@atom-learning/icons";import*as t from"react";import{ActionIcon as y}from"../action-icon/ActionIcon.js";import{Box as I}from"../box/Box.js";import{Icon as l}from"../icon/Icon.js";import{Input as $}from"../input/Input.js";import{styled as c}from"../../stitches.js";import{useCallbackRef as k}from"../../utilities/hooks/useCallbackRef.js";var H=(e=>(e.SEARCH="SEARCH",e.CLEAR="CLEAR",e))(H||{});const L=c(l,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),x=c($,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),p=({size:e="md",css:m,value:n,clearText:u="Clear",onChange:a,...E})=>{const[h,C]=k(),[b,v]=t.useState(n||""),[d,f]=t.useState(n?"CLEAR":"SEARCH"),A=()=>{var r,i;const o=h.current;if(!o)return;const s=(r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set;(i=s==null?void 0:s.call)==null||i.call(s,o,"");const R=new Event("input",{bubbles:!0});o.dispatchEvent(R),o.focus()},S=r=>{v(r.target.value),f(r.target.value?"CLEAR":"SEARCH"),a==null||a(r)},g=()=>d==="SEARCH"?t.createElement(L,{is:w,size:e,css:{size:e=="sm"?"$1":20}}):t.createElement(y,{label:u,theme:"neutral",size:e=="sm"?"md":"lg",css:{position:"absolute",top:0,right:0},onClick:A},t.createElement(l,{is:z}));return t.createElement(I,{css:{position:"relative",...m}},t.createElement(x,{ref:C,size:e,type:"search",...E,value:b,onChange:S,css:{pr:e==="sm"?"$5":"$6"}}),g())};p.displayName="SearchInput";export{p as SearchInput};
@@ -1 +1 @@
1
- import e from"react";import{useFormContext as x,Controller as E}from"react-hook-form";import{FieldWrapper as V}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import{Slider as l}from"../slider/Slider.js";const n=({css:u,label:i,name:t,defaultValue:a,outputLabel:d,min:r=0,max:m=100,steps:p=[],...s})=>{const{control:c}=x();return e.createElement(V,{css:u,fieldId:t,label:i},e.createElement(E,{control:c,name:t,defaultValue:a,render:({onChange:f,value:o})=>e.createElement(l,{name:t,defaultValue:a,onValueChange:f,value:o,min:r,max:m,...s},e.createElement(l.Steps,{min:r,max:m,steps:p}),e.createElement(l.Value,{value:o||a,outputLabel:d}))}))};n.displayName="SliderField";export{n as SliderField};
1
+ import e from"react";import{useFormContext as x,Controller as E}from"react-hook-form";import{FieldWrapper as V}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import{Slider as l}from"../slider/Slider.js";const o=({css:u,label:i,name:t,defaultValue:a,outputLabel:d,min:r=0,max:m=100,steps:p=[],...s})=>{const{control:c}=x();return e.createElement(V,{css:u,fieldId:t,label:i},e.createElement(E,{control:c,name:t,defaultValue:a,render:({onChange:f,value:n})=>e.createElement(l,{name:t,defaultValue:a,onValueChange:f,value:n,min:r,max:m,...s},e.createElement(l.Steps,{min:r,max:m,steps:p}),e.createElement(l.Value,{value:n||a,outputLabel:d}))}))};o.displayName="SliderField";export{o as SliderField};
@@ -1 +1 @@
1
- import*as s from"react";import{theme as p,styled as c}from"../../stitches.js";import{CSSWrapper as f}from"../../utilities/css-wrapper/CSSWrapper.js";const m=Object.keys(p.space).reduce((t,e)=>({...t,[e]:{mt:`-$space$${e}`,ml:`-$space$${e}`,"& > *":{mt:`$space$${e}`,ml:`$space$${e}`}}}),{}),w=c("div",{display:"flex","& > *":{m:0},variants:{direction:{row:{flexDirection:"row"},"row-reverse":{flexDirection:"row-reverse"},column:{flexDirection:"column"}},wrap:{wrap:{flexWrap:"wrap"},"no-wrap":{flexWrap:"no-wrap"},"wrap-reverse":{flexWrap:"wrap-reverse"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},false:{}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"},false:{}},gap:{...m,false:{}}}}),n=({css:t,gap:e=2,direction:r="row",wrap:i="wrap",justify:l="start",align:a,...o})=>s.createElement(f,{css:t},s.createElement(w,{direction:r,gap:e,wrap:i,justify:l,align:typeof a>"u"&&r!=="column"?"center":a,...o}));n.displayName="Stack";export{n as Stack};
1
+ import*as s from"react";import{theme as c,styled as o}from"../../stitches.js";import{CSSWrapper as f}from"../../utilities/css-wrapper/CSSWrapper.js";const m=Object.keys(c.space).reduce((t,e)=>({...t,[e]:{mt:`-$space$${e}`,ml:`-$space$${e}`,"& > *":{mt:`$space$${e}`,ml:`$space$${e}`}}}),{}),w=o("div",{display:"flex","& > *":{m:0},variants:{direction:{row:{flexDirection:"row"},"row-reverse":{flexDirection:"row-reverse"},column:{flexDirection:"column"}},wrap:{wrap:{flexWrap:"wrap"},"no-wrap":{flexWrap:"no-wrap"},"wrap-reverse":{flexWrap:"wrap-reverse"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},false:{}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"},false:{}},gap:{...m,false:{}}}}),n=({css:t,gap:e=2,direction:r="row",wrap:i="wrap",justify:l="start",align:a,...p})=>s.createElement(f,{css:t},s.createElement(w,{direction:r,gap:e,wrap:i,justify:l,align:typeof a>"u"&&r!=="column"?"center":a,...p}));n.displayName="Stack";export{n as Stack};
@@ -1 +1 @@
1
- import*as t from"react";import{styled as r}from"../../stitches.js";import{StyledDivider as d}from"../divider/Divider.js";import{StyledHeading as e}from"../heading/Heading.js";import{StyledImage as l}from"../image/Image.js";import{StyledList as a}from"../list/List.js";import{StyledText as c}from"../text/Text.js";const n=r("div",{[`& > ${e}`]:{maxWidth:"65ch","&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}},[`& > ${c}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${a}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${d}`]:{my:"$5"},[`& > ${l}`]:{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}}),o=t.forwardRef((m,i)=>t.createElement(n,{ref:i,...m}));o.displayName="StackContent";export{o as StackContent};
1
+ import*as t from"react";import{styled as r}from"../../stitches.js";import{StyledDivider as d}from"../divider/Divider.js";import{StyledHeading as e}from"../heading/Heading.js";import{StyledImage as l}from"../image/Image.js";import{StyledList as a}from"../list/List.js";import{StyledText as c}from"../text/Text.js";const n=r("div",{[`& > ${e}`]:{maxWidth:"65ch","&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}},[`& > ${c}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${a}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${d}`]:{my:"$5"},[`& > ${l}`]:{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}}),m=t.forwardRef((o,i)=>t.createElement(n,{ref:i,...o}));m.displayName="StackContent";export{m as StackContent};
@@ -263,7 +263,7 @@ export declare const StepperStepBullet: import("@stitches/react/types/styled-com
263
263
  };
264
264
  };
265
265
  }>>, {
266
- status?: "success" | "default" | "active" | "viewed" | undefined;
266
+ status?: "success" | "default" | "active" | "viewed" | "completed" | "reviewed" | undefined;
267
267
  }, {
268
268
  sm: string;
269
269
  md: string;
@@ -1 +1 @@
1
- import{styled as e}from"../../stitches.js";import{Flex as o}from"../flex/Flex.js";const r=e(o,{position:"relative",p:"$2",justifyContent:"center",alignItems:"center",size:"$3",borderRadius:"50%",border:"none",bg:"$tonal50",zIndex:1,flex:"none",variants:{status:{default:{bg:"$tonal50",color:"$tonal400"},active:{bg:"white",color:"$primaryMid",border:"2px solid",borderColor:"currentColor"},viewed:{bg:"$primary",color:"white"},success:{bg:"$success",color:"white"}}}});export{r as StepperStepBullet};
1
+ import{styled as e}from"../../stitches.js";import{Flex as o}from"../flex/Flex.js";const r=e(o,{position:"relative",p:"$2",justifyContent:"center",alignItems:"center",size:"$3",borderRadius:"50%",border:"none",bg:"$tonal50",zIndex:1,flex:"none",variants:{status:{default:{bg:"$tonal50",color:"$tonal300"},active:{bg:"white",color:"$primaryMid",border:"2px solid",borderColor:"currentColor"},viewed:{bg:"white",border:"2px solid $tonal200",color:"$tonal600"},completed:{bg:"$primary",color:"white"},reviewed:{bg:"$primaryMid",color:"white"},success:{bg:"$success",color:"white"}}}});export{r as StepperStepBullet};
@@ -265,6 +265,7 @@ export declare const StepperStepContainer: import("@stitches/react/types/styled-
265
265
  }>>, {
266
266
  direction?: "horizontal" | "vertical" | undefined;
267
267
  separator?: "success" | "default" | "active" | undefined;
268
+ status?: "success" | "default" | "active" | "viewed" | "completed" | "reviewed" | undefined;
268
269
  }, {
269
270
  sm: string;
270
271
  md: string;
@@ -1 +1 @@
1
- import{styled as t}from"../../stitches.js";import{Flex as e}from"../flex/Flex.js";const o=t(e,{position:"relative",fontFamily:"$body",fontWeight:600,fontSize:"$md",alignItems:"center","&:not(:last-child)::after":{content:"",position:"absolute"},variants:{direction:{vertical:{py:"$3",flexDirection:"row","&:not(:last-child)::after":{height:"100%",width:"4px",left:"14px",top:"50%"}},horizontal:{px:"$2",flexDirection:"column","&:not(:last-child)::after":{width:"100%",height:"4px",left:"50%",top:"14px"}}},separator:{default:{"&:not(:last-child)::after":{bg:"$tonal50"}},active:{"&:not(:last-child)::after":{bg:"$primary"}},success:{"&:not(:last-child)::after":{bg:"$success"}}}}});export{o as StepperStepContainer};
1
+ import{styled as t}from"../../stitches.js";import{Flex as i}from"../flex/Flex.js";const o=t(i,{position:"relative",fontFamily:"$body",fontWeight:600,fontSize:"$md",alignItems:"center","&:not(:last-child)::after":{content:"",position:"absolute"},"&:focus-visible":{outline:"none"},variants:{direction:{vertical:{py:"$3",flexDirection:"row","&:not(:last-child)::after":{height:"100%",width:"4px",left:"14px",top:"50%"}},horizontal:{px:"$2",flexDirection:"column","&:not(:last-child)::after":{width:"100%",height:"4px",left:"50%",top:"14px"}}},separator:{default:{"&:not(:last-child)::after":{bg:"$tonal50"}},active:{"&:not(:last-child)::after":{bg:"$primary"}},success:{"&:not(:last-child)::after":{bg:"$success"}}},status:{completed:{"&:hover":{"& :first-child":{bg:"$primaryMid",color:"white !important"},"& :last-child":{color:"$primaryMid"}},"&:focus-visible":{"& :first-child":{outline:"2px solid $primary",outlineOffset:"2px"}}},active:{"&:hover":{"& :first-child":{borderColor:"$tonal400",color:"$tonal600"},"& :last-child":{color:"$tonal600"}},"&:focus-visible":{"& :first-child":{outline:"2px solid $primary",outlineOffset:"2px"}}},default:{},viewed:{"&:focus-visible":{"& :first-child":{outline:"2px solid $primary !important",outlineOffset:"2px !important"}}},success:{},reviewed:{"&:focus-visible":{"& :first-child":{outline:"2px solid $primary !important",outlineOffset:"2px !important"}}}}}});export{o as StepperStepContainer};
@@ -1 +1 @@
1
- import*as n from"react";import{Button as p}from"../button/Button.js";import{useStepper as m}from"./stepper-context/StepperContext.js";const c=({label:e,children:r,onClick:o,...i})=>{const{goToNextStep:t,activeStep:l}=m();return n.createElement(p,{size:"sm",...i,onClick:()=>{if(o)return o(t);t==null||t()},css:{ml:"auto"}},r||(e==null?void 0:e(l)))};export{c as StepperStepForward};
1
+ import*as n from"react";import{Button as p}from"../button/Button.js";import{useStepper as m}from"./stepper-context/StepperContext.js";const c=({label:t,children:r,onClick:o,...i})=>{const{goToNextStep:e,activeStep:l}=m();return n.createElement(p,{size:"sm",...i,onClick:()=>{if(o)return o(e);e==null||e()},css:{ml:"auto"}},r||(t==null?void 0:t(l)))};export{c as StepperStepForward};
@@ -273,7 +273,7 @@ export declare const StepperStepLabel: import("@stitches/react/types/styled-comp
273
273
  as?: import("react").ElementType<any> | import("react").ComponentType<{}> | undefined;
274
274
  }>, {
275
275
  direction?: "horizontal" | "vertical" | undefined;
276
- status?: "success" | "default" | "active" | "viewed" | undefined;
276
+ status?: "success" | "default" | "active" | "viewed" | "completed" | "reviewed" | undefined;
277
277
  }, {
278
278
  sm: string;
279
279
  md: string;
@@ -1 +1 @@
1
- import{styled as t}from"../../stitches.js";import{Text as e}from"../text/Text.js";const o=t(e,{fontWeight:600,variants:{direction:{vertical:{ml:"$3",textAlign:"left"},horizontal:{mt:"$3",textAlign:"center"}},status:{default:{color:"$tonal400",fontWeight:400},active:{color:"$primaryMid"},viewed:{color:"$primary"},success:{color:"$success"}}}});export{o as StepperStepLabel};
1
+ import{styled as t}from"../../stitches.js";import{Text as e}from"../text/Text.js";const o=t(e,{fontWeight:600,variants:{direction:{vertical:{ml:"$3",textAlign:"left"},horizontal:{mt:"$3",textAlign:"center"}},status:{default:{color:"$tonal300",fontWeight:400},active:{color:"$primaryMid"},viewed:{color:"$tonal600"},completed:{color:"$primary"},success:{color:"$success"},reviewed:{}}}});export{o as StepperStepLabel};
@@ -1 +1 @@
1
- import{Ok as f}from"@atom-learning/icons";import*as i from"react";import{styled as b}from"../../stitches.js";import{Flex as v}from"../flex/Flex.js";import{Icon as h}from"../icon/Icon.js";import{useStepper as C}from"./stepper-context/StepperContext.js";import{StepperStepBullet as w}from"./StepperStepBullet.js";import{StepperStepContainer as D}from"./StepperStepContainer.js";import{StepperStepLabel as $}from"./StepperStepLabel.js";import{Status as r}from"./types.js";const x=b(v,{justifyContent:"space-between",variants:{direction:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),I=({css:m})=>{const{steps:o,goToStep:p,activeStep:c,viewedSteps:a,allowSkip:n,direction:l,hideLabels:u}=C(),d=t=>{const e=o[t];return e.status?e.status:c===t?r.ACTIVE:a.includes(t)?r.VIEWED:r.DEFAULT},S=t=>{var e;const s=(e=o[t])==null?void 0:e.status;return s===r.SUCCESS?r.SUCCESS:s===r.VIEWED||t<Math.max(...a)?r.ACTIVE:r.DEFAULT};return i.createElement(x,{css:m,direction:l},o.map((t,e)=>{const s=d(e),E=S(e);return i.createElement(D,{key:`step_${e}`,direction:l,separator:E,css:l==="horizontal"?{width:`calc(100% / ${o.length})`}:{height:`calc(100% / ${o.length})`}},i.createElement(w,{as:n?"button":"div",onClick:()=>n&&a.includes(e)?p==null?void 0:p(e):void 0,status:s,"aria-current":e===c?"step":void 0,"aria-label":t.label?"":`step ${e+1}`,"aria-labelledby":t.label?`step-${e}`:void 0,css:{cursor:n&&a.includes(e)?"pointer":"auto"}},t.status==="success"?i.createElement(h,{is:f}):e+1),t.label&&!u&&i.createElement($,{as:"span",id:`step-${e}`,direction:l,status:s},t.label))}))};export{I as StepperSteps};
1
+ import{Ok as f}from"@atom-learning/icons";import*as i from"react";import{styled as b}from"../../stitches.js";import{Flex as h}from"../flex/Flex.js";import{Icon as v}from"../icon/Icon.js";import{useStepper as g}from"./stepper-context/StepperContext.js";import{StepperStepBullet as D}from"./StepperStepBullet.js";import{StepperStepContainer as I}from"./StepperStepContainer.js";import{StepperStepLabel as U}from"./StepperStepLabel.js";import{Status as r}from"./types.js";const x=b(h,{justifyContent:"space-between",variants:{direction:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),T=({css:u})=>{const{steps:s,goToStep:m,activeStep:l,viewedSteps:n,allowSkip:c,direction:a,hideLabels:S,completedSteps:p}=g(),d=t=>{const e=s[t];return e.status?e.status:p.length===s.length?r.SUCCESS:l===t&&p.includes(l)?r.REVIEWED:l===t?r.ACTIVE:p.includes(t)?r.COMPLETED:n.includes(t)?r.VIEWED:r.DEFAULT},E=t=>{var e;const o=(e=s[t])==null?void 0:e.status;return p.length===s.length?r.SUCCESS:o===r.SUCCESS?r.SUCCESS:o===r.VIEWED||t<Math.max(...n)?r.ACTIVE:r.DEFAULT};return i.createElement(x,{css:u,direction:a},s.map((t,e)=>{const o=d(e),C=E(e);return i.createElement(I,{tabIndex:0,key:`step_${e}`,direction:a,separator:C,status:o,css:a==="horizontal"?{width:`calc(100% / ${s.length})`}:{height:`calc(100% / ${s.length})`}},i.createElement(D,{as:c?"button":"div",onClick:()=>c&&n.includes(e)?m==null?void 0:m(e):void 0,status:o,"aria-current":e===l?"step":void 0,"aria-label":t.label?"":`step ${e+1}`,"aria-labelledby":t.label?`step-${e}`:void 0,css:{cursor:c&&n.includes(e)?"pointer":"auto"}},t.status==="success"?i.createElement(v,{is:f}):e+1),t.label&&!S&&i.createElement(U,{as:"span",id:`step-${e}`,direction:a,status:o},t.label))}))};export{T as StepperSteps};
@@ -1 +1 @@
1
- import*as o from"react";const a=o.createContext({steps:[],goToPreviousStep:()=>null,goToNextStep:()=>null,goToStep:()=>null,activeStep:0,viewedSteps:[],allowSkip:!1,direction:"horizontal",hideLabels:!1}),T=({children:r,stepCount:n,allowSkip:u,onComplete:s,onStepChange:p,direction:S,steps:c,hideLabels:d})=>{const[t,i]=o.useState(0),[v,h]=o.useState([0]),l=!n;o.useEffect(()=>{h(e=>e.includes(t)?e:[...e,t]),p==null||p(t)},[t,p]);const w=()=>{if(s&&t===n-1)return s();if(t<n-1)return i(e=>e+1)},f=()=>{i(e=>e-1)},g=e=>{i(e)};return o.createElement(a.Provider,{value:{steps:c||Array(n).fill(""),goToPreviousStep:l?void 0:f,goToNextStep:l?void 0:w,goToStep:l?void 0:g,activeStep:t,viewedSteps:v,allowSkip:u,direction:S,hideLabels:d}},r)},m=()=>{const r=o.useContext(a);if(!r)throw new Error("Ensure that you wrap any components with the root component Stepper");return r};export{T as StepperProvider,m as useStepper};
1
+ import*as o from"react";const c=o.createContext({steps:[],goToPreviousStep:()=>null,goToNextStep:()=>null,goToStep:()=>null,activeStep:0,viewedSteps:[],allowSkip:!1,direction:"horizontal",hideLabels:!1,completedSteps:[]}),P=({children:n,stepCount:r,allowSkip:a,onComplete:p,onStepChange:s,direction:d,steps:v,hideLabels:h})=>{const[e,l]=o.useState(0),[w,m]=o.useState([0]),[g,f]=o.useState([]),u=!r;o.useEffect(()=>{m(t=>t.includes(e)?t:[...t,e]),s==null||s(e)},[e,s]);const T=()=>{const t=p&&e===r-1,S=e<r-1;if((p||S)&&f(i=>i.includes(e)?i:[...i,e]),t)return p==null?void 0:p();if(S)return l(i=>i+1)},x=()=>{l(t=>t-1)},C=t=>{l(t)};return o.createElement(c.Provider,{value:{steps:v||Array(r).fill(""),goToPreviousStep:u?void 0:x,goToNextStep:u?void 0:T,goToStep:u?void 0:C,activeStep:e,viewedSteps:w,completedSteps:g,allowSkip:a,direction:d,hideLabels:h}},n)},b=()=>{const n=o.useContext(c);if(!n)throw new Error("Ensure that you wrap any components with the root component Stepper");return n};export{P as StepperProvider,b as useStepper};
@@ -3,7 +3,9 @@ export declare enum Status {
3
3
  ACTIVE = "active",
4
4
  VIEWED = "viewed",
5
5
  SUCCESS = "success",
6
- DEFAULT = "default"
6
+ DEFAULT = "default",
7
+ COMPLETED = "completed",
8
+ REVIEWED = "reviewed"
7
9
  }
8
10
  export interface Step {
9
11
  label?: string;
@@ -17,6 +19,7 @@ export declare type Context = {
17
19
  goToStep?: (index: number) => void;
18
20
  activeStep: number;
19
21
  viewedSteps: number[];
22
+ completedSteps: number[];
20
23
  allowSkip?: boolean;
21
24
  direction?: Direction;
22
25
  hideLabels: boolean;
@@ -1 +1 @@
1
- var E=(t=>(t.ACTIVE="active",t.VIEWED="viewed",t.SUCCESS="success",t.DEFAULT="default",t))(E||{});export{E as Status};
1
+ var t=(E=>(E.ACTIVE="active",E.VIEWED="viewed",E.SUCCESS="success",E.DEFAULT="default",E.COMPLETED="completed",E.REVIEWED="reviewed",E))(t||{});export{t as Status};
@@ -1 +1 @@
1
- import*as o from"@radix-ui/react-switch";import*as r from"react";import{styled as a}from"../../stitches.js";const n=a(o.Root,{appearance:"none",backgroundColor:"$tonal200",border:"none",borderRadius:"$round",cursor:"pointer",display:"flex",overflow:"hidden",p:"$0",position:"relative",transition:"all 50ms ease-out",width:"$4","&:hover":{backgroundColor:"$tonal300"},"&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},'&[data-state="checked"]':{backgroundColor:"$primary"},'&[data-state="checked"]:hover':{backgroundColor:"$primaryMid"}}),i=a(o.Thumb,{backgroundColor:"white",borderRadius:"$round",display:"block",size:"$1",transition:"transform 50ms",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(calc($sizes$2 - $space$1))"}}),e=t=>r.createElement(n,{...t},r.createElement(i,null));e.displayName="Switch";export{e as Switch};
1
+ import*as o from"@radix-ui/react-switch";import*as r from"react";import{styled as e}from"../../stitches.js";const n=e(o.Root,{appearance:"none",backgroundColor:"$tonal200",border:"none",borderRadius:"$round",cursor:"pointer",display:"flex",overflow:"hidden",p:"$0",position:"relative",transition:"all 50ms ease-out",width:"$4","&:hover":{backgroundColor:"$tonal300"},"&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},'&[data-state="checked"]':{backgroundColor:"$primary"},'&[data-state="checked"]:hover':{backgroundColor:"$primaryMid"}}),i=e(o.Thumb,{backgroundColor:"white",borderRadius:"$round",display:"block",size:"$1",transition:"transform 50ms",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(calc($sizes$2 - $space$1))"}}),a=t=>r.createElement(n,{...t},r.createElement(i,null));a.displayName="Switch";export{a as Switch};
@@ -1 +1 @@
1
- import*as r from"react";import{styled as d}from"../../stitches.js";import{TableRow as i}from"./TableRow.js";const a=d("tbody",{variants:{striped:{true:{[`${i}`]:{"&:nth-child(odd)":{bg:"white"},"&:nth-child(even)":{bg:"$tonal50"}}},false:{bg:"white"}}}}),t=({striped:e=!0,...o})=>r.createElement(a,{striped:e,...o});t.displayName="TableBody";export{t as TableBody};
1
+ import*as r from"react";import{styled as d}from"../../stitches.js";import{TableRow as i}from"./TableRow.js";const a=d("tbody",{variants:{striped:{true:{[`${i}`]:{"&:nth-child(odd)":{bg:"white"},"&:nth-child(even)":{bg:"$tonal50"}}},false:{bg:"white"}}}}),e=({striped:t=!0,...o})=>r.createElement(a,{striped:t,...o});e.displayName="TableBody";export{e as TableBody};
@@ -1 +1 @@
1
- import m from"react";import{styled as l}from"../../stitches.js";import{TableHeaderCell as r}from"./TableHeaderCell.js";const o=l("thead",{variants:{theme:{primary:{[`${r}`]:{bg:"$primary"}},primaryDark:{[`${r}`]:{bg:"$primaryDark"}},light:{[`${r}`]:{bg:"$tonal50",color:"$tonal600"}}}}}),e=({theme:a="primaryDark",...t})=>m.createElement(o,{theme:a,...t});e.displayName="TableHeader";export{e as TableHeader};
1
+ import m from"react";import{styled as l}from"../../stitches.js";import{TableHeaderCell as e}from"./TableHeaderCell.js";const o=l("thead",{variants:{theme:{primary:{[`${e}`]:{bg:"$primary"}},primaryDark:{[`${e}`]:{bg:"$primaryDark"}},light:{[`${e}`]:{bg:"$tonal50",color:"$tonal600"}}}}}),r=({theme:a="primaryDark",...t})=>m.createElement(o,{theme:a,...t});r.displayName="TableHeader";export{r as TableHeader};
@@ -1 +1 @@
1
- import{Trigger as l}from"@radix-ui/react-tabs";import{opacify as o}from"color2k";import*as n from"react";import{styled as s,theme as e}from"../../stitches.js";const c=s(l,{background:"none",border:"none",cursor:"pointer",flexShrink:0,fontFamily:"$body",p:"$4",height:"$5",userSelect:"none",transition:"0.3s",variants:{theme:{light:{'&[data-state="active"]':{color:"$primary",fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},'&[data-state="inactive"]':{color:"$tonal500"},"&:not([data-disabled]):hover":{color:"$primary",bg:o(e.colors.primary.value,-.9)},"&:not([data-disabled]):active":{color:"$primary",bg:o(e.colors.primary.value,-.8),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}},dark:{color:"white",'&[data-state="active"]':{fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},"&:not([data-disabled]):hover":{bg:o("white",-.8)},"&:not([data-disabled]):active":{bg:o("white",-.7),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}}}}}),a=({children:t,theme:r,disabled:i=!1,...d})=>n.createElement(c,{disabled:i,theme:r,...d},t);a.displayName="TabTrigger";export{a as TabTrigger};
1
+ import{Trigger as l}from"@radix-ui/react-tabs";import{opacify as e}from"color2k";import*as n from"react";import{styled as s,theme as o}from"../../stitches.js";const c=s(l,{background:"none",border:"none",cursor:"pointer",flexShrink:0,fontFamily:"$body",p:"$4",height:"$5",userSelect:"none",transition:"0.3s",variants:{theme:{light:{'&[data-state="active"]':{color:"$primary",fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},'&[data-state="inactive"]':{color:"$tonal500"},"&:not([data-disabled]):hover":{color:"$primary",bg:e(o.colors.primary.value,-.9)},"&:not([data-disabled]):active":{color:"$primary",bg:e(o.colors.primary.value,-.8),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}},dark:{color:"white",'&[data-state="active"]':{fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},"&:not([data-disabled]):hover":{bg:e("white",-.8)},"&:not([data-disabled]):active":{bg:e("white",-.7),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}}}}}),a=({children:t,theme:r,disabled:i=!1,...d})=>n.createElement(c,{disabled:i,theme:r,...d},t);a.displayName="TabTrigger";export{a as TabTrigger};