@atom-learning/components 2.37.0 → 2.38.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 (85) hide show
  1. package/CHANGELOG.md +3 -9
  2. package/dist/components/accordion/AccordionItem.js +1 -1
  3. package/dist/components/action-icon/ActionIcon.js +1 -1
  4. package/dist/components/action-icon/ActionIcon.js.map +1 -1
  5. package/dist/components/avatar/Avatar.js +1 -1
  6. package/dist/components/calendar/Calendar.js +1 -1
  7. package/dist/components/carousel/CarouselArrows.js +1 -1
  8. package/dist/components/carousel/CarouselSlide.js +1 -1
  9. package/dist/components/chip/Chip.js +1 -1
  10. package/dist/components/chip/ChipGroup.js +1 -1
  11. package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js +1 -1
  12. package/dist/components/data-table/DataTable.js +1 -1
  13. package/dist/components/data-table/DataTableBody.js +1 -1
  14. package/dist/components/data-table/DataTableDataCell.js +1 -1
  15. package/dist/components/data-table/DataTableRow.js +1 -1
  16. package/dist/components/data-table/drag-and-drop/DraggableRow.js +1 -1
  17. package/dist/components/data-table/drag-and-drop/Handle.js +1 -1
  18. package/dist/components/dialog/DialogContent.js +1 -1
  19. package/dist/components/dialog/DialogContent.js.map +1 -1
  20. package/dist/components/dismissible/DismissibleRoot.js +1 -1
  21. package/dist/components/dismissible/DismissibleTrigger.js +1 -1
  22. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
  23. package/dist/components/field-wrapper/FieldDescription.js +1 -1
  24. package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
  25. package/dist/components/file-input/FileInput.js +1 -1
  26. package/dist/components/grid/Grid.js +1 -1
  27. package/dist/components/icon/Icon.js +1 -1
  28. package/dist/components/inline-message/InlineMessage.js +1 -1
  29. package/dist/components/label/Label.js +1 -1
  30. package/dist/components/link/Link.js +1 -1
  31. package/dist/components/list/List.js +1 -1
  32. package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
  33. package/dist/components/markdown-content/components/MarkdownHeading.js +1 -1
  34. package/dist/components/markdown-content/components/MarkdownImage.js +1 -1
  35. package/dist/components/markdown-content/components/MarkdownInlineCode.js +1 -1
  36. package/dist/components/markdown-content/components/MarkdownLink.js +1 -1
  37. package/dist/components/markdown-content/components/MarkdownListItem.js +1 -1
  38. package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -1
  39. package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
  40. package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
  41. package/dist/components/navigation/NavigationMenuDropdownContent.js +1 -1
  42. package/dist/components/navigation/NavigationMenuLink.js +1 -1
  43. package/dist/components/notification-badge/NotificationBadge.js +1 -1
  44. package/dist/components/number-input/NumberInput.js +1 -1
  45. package/dist/components/number-input-field/NumberInputField.js +1 -1
  46. package/dist/components/popover/PopoverContent.js +1 -1
  47. package/dist/components/popover/PopoverContent.js.map +1 -1
  48. package/dist/components/radio-button/RadioButton.js +1 -1
  49. package/dist/components/radio-button-field/RadioButtonField.js +1 -1
  50. package/dist/components/radio-button-field/RadioField.js +1 -1
  51. package/dist/components/radio-card/RadioCardGroup.js +1 -1
  52. package/dist/components/search-input/SearchInput.js +1 -1
  53. package/dist/components/select-field/SelectField.js +1 -1
  54. package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionContent.js +1 -1
  55. package/dist/components/sidedrawer/SidedrawerContent.js +1 -1
  56. package/dist/components/stack-content/StackContent.js +1 -1
  57. package/dist/components/stepper/StepperStepBack.js +1 -1
  58. package/dist/components/table/TableHeader.js +1 -1
  59. package/dist/components/table/TableRow.js +1 -1
  60. package/dist/components/tabs/Tabs.js +1 -1
  61. package/dist/components/tabs/TabsTrigger.js +1 -1
  62. package/dist/components/tabs/TabsTriggerList.js +1 -1
  63. package/dist/components/tabs/TabsTriggerList.js.map +1 -1
  64. package/dist/components/text/Text.js +1 -1
  65. package/dist/components/toast/Toast.js +1 -1
  66. package/dist/components/toast/ToastProvider.js +1 -1
  67. package/dist/components/toggle-group/ToggleGroupButton.js +1 -1
  68. package/dist/components/tooltip/TooltipContent.js +1 -1
  69. package/dist/components/video/Video.js +1 -1
  70. package/dist/experiments/color-scheme/ColorScheme.js +1 -1
  71. package/dist/index.cjs.js +1 -1
  72. package/dist/index.cjs.js.map +1 -1
  73. package/dist/utilities/hooks/useCallbackRef.js +1 -1
  74. package/dist/utilities/hooks/useResizeObserver.d.ts +8 -0
  75. package/dist/utilities/hooks/useResizeObserver.js +2 -0
  76. package/dist/utilities/hooks/useResizeObserver.js.map +1 -0
  77. package/dist/utilities/hooks/useScrollPosition.d.ts +11 -0
  78. package/dist/utilities/hooks/useScrollPosition.js +2 -0
  79. package/dist/utilities/hooks/useScrollPosition.js.map +1 -0
  80. package/dist/utilities/hooks/{useWindowSize.d.ts → useSize.d.ts} +2 -1
  81. package/dist/utilities/hooks/useSize.js +2 -0
  82. package/dist/utilities/hooks/useSize.js.map +1 -0
  83. package/package.json +1 -1
  84. package/dist/utilities/hooks/useWindowSize.js +0 -2
  85. package/dist/utilities/hooks/useWindowSize.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import*as o from"@radix-ui/react-radio-group";import*as r from"react";import{styled as t}from"../../stitches.js";const n=t(o.Item,{alignItems:"center",appearance:"none",backgroundColor:"transparent",border:"1px solid $tonal400",borderRadius:"$round",color:"white",cursor:"pointer",display:"flex",justifyContent:"center",p:0,size:"$1",transition:"all 50ms ease-out","&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},'&[data-state="checked"]':{backgroundColor:"$primary",borderColor:"$primary"},"&[disabled]":{backgroundColor:"$tonal100",borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"}}),l=t(o.Indicator,{size:"6px",borderRadius:"$round",backgroundColor:"currentcolor",position:"absolute"}),e=a=>r.createElement(n,{...a},r.createElement(l,null));e.displayName="RadioButton";export{e as RadioButton};
1
+ import*as o from"@radix-ui/react-radio-group";import*as r from"react";import{styled as e}from"../../stitches.js";const n=e(o.Item,{alignItems:"center",appearance:"none",backgroundColor:"transparent",border:"1px solid $tonal400",borderRadius:"$round",color:"white",cursor:"pointer",display:"flex",justifyContent:"center",p:0,size:"$1",transition:"all 50ms ease-out","&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},'&[data-state="checked"]':{backgroundColor:"$primary",borderColor:"$primary"},"&[disabled]":{backgroundColor:"$tonal100",borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"}}),l=e(o.Indicator,{size:"6px",borderRadius:"$round",backgroundColor:"currentcolor",position:"absolute"}),t=a=>r.createElement(n,{...a},r.createElement(l,null));t.displayName="RadioButton";export{t as RadioButton};
2
2
  //# sourceMappingURL=RadioButton.js.map
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{useFormContext as B,useController as F}from"react-hook-form";import{Description as R}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as V}from"../form/useFieldError.js";import{InlineMessage as b}from"../inline-message/InlineMessage.js";import{Label as h}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as x}from"../radio-button/RadioButtonGroup.js";import{styled as y}from"../../stitches.js";import{RadioField as q}from"./RadioField.js";const I=y("fieldset",{all:"unset"}),r=({children:d,css:c,direction:f="column",defaultValue:l,value:o,description:n,label:p,name:a,validation:t,onValueChange:i,...E})=>{const{control:C}=B(),{field:{ref:g,onChange:m,value:v,name:$}}=F({name:a,control:C,rules:t,defaultValue:l}),{error:u}=V(a);return e.useEffect(()=>{typeof o<"u"&&m(o)},[o]),e.createElement(I,{css:c},e.createElement(h,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(t==null?void 0:t.required)},p),n&&e.createElement(R,{css:{mb:"$3"}},n),e.createElement(x,{ref:g,direction:f,defaultValue:l,onValueChange:s=>{m(s),i==null||i(s)},value:v,...E},d),u&&e.createElement(b,{css:{mt:"$2"}},u))};r.Item=q,r.displayName="RadioButtonField";export{r as RadioButtonField};
1
+ import*as e from"react";import{useFormContext as B,useController as F}from"react-hook-form";import{Description as R}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as V}from"../form/useFieldError.js";import{InlineMessage as b}from"../inline-message/InlineMessage.js";import{Label as h}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as x}from"../radio-button/RadioButtonGroup.js";import{styled as y}from"../../stitches.js";import{RadioField as q}from"./RadioField.js";const I=y("fieldset",{all:"unset"}),r=({children:d,css:c,direction:f="column",defaultValue:l,value:o,description:n,label:p,name:a,validation:t,onValueChange:i,...E})=>{const{control:C}=B(),{field:{ref:g,onChange:m,value:v,name:D}}=F({name:a,control:C,rules:t,defaultValue:l}),{error:u}=V(a);return e.useEffect(()=>{typeof o<"u"&&m(o)},[o]),e.createElement(I,{css:c},e.createElement(h,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(t==null?void 0:t.required)},p),n&&e.createElement(R,{css:{mb:"$3"}},n),e.createElement(x,{ref:g,direction:f,defaultValue:l,onValueChange:s=>{m(s),i==null||i(s)},value:v,...E},d),u&&e.createElement(b,{css:{mt:"$2"}},u))};r.Item=q,r.displayName="RadioButtonField";export{r as RadioButtonField};
2
2
  //# sourceMappingURL=RadioButtonField.js.map
@@ -1,2 +1,2 @@
1
- import*as e from"react";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as r}from"../field-wrapper/InlineFieldWrapper.js";import{RadioButton as m}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";const o=({css:t,label:a,value:i,...l})=>e.createElement(r,{css:t,label:a},e.createElement(m,{value:i,...l}));o.displayName="RadioField";export{o as RadioField};
1
+ import*as e from"react";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as t}from"../field-wrapper/InlineFieldWrapper.js";import{RadioButton as m}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";const o=({css:a,label:i,value:l,...r})=>e.createElement(t,{css:a,label:i},e.createElement(m,{value:l,...r}));o.displayName="RadioField";export{o as RadioField};
2
2
  //# sourceMappingURL=RadioField.js.map
@@ -1,2 +1,2 @@
1
- import*as d from"@radix-ui/react-radio-group";import*as t from"react";import{Stack as p}from"../stack/Stack.js";import{RadioCard as c}from"./RadioCard.js";const f=({css:e,children:r,size:l,isFullWidth:o,align:a,gap:s="3",justify:m,...n})=>t.createElement(d.Root,{...n},t.createElement(p,{direction:"row",justify:m,gap:s,css:e},t.Children.map(r,i=>t.isValidElement(i)&&(i==null?void 0:i.type)===c?t.cloneElement(i,{size:l,isFullWidth:o,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: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};
2
2
  //# sourceMappingURL=RadioCardGroup.js.map
@@ -1,2 +1,2 @@
1
- import{Search as z,Close as H}from"@atom-learning/icons";import*as e from"react";import{ActionIcon as I}from"../action-icon/ActionIcon.js";import{Box as k}from"../box/Box.js";import{Icon as E}from"../icon/Icon.js";import{Input as L}from"../input/Input.js";import{styled as f}from"../../stitches.js";import{useCallbackRef as x}from"../../utilities/hooks/useCallbackRef.js";var N=(t=>(t.SEARCH="SEARCH",t.CLEAR="CLEAR",t))(N||{});const O=f(E,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),T=f(L,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),h=e.forwardRef(({size:t="md",css:C,value:r,defaultValue:i="",onValueChange:n,clearText:b="Clear",onChange:c,...d},v)=>{const[u,R]=x(),[A,p]=e.useState(i),[S,m]=e.useState(i?"CLEAR":"SEARCH");e.useEffect(()=>{typeof r>"u"||(p(r),m(r?"CLEAR":"SEARCH"))},[r]),e.useImperativeHandle(v,()=>u.current);const w=()=>{var s,o;const a=u.current;if(!a)return;const l=(s=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:s.set;(o=l==null?void 0:l.call)==null||o.call(l,a,"");const g=new Event("input",{bubbles:!0});a.dispatchEvent(g),a.focus(),n==null||n("")},y=s=>{c==null||c(s);const o=s.target.value;p(o),n==null||n(o),m(o?"CLEAR":"SEARCH")},$=()=>S==="SEARCH"?e.createElement(O,{is:z,size:t,css:{size:t=="sm"?"$1":20}}):e.createElement(I,{label:b,theme:"neutral",size:t,css:{position:"absolute",top:"0",right:"$1"},onClick:w},e.createElement(E,{is:H}));return e.createElement(k,{css:{position:"relative",...C}},e.createElement(T,{ref:R,size:t,type:"search",...d,value:A,onChange:y,css:{pr:t==="sm"?"$5":"$6"}}),$())});h.displayName="SearchInput";export{h as SearchInput};
1
+ import{Search as H,Close as I}from"@atom-learning/icons";import*as e from"react";import{ActionIcon as k}from"../action-icon/ActionIcon.js";import{Box as L}from"../box/Box.js";import{Icon as E}from"../icon/Icon.js";import{Input as $}from"../input/Input.js";import{styled as f}from"../../stitches.js";import{useCallbackRef as x}from"../../utilities/hooks/useCallbackRef.js";var N=(t=>(t.SEARCH="SEARCH",t.CLEAR="CLEAR",t))(N||{});const O=f(E,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),T=f($,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),h=e.forwardRef(({size:t="md",css:C,value:r,defaultValue:i="",onValueChange:n,clearText:b="Clear",onChange:c,...d},v)=>{const[u,R]=x(),[A,p]=e.useState(i),[S,m]=e.useState(i?"CLEAR":"SEARCH");e.useEffect(()=>{typeof r>"u"||(p(r),m(r?"CLEAR":"SEARCH"))},[r]),e.useImperativeHandle(v,()=>u.current);const w=()=>{var s,o;const a=u.current;if(!a)return;const l=(s=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:s.set;(o=l==null?void 0:l.call)==null||o.call(l,a,"");const z=new Event("input",{bubbles:!0});a.dispatchEvent(z),a.focus(),n==null||n("")},y=s=>{c==null||c(s);const o=s.target.value;p(o),n==null||n(o),m(o?"CLEAR":"SEARCH")},g=()=>S==="SEARCH"?e.createElement(O,{is:H,size:t,css:{size:t=="sm"?"$1":20}}):e.createElement(k,{label:b,theme:"neutral",size:t,css:{position:"absolute",top:"0",right:"$1"},onClick:w},e.createElement(E,{is:I}));return e.createElement(L,{css:{position:"relative",...C}},e.createElement(T,{ref:R,size:t,type:"search",...d,value:A,onChange:y,css:{pr:t==="sm"?"$5":"$6"}}),g())});h.displayName="SearchInput";export{h as SearchInput};
2
2
  //# sourceMappingURL=SearchInput.js.map
@@ -1,2 +1,2 @@
1
- import*as i from"react";import{useFormContext as u}from"react-hook-form";import{FieldWrapper as F}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{Select as h}from"../select/Select.js";const l=({css:m=void 0,children:d,name:e,label:p,validation:r,prompt:a,description:n,hideLabel:s,...c})=>{const{register:o}=u(),{error:t}=b(e),f=r?o(r):o;return i.createElement(F,{css:m,description:n,error:t,fieldId:e,label:p,prompt:a,required:Boolean(r==null?void 0:r.required),hideLabel:s},i.createElement(h,{name:e,id:e,...c,ref:f,...t&&{state:"error"}},d))};l.displayName="SelectField";export{l as SelectField};
1
+ import*as t from"react";import{useFormContext as u}from"react-hook-form";import{FieldWrapper as F}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{Select as h}from"../select/Select.js";const l=({css:m=void 0,children:d,name:e,label:p,validation:r,prompt:a,description:n,hideLabel:s,...c})=>{const{register:o}=u(),{error:i}=b(e),f=r?o(r):o;return t.createElement(F,{css:m,description:n,error:i,fieldId:e,label:p,prompt:a,required:Boolean(r==null?void 0:r.required),hideLabel:s},t.createElement(h,{name:e,id:e,...c,ref:f,...i&&{state:"error"}},d))};l.displayName="SelectField";export{l as SelectField};
2
2
  //# sourceMappingURL=SelectField.js.map
@@ -1,2 +1,2 @@
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{Box as m}from"../../box/Box.js";const c=e({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),d=e({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),h=n(i,{bg:"white",overflow:"hidden","@allowMotion":{'&[data-state="open"]':{animation:`${c} 300ms ease-out`},'&[data-state="closed"]':{animation:`${d} 300ms ease-out`}}}),s=({children:o,...a})=>t.createElement(h,{...a},t.Children.map(o,r=>t.createElement(m,{css:{"> a":{px:"$6"},"> button":{px:"$6"}}},r)));export{s as SidedrawerAccordionContent};
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{Box as m}from"../../box/Box.js";const c=o({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),d=o({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),h=n(i,{bg:"white",overflow:"hidden","@allowMotion":{'&[data-state="open"]':{animation:`${c} 300ms ease-out`},'&[data-state="closed"]':{animation:`${d} 300ms ease-out`}}}),s=({children:e,...a})=>t.createElement(h,{...a},t.Children.map(e,r=>t.createElement(m,{css:{"> a":{px:"$6"},"> button":{px:"$6"}}},r)));export{s as SidedrawerAccordionContent};
2
2
  //# sourceMappingURL=SidedrawerAccordionContent.js.map
@@ -1,2 +1,2 @@
1
- import{Content as a,Portal as i}from"@radix-ui/react-dialog";import t from"react";import{MAX_Z_INDEX as r}from"../../constants/zIndices.js";import{styled as n}from"../../stitches.js";import{SidedrawerOverlay as d}from"./SidedrawerOverlay.js";import{slideInLeft as l,slideOutLeft as m}from"../../utilities/style/keyframe-animations.js";const s=n(a,{bg:"white",boxShadow:"$2",display:"flex",flexDirection:"column",position:"fixed",top:0,left:0,height:"100%",maxWidth:"304px",width:"100%",zIndex:r,"@allowMotion":{'&[data-state="open"]':{animation:`${l} 250ms ease-out`},'&[data-state="closed"]':{animation:`${m} 250ms ease-out`}}}),f=({children:e,...o})=>t.createElement(i,null,t.createElement(d,{"data-testid":"sidedrawer_overlay"}),t.createElement(s,{role:"navigation",...o},e));export{f as SidedrawerContent};
1
+ import{Content as a,Portal as i}from"@radix-ui/react-dialog";import e from"react";import{MAX_Z_INDEX as r}from"../../constants/zIndices.js";import{styled as n}from"../../stitches.js";import{SidedrawerOverlay as d}from"./SidedrawerOverlay.js";import{slideInLeft as l,slideOutLeft as m}from"../../utilities/style/keyframe-animations.js";const s=n(a,{bg:"white",boxShadow:"$2",display:"flex",flexDirection:"column",position:"fixed",top:0,left:0,height:"100%",maxWidth:"304px",width:"100%",zIndex:r,"@allowMotion":{'&[data-state="open"]':{animation:`${l} 250ms ease-out`},'&[data-state="closed"]':{animation:`${m} 250ms ease-out`}}}),f=({children:t,...o})=>e.createElement(i,null,e.createElement(d,{"data-testid":"sidedrawer_overlay"}),e.createElement(s,{role:"navigation",...o},t));export{f as SidedrawerContent};
2
2
  //# sourceMappingURL=SidedrawerContent.js.map
@@ -1,2 +1,2 @@
1
- import*as t from"react";import{styled as r}from"../../stitches.js";import{StyledDivider as e}from"../divider/Divider.js";import{StyledHeading as d}from"../heading/Heading.js";import{StyledImage as a}from"../image/Image.js";import{StyledList as l}from"../list/List.js";import{StyledText as c}from"../text/Text.js";const f=r("div",{"& > *":{"&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}},[`& > ${d}`]:{maxWidth:"65ch"},[`& > ${c}`]:{maxWidth:"75ch"},[`& > ${l}`]:{maxWidth:"75ch"},[`& > ${e}`]:{my:"$5"},[`& > ${a}`]:{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}}),m=t.forwardRef((o,i)=>t.createElement(f,{ref:i,...o}));m.displayName="StackContent";export{m as StackContent};
1
+ import*as t from"react";import{styled as r}from"../../stitches.js";import{StyledDivider as e}from"../divider/Divider.js";import{StyledHeading as d}from"../heading/Heading.js";import{StyledImage as a}from"../image/Image.js";import{StyledList as l}from"../list/List.js";import{StyledText as c}from"../text/Text.js";const f=r("div",{"& > *":{"&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}},[`& > ${d}`]:{maxWidth:"65ch"},[`& > ${c}`]:{maxWidth:"75ch"},[`& > ${l}`]:{maxWidth:"75ch"},[`& > ${e}`]:{my:"$5"},[`& > ${a}`]:{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}}),o=t.forwardRef((m,i)=>t.createElement(f,{ref:i,...m}));o.displayName="StackContent";export{o as StackContent};
2
2
  //# sourceMappingURL=StackContent.js.map
@@ -1,2 +1,2 @@
1
- import*as i from"react";import{Button as n}from"../button/Button.js";import{useStepper as a}from"./stepper-context/StepperContext.js";const l=({label:e,children:o,...r})=>{const{activeStep:t,goToPreviousStep:p}=a();return i.createElement(n,{size:"sm",appearance:"outline",...r,disabled:t===0,onClick:p},o||(e==null?void 0:e(t)))};export{l as StepperStepBack};
1
+ import*as i from"react";import{Button as n}from"../button/Button.js";import{useStepper as a}from"./stepper-context/StepperContext.js";const l=({label:e,children:t,...r})=>{const{activeStep:o,goToPreviousStep:p}=a();return i.createElement(n,{size:"sm",appearance:"outline",...r,disabled:o===0,onClick:p},t||(e==null?void 0:e(o)))};export{l as StepperStepBack};
2
2
  //# sourceMappingURL=StepperStepBack.js.map
@@ -1,2 +1,2 @@
1
- import l from"react";import{styled as o}from"../../stitches.js";import{TableHeaderCell as e}from"./TableHeaderCell.js";const r={PRIMARY:"primary",PRIMARY_DARK:"primaryDark",LIGHT:"light"},i=o("thead",{variants:{theme:{[r.PRIMARY]:{[`${e}`]:{bg:"$primary"}},[r.PRIMARY_DARK]:{[`${e}`]:{bg:"$primaryDark"}},[r.LIGHT]:{[`${e}`]:{bg:"$tonal50",color:"$tonal600"}}}}}),a=({theme:t="primaryDark",...m})=>l.createElement(i,{theme:t,...m});a.displayName="TableHeader";export{r as TABLE_HEADER_THEMES,a as TableHeader};
1
+ import o from"react";import{styled as l}from"../../stitches.js";import{TableHeaderCell as e}from"./TableHeaderCell.js";const r={PRIMARY:"primary",PRIMARY_DARK:"primaryDark",LIGHT:"light"},i=l("thead",{variants:{theme:{[r.PRIMARY]:{[`${e}`]:{bg:"$primary"}},[r.PRIMARY_DARK]:{[`${e}`]:{bg:"$primaryDark"}},[r.LIGHT]:{[`${e}`]:{bg:"$tonal50",color:"$tonal600"}}}}}),a=({theme:t="primaryDark",...m})=>o.createElement(i,{theme:t,...m});a.displayName="TableHeader";export{r as TABLE_HEADER_THEMES,a as TableHeader};
2
2
  //# sourceMappingURL=TableHeader.js.map
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{styled as l}from"../../stitches.js";const t=l("tr",{bg:"unset"}),o=e.forwardRef((r,a)=>e.createElement(t,{...r,ref:a}));o.displayName="TableRow";export{t as StyledRow,o as TableRow};
1
+ import*as e from"react";import{styled as l}from"../../stitches.js";const o=l("tr",{bg:"unset"}),r=e.forwardRef((t,a)=>e.createElement(o,{...t,ref:a}));r.displayName="TableRow";export{o as StyledRow,r as TableRow};
2
2
  //# sourceMappingURL=TableRow.js.map
@@ -1,2 +1,2 @@
1
- import{Root as i}from"@radix-ui/react-tabs";import*as e from"react";import{styled as m}from"../../stitches.js";import{TabsTriggerList as s}from"./TabsTriggerList.js";import{TabsTrigger as a}from"./TabsTrigger.js";import{TabsContent as g}from"./TabsContent.js";const T=m(i,{width:"100%"}),r=({children:t,...o})=>e.createElement(T,{...o},t);r.TriggerList=s,r.Trigger=a,r.Content=g,r.displayName="Tabs";export{r as Tabs};
1
+ import{Root as i}from"@radix-ui/react-tabs";import*as e from"react";import{styled as m}from"../../stitches.js";import{TabsTriggerList as s}from"./TabsTriggerList.js";import{TabsTrigger as a}from"./TabsTrigger.js";import{TabsContent as g}from"./TabsContent.js";const T=m(i,{width:"100%"}),r=({children:o,...t})=>e.createElement(T,{...t},o);r.TriggerList=s,r.Trigger=a,r.Content=g,r.displayName="Tabs";export{r as Tabs};
2
2
  //# sourceMappingURL=Tabs.js.map
@@ -1,2 +1,2 @@
1
- import{Trigger as i}from"@radix-ui/react-tabs";import*as e from"react";import{styled as a}from"../../stitches.js";import{Text as n}from"../text/Text.js";import{focusVisibleStyleBlock as c}from"../../utilities/style/focus-visible-style-block.js";const s=a(i,{background:"none",border:"none",cursor:"pointer",flexShrink:0,p:"$4",userSelect:"none",borderBottom:"2px solid transparent",'&[data-state="active"]':{color:"$interactive1",fontWeight:600,letterSpacing:"-0.005em",borderColor:"currentColor"},"&[data-disabled]":{opacity:.3,cursor:"not-allowed"},"&:not([data-disabled])":{"&:hover, &:focus-visible":{color:"$interactive2",bg:"$accentA1"},"&:active":{color:"$interactive3"},"&:focus-visible":{...c()}}}),r=({children:o,...t})=>e.createElement(s,{asChild:!0,...t},e.createElement(n,{size:"sm",as:"button"},o));r.displayName="TabsTrigger";export{r as TabsTrigger};
1
+ import{Trigger as i}from"@radix-ui/react-tabs";import*as e from"react";import{styled as a}from"../../stitches.js";import{Text as n}from"../text/Text.js";import{focusVisibleStyleBlock as c}from"../../utilities/style/focus-visible-style-block.js";const s=a(i,{background:"none",border:"none",cursor:"pointer",flexShrink:0,p:"$4",userSelect:"none",borderBottom:"2px solid transparent",'&[data-state="active"]':{color:"$interactive1",fontWeight:600,letterSpacing:"-0.005em",borderColor:"currentColor"},"&[data-disabled]":{opacity:.3,cursor:"not-allowed"},"&:not([data-disabled])":{"&:hover, &:focus-visible":{color:"$interactive2",bg:"$accentA1"},"&:active":{color:"$interactive3"},"&:focus-visible":{...c()}}}),o=({children:r,...t})=>e.createElement(s,{asChild:!0,...t},e.createElement(n,{size:"sm",as:"button"},r));o.displayName="TabsTrigger";export{o as TabsTrigger};
2
2
  //# sourceMappingURL=TabsTrigger.js.map
@@ -1,2 +1,2 @@
1
- import{List as y}from"@radix-ui/react-tabs";import e from"react";import{styled as m}from"../../stitches.js";import{ColorScheme as T}from"../../experiments/color-scheme/ColorScheme.js";import{useWindowSize as x}from"../../utilities/hooks/useWindowSize.js";import{useCallbackRefState as z}from"../../utilities/hooks/useCallbackRef.js";import{ActionIcon as $}from"../action-icon/ActionIcon.js";import{Icon as p}from"../icon/Icon.js";import{ChevronLeft as R,ChevronRight as I}from"@atom-learning/icons";const N=m(T,{position:"relative",borderBottom:"1px solid $base3",width:"100%"}),_=m(y,{flexShrink:0,display:"flex",width:"100%",overflowX:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}),u=m($,{height:"100% !important",position:"absolute",top:"50%",transform:"translateY(-50%)",cursor:"pointer",background:"$background !important",color:"$interactive1 !important",borderRadius:0,opacity:.9}),A=10,b=({children:g,colorScheme:v={},...C})=>{const[t,k]=z(),{width:W}=x(),[w,i]=e.useState(!1),[E,s]=e.useState(!1),f=e.useCallback(c=>{if(!t)return;const{scrollWidth:r,scrollLeft:l,offsetWidth:a}=t,h=Math.round(r*(A/100));let n=l;if(c==="right"){const o=l+h;n=o+a<=r?o:r-a}else{const o=l-h;n=o>0?o:0}t.scroll({left:n,behavior:"smooth"}),setTimeout(()=>{const{scrollWidth:o,scrollLeft:d,offsetWidth:L}=t,S=o-(d+L);d===0?(i(!1),s(!0)):S<5?(s(!1),i(!0)):(i(!0),s(!0))},500)},[t]);return e.useEffect(()=>{var c;if(!t)return;const{offsetWidth:r,scrollWidth:l}=t,a=l>r;(c=t.scroll)==null||c.call(t,{left:0}),i(!1),s(a)},[t,W]),e.createElement(N,{base:"slate",accent:"blue",interactive:"hiContrast1",...v,...C},w&&e.createElement(u,{label:"scroll left",size:"md",css:{left:0},onClick:()=>f("left")},e.createElement(p,{is:R})),e.createElement(_,{ref:k},g),E&&e.createElement(u,{label:"scroll right",size:"md",css:{right:0},onClick:()=>f("right")},e.createElement(p,{is:I})))};b.displayName="TabsTriggerList";export{b as TabsTriggerList};
1
+ import{List as k}from"@radix-ui/react-tabs";import t from"react";import{styled as i}from"../../stitches.js";import{ColorScheme as y}from"../../experiments/color-scheme/ColorScheme.js";import{useSize as C}from"../../utilities/hooks/useSize.js";import{useScrollPosition as v}from"../../utilities/hooks/useScrollPosition.js";import{useCallbackRefState as W}from"../../utilities/hooks/useCallbackRef.js";import{ActionIcon as w}from"../action-icon/ActionIcon.js";import{Icon as s}from"../icon/Icon.js";import{ChevronLeft as E,ChevronRight as S}from"@atom-learning/icons";const L=i(y,{position:"relative",borderBottom:"1px solid $base3",width:"100%"}),x=i(k,{flexShrink:0,display:"flex",width:"100%",overflowX:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}),a=i(w,{height:"100% !important",position:"absolute",top:"50%",transform:"translateY(-50%)",cursor:"pointer",background:"$background !important",color:"$interactive1 !important",borderRadius:0,opacity:.9}),c=.8,n=({children:m,colorScheme:d={},...h})=>{const[e,f]=W(),{width:p}=C({element:e,delay:500}),{left:o}=v({element:e,delay:100,delayMethod:"debounce"}),r=t.useMemo(()=>e?e.scrollWidth>e.clientWidth:!1,[p,e]),b=t.useMemo(()=>r?o>0:!1,[o,r]),u=t.useMemo(()=>!e||!r?!1:e.scrollWidth-o-e.clientWidth>1,[e,o,r]),l=t.useCallback(g=>{!e||e.scroll({left:e.scrollLeft+e.clientWidth*g,behavior:"smooth"})},[e]);return t.createElement(L,{base:"slate",accent:"blue",interactive:"hiContrast1",...d,...h},b&&t.createElement(a,{label:"scroll left",size:"md",css:{left:0},onClick:()=>l(-c)},t.createElement(s,{is:E})),t.createElement(x,{ref:f},m),u&&t.createElement(a,{label:"scroll right",size:"md",css:{right:0},onClick:()=>l(c)},t.createElement(s,{is:S})))};n.displayName="TabsTriggerList";export{n as TabsTriggerList};
2
2
  //# sourceMappingURL=TabsTriggerList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabsTriggerList.js","sources":["../../../src/components/tabs/TabsTriggerList.tsx"],"sourcesContent":["import { List } from '@radix-ui/react-tabs'\nimport React from 'react'\nimport { styled } from '~/stitches'\nimport { ColorScheme } from '~/experiments/color-scheme'\nimport { useWindowSize } from '~/utilities/hooks/useWindowSize'\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\nimport { ActionIcon } from '../action-icon'\nimport { Icon } from '../icon'\nimport { ChevronLeft, ChevronRight } from '@atom-learning/icons'\n\nconst StyledContainer = styled(ColorScheme, {\n position: 'relative',\n borderBottom: '1px solid $base3',\n width: '100%'\n})\n\nconst StyledTriggerList = styled(List, {\n flexShrink: 0,\n display: 'flex',\n width: '100%',\n overflowX: 'auto',\n '&::-webkit-scrollbar': { display: 'none' },\n scrollbarWidth: 'none'\n})\n\nconst StyledChevronActionIcon = styled(ActionIcon, {\n height: '100% !important',\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)',\n cursor: 'pointer',\n background: '$background !important',\n color: '$interactive1 !important',\n borderRadius: 0,\n opacity: 0.9\n})\n\nconst SCROLL_PERCENTAGE = 10\nexport const TabsTriggerList: React.FC<\n React.ComponentProps<typeof StyledTriggerList> & {\n colorScheme?: typeof ColorScheme\n }\n> = ({ children, colorScheme = {}, ...rest }) => {\n const [listRef, setListRefCallback] = useCallbackRefState()\n\n const { width: screenWidth } = useWindowSize()\n\n const [showLeftScroller, setShowLeftScroller] = React.useState<boolean>(false)\n const [showRightScroller, setShowRightScroller] =\n React.useState<boolean>(false)\n\n const scrollTriggerListTo = React.useCallback(\n (direction: 'left' | 'right') => {\n if (!listRef) return\n const { scrollWidth, scrollLeft, offsetWidth } = listRef\n const scrollAmount = Math.round(scrollWidth * (SCROLL_PERCENTAGE / 100))\n let left = scrollLeft\n if (direction === 'right') {\n const newScrollAmount = scrollLeft + scrollAmount\n left =\n newScrollAmount + offsetWidth <= scrollWidth\n ? newScrollAmount\n : scrollWidth - offsetWidth\n } else {\n const newScrollAmount = scrollLeft - scrollAmount\n left = newScrollAmount > 0 ? newScrollAmount : 0\n }\n\n listRef.scroll({\n left,\n behavior: 'smooth'\n })\n\n // Relying on setTimeout since scroll does not have a callback / doesn't return a promise :(\n setTimeout(() => {\n const { scrollWidth, scrollLeft, offsetWidth } = listRef\n const scrollDistance = scrollWidth - (scrollLeft + offsetWidth)\n if (scrollLeft === 0) {\n setShowLeftScroller(false)\n setShowRightScroller(true)\n } else if (scrollDistance < 5) {\n // sometimes right button does not hide due to few pixel precision\n setShowRightScroller(false)\n setShowLeftScroller(true)\n } else {\n setShowLeftScroller(true)\n setShowRightScroller(true)\n }\n }, 500)\n },\n [listRef]\n )\n\n React.useEffect(() => {\n if (!listRef) return\n const { offsetWidth, scrollWidth } = listRef\n\n const shouldShowScroller = scrollWidth > offsetWidth\n\n // Scroll to left on resize, hide left scroll button and then decide if right scroll button should be visible or not\n listRef.scroll?.({\n left: 0\n })\n setShowLeftScroller(false)\n setShowRightScroller(shouldShowScroller)\n }, [listRef, screenWidth])\n\n return (\n <StyledContainer\n base=\"slate\"\n accent=\"blue\"\n interactive=\"hiContrast1\"\n {...colorScheme}\n {...rest}\n >\n {showLeftScroller && (\n <StyledChevronActionIcon\n label=\"scroll left\"\n size=\"md\"\n css={{\n left: 0\n }}\n onClick={() => scrollTriggerListTo('left')}\n >\n <Icon is={ChevronLeft} />\n </StyledChevronActionIcon>\n )}\n\n <StyledTriggerList ref={setListRefCallback}>{children}</StyledTriggerList>\n\n {showRightScroller && (\n <StyledChevronActionIcon\n label=\"scroll right\"\n size=\"md\"\n css={{\n right: 0\n }}\n onClick={() => scrollTriggerListTo('right')}\n >\n <Icon is={ChevronRight} />\n </StyledChevronActionIcon>\n )}\n </StyledContainer>\n )\n}\n\nTabsTriggerList.displayName = 'TabsTriggerList'\n"],"names":["StyledContainer","styled","ColorScheme","StyledTriggerList","List","StyledChevronActionIcon","ActionIcon","SCROLL_PERCENTAGE","TabsTriggerList","children","colorScheme","rest","listRef","setListRefCallback","useCallbackRefState","screenWidth","useWindowSize","showLeftScroller","setShowLeftScroller","React","showRightScroller","setShowRightScroller","scrollTriggerListTo","direction","scrollWidth","scrollLeft","offsetWidth","scrollAmount","left","newScrollAmount","scrollDistance","_a","shouldShowScroller","Icon","ChevronLeft","ChevronRight"],"mappings":"mfAUA,MAAMA,EAAkBC,EAAOC,EAAa,CAC1C,SAAU,WACV,aAAc,mBACd,MAAO,MACT,CAAC,EAEKC,EAAoBF,EAAOG,EAAM,CACrC,WAAY,EACZ,QAAS,OACT,MAAO,OACP,UAAW,OACX,uBAAwB,CAAE,QAAS,MAAO,EAC1C,eAAgB,MAClB,CAAC,EAEKC,EAA0BJ,EAAOK,EAAY,CACjD,OAAQ,kBACR,SAAU,WACV,IAAK,MACL,UAAW,mBACX,OAAQ,UACR,WAAY,yBACZ,MAAO,2BACP,aAAc,EACd,QAAS,EACX,CAAC,EAEKC,EAAoB,GACbC,EAIT,CAAC,CAAE,SAAAC,EAAU,YAAAC,EAAc,CAAA,KAAOC,CAAK,IAAM,CAC/C,KAAM,CAACC,EAASC,CAAkB,EAAIC,IAEhC,CAAE,MAAOC,CAAY,EAAIC,EAAAA,EAEzB,CAACC,EAAkBC,CAAmB,EAAIC,EAAM,SAAkB,EAAK,EACvE,CAACC,EAAmBC,CAAoB,EAC5CF,EAAM,SAAkB,EAAK,EAEzBG,EAAsBH,EAAM,YAC/BI,GAAgC,CAC/B,GAAI,CAACX,EAAS,OACd,KAAM,CAAE,YAAAY,EAAa,WAAAC,EAAY,YAAAC,CAAY,EAAId,EAC3Ce,EAAe,KAAK,MAAMH,GAAejB,EAAoB,IAAI,EACvE,IAAIqB,EAAOH,EACX,GAAIF,IAAc,QAAS,CACzB,MAAMM,EAAkBJ,EAAaE,EACrCC,EACEC,EAAkBH,GAAeF,EAC7BK,EACAL,EAAcE,CACtB,KAAO,CACL,MAAMG,EAAkBJ,EAAaE,EACrCC,EAAOC,EAAkB,EAAIA,EAAkB,CACjD,CAEAjB,EAAQ,OAAO,CACb,KAAAgB,EACA,SAAU,QACZ,CAAC,EAGD,WAAW,IAAM,CACf,KAAM,CAAE,YAAAJ,EAAa,WAAAC,EAAY,YAAAC,CAAY,EAAId,EAC3CkB,EAAiBN,GAAeC,EAAaC,GAC/CD,IAAe,GACjBP,EAAoB,EAAK,EACzBG,EAAqB,EAAI,GAChBS,EAAiB,GAE1BT,EAAqB,EAAK,EAC1BH,EAAoB,EAAI,IAExBA,EAAoB,EAAI,EACxBG,EAAqB,EAAI,EAE7B,EAAG,GAAG,CACR,EACA,CAACT,CAAO,CACV,EAEA,OAAAO,EAAM,UAAU,IAAM,CA7FxB,IAAAY,EA8FI,GAAI,CAACnB,EAAS,OACd,KAAM,CAAE,YAAAc,EAAa,YAAAF,CAAY,EAAIZ,EAE/BoB,EAAqBR,EAAcE,GAGzCK,EAAAnB,EAAQ,SAAR,MAAAmB,EAAA,KAAAnB,EAAiB,CACf,KAAM,CACR,CAAA,EACAM,EAAoB,EAAK,EACzBG,EAAqBW,CAAkB,CACzC,EAAG,CAACpB,EAASG,CAAW,CAAC,EAGvBI,EAAA,cAACnB,EAAA,CACC,KAAK,QACL,OAAO,OACP,YAAY,cACX,GAAGU,EACH,GAAGC,CAEHM,EAAAA,GACCE,EAAA,cAACd,EAAA,CACC,MAAM,cACN,KAAK,KACL,IAAK,CACH,KAAM,CACR,EACA,QAAS,IAAMiB,EAAoB,MAAM,CAAA,EAEzCH,EAAA,cAACc,EAAA,CAAK,GAAIC,CAAAA,CAAa,CACzB,EAGFf,EAAA,cAAChB,EAAA,CAAkB,IAAKU,CAAqBJ,EAAAA,CAAS,EAErDW,GACCD,EAAA,cAACd,EAAA,CACC,MAAM,eACN,KAAK,KACL,IAAK,CACH,MAAO,CACT,EACA,QAAS,IAAMiB,EAAoB,OAAO,CAE1CH,EAAAA,EAAA,cAACc,EAAA,CAAK,GAAIE,CAAc,CAAA,CAC1B,CAEJ,CAEJ,EAEA3B,EAAgB,YAAc"}
1
+ {"version":3,"file":"TabsTriggerList.js","sources":["../../../src/components/tabs/TabsTriggerList.tsx"],"sourcesContent":["import { List } from '@radix-ui/react-tabs'\nimport React from 'react'\nimport { styled } from '~/stitches'\nimport { ColorScheme } from '~/experiments/color-scheme'\nimport { useSize } from '~/utilities/hooks/useSize'\nimport { useScrollPosition } from '~/utilities/hooks/useScrollPosition'\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\nimport { ActionIcon } from '../action-icon'\nimport { Icon } from '../icon'\nimport { ChevronLeft, ChevronRight } from '@atom-learning/icons'\n\nconst StyledContainer = styled(ColorScheme, {\n position: 'relative',\n borderBottom: '1px solid $base3',\n width: '100%'\n})\n\nconst StyledTriggerList = styled(List, {\n flexShrink: 0,\n display: 'flex',\n width: '100%',\n overflowX: 'auto',\n '&::-webkit-scrollbar': { display: 'none' },\n scrollbarWidth: 'none'\n})\n\nconst StyledChevronActionIcon = styled(ActionIcon, {\n height: '100% !important',\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)',\n cursor: 'pointer',\n background: '$background !important',\n color: '$interactive1 !important',\n borderRadius: 0,\n opacity: 0.9\n})\n\nconst SCROLL_STEP = 0.8 // Used to scroll 80% of clientWidth\n\nexport const TabsTriggerList: React.FC<\n React.ComponentProps<typeof StyledTriggerList> & {\n colorScheme?: typeof ColorScheme\n }\n> = ({ children, colorScheme = {}, ...rest }) => {\n const [listRef, setListRefCallback] = useCallbackRefState()\n\n const { width } = useSize({ element: listRef, delay: 500 })\n const { left } = useScrollPosition({\n element: listRef,\n delay: 100,\n delayMethod: 'debounce'\n })\n\n const canScrollXAxis = React.useMemo(() => {\n if (!listRef) return false\n return listRef.scrollWidth > listRef.clientWidth\n }, [width, listRef])\n\n const canScrollLeft = React.useMemo(() => {\n if (!canScrollXAxis) return false\n return left > 0\n }, [left, canScrollXAxis])\n\n const canScrollRight = React.useMemo(() => {\n if (!listRef || !canScrollXAxis) return false\n return listRef.scrollWidth - left - listRef.clientWidth > 1 // 1 rather than 0 to account for sub-pixel widths and calculations\n }, [listRef, left, canScrollXAxis])\n\n const scrollList = React.useCallback(\n (stepModifier) => {\n if (!listRef) return\n listRef.scroll({\n left: listRef.scrollLeft + listRef.clientWidth * stepModifier,\n behavior: 'smooth'\n })\n },\n [listRef]\n )\n\n return (\n <StyledContainer\n base=\"slate\"\n accent=\"blue\"\n interactive=\"hiContrast1\"\n {...colorScheme}\n {...rest}\n >\n {canScrollLeft && (\n <StyledChevronActionIcon\n label=\"scroll left\"\n size=\"md\"\n css={{\n left: 0\n }}\n onClick={() => scrollList(-SCROLL_STEP)}\n >\n <Icon is={ChevronLeft} />\n </StyledChevronActionIcon>\n )}\n\n <StyledTriggerList ref={setListRefCallback}>{children}</StyledTriggerList>\n\n {canScrollRight && (\n <StyledChevronActionIcon\n label=\"scroll right\"\n size=\"md\"\n css={{\n right: 0\n }}\n onClick={() => scrollList(SCROLL_STEP)}\n >\n <Icon is={ChevronRight} />\n </StyledChevronActionIcon>\n )}\n </StyledContainer>\n )\n}\n\nTabsTriggerList.displayName = 'TabsTriggerList'\n"],"names":["StyledContainer","styled","ColorScheme","StyledTriggerList","List","StyledChevronActionIcon","ActionIcon","SCROLL_STEP","TabsTriggerList","children","colorScheme","rest","listRef","setListRefCallback","useCallbackRefState","width","useSize","left","useScrollPosition","canScrollXAxis","React","canScrollLeft","canScrollRight","scrollList","stepModifier","Icon","ChevronLeft","ChevronRight"],"mappings":"sjBAWA,MAAMA,EAAkBC,EAAOC,EAAa,CAC1C,SAAU,WACV,aAAc,mBACd,MAAO,MACT,CAAC,EAEKC,EAAoBF,EAAOG,EAAM,CACrC,WAAY,EACZ,QAAS,OACT,MAAO,OACP,UAAW,OACX,uBAAwB,CAAE,QAAS,MAAO,EAC1C,eAAgB,MAClB,CAAC,EAEKC,EAA0BJ,EAAOK,EAAY,CACjD,OAAQ,kBACR,SAAU,WACV,IAAK,MACL,UAAW,mBACX,OAAQ,UACR,WAAY,yBACZ,MAAO,2BACP,aAAc,EACd,QAAS,EACX,CAAC,EAEKC,EAAc,GAEPC,EAIT,CAAC,CAAE,SAAAC,EAAU,YAAAC,EAAc,CAAA,KAAOC,CAAK,IAAM,CAC/C,KAAM,CAACC,EAASC,CAAkB,EAAIC,EAEhC,EAAA,CAAE,MAAAC,CAAM,EAAIC,EAAQ,CAAE,QAASJ,EAAS,MAAO,GAAI,CAAC,EACpD,CAAE,KAAAK,CAAK,EAAIC,EAAkB,CACjC,QAASN,EACT,MAAO,IACP,YAAa,UACf,CAAC,EAEKO,EAAiBC,EAAM,QAAQ,IAC9BR,EACEA,EAAQ,YAAcA,EAAQ,YADhB,GAEpB,CAACG,EAAOH,CAAO,CAAC,EAEbS,EAAgBD,EAAM,QAAQ,IAC7BD,EACEF,EAAO,EADc,GAE3B,CAACA,EAAME,CAAc,CAAC,EAEnBG,EAAiBF,EAAM,QAAQ,IAC/B,CAACR,GAAW,CAACO,EAAuB,GACjCP,EAAQ,YAAcK,EAAOL,EAAQ,YAAc,EACzD,CAACA,EAASK,EAAME,CAAc,CAAC,EAE5BI,EAAaH,EAAM,YACtBI,GAAiB,CACZ,CAACZ,GACLA,EAAQ,OAAO,CACb,KAAMA,EAAQ,WAAaA,EAAQ,YAAcY,EACjD,SAAU,QACZ,CAAC,CACH,EACA,CAACZ,CAAO,CACV,EAEA,OACEQ,EAAA,cAACpB,EAAA,CACC,KAAK,QACL,OAAO,OACP,YAAY,cACX,GAAGU,EACH,GAAGC,CAAAA,EAEHU,GACCD,EAAA,cAACf,EAAA,CACC,MAAM,cACN,KAAK,KACL,IAAK,CACH,KAAM,CACR,EACA,QAAS,IAAMkB,EAAW,CAAChB,CAAW,CAEtCa,EAAAA,EAAA,cAACK,EAAA,CAAK,GAAIC,CAAAA,CAAa,CACzB,EAGFN,EAAA,cAACjB,EAAA,CAAkB,IAAKU,CAAqBJ,EAAAA,CAAS,EAErDa,GACCF,EAAA,cAACf,EAAA,CACC,MAAM,eACN,KAAK,KACL,IAAK,CACH,MAAO,CACT,EACA,QAAS,IAAMkB,EAAWhB,CAAW,CAAA,EAErCa,EAAA,cAACK,EAAA,CAAK,GAAIE,EAAc,CAC1B,CAEJ,CAEJ,EAEAnB,EAAgB,YAAc"}
@@ -1,2 +1,2 @@
1
- import*as o from"react";import{styled as f}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const t={size:{xs:{fontSize:"$xs",lineHeight:1.6,...e(.4364)},sm:{fontSize:"$sm",lineHeight:1.53,...e(.4056)},md:{fontSize:"$md",lineHeight:1.5,...e(.3864)},lg:{fontSize:"$lg",lineHeight:1.52,...e(.3983)},xl:{fontSize:"$xl",lineHeight:1.42,...e(.3506)}},noCapsize:{true:{"&::before, &::after":{display:"none !important"}}}},l=({size:i,noCapsize:n})=>({...t.size[i],...t.noCapsize[`${n}`]}),a=f("p",{fontFamily:"$body",fontWeight:400,margin:0,"& > &":{"&:before, &:after":{display:"none"}},variants:t}),r=o.forwardRef(({size:i="md",...n},s)=>o.createElement(a,{size:i,...n,ref:s}));r.displayName="Text";export{a as StyledText,r as Text,l as getTextVariant,t as textVariants};
1
+ import*as o from"react";import{styled as f}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const i={size:{xs:{fontSize:"$xs",lineHeight:1.6,...e(.4364)},sm:{fontSize:"$sm",lineHeight:1.53,...e(.4056)},md:{fontSize:"$md",lineHeight:1.5,...e(.3864)},lg:{fontSize:"$lg",lineHeight:1.52,...e(.3983)},xl:{fontSize:"$xl",lineHeight:1.42,...e(.3506)}},noCapsize:{true:{"&::before, &::after":{display:"none !important"}}}},l=({size:t,noCapsize:n})=>({...i.size[t],...i.noCapsize[`${n}`]}),a=f("p",{fontFamily:"$body",fontWeight:400,margin:0,"& > &":{"&:before, &:after":{display:"none"}},variants:i}),r=o.forwardRef(({size:t="md",...n},s)=>o.createElement(a,{size:t,...n,ref:s}));r.displayName="Text";export{a as StyledText,r as Text,l as getTextVariant,i as textVariants};
2
2
  //# sourceMappingURL=Text.js.map
@@ -1,2 +1,2 @@
1
- import{Error as g,Close as h}from"@atom-learning/icons";import*as t from"react";import{toast as v}from"react-hot-toast";import{keyframes as a,styled as i}from"../../stitches.js";import{ActionIcon as y}from"../action-icon/ActionIcon.js";import{Icon as s}from"../icon/Icon.js";import{Loader as $}from"../loader/Loader.js";import{Text as w}from"../text/Text.js";const n=400,x=a({"0%":{transform:"translate3d(0,-100%,0)",opacity:0},"100%":{transform:"translate3d(0,0,0)",opacity:1}}),E=a({"0%":{transform:"translate3d(0,0,0)",opacity:1},"100%":{transform:"translate3d(0,-100%,0)",opacity:0}}),k=i("div",{position:"absolute",width:"100%",variants:{visible:{true:{"@allowMotion":{animation:`${x} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}},false:{opacity:0,"@allowMotion":{animation:`${E} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}}}}}),I=i("div",{pointerEvents:"auto",alignItems:"center",borderRadius:"$0",boxShadow:"$1",boxSizing:"border-box",color:"white",display:"flex",minHeight:"$5",pl:"$4",position:"relative",pr:"$6",py:"$4",transition:"background-color 50ms ease-out",width:"100%","@sm":{width:n},"@allowMotion":{transition:"background-color 50ms ease-out, transform 150ms ease-out"},variants:{status:{blank:{bg:"$primary"},error:{bg:"$danger"},loading:{bg:"$primary"},success:{bg:"$success"}}}}),T=t.memo(({ariaLive:l,height:m,id:e,message:c,role:p,type:o="blank",visible:d,calculateOffset:u,updateHeight:b})=>{const f=u(e,{reverseOrder:!0,margin:8});return t.createElement(k,{visible:d},t.createElement(I,{ref:r=>{r&&m===void 0&&b(e,r.getBoundingClientRect().height)},status:o,role:p,"aria-live":l,style:{transform:`translateY(${f}px)`}},o==="error"&&t.createElement(s,{size:"sm",css:{mr:"$3",flex:"0 0 auto"},is:g}),t.createElement(w,null,c),o==="loading"?t.createElement($,{css:{flex:"0 0 auto",ml:"auto"}}):t.createElement(y,{css:{position:"absolute",top:"$2",right:"$2",color:"white","&:hover,&:focus":{color:"white",opacity:.5}},label:"Close alert",onClick:()=>v.dismiss(e)},t.createElement(s,{is:h}))))});export{n as TOAST_WIDTH,T as Toast};
1
+ import{Error as g,Close as $}from"@atom-learning/icons";import*as t from"react";import{toast as h}from"react-hot-toast";import{keyframes as a,styled as i}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as s}from"../icon/Icon.js";import{Loader as y}from"../loader/Loader.js";import{Text as w}from"../text/Text.js";const n=400,x=a({"0%":{transform:"translate3d(0,-100%,0)",opacity:0},"100%":{transform:"translate3d(0,0,0)",opacity:1}}),E=a({"0%":{transform:"translate3d(0,0,0)",opacity:1},"100%":{transform:"translate3d(0,-100%,0)",opacity:0}}),k=i("div",{position:"absolute",width:"100%",variants:{visible:{true:{"@allowMotion":{animation:`${x} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}},false:{opacity:0,"@allowMotion":{animation:`${E} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}}}}}),I=i("div",{pointerEvents:"auto",alignItems:"center",borderRadius:"$0",boxShadow:"$1",boxSizing:"border-box",color:"white",display:"flex",minHeight:"$5",pl:"$4",position:"relative",pr:"$6",py:"$4",transition:"background-color 50ms ease-out",width:"100%","@sm":{width:n},"@allowMotion":{transition:"background-color 50ms ease-out, transform 150ms ease-out"},variants:{status:{blank:{bg:"$primary"},error:{bg:"$danger"},loading:{bg:"$primary"},success:{bg:"$success"}}}}),T=t.memo(({ariaLive:l,height:m,id:e,message:c,role:p,type:o="blank",visible:d,calculateOffset:u,updateHeight:b})=>{const f=u(e,{reverseOrder:!0,margin:8});return t.createElement(k,{visible:d},t.createElement(I,{ref:r=>{r&&m===void 0&&b(e,r.getBoundingClientRect().height)},status:o,role:p,"aria-live":l,style:{transform:`translateY(${f}px)`}},o==="error"&&t.createElement(s,{size:"sm",css:{mr:"$3",flex:"0 0 auto"},is:g}),t.createElement(w,null,c),o==="loading"?t.createElement(y,{css:{flex:"0 0 auto",ml:"auto"}}):t.createElement(v,{css:{position:"absolute",top:"$2",right:"$2",color:"white","&:hover,&:focus":{color:"white",opacity:.5}},label:"Close alert",onClick:()=>h.dismiss(e)},t.createElement(s,{is:$}))))});export{n as TOAST_WIDTH,T as Toast};
2
2
  //# sourceMappingURL=Toast.js.map
@@ -1,2 +1,2 @@
1
- import*as t from"react";import{useToaster as p}from"react-hot-toast";import{default as P}from"react-hot-toast";import{styled as c}from"../../stitches.js";import{TOAST_WIDTH as d,Toast as f}from"./Toast.js";import{MAX_Z_INDEX as u}from"../../constants/zIndices.js";const T=c("div",{left:"$2",position:"fixed",top:"$2",right:"$2",zIndex:u,"@sm":{top:"$3",right:"auto",left:`calc(50% - ${d/2}px)`}}),o=({children:a})=>{const{toasts:r,handlers:s}=p(),{startPause:i,endPause:m,calculateOffset:n,updateHeight:l}=s;return t.createElement(t.Fragment,null,t.createElement(T,{onMouseEnter:i,onMouseLeave:m},r.map(e=>t.createElement(f,{key:e.id,calculateOffset:n,updateHeight:l,...e}))),a)};o.displayName="ToastProvider";export{o as ToastProvider,P as toast};
1
+ import*as t from"react";import{useToaster as p}from"react-hot-toast";import{default as _}from"react-hot-toast";import{styled as c}from"../../stitches.js";import{TOAST_WIDTH as d,Toast as f}from"./Toast.js";import{MAX_Z_INDEX as u}from"../../constants/zIndices.js";const T=c("div",{left:"$2",position:"fixed",top:"$2",right:"$2",zIndex:u,"@sm":{top:"$3",right:"auto",left:`calc(50% - ${d/2}px)`}}),o=({children:a})=>{const{toasts:r,handlers:s}=p(),{startPause:i,endPause:m,calculateOffset:n,updateHeight:l}=s;return t.createElement(t.Fragment,null,t.createElement(T,{onMouseEnter:i,onMouseLeave:m},r.map(e=>t.createElement(f,{key:e.id,calculateOffset:n,updateHeight:l,...e}))),a)};o.displayName="ToastProvider";export{o as ToastProvider,_ as toast};
2
2
  //# sourceMappingURL=ToastProvider.js.map
@@ -1,2 +1,2 @@
1
- import*as n from"react";import{styled as f}from"../../stitches.js";import{StyledIcon as g,Icon as r}from"../icon/Icon.js";import{StyledItem as h}from"./ToggleGroupItem.js";const s={sm:"32px",md:"40px",lg:"48px"},u={sm:"$4",md:"$5",lg:"$5"},x={sm:"$2",md:"$3",lg:"$3"},l=i=>({fontSize:`$${i}`,px:u[i],minHeight:s[i],"& > *:not(:last-child)":{mr:x[i]}}),d=f(h,{flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,lineHeight:1,py:"$1",[`& ${g}`]:{flexShrink:0},variants:{size:{sm:l("sm"),md:l("md"),lg:l("lg")},isIconOnly:{true:{}}},compoundVariants:[{isIconOnly:!0,size:"sm",css:{minWidth:s.sm,p:0}},{isIconOnly:!0,size:"md",css:{minWidth:s.md,p:0}},{isIconOnly:!0,size:"lg",css:{minWidth:s.lg,p:0}}]}),I=n.forwardRef(({size:i="md",children:p,...c},y)=>{var m;const t=n.Children.toArray(p),o=t.length<=1,a=o&&n.isValidElement(t[0])&&((m=t[0])==null?void 0:m.type)===r;return n.createElement(d,{ref:y,size:i,isIconOnly:a,...c},t.map(e=>!o&&(typeof e=="string"||typeof e=="number")?n.createElement("span",{key:e},e):n.isValidElement(e)&&(e==null?void 0:e.type)===r?n.cloneElement(e,{...e.props,size:i}):e))});export{d as StyledButton,I as ToggleGroupButton};
1
+ import*as n from"react";import{styled as f}from"../../stitches.js";import{StyledIcon as g,Icon as r}from"../icon/Icon.js";import{StyledItem as h}from"./ToggleGroupItem.js";const t={sm:"32px",md:"40px",lg:"48px"},$={sm:"$4",md:"$5",lg:"$5"},u={sm:"$2",md:"$3",lg:"$3"},l=i=>({fontSize:`$${i}`,px:$[i],minHeight:t[i],"& > *:not(:last-child)":{mr:u[i]}}),d=f(h,{flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,lineHeight:1,py:"$1",[`& ${g}`]:{flexShrink:0},variants:{size:{sm:l("sm"),md:l("md"),lg:l("lg")},isIconOnly:{true:{}}},compoundVariants:[{isIconOnly:!0,size:"sm",css:{minWidth:t.sm,p:0}},{isIconOnly:!0,size:"md",css:{minWidth:t.md,p:0}},{isIconOnly:!0,size:"lg",css:{minWidth:t.lg,p:0}}]}),x=n.forwardRef(({size:i="md",children:p,...c},y)=>{var o;const s=n.Children.toArray(p),m=s.length<=1,a=m&&n.isValidElement(s[0])&&((o=s[0])==null?void 0:o.type)===r;return n.createElement(d,{ref:y,size:i,isIconOnly:a,...c},s.map(e=>!m&&(typeof e=="string"||typeof e=="number")?n.createElement("span",{key:e},e):n.isValidElement(e)&&(e==null?void 0:e.type)===r?n.cloneElement(e,{...e.props,size:i}):e))});export{d as StyledButton,x as ToggleGroupButton};
2
2
  //# sourceMappingURL=ToggleGroupButton.js.map
@@ -1,2 +1,2 @@
1
- import{Content as m,Arrow as l}from"@radix-ui/react-tooltip";import*as t from"react";import{TOOLTIP_Z_INDEX as r}from"../../constants/zIndices.js";import{styled as a}from"../../stitches.js";import{slideDownAndFade as s,slideLeftAndFade as p,slideUpAndFade as f,slideRightAndFade as c}from"../../utilities/style/keyframe-animations.js";const h=a(m,{backgroundColor:"$tonal500",borderRadius:"$0",boxShadow:"$0",color:"white",fontFamily:"$body",fontSize:"$sm",lineHeight:1.5,whiteSpace:"normal",px:"$3",py:"$2",zIndex:r,"@allowMotion":{animationDuration:"75ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="delayed-open"]':{'&[data-side="top"]':{animationName:s},'&[data-side="right"]':{animationName:p},'&[data-side="bottom"]':{animationName:f},'&[data-side="left"]':{animationName:c}}},variants:{size:{sm:{maxWidth:"100px"},md:{maxWidth:"250px"},lg:{maxWidth:"400px"}}}}),x=a(l,{fill:"$tonal500",'[data-align="end"] &':{mr:"$2"},'[data-align="start"] &':{ml:"$2"}}),$=({children:i,side:e="top",sideOffset:o=4,size:n="md",...d})=>t.createElement(h,{side:e,sideOffset:o,size:n,...d},i,t.createElement(x,null));export{$ as TooltipContent};
1
+ import{Content as m,Arrow as l}from"@radix-ui/react-tooltip";import*as a from"react";import{TOOLTIP_Z_INDEX as r}from"../../constants/zIndices.js";import{styled as t}from"../../stitches.js";import{slideDownAndFade as s,slideLeftAndFade as p,slideUpAndFade as f,slideRightAndFade as c}from"../../utilities/style/keyframe-animations.js";const h=t(m,{backgroundColor:"$tonal500",borderRadius:"$0",boxShadow:"$0",color:"white",fontFamily:"$body",fontSize:"$sm",lineHeight:1.5,whiteSpace:"normal",px:"$3",py:"$2",zIndex:r,"@allowMotion":{animationDuration:"75ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="delayed-open"]':{'&[data-side="top"]':{animationName:s},'&[data-side="right"]':{animationName:p},'&[data-side="bottom"]':{animationName:f},'&[data-side="left"]':{animationName:c}}},variants:{size:{sm:{maxWidth:"100px"},md:{maxWidth:"250px"},lg:{maxWidth:"400px"}}}}),x=t(l,{fill:"$tonal500",'[data-align="end"] &':{mr:"$2"},'[data-align="start"] &':{ml:"$2"}}),$=({children:i,side:e="top",sideOffset:o=4,size:n="md",...d})=>a.createElement(h,{side:e,sideOffset:o,size:n,...d},i,a.createElement(x,null));export{$ as TooltipContent};
2
2
  //# sourceMappingURL=TooltipContent.js.map
@@ -1,2 +1,2 @@
1
- import*as e from"react";import m from"react-player/vimeo";import{Box as p}from"../box/Box.js";import{styled as a}from"../../stitches.js";import{CSSWrapper as l}from"../../utilities/css-wrapper/CSSWrapper.js";const f=a(m,{}),o=e.forwardRef(({id:t,ratio:r=9/16,css:i,...s},d)=>e.createElement(l,{css:i},e.createElement(p,{css:{borderRadius:"$0",position:"relative",paddingTop:`${r*100}%`,overflow:"hidden",height:0,width:"100%"}},e.createElement(f,{...s,role:"figure",url:`https://player.vimeo.com/video/${t}`,height:"100%",width:"100%",css:{position:"absolute",top:0,left:0},ref:d}))));o.displayName="Video";export{o as Video};
1
+ import*as e from"react";import m from"react-player/vimeo";import{Box as p}from"../box/Box.js";import{styled as a}from"../../stitches.js";import{CSSWrapper as l}from"../../utilities/css-wrapper/CSSWrapper.js";const f=a(m,{}),o=e.forwardRef(({id:r,ratio:t=9/16,css:i,...s},d)=>e.createElement(l,{css:i},e.createElement(p,{css:{borderRadius:"$0",position:"relative",paddingTop:`${t*100}%`,overflow:"hidden",height:0,width:"100%"}},e.createElement(f,{...s,role:"figure",url:`https://player.vimeo.com/video/${r}`,height:"100%",width:"100%",css:{position:"absolute",top:0,left:0},ref:d}))));o.displayName="Video";export{o as Video};
2
2
  //# sourceMappingURL=Video.js.map
@@ -1,2 +1,2 @@
1
- import*as o from"react";import{styled as f,colorSchemes as e}from"./stitches.colorscheme.config.js";import{Slot as d}from"@radix-ui/react-slot";const p=f("div"),t=o.forwardRef(({base:r="",accent:a="",interactive:c="",className:m,asChild:s=!1,...i},l)=>{const n=[m,e[`interactive-${c}`],e[`accent-${a}`],e[`base-${r}`]].filter(Boolean).join(" ");return o.createElement(s?d:p,{ref:l,className:n,...i})});t.displayName="ColorScheme";export{t as ColorScheme};
1
+ import*as o from"react";import{styled as f,colorSchemes as e}from"./stitches.colorscheme.config.js";import{Slot as d}from"@radix-ui/react-slot";const p=f("div"),r=o.forwardRef(({base:t="",accent:a="",interactive:c="",className:m,asChild:s=!1,...i},l)=>{const n=[m,e[`interactive-${c}`],e[`accent-${a}`],e[`base-${t}`]].filter(Boolean).join(" ");return o.createElement(s?d:p,{ref:l,className:n,...i})});r.displayName="ColorScheme";export{r as ColorScheme};
2
2
  //# sourceMappingURL=ColorScheme.js.map