@atom-learning/components 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/Accordion.js +1 -1
- package/dist/components/accordion/AccordionContent.js +1 -1
- package/dist/components/accordion/AccordionItem.js +1 -1
- package/dist/components/accordion/AccordionTrigger.js +1 -1
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/alert-dialog/AlertDialog.js +1 -1
- package/dist/components/alert-dialog/AlertDialogContent.js +1 -1
- package/dist/components/alert-dialog/alert-context/AlertContext.js +1 -1
- package/dist/components/alert-dialog/alert-context/AlertDialog.js +1 -1
- package/dist/components/alert-dialog/alert-context/reducer.js +1 -1
- package/dist/components/box/Box.js +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/calendar/constants.js +1 -1
- package/dist/components/carousel/Carousel.js +1 -1
- package/dist/components/carousel/CarouselArrows.js +1 -1
- package/dist/components/carousel/CarouselPagination.js +1 -1
- package/dist/components/carousel/CarouselSlide.js +1 -1
- package/dist/components/carousel/CarouselSlider.js +1 -1
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/checkbox-field/CheckboxField.js +1 -1
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/combobox/ComboboxInput.js +1 -1
- package/dist/components/combobox/ComboboxPopover.js +1 -1
- package/dist/components/date-field/DateField.js +1 -1
- package/dist/components/date-input/DateInput.d.ts +4 -2
- package/dist/components/date-input/DateInput.js +1 -1
- package/dist/components/date-input/constants.js +1 -1
- package/dist/components/date-input/use-date.js +1 -1
- package/dist/components/dialog/Dialog.js +1 -1
- package/dist/components/dialog/DialogContent.js +1 -1
- package/dist/components/divider/Divider.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuContent.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuItem.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuTrigger.js +1 -1
- package/dist/components/field-wrapper/FieldDescription.js +1 -1
- package/dist/components/field-wrapper/FieldWrapper.js +1 -1
- package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
- package/dist/components/flex/Flex.js +1 -1
- package/dist/components/form/Form.js +1 -1
- package/dist/components/form/Form.types.js +1 -1
- package/dist/components/form/useFieldError.js +1 -1
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/image/Image.js +1 -1
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input-field/InputField.js +1 -1
- package/dist/components/label/Label.js +1 -1
- package/dist/components/link/Link.js +1 -1
- package/dist/components/list/List.js +1 -1
- package/dist/components/loader/Loader.js +1 -1
- package/dist/components/markdown-content/MarkdownContent.js +1 -1
- package/dist/components/markdown-content/components/MarkdownCode.js +1 -1
- package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
- package/dist/components/markdown-content/components/MarkdownHeading.js +1 -1
- package/dist/components/markdown-content/components/MarkdownImage.js +1 -1
- package/dist/components/markdown-content/components/MarkdownInlineCode.js +1 -1
- package/dist/components/markdown-content/components/MarkdownLink.js +1 -1
- package/dist/components/markdown-content/components/MarkdownList.js +1 -1
- package/dist/components/markdown-content/components/MarkdownListItem.js +1 -1
- package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -1
- package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
- package/dist/components/markdown-content/components/MarkdownText.js +1 -1
- package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
- package/dist/components/notification-badge/NotificationBadge.js +1 -1
- package/dist/components/password-field/PasswordField.js +1 -1
- package/dist/components/password-input/PasswordInput.js +1 -1
- package/dist/components/popover/Popover.js +1 -1
- package/dist/components/popover/PopoverContent.js +1 -1
- package/dist/components/progress-bar/ProgressBar.js +1 -1
- package/dist/components/radio-button/RadioButton.js +1 -1
- package/dist/components/radio-button/RadioButtonGroup.js +1 -1
- package/dist/components/radio-button-field/RadioButtonField.js +1 -1
- package/dist/components/radio-button-field/RadioField.js +1 -1
- package/dist/components/radio-card/RadioCard.js +1 -1
- package/dist/components/radio-card/RadioCardGroup.js +1 -1
- package/dist/components/search-input/SearchInput.d.ts +1 -0
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/select/Select.js +1 -1
- package/dist/components/select-field/SelectField.js +1 -1
- package/dist/components/slider/Slider.js +1 -1
- package/dist/components/slider/SliderSteps.d.ts +1 -1
- package/dist/components/slider/SliderSteps.js +1 -1
- package/dist/components/slider/SliderValue.js +1 -1
- package/dist/components/slider-field/SliderField.js +1 -1
- package/dist/components/stack/Stack.js +1 -1
- package/dist/components/stack-content/StackContent.js +1 -1
- package/dist/components/switch/Switch.js +1 -1
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/TableBody.js +1 -1
- package/dist/components/table/TableCell.js +1 -1
- package/dist/components/table/TableFooter.js +1 -1
- package/dist/components/table/TableHeader.js +1 -1
- package/dist/components/table/TableHeaderCell.js +1 -1
- package/dist/components/table/TableRow.js +1 -1
- package/dist/components/tabs/TabTrigger.js +1 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/TabsTriggerList.js +1 -1
- package/dist/components/tabs/utils.js +1 -1
- package/dist/components/text/Text.js +1 -1
- package/dist/components/textarea/Textarea.js +1 -1
- package/dist/components/textarea-field/TextareaField.js +1 -1
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toast/ToastProvider.js +1 -1
- package/dist/components/tooltip/Tooltip.js +1 -1
- package/dist/components/tooltip/TooltipContent.js +1 -1
- package/dist/components/validation-error/ValidationError.js +1 -1
- package/dist/components/video/Video.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/docs/DateInput.mdx +6 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.js +1 -1
- package/dist/stitches.js +1 -1
- package/dist/utilities/css-wrapper/CSSWrapper.js +1 -1
- package/dist/utilities/style/capsize.js +1 -1
- package/dist/utilities/style/encode-background-icon.js +1 -1
- package/dist/utilities/style/keyframe-animations.js +1 -1
- package/dist/utilities/use-is-mounted-ref/index.js +1 -1
- package/package.json +22 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import d from"mdast-util-directive";import f from"mdast-util-from-markdown";import k from"micromark-extension-directive";import{createElement as p}from"react";import{StackContent as M}from"../stack-content/StackContent.js";import{MarkdownCode as l}from"./components/MarkdownCode.js";import{MarkdownEmphasis as w}from"./components/MarkdownEmphasis.js";import{MarkdownHeading as c}from"./components/MarkdownHeading.js";import{MarkdownInlineCode as g}from"./components/MarkdownInlineCode.js";import{MarkdownImage as h}from"./components/MarkdownImage.js";import{MarkdownLink as u}from"./components/MarkdownLink.js";import{MarkdownList as C}from"./components/MarkdownList.js";import{MarkdownListItem as y}from"./components/MarkdownListItem.js";import{MarkdownParagraph as x}from"./components/MarkdownParagraph.js";import{MarkdownStrong as $}from"./components/MarkdownStrong.js";import{MarkdownText as v}from"./components/MarkdownText.js";import{MarkdownThematicBreak as I}from"./components/MarkdownThematicBreak.js";const E={code:l,emphasis:w,heading:c,inlineCode:g,image:h,link:u,list:C,listItem:y,paragraph:x,strong:$,text:v,thematicBreak:I},L=o=>{var r,t;if((r=o.position)==null?void 0: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=f(o,{extensions:[k()],mdastExtensions:[d.fromMarkdown]}),m={...E,...r},n=a=>{const i=m[a.type];return i?p(i,{key:L(a),node:a,handleNode:n}):null};return p(M,{css:t},e.children.map(n))};s.displayName="MarkdownContent";export{s as MarkdownContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement 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(m,{as:"pre"},o.value);export{n as MarkdownCode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as l}from"react";import{styled as o}from"../../../stitches.js";const m=o("em",{fontStyle:"italic"}),n=({node:e,handleNode:r})=>{var t;return l(m,null,(t=e.children)==null?void 0:t.map(r))};export{n as MarkdownEmphasis};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{createElement as n}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"}}},h=({node:e,handleNode:r,css:a})=>{var s;const{as:t,size:i}=o(e.depth);return n(c,{as:t,size:i,css:{color:"inherit",...a}},(s=e.children)==null?void 0:s.map(r))};export{h as MarkdownHeading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as m}from"react";import{Image as a}from"../../image/Image.js";const e=({node:r,css:t})=>m(a,{src:r.url,alt:r.alt,css:t});export{e as MarkdownImage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as e}from"react";import{styled as n}from"../../../stitches.js";import{Box as t}from"../../box/Box.js";const l=n(t,{bg:"$tonal100",borderRadius:"$0",color:"$tonal600",display:"inline-block",fontFamily:"$mono",fontSize:"85%",p:"$0 $1"}),r=({node:o})=>e(l,{as:"code"},o.value);export{r as MarkdownInlineCode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as i}from"react";import{Link as l}from"../../link/Link.js";const m=({node:r,handleNode:e})=>{var t;return i(l,{title:r.title,href:r.url},(t=r.children)==null?void 0:t.map(e))};export{m as MarkdownLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{createElement as a}from"react";import{List as d}from"../../list/List.js";const i=({node:r,handleNode:o,css:t})=>{var e;return a(d,{css:{"& p:before, & p:after":{display:"none"},...t},ordered:r.ordered},(e=r.children)==null?void 0:e.map(o))};export{i as MarkdownList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as m}from"react";import{List as o}from"../../list/List.js";const n=({node:t,handleNode:e})=>{var r;return m(o.Item,null,(r=t.children)==null?void 0:r.map(e))};export{n as MarkdownListItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{createElement as a}from"react";import{Text as n}from"../../text/Text.js";const i=({node:o,handleNode:e,css:t})=>{var r;return a(n,{css:{color:"inherit",...t}},(r=o.children)==null?void 0:r.map(e))};export{i as MarkdownParagraph};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as n}from"react";import{styled as e}from"../../../stitches.js";const l=e("strong",{fontWeight:600}),m=({node:r,handleNode:o})=>{var t;return n(l,null,(t=r.children)==null?void 0:t.map(o))};export{m as MarkdownStrong};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o=({node:e})=>e.value;export{o as MarkdownText};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{createElement as e}from"react";import{Divider as t}from"../../divider/Divider.js";const o=({css:r})=>e(t,{css:{width:"100%",...r}});export{o as MarkdownThematicBreak};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import{Box as i}from"../box/Box.js";import{Flex as n}from"../flex/Flex.js";import{styled as o}from"../../stitches.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
|
-
|
|
1
|
+
import{createElement as s}from"react";import{useFormContext as f}from"react-hook-form";import{FieldWrapper as n}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as w}from"../form/useFieldError.js";import{PasswordInput as F}from"../password-input/PasswordInput.js";const t=({css:i={},label:p="Password",name:r,prompt:d=void 0,description:m,validation:o,...l})=>{const{register:e}=f(),{error:u}=w(r),c=o?e(o):e;return s(n,{css:{...i,position:"relative"},description:m,error:u,fieldId:r,label:p,prompt:d,required:Boolean(o==null?void 0:o.required)},s(F,{autoComplete:"current-password",name:r,id:r,ref:c,...l}))};t.displayName="PasswordField";export{t as PasswordField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Eye as c,EyeCrossed as d}from"@atom-learning/icons";import{forwardRef as w,useState as f,createElement as s}from"react";import{ActionIcon as u}from"../action-icon/ActionIcon.js";import{Box as b}from"../box/Box.js";import{Icon as I}from"../icon/Icon.js";import{Input as y}from"../input/Input.js";const t=w(({css:r,hidePasswordText:i="Hide password",showPasswordText:a="Show password",...p},n)=>{const[o,m]=f(!1),l=()=>m(e=>!e);return s(b,{css:{position:"relative",...r}},s(y,{...p,type:o?"text":"password",ref:n,css:{pr:"$sizes$2"}}),s(u,{appearance:"simple",theme:"neutral",css:{bottom:0,position:"absolute",right:0},label:o?i:a,onClick:l,onMouseDown:e=>e.preventDefault(),size:"lg"},s(I,{is:o?c:d,css:{size:20}})))});t.displayName="PasswordInput";export{t as PasswordInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Root as
|
|
1
|
+
import{Root as r,Trigger as t}from"@radix-ui/react-popover";import{createElement as m}from"react";import{styled as p}from"../../stitches.js";import{PopoverContent as i}from"./PopoverContent.js";p(r,{});const o=e=>m(r,{...e});o.Content=i,o.Trigger=t,o.displayName="Popover";export{o as Popover};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Close as r}from"@atom-learning/icons";import{Content as l,Arrow as p,Close as h}from"@radix-ui/react-popover";import{createElement as t}from"react";import{styled as i}from"../../stitches.js";import{ActionIcon as c}from"../action-icon/ActionIcon.js";import{Icon as $}from"../icon/Icon.js";import{slideDownAndFade as f,slideLeftAndFade as g,slideUpAndFade as w,slideRightAndFade as x}from"../../utilities/style/keyframe-animations.js";const b=i(l,{bg:"white",borderRadius:"$1",boxShadow:"$2",maxWidth:"90vw",p:"$sizes$2",pr:"$6",position:"relative","@allowMotion":{animationDuration:"75ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="open"]':{'&[data-side="top"]':{animationName:f},'&[data-side="right"]':{animationName:g},'&[data-side="bottom"]':{animationName:w},'&[data-side="left"]':{animationName:x}}},variants:{size:{sm:{maxWidth:"200px"},md:{maxWidth:"400px"},lg:{maxWidth:"600px"}}}}),C=i(p,{fill:"white",zIndex:1,'[data-align="end"] &':{mr:"$sizes$2"},'[data-align="start"] &':{ml:"$sizes$2"}}),u=({children:o,side:e="top",sideOffset:a=8,closePopoverText:n="Close popover",showCloseButton:m=!0,size:s="md",...d})=>t(b,{size:s,side:e,sideOffset:a,...d},m&&t(c,{as:h,css:{position:"absolute",right:"$0",top:"$0"},label:n,size:"lg",theme:"neutral"},t($,{is:r})),o,t(C,{width:16,height:8}));export{u as PopoverContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Root as s,Indicator as n}from"@radix-ui/react-progress";import{createElement as r}from"react";import{styled as o}from"../../stitches.js";const d=o(s,{borderRadius:"$round",background:"$tonal100",height:"$0",position:"relative",overflow:"hidden",width:"100%",variants:{theme:{primary:{color:"$primary"},success:{color:"$success"},warning:{color:"$warning"},danger:{color:"$danger"}}}}),c=o(n,{backgroundColor:"currentcolor",borderRadius:"$round",boxSizing:"border-box",height:"100%",position:"absolute",transition:"all 300ms ease-out"}),e=({value:t,theme:i="primary",...a})=>r(d,{theme:i,...a},r(c,{style:{width:`${t}%`}}));e.displayName="ProgressBar";export{e as ProgressBar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Item as
|
|
1
|
+
import{Item as n,Indicator as a}from"@radix-ui/react-radio-group";import{createElement as o}from"react";import{styled as r}from"../../stitches.js";const l=r(n,{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"}}),d=r(a,{size:"6px",borderRadius:"$round",backgroundColor:"currentcolor",position:"absolute"}),t=e=>o(l,{...e},o(d,null));t.displayName="RadioButton";export{t as RadioButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Root as
|
|
1
|
+
import{Root as r}from"@radix-ui/react-radio-group";import{styled as t}from"../../stitches.js";const o=t(r,{display:"flex",flexWrap:"wrap",variants:{direction:{row:{flexDirection:"row","& > *:not(:last-child)":{mr:"$5"}},column:{flexDirection:"column"}}}});o.displayName="RadioButtonGroup";export{o as RadioButtonGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as o}from"react";import{useFormContext as
|
|
1
|
+
import{createElement as o}from"react";import{useFormContext as a,Controller as F}from"react-hook-form";import{Description as B}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as R}from"../form/useFieldError.js";import{Label as b}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as C}from"../radio-button/RadioButtonGroup.js";import{ValidationError as E}from"../validation-error/ValidationError.js";import{styled as $}from"../../stitches.js";import{RadioField as g}from"./RadioField.js";const q=$("fieldset",{all:"unset"}),e=({children:s,css:n,direction:p="column",defaultValue:t,description:m,label:d,name:i,validation:r})=>{const{control:u}=a(),{error:l}=R(i);return o(q,{css:n},o(b,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(r==null?void 0:r.required)},d),m&&o(B,{css:{mb:"$3"}},m),o(F,{control:u,name:i,rules:r,defaultValue:t,render:({onChange:c,value:f})=>o(C,{direction:p,defaultValue:t,onValueChange:c,value:f},s)}),l&&o(E,{css:{mt:"$2"}},l))};e.Item=g,e.displayName="RadioButtonField";export{e as RadioButtonField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{createElement as o}from"react";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as p}from"../field-wrapper/InlineFieldWrapper.js";import{RadioButton as a}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";const i=({css:r,label:e,value:t,...m})=>o(p,{css:r,label:e},o(a,{value:t,...m}));i.displayName="RadioField";export{i as RadioField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Item as s,Indicator as d}from"@radix-ui/react-radio-group";import{createElement as t}from"react";import{styled as r}from"../../stitches.js";import{Box as c}from"../box/Box.js";const i=r(s,{alignItems:"center",bg:"white",border:"1px solid $tonal200",borderRadius:"$0",cursor:"pointer",display:"flex",textAlign:"left",'&[data-state="checked"]':{outline:"2px solid $primary",outlineOffset:"-2px"},variants:{align:{left:{flexDirection:"row"},right:{flexDirection:"row-reverse"}},size:{md:{px:"$4",py:"$3"},lg:{px:"$5",py:"$4"}},isFullWidth:{true:{width:"100%"},false:{width:"max-content"}}}}),p=r("div",{alignItems:"center",appearance:"none",backgroundColor:"transparent",border:"1px solid $tonal500",borderRadius:"$round",display:"flex",flexShrink:0,justifyContent:"center",p:0,size:"$1",transition:"all 50ms ease-out",'[data-state="checked"] &':{backgroundColor:"$primary",borderColor:"$primary"},variants:{containerIsFullWidth:{true:{},false:{}},align:{left:{mr:"$4"},right:{}}},compoundVariants:[{containerIsFullWidth:!0,align:"right",css:{ml:"auto"}},{containerIsFullWidth:!1,align:"right",css:{ml:"$4"}}]}),u=r(d,{backgroundColor:"white",borderRadius:"$round",position:"absolute",size:"6px"}),m=({children:a,isFullWidth:e=!1,size:n="md",align:o="left",...l})=>t(i,{...l,align:o,isFullWidth:e,size:n},t(p,{align:o,containerIsFullWidth:e},t(u,null)),t(c,null,a));export{m as RadioCard,i as StyledRadioCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Root as d}from"@radix-ui/react-radio-group";import{createElement as o,Children as l,isValidElement as u,cloneElement as C}from"react";import{Stack as E}from"../stack/Stack.js";import{RadioCard as R}from"./RadioCard.js";const s=({css:t,children:e,size:m,isFullWidth:n,align:i,gap:a="3",justify:p,...f})=>o(d,{...f},o(E,{direction:"row",justify:p,gap:a,css:t},l.map(e,r=>u(r)&&(r==null?void 0:r.type)===R?C(r,{size:m,isFullWidth:n,align:i}):r)));export{s as RadioCardGroup};
|
|
@@ -6,6 +6,7 @@ declare type SearchInputProps = React.ComponentProps<typeof Input> & {
|
|
|
6
6
|
css?: CSS;
|
|
7
7
|
value?: string;
|
|
8
8
|
clearText?: string;
|
|
9
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
9
10
|
};
|
|
10
11
|
export declare const SearchInput: React.FC<SearchInputProps>;
|
|
11
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Search as f,Close as g}from"@atom-learning/icons";import{useState as c,createElement as e}from"react";import{ActionIcon as A}from"../action-icon/ActionIcon.js";import{Box as E}from"../box/Box.js";import{Icon as i}from"../icon/Icon.js";import{Input as y}from"../input/Input.js";import{styled as l}from"../../stitches.js";const $=l(i,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),v=l(y,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),p=({size:t="md",css:m,value:r,clearText:u="Clear",onChange:n,...h})=>{const[d,s]=c(r||""),[C,a]=c(r?"CLEAR":"SEARCH"),I=()=>{s(""),a("SEARCH")},S=o=>{s(o.target.value),a(o.target.value?"CLEAR":"SEARCH"),n==null||n(o)},b=()=>C==="SEARCH"?e($,{is:f,size:t,css:{size:t=="sm"?"$1":20}}):e(A,{label:u,theme:"neutral",size:t=="sm"?"md":"lg",css:{position:"absolute",top:0,right:0},onClick:I},e(i,{is:g}));return e(E,{css:{position:"relative",...m}},e(v,{size:t,type:"search",...h,value:d,onChange:S,css:{pr:t==="sm"?"$5":"$6"}}),b())};p.displayName="SearchInput";export{p as SearchInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{forwardRef as d,createElement as e}from"react";import{styled as l,theme as s}from"../../stitches.js";import{encodeBackgroundIcon as c}from"../../utilities/style/encode-background-icon.js";const p=l("select",{appearance:"none",backgroundColor:"white",backgroundImage:c(s.colors.tonal300.value,"chevron"),backgroundRepeat:"no-repeat, repeat",border:"1px solid $tonal300",borderRadius:"$0",color:"$tonal600",display:"block",fontFamily:"$body",fontWeight:400,lineHeight:1.4,transition:"all 75ms ease-out",width:"100%","&:hover":{cursor:"pointer"},"&:focus":{borderColor:"$primary",outline:"none"},"&::-ms-expand":{display:"none"},"&[disabled], > option[disabled]":{backgroundColor:"$tonal100",color:"$tonal400",cursor:"not-allowed"},variants:{size:{sm:{backgroundPosition:"right $space$2 top 50%, 0 0",backgroundSize:"18px auto, 100%",fontSize:"$sm",height:"$3",pl:"$2",pr:"$5"},md:{backgroundPosition:"right $space$3 top 50%, 0 0",backgroundSize:"20px auto, 100%",fontSize:"$md",height:"$4",pl:"$3",pr:"$6"}},state:{error:{border:"1px solid $danger"}}}}),r=d(({placeholder:o,children:t,size:a="md",...n},i)=>e(p,{size:a,defaultValue:"",...n,ref:i},o&&e("option",{disabled:!0,hidden:!0,value:""},o),t));r.displayName="Select";export{r as Select};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{createElement as i}from"react";import{useFormContext as F}from"react-hook-form";import{FieldWrapper as n}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as S}from"../form/useFieldError.js";import{Select as q}from"../select/Select.js";const m=({css:p=void 0,children:l,name:r,label:d,validation:e,prompt:s,description:c,...f})=>{const{register:o}=F(),{error:t}=S(r),u=e?o(e):o;return i(n,{css:p,description:c,error:t,fieldId:r,label:d,prompt:s,required:Boolean(e==null?void 0:e.required)},i(q,{name:r,id:r,...f,ref:u,...t&&{state:"error"}},l))};m.displayName="SelectField";export{m as SelectField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Track as $,Root as b,Range as h,Thumb as g}from"@radix-ui/react-slider";import{createElement as o}from"react";import{styled as t}from"../../stitches.js";import{SliderSteps as f}from"./SliderSteps.js";import{SliderValue as S}from"./SliderValue.js";import{CSSWrapper as y}from"../../utilities/css-wrapper/CSSWrapper.js";const i=t($,{borderRadius:"$round",flexGrow:1,position:"relative",'&[data-orientation="horizontal"]':{height:"$space$1"},'&[data-orientation="vertical"]':{width:"$space$1"}}),v=t(b,{alignItems:"center",display:"flex",position:"relative",touchAction:"none",userSelect:"none",cursor:"pointer",'&[data-orientation="horizontal"]':{height:"$1"},'&[data-orientation="vertical"]':{flexDirection:"column",width:"$1"},"&[data-disabled]":{cursor:"not-allowed",bg:"$tonal100"},variants:{theme:{light:{[`${i}`]:{bg:"#fff"}},tonal:{[`${i}`]:{bg:"$tonal200"}}}}}),w=t(h,{bg:"$primary",borderRadius:"$round",height:"100%",position:"absolute","&[data-disabled]":{bg:"$tonal200",cursor:"not-allowed"}}),x=t(g,{bg:"$primaryMid",borderRadius:"$round",display:"block",size:"$1","&:hover":{bg:"$primaryDark"},"&:focus":{outline:"2px solid $primaryMid",outlineOffset:"2px"},"&[data-disabled]":{bg:"$tonal200",cursor:"not-allowed"}}),e=({value:a,defaultValue:l,min:n=0,max:d=100,theme:s="tonal",css:p,children:c,...m})=>{const r=a||l;return o(y,{css:p},o(v,{theme:s,defaultValue:l,value:a,min:n,max:d,...m},o(i,null,o(w,null)),(r==null?void 0:r.length)&&r.map((R,u)=>o(x,{key:`thumb${u}`}))),c)};e.Value=S,e.Steps=f,e.displayName="Slider";export{e as Slider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as l}from"react";import{styled as a}from"../../stitches.js";import{Text as i}from"../text/Text.js";const s=a("div",{height:"$space$3",mt:"$3",position:"relative",width:"100%"}),o=(r,e,n)=>(r-e)/(n-e)*100,u=(r,e,n)=>{const t=o(r,e,n);return t<=10?0:t>=90?100:50},c=({min:r,max:e,steps:n=[]})=>n.length===0?null:l(s,null,n.map(t=>l(i,{as:"span",key:t.value,css:{position:"absolute",color:"$tonal300"},style:{left:`${o(t.value,r,e)}%`,transform:`translateX(-${u(t.value,r,e)}%)`}},t.label)));export{c as SliderSteps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as
|
|
1
|
+
import{createElement as o}from"react";import{Text as m}from"../text/Text.js";const n=({value:t=[],outputLabel:r=e=>`Current value is ${e}`})=>o(m,{css:{mt:"$4",color:"$tonal300",width:"100%"}},r(t.length===1?t[0]:t));export{n as SliderValue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import e from"react";import{useFormContext as S,Controller as f}from"react-hook-form";import{FieldWrapper as C}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import{Slider as o}from"../slider/Slider.js";const n=({css:p,label:c,name:r,defaultValue:t,outputLabel:d,min:l=0,max:i=100,steps:a=[],...s})=>{const{control:E}=S();return e.createElement(C,{css:p,fieldId:r,label:c},e.createElement(f,{control:E,name:r,defaultValue:t,render:({onChange:F,value:m})=>e.createElement(o,{name:r,defaultValue:t,onValueChange:F,value:m,min:l,max:i,...s},e.createElement(o.Steps,{min:l,max:i,steps:a}),e.createElement(o.Value,{value:m||t,outputLabel:d}))}))};n.displayName="SliderField";export{n as SliderField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{createElement as r}from"react";import{theme as s,styled as i}from"../../stitches.js";import{CSSWrapper as l}from"../../utilities/css-wrapper/CSSWrapper.js";const m=Object.keys(s.space).reduce((t,e)=>({...t,[e]:{mt:`-$space$${e}`,ml:`-$space$${e}`,"& > *":{mt:`$space$${e}`,ml:`$space$${e}`}}}),{}),p=i("div",{display:"flex",flexWrap:"wrap","& > *":{m:0},variants:{direction:{row:{flexDirection:"row",alignItems:"center"},"row-reverse":{flexDirection:"row-reverse",alignItems:"center"},column:{flexDirection:"column"}},justify:{start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},center:{justifyContent:"center"}},gap:m}}),a=({css:t,gap:e=2,direction:n="row",justify:c="start",...o})=>r(l,{css:t},r(p,{direction:n,gap:e,justify:c,...o}));a.displayName="Stack";export{a as Stack};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{createElement as e,Children as a,isValidElement as p,cloneElement as s}from"react";import{styled as f}from"../../stitches.js";import{Divider as d}from"../divider/Divider.js";import{Heading as c}from"../heading/Heading.js";import{Image as l}from"../image/Image.js";import{List as k}from"../list/List.js";import"../markdown-content/components/MarkdownCode.js";import"../markdown-content/components/MarkdownEmphasis.js";import{MarkdownHeading as u}from"../markdown-content/components/MarkdownHeading.js";import"../markdown-content/components/MarkdownInlineCode.js";import{MarkdownImage as y}from"../markdown-content/components/MarkdownImage.js";import"../link/Link.js";import{MarkdownList as $}from"../markdown-content/components/MarkdownList.js";import{MarkdownParagraph as g}from"../markdown-content/components/MarkdownParagraph.js";import"../markdown-content/components/MarkdownStrong.js";import{MarkdownThematicBreak as w}from"../markdown-content/components/MarkdownThematicBreak.js";import{Text as C}from"../text/Text.js";const M=f("div",{}),m=(o,i)=>s(o,{css:{...i,...o.props.css?o.props.css:{}}}),n=({children:o,...i})=>e(M,{...i},a.map(o,r=>{if(!p(r))return r;const t=r==null?void 0:r.type;return t===c||t===u?m(r,{maxWidth:"65ch","&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}}):t===C||t===g||t===k||t===$?m(r,{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}}):t===d||t===w?m(r,{my:"$5"}):t===l||t===y?m(r,{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}):r}));n.displayName="StackContent";export{n as StackContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Root as
|
|
1
|
+
import{Root as a,Thumb as n}from"@radix-ui/react-switch";import{createElement as o}from"react";import{styled as r}from"../../stitches.js";const i=r(a,{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"}}),s=r(n,{backgroundColor:"white",borderRadius:"$round",display:"block",size:"$1",transition:"transform 50ms",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(calc($sizes$2 - $space$1))"}}),t=e=>o(i,{...e},o(s,null));t.displayName="Switch";export{t as Switch};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{createElement as m}from"react";import{styled as s}from"../../stitches.js";import{TableBody as p}from"./TableBody.js";import{TableCell as o}from"./TableCell.js";import{TableFooter as $}from"./TableFooter.js";import{TableFooterCell as t}from"./TableFooterCell.js";import{TableHeader as b}from"./TableHeader.js";import{TableHeaderCell as r}from"./TableHeaderCell.js";import{TableRow as l}from"./TableRow.js";const f=s("table",{borderCollapse:"separate",borderSpacing:0,fontFamily:"$sans",fontSize:"$sm",width:"100%",variants:{size:{md:{[`${o}, ${r}, ${t}`]:{height:"$4"}},lg:{[`${o}, ${r}, ${t}`]:{height:"$5"}}},corners:{round:{[`${r}`]:{"&:first-of-type":{borderTopLeftRadius:"$0"},"&:last-of-type":{borderTopRightRadius:"$0"}},[`${l}:last-child`]:{[`${o}:first-child`]:{borderBottomLeftRadius:"$0"},[`${o}:last-child`]:{borderBottomRightRadius:"$0"}}},square:{}}}}),e=({size:a="md",corners:i="round",...d})=>m(f,{size:a,corners:i,...d});e.Body=p,e.Cell=o,e.Footer=$,e.FooterCell=t,e.Header=b,e.HeaderCell=r,e.Row=l,e.displayName="Table";export{e as Table};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as
|
|
1
|
+
import{styled as d}from"../../stitches.js";const o=d("tbody",{});o.displayName="TableBody";export{o as TableBody};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as t}from"../../stitches.js";const
|
|
1
|
+
import{styled as t}from"../../stitches.js";const l=t("td",{borderBottom:"1px solid $tonal100",boxSizing:"border-box",color:"$tonal400",fontFamily:"$body",lineHeight:1.5,p:"$2 $3",textAlign:"left",verticalAlign:"middle","&:first-child":{fontWeight:"bold"},"tr:nth-child(odd) &":{bg:"white"},"tr:nth-child(even) &":{bg:"$tonal50"}});l.displayName="TableCell";export{l as TableCell};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as
|
|
1
|
+
import{styled as t}from"../../stitches.js";const o=t("tfoot",{});o.displayName="TableFooter";export{o as TableFooter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{styled as t}from"../../stitches.js";import i from"react";import{TableHeaderCell as r}from"./TableHeaderCell.js";const l=t("thead",{variants:{theme:{primary:{[`${r}`]:{bg:"$primary"}},primaryDark:{[`${r}`]:{bg:"$primaryDark"}}}}}),e=({theme:a="primaryDark",...m})=>i.createElement(l,{theme:a,...m});e.displayName="TableHeader";export{e as TableHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as
|
|
1
|
+
import{styled as l}from"../../stitches.js";const e=l("th",{color:"white",fontFamily:"$body",fontWeight:600,lineHeight:1.5,p:"$2 $3",textAlign:"left",verticalAlign:"middle"});e.displayName="TableHeaderCell";export{e as TableHeaderCell};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as
|
|
1
|
+
import{styled as e}from"../../stitches.js";const o=e("tr",{});o.displayName="TableRow";export{o as TableRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Trigger as d}from"@radix-ui/react-tabs";import{createElement as n}from"react";import{opacify as a}from"polished";import{styled as s,theme as e}from"../../stitches.js";const c=s(d,{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:a(-.9,e.colors.primary.value)},"&:not([data-disabled]):active":{color:"$primary",bg:a(-.8,e.colors.primary.value),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:a(-.8,"white")},"&:not([data-disabled]):active":{bg:a(-.7,"white"),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}}}}}),o=({children:t,theme:r,disabled:i=!1,...l})=>n(c,{disabled:i,theme:r,...l},t);o.displayName="TabTrigger";export{o as TabTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Root as m,Content as n}from"@radix-ui/react-tabs";import{createElement as p}from"react";import{styled as t}from"../../stitches.js";import{TabTrigger as s}from"./TabTrigger.js";import{TriggerListWrapper as e}from"./TabsTriggerList.js";import{passPropsToChildren as g}from"./utils.js";const c=t(m,{display:"flex",flexDirection:"column",variants:{theme:{light:{color:"$primary"},dark:{color:"white"}}}}),i=t(n,{flexGrow:1,fontFamily:"$body",variants:{theme:{light:{color:"$textForeground"},dark:{bg:"$primaryDark",color:"white"}}}}),r=({theme:o="light",children:a,...l})=>p(c,{theme:o,...l},g(a,{theme:o},[e,i]));r.TriggerList=e,r.Trigger=s,r.Content=i,r.displayName="Tabs";export{r as Tabs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{List as A}from"@radix-ui/react-tabs";import o,{useRef as D,useState as h,useCallback as I,useEffect as S}from"react";import{ChevronLeft as B,ChevronRight as P}from"@atom-learning/icons";import{opacify as L}from"polished";import{debounce as F}from"throttle-debounce";import{theme as M,styled as y}from"../../stitches.js";import{ActionIcon as X}from"../action-icon/ActionIcon.js";import{Flex as _}from"../flex/Flex.js";import{Icon as E}from"../icon/Icon.js";import{TabTrigger as W}from"./TabTrigger.js";import{passPropsToChildren as k}from"./utils.js";const j=L(-.2,"white"),q=L(-.2,M.colors.primaryDark.value),x=y(X,{position:"absolute",transition:"all 125ms",variants:{theme:{light:{bg:`${j} !important`},dark:{bg:`${q} !important`,color:"currentColor !important"}},visible:{true:{opacity:1,visibility:"visible",pointerEvents:"all"},false:{opacity:0,visibility:"hidden",pointerEvents:"none"}}}}),T=y(A,{flexShrink:0,display:"flex",width:"100%",overflowX:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none",variants:{theme:{light:{borderBottom:"1px solid $tonal300"},dark:{bg:"$primaryDark",borderBottom:"1px solid $tonal200"}},appearance:{uppercase:{textTransform:"uppercase"}}}}),G=({children:d,theme:l,appearance:p,enableTabScrolling:C,...u})=>{const s=D(null),[g,n]=h(!1),[v,c]=h(!1),[z,R]=h(),b=I(t=>{const e=s.current;if(e){const{scrollWidth:a,scrollLeft:i}=e,f=Math.round(a/4);let m=i;if(t==="right"){const r=e.scrollLeft+f;m=r<=a?r:i}else{const r=i-f;m=r>0?r:0}e.scroll({left:m,behavior:"smooth"}),setTimeout(()=>{const{scrollWidth:r,scrollLeft:w,offsetWidth:$}=e;w===0?(n(!1),c(!0)):w+$===r?(c(!1),n(!0)):(n(!0),c(!0))},500)}},[]);return S(()=>{const t=F(500,()=>{R(window.innerWidth)});return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),S(()=>{var t;const e=s.current;if(e){const{offsetWidth:a,scrollWidth:i}=e,f=i>a;(t=e.scroll)==null||t.call(e,{left:0}),n(!1),c(f)}},[z]),g||v||C?o.createElement(_,{css:{position:"relative"}},o.createElement(x,{size:"xl",label:"Scroll Left",theme:l,onClick:()=>b("left"),visible:g,css:{left:0}},o.createElement(E,{is:B,size:"lg"})),o.createElement(T,{...u,ref:s,appearance:p,theme:l},k(d,{theme:l},[W])),o.createElement(x,{size:"xl",label:"Scroll right",theme:l,onClick:()=>b("right"),visible:v,css:{right:0}},o.createElement(E,{is:P,size:"lg"}))):o.createElement(T,{theme:l,...u,appearance:p,ref:s},k(d,{theme:l},[W]))};export{G as TriggerListWrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import r from"react";const p=(n,t,o=[])=>r.Children.map(n,e=>r.isValidElement(e)&&o.includes(e==null?void 0:e.type)?r.cloneElement(e,{...t}):e);export{p as passPropsToChildren};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{forwardRef as f,createElement as l}from"react";import{styled as g}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const i=({applyCapsize:t=!0}={})=>({xs:{fontSize:"$xs",lineHeight:1.6,...t?e(.4364):{}},sm:{fontSize:"$sm",lineHeight:1.53,...t?e(.4056):{}},md:{fontSize:"$md",lineHeight:1.5,...t?e(.3864):{}},lg:{fontSize:"$lg",lineHeight:1.52,...t?e(.3983):{}},xl:{fontSize:"$xl",lineHeight:1.42,...t?e(.3506):{}}}),o=g("p",{color:"$tonal600",fontFamily:"$body",fontWeight:400,margin:0,"& > &":{"&:before, &:after":{display:"none"}},variants:{size:i()}}),n=f(({size:t="md",...r},m)=>l(o,{size:t,...r,ref:m}));n.displayName="Text";export{o as StyledParagraph,n as Text,i as textVariantSize};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{forwardRef as
|
|
1
|
+
import{forwardRef as a,createElement as t}from"react";import{styled as l}from"../../stitches.js";const n=l("textarea",{boxShadow:"none",fontSize:"$md",appearance:"none",border:"1px solid $tonal400",borderRadius:"$0",boxSizing:"border-box",color:"$tonal600",fontFamily:"$body",fontWeight:400,lineHeight:1.4,minHeight:"$7",px:"$3",py:"calc($2 + $1)",resize:"vertical",transition:"all 75ms ease-out",width:"100%","&:focus":{borderColor:"$primary",outline:"none"},"&[disabled]":{backgroundColor:"$tonal100",color:"$tonal400",cursor:"not-allowed"},"&::placeholder":{color:"$tonal300",opacity:1},variants:{state:{error:{border:"1px solid $danger"}}}}),o=a((e,r)=>t(n,{...e,ref:r}));o.displayName="Textarea";export{o as Textarea};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{createElement as i}from"react";import{useFormContext as c}from"react-hook-form";import{FieldWrapper as x}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as F}from"../form/useFieldError.js";import{Textarea as a}from"../textarea/Textarea.js";const m=({css:p=void 0,label:d,name:r,validation:e,prompt:s,description:f,...l})=>{const{register:o}=c(),{error:t}=F(r),u=e?o(e):o;return i(x,{css:p,description:f,error:t,fieldId:r,label:d,prompt:s,required:Boolean(e==null?void 0:e.required)},i(a,{id:r,name:r,ref:u,...t&&{state:"error"},...l}))};m.displayName="TextareaField";export{m as TextareaField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Error as
|
|
1
|
+
import{Error as g,Close as $}from"@atom-learning/icons";import{memo as h,createElement as o}from"react";import{toast as y}from"react-hot-toast";import{keyframes as i,styled as a}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as e}from"../icon/Icon.js";import{Loader as w}from"../loader/Loader.js";import{Text as x}from"../text/Text.js";const n=400,T=i({"0%":{transform:"translate3d(0,-100%,0)",opacity:0},"100%":{transform:"translate3d(0,0,0)",opacity:1}}),k=i({"0%":{transform:"translate3d(0,0,0)",opacity:1},"100%":{transform:"translate3d(0,-100%,0)",opacity:0}}),C=a("div",{position:"absolute",width:"100%",variants:{visible:{true:{"@allowMotion":{animation:`${T} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}},false:{opacity:0,"@allowMotion":{animation:`${k} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}}}}}),I=a("div",{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"}}}}),z=h(({ariaLive:l,height:m,id:t,message:c,role:d,type:r="blank",visible:f,calculateOffset:p,updateHeight:u})=>{const b=p(t,{reverseOrder:!0,margin:8});return o(C,{visible:f},o(I,{ref:s=>{s&&m===void 0&&u(t,s.getBoundingClientRect().height)},status:r,role:d,"aria-live":l,style:{transform:`translateY(${b}px)`}},r==="error"&&o(e,{size:"sm",css:{mr:"$3",flex:"0 0 auto"},is:g}),o(x,{css:{color:"inherit"}},c),r==="loading"?o(w,{css:{flex:"0 0 auto",ml:"auto"}}):o(v,{css:{position:"absolute",top:"$2",right:"$2",color:"white","&:hover,&:focus":{color:"white",opacity:.5}},label:"Close alert",onClick:()=>y.dismiss(t)},o(e,{is:$}))))});export{n as TOAST_WIDTH,z as Toast};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createElement as t,Fragment as
|
|
1
|
+
import{createElement as t,Fragment as d}from"react";import{useToaster as l}from"react-hot-toast";import{default as E}from"react-hot-toast";import{styled as f}from"../../stitches.js";import{TOAST_WIDTH as u,Toast as c}from"./Toast.js";const T=2147483647,x=f("div",{left:"$2",position:"fixed",top:"$2",right:"$2",zIndex:T,"@sm":{top:"$3",right:"auto",left:`calc(50% - ${u/2}px)`}}),o=({children:r})=>{const{toasts:s,handlers:a}=l(),{startPause:n,endPause:i,calculateOffset:m,updateHeight:p}=a;return t(d,null,t(x,{onMouseEnter:n,onMouseLeave:i},s.map(e=>t(c,{key:e.id,calculateOffset:m,updateHeight:p,...e}))),r)};o.displayName="ToastProvider";export{o as ToastProvider,E as toast};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Root as i,Trigger as m}from"@radix-ui/react-tooltip";import{createElement as p}from"react";import{styled as l}from"../../stitches.js";import{TooltipContent as n}from"./TooltipContent.js";const o=({children:t,delayDuration:r=350,...e})=>p(i,{delayDuration:r,...e},t);o.Content=n,o.Trigger=l(m,{}),o.displayName="Tooltip";export{o as Tooltip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Content as m,Arrow as l}from"@radix-ui/react-tooltip";import{createElement as t}from"react";import{styled as a}from"../../stitches.js";import{slideDownAndFade as r,slideLeftAndFade as s,slideUpAndFade as p,slideRightAndFade as c}from"../../utilities/style/keyframe-animations.js";const f=a(m,{backgroundColor:"$tonal500",borderRadius:"$0",boxShadow:"$0",color:"white",fontFamily:"$body",fontSize:"$sm",lineHeight:1.5,px:"$3",py:"$2","@allowMotion":{animationDuration:"75ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="delayed-open"]':{'&[data-side="top"]':{animationName:r},'&[data-side="right"]':{animationName:s},'&[data-side="bottom"]':{animationName:p},'&[data-side="left"]':{animationName:c}}},variants:{size:{sm:{maxWidth:"100px"},md:{maxWidth:"250px"},lg:{maxWidth:"400px"}}}}),$=a(l,{fill:"$tonal500",'[data-align="end"] &':{mr:"$2"},'[data-align="start"] &':{ml:"$2"}}),g=({children:o,side:i="top",sideOffset:n=4,size:e="md",...d})=>t(f,{side:i,sideOffset:n,size:e,...d},o,t($,null));export{g as TooltipContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Error as s}from"@atom-learning/icons";import{createElement as r}from"react";import{Flex as i}from"../flex/Flex.js";import{Icon as m}from"../icon/Icon.js";import{Text as a}from"../text/Text.js";const n=({css:o,children:t,...e})=>r(i,{css:{color:"$danger",alignItems:"flex-start",...o},...e},r(m,{is:s,size:"sm",css:{mr:"$2",flexShrink:0},"aria-hidden":!0}),r(a,{css:{color:"inherit",transform:"translateY($space$1)"},size:"sm"},t));export{n as ValidationError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{forwardRef as m,createElement as o}from"react";import s from"react-player/vimeo";import{Box as a}from"../box/Box.js";import{styled as l}from"../../stitches.js";import{CSSWrapper as f}from"../../utilities/css-wrapper/CSSWrapper.js";const h=l(s,{}),e=m(({id:r,ratio:t=9/16,css:i,...d},p)=>o(f,{css:i},o(a,{css:{borderRadius:"$0",position:"relative",paddingTop:`${t*100}%`,overflow:"hidden",height:0,width:"100%"}},o(h,{...d,role:"figure",url:`https://player.vimeo.com/video/${r}`,height:"100%",width:"100%",css:{position:"absolute",top:0,left:0},ref:p}))));e.displayName="Video";export{e as Video};
|