@atom-learning/components 1.17.2 → 1.18.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 (131) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/dist/components/accordion/Accordion.d.ts +2 -1
  3. package/dist/components/accordion/Accordion.js +1 -1
  4. package/dist/components/accordion/AccordionContent.js +1 -1
  5. package/dist/components/accordion/AccordionItem.js +1 -1
  6. package/dist/components/accordion/AccordionTrigger.js +1 -1
  7. package/dist/components/action-icon/ActionIcon.js +1 -1
  8. package/dist/components/alert-dialog/AlertDialog.js +1 -1
  9. package/dist/components/alert-dialog/AlertDialogContent.js +1 -1
  10. package/dist/components/alert-dialog/alert-context/AlertContext.js +1 -1
  11. package/dist/components/alert-dialog/alert-context/AlertDialog.js +1 -1
  12. package/dist/components/alert-dialog/alert-context/reducer.js +1 -1
  13. package/dist/components/badge/Badge.js +1 -1
  14. package/dist/components/button/Button.js +1 -1
  15. package/dist/components/calendar/Calendar.js +1 -1
  16. package/dist/components/calendar/constants.js +1 -1
  17. package/dist/components/carousel/Carousel.js +1 -1
  18. package/dist/components/carousel/CarouselArrows.js +1 -1
  19. package/dist/components/carousel/CarouselSlide.d.ts +1 -1
  20. package/dist/components/carousel/CarouselSlide.js +1 -1
  21. package/dist/components/carousel/CarouselSlider.d.ts +1 -1
  22. package/dist/components/checkbox/Checkbox.js +1 -1
  23. package/dist/components/checkbox-field/CheckboxField.js +1 -1
  24. package/dist/components/combobox/Combobox.js +1 -1
  25. package/dist/components/date-field/DateField.js +1 -1
  26. package/dist/components/date-input/DateInput.js +1 -1
  27. package/dist/components/date-input/use-date.js +1 -1
  28. package/dist/components/dialog/Dialog.js +1 -1
  29. package/dist/components/dialog/DialogContent.js +1 -1
  30. package/dist/components/divider/Divider.d.ts +2 -3
  31. package/dist/components/divider/Divider.js +1 -1
  32. package/dist/components/dropdown-menu/DropdownMenu.js +1 -1
  33. package/dist/components/dropdown-menu/DropdownMenuItem.js +1 -1
  34. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
  35. package/dist/components/empty-state/EmptyState.js +1 -1
  36. package/dist/components/empty-state/EmptyStateBody.d.ts +1 -1
  37. package/dist/components/field-wrapper/FieldDescription.js +1 -1
  38. package/dist/components/field-wrapper/FieldWrapper.js +1 -1
  39. package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
  40. package/dist/components/file-input/FileInput.js +1 -1
  41. package/dist/components/form/Form.js +1 -1
  42. package/dist/components/form/Form.types.js +1 -1
  43. package/dist/components/form/useFieldError.js +1 -1
  44. package/dist/components/grid/Grid.js +1 -1
  45. package/dist/components/heading/Heading.d.ts +1 -1
  46. package/dist/components/heading/Heading.js +1 -1
  47. package/dist/components/icon/Icon.js +1 -1
  48. package/dist/components/image/Image.d.ts +1 -1
  49. package/dist/components/image/Image.js +1 -1
  50. package/dist/components/index.d.ts +1 -0
  51. package/dist/components/input/Input.js +1 -1
  52. package/dist/components/input-field/InputField.js +1 -1
  53. package/dist/components/label/Label.js +1 -1
  54. package/dist/components/link/Link.js +1 -1
  55. package/dist/components/list/List.d.ts +3 -2
  56. package/dist/components/list/List.js +1 -1
  57. package/dist/components/loader/Loader.js +1 -1
  58. package/dist/components/markdown-content/MarkdownContent.js +1 -1
  59. package/dist/components/markdown-content/components/MarkdownCode.js +1 -1
  60. package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
  61. package/dist/components/markdown-content/components/MarkdownHeading.js +1 -1
  62. package/dist/components/markdown-content/components/MarkdownImage.js +1 -1
  63. package/dist/components/markdown-content/components/MarkdownInlineCode.js +1 -1
  64. package/dist/components/markdown-content/components/MarkdownLink.js +1 -1
  65. package/dist/components/markdown-content/components/MarkdownList.js +1 -1
  66. package/dist/components/markdown-content/components/MarkdownListItem.js +1 -1
  67. package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -1
  68. package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
  69. package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
  70. package/dist/components/password-field/PasswordField.js +1 -1
  71. package/dist/components/password-input/PasswordInput.js +1 -1
  72. package/dist/components/popover/Popover.js +1 -1
  73. package/dist/components/popover/PopoverContent.js +1 -1
  74. package/dist/components/progress-bar/ProgressBar.js +1 -1
  75. package/dist/components/radio-button/RadioButton.js +1 -1
  76. package/dist/components/radio-button/RadioButtonGroup.js +1 -1
  77. package/dist/components/radio-button-field/RadioButtonField.js +1 -1
  78. package/dist/components/radio-button-field/RadioField.js +1 -1
  79. package/dist/components/radio-card/RadioCard.js +1 -1
  80. package/dist/components/radio-card/RadioCardGroup.js +1 -1
  81. package/dist/components/search-input/SearchInput.js +1 -1
  82. package/dist/components/select/Select.js +1 -1
  83. package/dist/components/select-field/SelectField.js +1 -1
  84. package/dist/components/slider/Slider.js +1 -1
  85. package/dist/components/slider/SliderSteps.js +1 -1
  86. package/dist/components/slider/SliderValue.js +1 -1
  87. package/dist/components/slider-field/SliderField.js +1 -1
  88. package/dist/components/stack/Stack.d.ts +5 -5
  89. package/dist/components/stack/Stack.js +1 -1
  90. package/dist/components/stack-content/StackContent.d.ts +1 -1
  91. package/dist/components/stack-content/StackContent.js +1 -1
  92. package/dist/components/stepper/Stepper.js +1 -1
  93. package/dist/components/stepper/StepperStepBack.js +1 -1
  94. package/dist/components/stepper/StepperStepForward.js +1 -1
  95. package/dist/components/stepper/StepperSteps.js +1 -1
  96. package/dist/components/stepper/stepper-context/StepperContext.js +1 -1
  97. package/dist/components/switch/Switch.js +1 -1
  98. package/dist/components/table/Table.js +1 -1
  99. package/dist/components/table/TableBody.js +1 -1
  100. package/dist/components/table/TableHeader.js +1 -1
  101. package/dist/components/tabs/TabTrigger.js +1 -1
  102. package/dist/components/tabs/Tabs.js +1 -1
  103. package/dist/components/tabs/TabsTriggerList.js +1 -1
  104. package/dist/components/tabs/utils.js +1 -1
  105. package/dist/components/text/Text.d.ts +3 -3
  106. package/dist/components/text/Text.js +1 -1
  107. package/dist/components/textarea/Textarea.js +1 -1
  108. package/dist/components/textarea-field/TextareaField.js +1 -1
  109. package/dist/components/toast/Toast.js +1 -1
  110. package/dist/components/toast/ToastProvider.js +1 -1
  111. package/dist/components/toggle-group/ToggleGroupButton.d.ts +534 -0
  112. package/dist/components/toggle-group/ToggleGroupButton.js +1 -0
  113. package/dist/components/toggle-group/ToggleGroupItem.d.ts +532 -0
  114. package/dist/components/toggle-group/ToggleGroupItem.js +1 -0
  115. package/dist/components/toggle-group/ToggleGroupRoot.d.ts +280 -0
  116. package/dist/components/toggle-group/ToggleGroupRoot.js +1 -0
  117. package/dist/components/toggle-group/index.d.ts +1351 -0
  118. package/dist/components/toggle-group/index.js +1 -0
  119. package/dist/components/tooltip/Tooltip.js +1 -1
  120. package/dist/components/tooltip/TooltipContent.js +1 -1
  121. package/dist/components/validation-error/ValidationError.js +1 -1
  122. package/dist/components/video/Video.js +1 -1
  123. package/dist/docgen.json +1 -1
  124. package/dist/index.cjs.js +1 -1
  125. package/dist/index.js +1 -1
  126. package/dist/stitches.js +1 -1
  127. package/dist/utilities/css-wrapper/CSSWrapper.js +1 -1
  128. package/dist/utilities/style/capsize.js +1 -1
  129. package/dist/utilities/style/focus-visible-style-block.js +1 -0
  130. package/dist/utilities/style/keyframe-animations.js +1 -1
  131. package/package.json +6 -6
@@ -1 +1 @@
1
- import{Root as e}from"@radix-ui/react-visually-hidden";import{createElement as i}from"react";import{Flex as m}from"../flex/Flex.js";import{keyframes as r,styled as l}from"../../stitches.js";const c=r({"0%":{opacity:0},"30%":{opacity:1},"50%":{opacity:1},"80%":{opacity:0},"100%":{opacity:0}}),t=l("div",{animationName:`${c}`,animationDuration:"1s",animationFillMode:"both",animationIterationCount:"infinite",animationTimingFunction:"linear",backgroundColor:"currentColor",borderRadius:"$round","&:nth-child(1)":{animationDelay:"-300ms"},"&:nth-child(2)":{animationDelay:"-150ms"},"&:nth-child(3)":{animationDelay:0},variants:{size:{sm:{size:"4px",mx:"2px"},md:{size:"6px",mx:"2px"},lg:{size:"8px",mx:"3px"}}}}),p=({css:n={},message:a="Loading",size:o="md"})=>i(m,{css:{justifyContent:"center",...n},role:"alert"},i(e,null,a),i(t,{size:o}),i(t,{size:o}),i(t,{size:o}));export{p as Loader};
1
+ import*as o from"@radix-ui/react-visually-hidden";import*as e from"react";import{Flex as m}from"../flex/Flex.js";import{keyframes as r,styled as s}from"../../stitches.js";const l=r({"0%":{opacity:0},"30%":{opacity:1},"50%":{opacity:1},"80%":{opacity:0},"100%":{opacity:0}}),t=s("div",{animationName:`${l}`,animationDuration:"1s",animationFillMode:"both",animationIterationCount:"infinite",animationTimingFunction:"linear",backgroundColor:"currentColor",borderRadius:"$round","&:nth-child(1)":{animationDelay:"-300ms"},"&:nth-child(2)":{animationDelay:"-150ms"},"&:nth-child(3)":{animationDelay:0},variants:{size:{sm:{size:"4px",mx:"2px"},md:{size:"6px",mx:"2px"},lg:{size:"8px",mx:"3px"}}}}),c=({css:n={},message:a="Loading",size:i="md"})=>e.createElement(m,{css:{justifyContent:"center",...n},role:"alert"},e.createElement(o.Root,null,a),e.createElement(t,{size:i}),e.createElement(t,{size:i}),e.createElement(t,{size:i}));export{c as Loader};
@@ -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
+ import d from"mdast-util-directive";import k from"mdast-util-from-markdown";import f from"micromark-extension-directive";import*as p from"react";import{StackContent as l}from"../stack-content/StackContent.js";import{MarkdownCode as c}from"./components/MarkdownCode.js";import{MarkdownEmphasis as w}from"./components/MarkdownEmphasis.js";import{MarkdownHeading as M}from"./components/MarkdownHeading.js";import{MarkdownInlineCode as h}from"./components/MarkdownInlineCode.js";import{MarkdownImage as u}from"./components/MarkdownImage.js";import{MarkdownLink as g}from"./components/MarkdownLink.js";import{MarkdownList as $}from"./components/MarkdownList.js";import{MarkdownListItem as C}from"./components/MarkdownListItem.js";import{MarkdownParagraph as x}from"./components/MarkdownParagraph.js";import{MarkdownStrong as y}from"./components/MarkdownStrong.js";import{MarkdownText as E}from"./components/MarkdownText.js";import{MarkdownThematicBreak as I}from"./components/MarkdownThematicBreak.js";const L={code:c,emphasis:w,heading:M,inlineCode:h,image:u,link:g,list:$,listItem:C,paragraph:x,strong:y,text:E,thematicBreak:I},v=o=>{var r,t;if((r=o.position)!=null&&r.start){const{line:e,column:m,offset:n}=(t=o.position)==null?void 0:t.start;return`${o.type}${e}${m}${n}`}return`${o.type}${+new Date}`},s=({content:o,customComponents:r={},css:t})=>{const e=k(o,{extensions:[f()],mdastExtensions:[d.fromMarkdown]}),m={...L,...r},n=a=>{const i=m[a.type];return i?p.createElement(i,{key:v(a),node:a,handleNode:n}):null};return p.createElement(l,{css:t},e.children.map(n))};s.displayName="MarkdownContent";export{s as MarkdownContent};
@@ -1 +1 @@
1
- import{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
+ import*as e from"react";import{styled as t}from"../../../stitches.js";import{Box as r}from"../../box/Box.js";const m=t(r,{bg:"$tonal100",borderRadius:"$1",color:"$tonal600",fontFamily:"$mono",fontSize:"$sm",lineHeight:1.4,my:"$4",p:"$3"}),n=({node:o})=>e.createElement(m,{as:"pre"},o.value);export{n as MarkdownCode};
@@ -1 +1 @@
1
- import{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
+ import*as t from"react";import{styled as r}from"../../../stitches.js";const l=r("em",{fontStyle:"italic"}),a=({node:o,handleNode:n})=>{var e;return t.createElement(l,null,(e=o.children)==null?void 0:e.map(n))};export{a as MarkdownEmphasis};
@@ -1 +1 @@
1
- import{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
+ import*as i from"react";import{Heading as c}from"../../heading/Heading.js";const o=e=>{switch(e){case 1:return{size:"xl",as:"h1"};case 2:return{size:"lg",as:"h2"};case 3:return{size:"md",as:"h3"};case 4:return{size:"sm",as:"h4"};case 5:return{size:"xs",as:"h5"};default:return{size:"xs",as:"h6"}}},d=({node:e,handleNode:r,css:a})=>{var s;const{as:n,size:t}=o(e.depth);return i.createElement(c,{as:n,size:t,css:{color:"inherit",...a}},(s=e.children)==null?void 0:s.map(r))};export{d as MarkdownHeading};
@@ -1 +1 @@
1
- import{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
+ import*as o from"react";import{Image as t}from"../../image/Image.js";const m=({node:r,css:a})=>{var e;return o.createElement(t,{src:r.url,alt:(e=r.alt)!=null?e:void 0,css:a})};export{m as MarkdownImage};
@@ -1 +1 @@
1
- import{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
+ import*as e from"react";import{styled as n}from"../../../stitches.js";import{Box as r}from"../../box/Box.js";const t=n(r,{bg:"$tonal100",borderRadius:"$0",color:"$tonal600",display:"inline-block",fontFamily:"$mono",fontSize:"85%",p:"$0 $1"}),l=({node:o})=>e.createElement(t,{as:"code"},o.value);export{l as MarkdownInlineCode};
@@ -1 +1 @@
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
+ import*as l from"react";import{Link as i}from"../../link/Link.js";const n=({node:e,handleNode:o})=>{var r,t;return l.createElement(i,{title:(r=e.title)!=null?r:void 0,href:e.url},(t=e.children)==null?void 0:t.map(o))};export{n as MarkdownLink};
@@ -1 +1 @@
1
- import{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
+ import*as t from"react";import{List as n}from"../../list/List.js";const s=({node:e,handleNode:o,css:d})=>{var r;return t.createElement(n,{css:{"& p:before, & p:after":{display:"none"},...d},ordered:e.ordered||void 0},(r=e.children)==null?void 0:r.map(o))};export{s as MarkdownList};
@@ -1 +1 @@
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
+ import*as o from"react";import{List as n}from"../../list/List.js";const m=({node:t,handleNode:r})=>{var e;return o.createElement(n.Item,null,(e=t.children)==null?void 0:e.map(r))};export{m as MarkdownListItem};
@@ -1 +1 @@
1
- import{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
+ import*as n from"react";import{Text as t}from"../../text/Text.js";const c=({node:e,handleNode:o,css:a})=>{var r;return n.createElement(t,{css:{color:"inherit",...a}},(r=e.children)==null?void 0:r.map(o))};export{c as MarkdownParagraph};
@@ -1 +1 @@
1
- import{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
+ import*as r from"react";import{styled as t}from"../../../stitches.js";const d=t("strong",{fontWeight:600}),l=({node:e,handleNode:n})=>{var o;return r.createElement(d,null,(o=e.children)==null?void 0:o.map(n))};export{l as MarkdownStrong};
@@ -1 +1 @@
1
- import{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
+ import*as r from"react";import{Divider as t}from"../../divider/Divider.js";const o=({css:e})=>r.createElement(t,{css:{width:"100%",...e}});export{o as MarkdownThematicBreak};
@@ -1 +1 @@
1
- import{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
+ import*as t from"react";import{useFormContext as c}from"react-hook-form";import{FieldWrapper as u}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as f}from"../form/useFieldError.js";import{PasswordInput as w}from"../password-input/PasswordInput.js";const i=({css:s={},label:m="Password",name:r,prompt:p=void 0,description:a,validation:e,...d})=>{const{register:o}=c(),{error:l}=f(r),n=e?o(e):o;return t.createElement(u,{css:{...s,position:"relative"},description:a,error:l,fieldId:r,label:m,prompt:p,required:Boolean(e==null?void 0:e.required)},t.createElement(w,{autoComplete:"current-password",name:r,id:r,ref:n,...d}))};i.displayName="PasswordField";export{i as PasswordField};
@@ -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
+ import{Eye as l,EyeCrossed as d}from"@atom-learning/icons";import*as e from"react";import{useState as f}from"react";import{ActionIcon as w}from"../action-icon/ActionIcon.js";import{Box as u}from"../box/Box.js";import{Icon as E}from"../icon/Icon.js";import{Input as h}from"../input/Input.js";const t=e.forwardRef(({css:r,hidePasswordText:a="Hide password",showPasswordText:i="Show password",...m},p)=>{const[o,n]=f(!1),c=()=>n(s=>!s);return e.createElement(u,{css:{position:"relative",...r}},e.createElement(h,{...m,type:o?"text":"password",ref:p,css:{pr:"$sizes$2"}}),e.createElement(w,{appearance:"simple",theme:"neutral",css:{bottom:0,position:"absolute",right:0},label:o?a:i,onClick:c,onMouseDown:s=>s.preventDefault(),size:"lg"},e.createElement(E,{is:o?l:d,css:{size:20}})))});t.displayName="PasswordInput";export{t as PasswordInput};
@@ -1 +1 @@
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
+ import{Root as r,Trigger as t}from"@radix-ui/react-popover";import*as m from"react";import{styled as p}from"../../stitches.js";import{PopoverContent as i}from"./PopoverContent.js";p(r,{});const o=e=>m.createElement(r,{...e});o.Content=i,o.Trigger=t,o.displayName="Popover";export{o as Popover};
@@ -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
+ import{Close as r}from"@atom-learning/icons";import{Content as l,Arrow as p,Close as h}from"@radix-ui/react-popover";import*as e from"react";import{styled as t}from"../../stitches.js";import{ActionIcon as c}from"../action-icon/ActionIcon.js";import{Icon as f}from"../icon/Icon.js";import{slideDownAndFade as $,slideLeftAndFade as g,slideUpAndFade as x,slideRightAndFade as w}from"../../utilities/style/keyframe-animations.js";const b=t(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:$},'&[data-side="right"]':{animationName:g},'&[data-side="bottom"]':{animationName:x},'&[data-side="left"]':{animationName:w}}},variants:{size:{sm:{maxWidth:"200px"},md:{maxWidth:"400px"},lg:{maxWidth:"600px"}}}}),z=t(p,{fill:"white",zIndex:1,'[data-align="end"] &':{mr:"$sizes$2"},'[data-align="start"] &':{ml:"$sizes$2"}}),C=({children:i,side:o="top",sideOffset:a=8,closePopoverText:s="Close popover",showCloseButton:n=!0,size:m="md",...d})=>e.createElement(b,{size:m,side:o,sideOffset:a,...d},n&&e.createElement(c,{as:h,css:{position:"absolute",right:"$0",top:"$0"},label:s,size:"lg",theme:"neutral"},e.createElement(f,{is:r})),i,e.createElement(z,{width:16,height:8}));export{C as PopoverContent};
@@ -1 +1 @@
1
- import{Root as n,Indicator as d}from"@radix-ui/react-progress";import{createElement as t}from"react";import{styled as e}from"../../stitches.js";const c=e(n,{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"}}}}),l=e(d,{backgroundColor:"currentcolor",borderRadius:"$round",boxSizing:"border-box",height:"100%",position:"absolute",transition:"all 300ms ease-out"}),s=({value:r,max:o=100,theme:a="primary",...i})=>t(c,{value:r,max:o,theme:a,...i},t(l,{style:{width:"100%",transform:`translateX(-${100-(r||0)/o*100}%)`}}));s.displayName="ProgressBar";export{s as ProgressBar};
1
+ import*as e from"@radix-ui/react-progress";import*as a from"react";import{styled as t}from"../../stitches.js";const l=t(e.Root,{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"}}}}),d=t(e.Indicator,{backgroundColor:"currentcolor",borderRadius:"$round",boxSizing:"border-box",height:"100%",position:"absolute",transition:"all 300ms ease-out"}),s=({value:r,max:o=100,theme:i="primary",...n})=>a.createElement(l,{value:r,max:o,theme:i,...n},a.createElement(d,{style:{width:"100%",transform:`translateX(-${100-(r||0)/o*100}%)`}}));s.displayName="ProgressBar";export{s as ProgressBar};
@@ -1 +1 @@
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
+ 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};
@@ -1 +1 @@
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
+ import*as r from"@radix-ui/react-radio-group";import{styled as t}from"../../stitches.js";const o=t(r.Root,{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 B,Controller as R}from"react-hook-form";import{Description as b}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as E}from"../form/useFieldError.js";import{Label as $}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as q}from"../radio-button/RadioButtonGroup.js";import{ValidationError as x}from"../validation-error/ValidationError.js";import{styled as y}from"../../stitches.js";import{RadioField as C}from"./RadioField.js";const g=y("fieldset",{all:"unset"}),t=({children:d,css:p,direction:u="column",defaultValue:e,description:m,label:c,name:i,validation:r,onValueChange:l})=>{const{control:f}=B(),{error:s}=E(i);return o(g,{css:p},o($,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(r==null?void 0:r.required)},c),m&&o(b,{css:{mb:"$3"}},m),o(R,{control:f,name:i,rules:r,defaultValue:e,render:({onChange:F,value:a})=>o(q,{direction:u,defaultValue:e,onValueChange:n=>{F(n),l==null||l(n)},value:a},d)}),s&&o(x,{css:{mt:"$2"}},s))};t.Item=C,t.displayName="RadioButtonField";export{t as RadioButtonField};
1
+ import*as e from"react";import{useFormContext as V,Controller as C}from"react-hook-form";import{Description as F}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{Label as g}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as h}from"../radio-button/RadioButtonGroup.js";import{ValidationError as v}from"../validation-error/ValidationError.js";import{styled as B}from"../../stitches.js";import{RadioField as R}from"./RadioField.js";const q=B("fieldset",{all:"unset"}),r=({children:d,css:u,direction:s="column",defaultValue:t,description:l,label:c,name:n,validation:o,onValueChange:a})=>{const{control:p}=V(),{error:i}=b(n);return e.createElement(q,{css:u},e.createElement(g,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(o==null?void 0:o.required)},c),l&&e.createElement(F,{css:{mb:"$3"}},l),e.createElement(C,{control:p,name:n,rules:o,defaultValue:t,render:({onChange:f,value:E})=>e.createElement(h,{direction:s,defaultValue:t,onValueChange:m=>{f(m),a==null||a(m)},value:E},d)}),i&&e.createElement(v,{css:{mt:"$2"}},i))};r.Item=R,r.displayName="RadioButtonField";export{r as RadioButtonField};
@@ -1 +1 @@
1
- import{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
+ 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};
@@ -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
+ import*as l from"@radix-ui/react-radio-group";import*as e from"react";import{styled as t}from"../../stitches.js";import{Box as d}from"../box/Box.js";const o=t(l.Item,{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"}}}}),c=t("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"}}]}),p=t(l.Indicator,{backgroundColor:"white",borderRadius:"$round",position:"absolute",size:"6px"}),u=({children:a,isFullWidth:r=!1,size:n="md",align:i="left",...s})=>e.createElement(o,{...s,align:i,isFullWidth:r,size:n},e.createElement(c,{align:i,containerIsFullWidth:r},e.createElement(p,null)),e.createElement(d,null,a));export{u as RadioCard,o as StyledRadioCard};
@@ -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};
1
+ import*as d from"@radix-ui/react-radio-group";import*as e from"react";import{Stack as p}from"../stack/Stack.js";import{RadioCard as c}from"./RadioCard.js";const f=({css:t,children:r,size:l,isFullWidth:o,align:a,gap:s="3",justify:m,...n})=>e.createElement(d.Root,{...n},e.createElement(p,{direction:"row",justify:m,gap:s,css:t},e.Children.map(r,i=>e.isValidElement(i)&&(i==null?void 0:i.type)===c?e.cloneElement(i,{size:l,isFullWidth:o,align:a}):i)));export{f as RadioCardGroup};
@@ -1 +1 @@
1
- import{Search as 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
+ import{Search as R,Close as b}from"@atom-learning/icons";import*as t from"react";import{ActionIcon as g}from"../action-icon/ActionIcon.js";import{Box as v}from"../box/Box.js";import{Icon as i}from"../icon/Icon.js";import{Input as d}from"../input/Input.js";import{styled as l}from"../../stitches.js";var z=(e=>(e.SEARCH="SEARCH",e.CLEAR="CLEAR",e))(z||{});const f=l(i,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),H=l(d,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),c=({size:e="md",css:m,value:s,clearText:p="Clear",onChange:r,...u})=>{const[E,a]=t.useState(s||""),[C,n]=t.useState(s?"CLEAR":"SEARCH"),h=()=>{a(""),n("SEARCH"),r==null||r({currentTarget:{value:""},target:{value:""}})},S=o=>{a(o.target.value),n(o.target.value?"CLEAR":"SEARCH"),r==null||r(o)},A=()=>C==="SEARCH"?t.createElement(f,{is:R,size:e,css:{size:e=="sm"?"$1":20}}):t.createElement(g,{label:p,theme:"neutral",size:e=="sm"?"md":"lg",css:{position:"absolute",top:0,right:0},onClick:h},t.createElement(i,{is:b}));return t.createElement(v,{css:{position:"relative",...m}},t.createElement(H,{size:e,type:"search",...u,value:E,onChange:S,css:{pr:e==="sm"?"$5":"$6"}}),A())};c.displayName="SearchInput";export{c as SearchInput};
@@ -1 +1 @@
1
- import{forwardRef as i,createElement as r}from"react";import{styled as s,theme as c}from"../../stitches.js";import{encodeBackgroundIcon as p}from"../../utilities/style/encode-background-icon.js";const u=s("select",{appearance:"none",backgroundColor:"white",backgroundImage:p(c.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"}}}}),a=i(({placeholder:e,children:n,size:l="md",...o},d)=>{const t={size:l,ref:d,...o};return!o.value&&!o.defaultValue&&(t.defaultValue=""),r(u,{...t},e&&r("option",{disabled:!0,hidden:!0,value:""},e),n)});a.displayName="Select";export{a as Select};
1
+ import*as o from"react";import{styled as d,theme as s}from"../../stitches.js";import{encodeBackgroundIcon as c}from"../../utilities/style/encode-background-icon.js";const p=d("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"}}}}),t=o.forwardRef(({placeholder:r,children:n,size:l="md",...e},i)=>{const a={size:l,ref:i,...e};return!e.value&&!e.defaultValue&&(a.defaultValue=""),o.createElement(p,{...a},r&&o.createElement("option",{disabled:!0,hidden:!0,value:""},r),n)});t.displayName="Select";export{t as Select};
@@ -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
+ import*as i from"react";import{useFormContext as f}from"react-hook-form";import{FieldWrapper as u}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as F}from"../form/useFieldError.js";import{Select as v}from"../select/Select.js";const m=({css:l=void 0,children:p,name:e,label:d,validation:r,prompt:a,description:n,...s})=>{const{register:o}=f(),{error:t}=F(e),c=r?o(r):o;return i.createElement(u,{css:l,description:n,error:t,fieldId:e,label:d,prompt:a,required:Boolean(r==null?void 0:r.required)},i.createElement(v,{name:e,id:e,...s,ref:c,...t&&{state:"error"}},p))};m.displayName="SelectField";export{m as SelectField};
@@ -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
+ import{Track as $,Root as h,Range as b,Thumb as f}from"@radix-ui/react-slider";import*as e from"react";import{styled as t}from"../../stitches.js";import{SliderSteps as g}from"./SliderSteps.js";import{SliderValue as v}from"./SliderValue.js";import{CSSWrapper as x}from"../../utilities/css-wrapper/CSSWrapper.js";const r=t($,{borderRadius:"$round",flexGrow:1,position:"relative",'&[data-orientation="horizontal"]':{height:"$space$1"},'&[data-orientation="vertical"]':{width:"$space$1"}}),y=t(h,{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:{[`${r}`]:{bg:"#fff"}},tonal:{[`${r}`]:{bg:"$tonal200"}}}}}),S=t(b,{bg:"$primary",borderRadius:"$round",height:"100%",position:"absolute","&[data-disabled]":{bg:"$tonal200",cursor:"not-allowed"}}),w=t(f,{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"}}),o=({value:i,defaultValue:l,min:n=0,max:d=100,theme:s="tonal",css:m,children:u,...c})=>{const a=i||l;return e.createElement(x,{css:m},e.createElement(y,{theme:s,defaultValue:l,value:i,min:n,max:d,...c},e.createElement(r,null,e.createElement(S,null)),(a==null?void 0:a.length)&&a.map((k,p)=>e.createElement(w,{key:`thumb${p}`}))),u)};o.Value=v,o.Steps=g,o.displayName="Slider";export{o as Slider};
@@ -1 +1 @@
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
+ import*as a from"react";import{styled as n}from"../../stitches.js";import{Text as r}from"../text/Text.js";const i=n("div",{height:"$space$3",mt:"$3",position:"relative",width:"100%"}),s=(l,t,o)=>(l-t)/(o-t)*100,m=(l,t,o)=>{const e=s(l,t,o);return e<=10?0:e>=90?100:50},p=({min:l,max:t,steps:o=[]})=>o.length===0?null:a.createElement(i,null,o.map(e=>a.createElement(r,{as:"span",key:e.value,css:{position:"absolute",color:"$tonal300"},style:{left:`${s(e.value,l,t)}%`,transform:`translateX(-${m(e.value,l,t)}%)`}},e.label)));export{p as SliderSteps};
@@ -1 +1 @@
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
+ import*as r from"react";import{Text as l}from"../text/Text.js";const a=({value:t=[],outputLabel:e=o=>`Current value is ${o}`})=>r.createElement(l,{css:{mt:"$4",color:"$tonal300",width:"100%"}},e(t.length===1?t[0]:t));export{a as SliderValue};
@@ -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
+ import e from"react";import{useFormContext as x,Controller as E}from"react-hook-form";import{FieldWrapper as V}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import{Slider as l}from"../slider/Slider.js";const o=({css:u,label:i,name:t,defaultValue:a,outputLabel:d,min:r=0,max:m=100,steps:p=[],...s})=>{const{control:c}=x();return e.createElement(V,{css:u,fieldId:t,label:i},e.createElement(E,{control:c,name:t,defaultValue:a,render:({onChange:f,value:n})=>e.createElement(l,{name:t,defaultValue:a,onValueChange:f,value:n,min:r,max:m,...s},e.createElement(l.Steps,{min:r,max:m,steps:p}),e.createElement(l.Value,{value:n||a,outputLabel:d}))}))};o.displayName="SliderField";export{o as SliderField};
@@ -3,9 +3,9 @@ import { CSS } from '../../stitches';
3
3
  declare const StyledStack: import("@stitches/react/types/styled-component").StyledComponent<"div", {
4
4
  direction?: "row" | "column" | "row-reverse" | undefined;
5
5
  wrap?: "wrap" | "wrap-reverse" | "no-wrap" | undefined;
6
- justify?: "center" | "end" | "start" | undefined;
7
- align?: "center" | "end" | "start" | undefined;
8
- gap?: number | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
6
+ justify?: boolean | "center" | "false" | "end" | "start" | undefined;
7
+ align?: boolean | "center" | "false" | "end" | "start" | undefined;
8
+ gap?: number | boolean | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "false" | undefined;
9
9
  }, {
10
10
  sm: string;
11
11
  md: string;
@@ -271,8 +271,8 @@ declare const StyledStack: import("@stitches/react/types/styled-component").Styl
271
271
  };
272
272
  };
273
273
  }>>;
274
- declare type StackProps = React.ComponentProps<typeof StyledStack> & {
274
+ declare type StackPropsType = React.ComponentProps<typeof StyledStack> & {
275
275
  css?: CSS;
276
276
  };
277
- export declare const Stack: React.FC<StackProps>;
277
+ export declare const Stack: React.FC<StackPropsType>;
278
278
  export {};
@@ -1 +1 @@
1
- import{createElement as n}from"react";import{theme as l,styled as i}from"../../stitches.js";import{CSSWrapper as f}from"../../utilities/css-wrapper/CSSWrapper.js";const m=Object.keys(l.space).reduce((t,e)=>({...t,[e]:{mt:`-$space$${e}`,ml:`-$space$${e}`,"& > *":{mt:`$space$${e}`,ml:`$space$${e}`}}}),{}),w=i("div",{display:"flex","& > *":{m:0},variants:{direction:{row:{flexDirection:"row"},"row-reverse":{flexDirection:"row-reverse"},column:{flexDirection:"column"}},wrap:{wrap:{flexWrap:"wrap"},"no-wrap":{flexWrap:"no-wrap"},"wrap-reverse":{flexWrap:"wrap-reverse"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"}},gap:m}}),s=({css:t,gap:e=2,direction:r="row",wrap:p="wrap",justify:o="start",align:a,...c})=>n(f,{css:t},n(w,{direction:r,gap:e,wrap:p,justify:o,align:typeof a=="undefined"&&r!=="column"?"center":a,...c}));s.displayName="Stack";export{s as Stack};
1
+ import*as s from"react";import{theme as c,styled as o}from"../../stitches.js";import{CSSWrapper as f}from"../../utilities/css-wrapper/CSSWrapper.js";const m=Object.keys(c.space).reduce((t,e)=>({...t,[e]:{mt:`-$space$${e}`,ml:`-$space$${e}`,"& > *":{mt:`$space$${e}`,ml:`$space$${e}`}}}),{}),w=o("div",{display:"flex","& > *":{m:0},variants:{direction:{row:{flexDirection:"row"},"row-reverse":{flexDirection:"row-reverse"},column:{flexDirection:"column"}},wrap:{wrap:{flexWrap:"wrap"},"no-wrap":{flexWrap:"no-wrap"},"wrap-reverse":{flexWrap:"wrap-reverse"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},false:{}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"},false:{}},gap:{...m,false:{}}}}),n=({css:t,gap:e=2,direction:r="row",wrap:i="wrap",justify:l="start",align:a,...p})=>s.createElement(f,{css:t},s.createElement(w,{direction:r,gap:e,wrap:i,justify:l,align:typeof a>"u"&&r!=="column"?"center":a,...p}));n.displayName="Stack";export{n as Stack};
@@ -269,5 +269,5 @@ declare type StackContentProps = React.ComponentProps<typeof StyledStackContent>
269
269
  children: React.ReactNode;
270
270
  css?: CSS;
271
271
  };
272
- export declare const StackContent: React.FC<StackContentProps>;
272
+ export declare const StackContent: React.ForwardRefExoticComponent<StackContentProps>;
273
273
  export {};
@@ -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
+ import*as t from"react";import{styled as r}from"../../stitches.js";import{StyledDivider as d}from"../divider/Divider.js";import{StyledHeading as e}from"../heading/Heading.js";import{StyledImage as l}from"../image/Image.js";import{StyledList as a}from"../list/List.js";import{StyledText as c}from"../text/Text.js";const n=r("div",{[`& > ${e}`]:{maxWidth:"65ch","&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}},[`& > ${c}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${a}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${d}`]:{my:"$5"},[`& > ${l}`]:{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}}),m=t.forwardRef((o,i)=>t.createElement(n,{ref:i,...o}));m.displayName="StackContent";export{m as StackContent};
@@ -1 +1 @@
1
- import{createElement as e}from"react";import{Box as i}from"../box/Box.js";import{StepperProvider as S}from"./stepper-context/StepperContext.js";import{StepperStepBack as s}from"./StepperStepBack.js";import{StepperStepForward as d}from"./StepperStepForward.js";import{StepperSteps as f}from"./StepperSteps.js";const r=({children:p,stepCount:t,allowSkip:o,onComplete:m,onStepChange:a})=>e(S,{stepCount:t,allowSkip:o,onComplete:m,onStepChange:a},e(i,{"aria-label":"progress",css:{width:"100%",display:"grid",gridTemplateColumns:"1fr auto 1fr"}},p));r.StepBack=s,r.StepForward=d,r.Steps=f,r.displayName="Stepper";export{r as Stepper};
1
+ import*as p from"react";import{Box as i}from"../box/Box.js";import{StepperProvider as S}from"./stepper-context/StepperContext.js";import{StepperStepBack as l}from"./StepperStepBack.js";import{StepperStepForward as n}from"./StepperStepForward.js";import{StepperSteps as s}from"./StepperSteps.js";const e=({children:r,stepCount:t,allowSkip:o,onComplete:a,onStepChange:m})=>p.createElement(S,{stepCount:t,allowSkip:o,onComplete:a,onStepChange:m},p.createElement(i,{"aria-label":"progress",css:{width:"100%",display:"grid",gridTemplateColumns:"1fr auto 1fr"}},r));e.StepBack=l,e.StepForward=n,e.Steps=s,e.displayName="Stepper";export{e as Stepper};
@@ -1 +1 @@
1
- import{createElement as i}from"react";import{Button as n}from"../button/Button.js";import{useStepper as m}from"./stepper-context/StepperContext.js";const c=({label:e,children:o,...r})=>{const{activeStep:t,goToPreviousStep:p}=m();return i(n,{size:"sm",appearance:"outline",...r,disabled:t===0,onClick:p},o||(e==null?void 0:e(t)))};export{c 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};
@@ -1 +1 @@
1
- import{createElement as i}from"react";import{Button as m}from"../button/Button.js";import{useStepper as c}from"./stepper-context/StepperContext.js";const s=({label:t,children:r,onClick:e,...p})=>{const{goToNextStep:o,activeStep:n}=c();return i(m,{size:"sm",...p,onClick:()=>{if(e)return e(o);o()},css:{ml:"auto"}},r||(t==null?void 0:t(n)))};export{s as StepperStepForward};
1
+ import*as n from"react";import{Button as l}from"../button/Button.js";import{useStepper as m}from"./stepper-context/StepperContext.js";const c=({label:e,children:o,onClick:t,...i})=>{const{goToNextStep:r,activeStep:p}=m();return n.createElement(l,{size:"sm",...i,onClick:()=>{if(t)return t(r);r()},css:{ml:"auto"}},o||(e==null?void 0:e(p)))};export{c as StepperStepForward};
@@ -1 +1 @@
1
- import{createElement as n}from"react";import{styled as $}from"../../stitches.js";import{Flex as s}from"../flex/Flex.js";import{useStepper as g}from"./stepper-context/StepperContext.js";const u=$(s,{position:"relative",p:"$2",justifyContent:"center",alignItems:"center",width:"$2",height:"$2",borderRadius:"50%",border:"none",bg:"$tonal50",fontFamily:"$body",fontWeight:400,fontSize:"$sm","&:not(:first-child)":{ml:"$3"},"&:not(:last-child)::after":{content:"",height:"1px",position:"absolute",left:"$sizes$2"},variants:{state:{normal:{bg:"$tonal50",color:"$tonal400"},active:{bg:"$primary",color:"white"},viewed:{bg:"$primaryDark",color:"white"}},separator:{normal:{"&:not(:last-child)::after":{bg:"$tonal50"}},highlight:{"&:not(:last-child)::after":{bg:"$primaryDark"}}}}}),f=({css:r,...p})=>{const{steps:a,goToStep:c,activeStep:l,viewedSteps:o,allowSkip:i}=g(),h=e=>l===e?"active":o.includes(e)?"viewed":"normal",m=e=>e<Math.max(...o)?"highlight":"normal";return n(s,{css:{alignItems:"center",justifyContent:"space-between",...r},...p},a.map((e,t)=>n(u,{key:`step_${t}`,as:i?"button":"div",onClick:()=>i&&o.includes(t)?c(t):void 0,state:h(t),separator:m(t),"aria-current":t===l?"step":void 0,"aria-label":`step ${t+1}`,css:{cursor:i&&o.includes(t)?"pointer":"auto","&:not(:last-child)::after":{width:(r==null?void 0:r.width)?`calc((${r.width} - ($2 * ${a.length})) / ${a.length-1})`:"$1"}}},t+1)))};export{f as StepperSteps};
1
+ import*as l from"react";import{styled as d}from"../../stitches.js";import{Flex as s}from"../flex/Flex.js";import{useStepper as $}from"./stepper-context/StepperContext.js";const g=d(s,{position:"relative",p:"$2",justifyContent:"center",alignItems:"center",width:"$2",height:"$2",borderRadius:"50%",border:"none",bg:"$tonal50",fontFamily:"$body",fontWeight:400,fontSize:"$sm","&:not(:first-child)":{ml:"$3"},"&:not(:last-child)::after":{content:"",height:"1px",position:"absolute",left:"$sizes$2"},variants:{state:{normal:{bg:"$tonal50",color:"$tonal400"},active:{bg:"$primary",color:"white"},viewed:{bg:"$primaryDark",color:"white"}},separator:{normal:{"&:not(:last-child)::after":{bg:"$tonal50"}},highlight:{"&:not(:last-child)::after":{bg:"$primaryDark"}}}}}),f=({css:o,...c})=>{const{steps:a,goToStep:p,activeStep:n,viewedSteps:i,allowSkip:r}=$(),h=e=>n===e?"active":i.includes(e)?"viewed":"normal",m=e=>e<Math.max(...i)?"highlight":"normal";return l.createElement(s,{css:{alignItems:"center",justifyContent:"space-between",...o},...c},a.map((e,t)=>l.createElement(g,{key:`step_${t}`,as:r?"button":"div",onClick:()=>r&&i.includes(t)?p(t):void 0,state:h(t),separator:m(t),"aria-current":t===n?"step":void 0,"aria-label":`step ${t+1}`,css:{cursor:r&&i.includes(t)?"pointer":"auto","&:not(:last-child)::after":{width:o!=null&&o.width?`calc((${o.width} - ($2 * ${a.length})) / ${a.length-1})`:"$1"}}},t+1)))};export{f as StepperSteps};
@@ -1 +1 @@
1
- import{createContext as w,useState as c,useEffect as d,createElement as x,useContext as T}from"react";const i=w({steps:[],goToPreviousStep:()=>null,goToNextStep:()=>null,goToStep:()=>null,activeStep:0,viewedSteps:[],allowSkip:!1}),g=({children:o,stepCount:r,allowSkip:u,onComplete:p,onStepChange:s})=>{const[t,n]=c(0),[S,l]=c([0]);d(()=>{l(e=>e.includes(t)?e:[...e,t]),s==null||s(t)},[t,s]);const a=()=>{if(p&&t===r-1)return p();if(t<r-1)return n(e=>e+1)},v=()=>{n(e=>e-1)},f=e=>{n(e)};return x(i.Provider,{value:{steps:Array(r).fill(""),goToPreviousStep:v,goToNextStep:a,goToStep:f,activeStep:t,viewedSteps:S,allowSkip:u}},o)},m=()=>{const o=T(i);if(!o)throw new Error("Ensure that you wrap any components with the root component Stepper");return o};export{g as StepperProvider,m as useStepper};
1
+ import*as o from"react";const i=o.createContext({steps:[],goToPreviousStep:()=>null,goToNextStep:()=>null,goToStep:()=>null,activeStep:0,viewedSteps:[],allowSkip:!1}),f=({children:r,stepCount:n,allowSkip:u,onComplete:s,onStepChange:p})=>{const[t,l]=o.useState(0),[S,a]=o.useState([0]);o.useEffect(()=>{a(e=>e.includes(t)?e:[...e,t]),p==null||p(t)},[t,p]);const c=()=>{if(s&&t===n-1)return s();if(t<n-1)return l(e=>e+1)},v=()=>{l(e=>e-1)},w=e=>{l(e)};return o.createElement(i.Provider,{value:{steps:Array(n).fill(""),goToPreviousStep:v,goToNextStep:c,goToStep:w,activeStep:t,viewedSteps:S,allowSkip:u}},r)},g=()=>{const r=o.useContext(i);if(!r)throw new Error("Ensure that you wrap any components with the root component Stepper");return r};export{f as StepperProvider,g as useStepper};
@@ -1 +1 @@
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
+ import*as o from"@radix-ui/react-switch";import*as r from"react";import{styled as e}from"../../stitches.js";const n=e(o.Root,{appearance:"none",backgroundColor:"$tonal200",border:"none",borderRadius:"$round",cursor:"pointer",display:"flex",overflow:"hidden",p:"$0",position:"relative",transition:"all 50ms ease-out",width:"$4","&:hover":{backgroundColor:"$tonal300"},"&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},'&[data-state="checked"]':{backgroundColor:"$primary"},'&[data-state="checked"]:hover':{backgroundColor:"$primaryMid"}}),i=e(o.Thumb,{backgroundColor:"white",borderRadius:"$round",display:"block",size:"$1",transition:"transform 50ms",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(calc($sizes$2 - $space$1))"}}),a=t=>r.createElement(n,{...t},r.createElement(i,null));a.displayName="Switch";export{a as Switch};
@@ -1 +1 @@
1
- import{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
+ import*as d from"react";import{styled as m}from"../../stitches.js";import{TableBody as f}from"./TableBody.js";import{TableCell as o}from"./TableCell.js";import{TableFooter as p}from"./TableFooter.js";import{TableFooterCell as t}from"./TableFooterCell.js";import{TableHeader as $}from"./TableHeader.js";import{TableHeaderCell as r}from"./TableHeaderCell.js";import{TableRow as l}from"./TableRow.js";const b=m("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",...s})=>d.createElement(b,{size:a,corners:i,...s});e.Body=f,e.Cell=o,e.Footer=p,e.FooterCell=t,e.Header=$,e.HeaderCell=r,e.Row=l,e.displayName="Table";export{e as Table};
@@ -1 +1 @@
1
- import{styled as d}from"../../stitches.js";import{createElement as l}from"react";import{TableRow as r}from"./TableRow.js";const a=d("tbody",{variants:{striped:{true:{[`${r}`]:{"&:nth-child(odd)":{bg:"white"},"&:nth-child(even)":{bg:"$tonal50"}}},false:{bg:"white"}}}}),e=({striped:t=!0,...o})=>l(a,{striped:t,...o});e.displayName="TableBody";export{e as TableBody};
1
+ import{styled as r}from"../../stitches.js";import*as d from"react";import{TableRow as i}from"./TableRow.js";const a=r("tbody",{variants:{striped:{true:{[`${i}`]:{"&:nth-child(odd)":{bg:"white"},"&:nth-child(even)":{bg:"$tonal50"}}},false:{bg:"white"}}}}),e=({striped:t=!0,...o})=>d.createElement(a,{striped:t,...o});e.displayName="TableBody";export{e as TableBody};
@@ -1 +1 @@
1
- import l from"react";import{styled as m}from"../../stitches.js";import{TableHeaderCell as r}from"./TableHeaderCell.js";const o=m("thead",{variants:{theme:{primary:{[`${r}`]:{bg:"$primary"}},primaryDark:{[`${r}`]:{bg:"$primaryDark"}},light:{[`${r}`]:{bg:"$tonal50",color:"$tonal600"}}}}}),a=({theme:e="primaryDark",...t})=>l.createElement(o,{theme:e,...t});a.displayName="TableHeader";export{a as TableHeader};
1
+ import m from"react";import{styled as l}from"../../stitches.js";import{TableHeaderCell as e}from"./TableHeaderCell.js";const o=l("thead",{variants:{theme:{primary:{[`${e}`]:{bg:"$primary"}},primaryDark:{[`${e}`]:{bg:"$primaryDark"}},light:{[`${e}`]:{bg:"$tonal50",color:"$tonal600"}}}}}),r=({theme:a="primaryDark",...t})=>m.createElement(o,{theme:a,...t});r.displayName="TableHeader";export{r as TableHeader};
@@ -1 +1 @@
1
- import{Trigger as l}from"@radix-ui/react-tabs";import{opacify as o}from"color2k";import{createElement as n}from"react";import{styled as c,theme as e}from"../../stitches.js";const s=c(l,{background:"none",border:"none",cursor:"pointer",flexShrink:0,fontFamily:"$body",p:"$4",height:"$5",userSelect:"none",transition:"0.3s",variants:{theme:{light:{'&[data-state="active"]':{color:"$primary",fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},'&[data-state="inactive"]':{color:"$tonal500"},"&:not([data-disabled]):hover":{color:"$primary",bg:o(e.colors.primary.value,-.9)},"&:not([data-disabled]):active":{color:"$primary",bg:o(e.colors.primary.value,-.8),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}},dark:{color:"white",'&[data-state="active"]':{fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},"&:not([data-disabled]):hover":{bg:o("white",-.8)},"&:not([data-disabled]):active":{bg:o("white",-.7),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}}}}}),a=({children:t,theme:r,disabled:i=!1,...d})=>n(s,{disabled:i,theme:r,...d},t);a.displayName="TabTrigger";export{a as TabTrigger};
1
+ import{Trigger as l}from"@radix-ui/react-tabs";import{opacify as e}from"color2k";import*as n from"react";import{styled as s,theme as o}from"../../stitches.js";const c=s(l,{background:"none",border:"none",cursor:"pointer",flexShrink:0,fontFamily:"$body",p:"$4",height:"$5",userSelect:"none",transition:"0.3s",variants:{theme:{light:{'&[data-state="active"]':{color:"$primary",fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},'&[data-state="inactive"]':{color:"$tonal500"},"&:not([data-disabled]):hover":{color:"$primary",bg:e(o.colors.primary.value,-.9)},"&:not([data-disabled]):active":{color:"$primary",bg:e(o.colors.primary.value,-.8),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}},dark:{color:"white",'&[data-state="active"]':{fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},"&:not([data-disabled]):hover":{bg:e("white",-.8)},"&:not([data-disabled]):active":{bg:e("white",-.7),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}}}}}),a=({children:t,theme:r,disabled:i=!1,...d})=>n.createElement(c,{disabled:i,theme:r,...d},t);a.displayName="TabTrigger";export{a as TabTrigger};
@@ -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{TriggerListWrapper as e}from"./TabsTriggerList.js";import{TabTrigger as s}from"./TabTrigger.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
+ import{Root as l,Content as n}from"@radix-ui/react-tabs";import*as p from"react";import{styled as o}from"../../stitches.js";import{TriggerListWrapper as t}from"./TabsTriggerList.js";import{TabTrigger as s}from"./TabTrigger.js";import{passPropsToChildren as g}from"./utils.js";const h=o(l,{display:"flex",flexDirection:"column",variants:{theme:{light:{color:"$primary"},dark:{color:"white"}}}}),i=o(n,{flexGrow:1,fontFamily:"$body",variants:{theme:{light:{color:"$textForeground"},dark:{bg:"$primaryDark",color:"white"}}}}),r=({theme:e="light",children:m,...a})=>p.createElement(h,{theme:e,...a},g(m,{theme:e},[t,i]));r.TriggerList=t,r.Trigger=s,r.Content=i,r.displayName="Tabs";export{r as Tabs};
@@ -1 +1 @@
1
- import{ChevronLeft as B,ChevronRight as P}from"@atom-learning/icons";import{List as F}from"@radix-ui/react-tabs";import{opacify as L}from"color2k";import o,{useRef as M,useState as h,useCallback as X,useEffect as W}from"react";import{debounce as _}from"throttle-debounce";import{ActionIcon as j}from"../action-icon/ActionIcon.js";import{Flex as q}from"../flex/Flex.js";import{Icon as y}from"../icon/Icon.js";import{theme as G,styled as E}from"../../stitches.js";import{TabTrigger as k}from"./TabTrigger.js";import{passPropsToChildren as x}from"./utils.js";const H=L("white",-.2),J=L(G.colors.primaryDark.value,-.2),T=E(j,{position:"absolute",transition:"all 125ms",variants:{theme:{light:{bg:`${H} !important`},dark:{bg:`${J} !important`,color:"currentColor !important"}},visible:{true:{opacity:1,visibility:"visible",pointerEvents:"all"},false:{opacity:0,visibility:"hidden",pointerEvents:"none"}}}}),C=E(F,{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:{"& button":{textTransform:"uppercase"}}}}}),K=({children:d,theme:l,appearance:p,enableTabScrolling:z,scrollPercentage:R=10,...u})=>{const n=M(null),[g,c]=h(!1),[b,a]=h(!1),[$,A]=h(),v=X(t=>{const e=n.current;if(e){const{scrollWidth:i,scrollLeft:s,offsetWidth:f}=e,w=Math.round(i*(R/100));let m=s;if(t==="right"){const r=s+w;m=r+f<=i?r:i-f}else{const r=s-w;m=r>0?r:0}e.scroll({left:m,behavior:"smooth"}),setTimeout(()=>{const{scrollWidth:r,scrollLeft:S,offsetWidth:D}=e,I=r-(S+D);S===0?(c(!1),a(!0)):I<5?(a(!1),c(!0)):(c(!0),a(!0))},500)}},[]);return W(()=>{const t=_(500,()=>{A(window.innerWidth)});return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),W(()=>{var t;const e=n.current;if(e){const{offsetWidth:i,scrollWidth:s}=e,f=s>i;(t=e.scroll)==null||t.call(e,{left:0}),c(!1),a(f)}},[$]),g||b||z?o.createElement(q,{css:{position:"relative"}},o.createElement(T,{size:"xl",label:"Scroll Left",theme:l,onClick:()=>v("left"),visible:g,css:{left:0}},o.createElement(y,{is:B,size:"lg"})),o.createElement(C,{...u,ref:n,appearance:p,theme:l},x(d,{theme:l},[k])),o.createElement(T,{size:"xl",label:"Scroll right",theme:l,onClick:()=>v("right"),visible:b,css:{right:0}},o.createElement(y,{is:P,size:"lg"}))):o.createElement(C,{theme:l,...u,appearance:p,ref:n},x(d,{theme:l},[k]))};export{K as TriggerListWrapper};
1
+ import{ChevronLeft as P,ChevronRight as R}from"@atom-learning/icons";import{List as _}from"@radix-ui/react-tabs";import{opacify as k}from"color2k";import o,{useRef as F,useState as f,useCallback as J,useEffect as y}from"react";import{debounce as K}from"throttle-debounce";import{ActionIcon as M}from"../action-icon/ActionIcon.js";import{Flex as X}from"../flex/Flex.js";import{Icon as x}from"../icon/Icon.js";import{theme as j,styled as W}from"../../stitches.js";import{TabTrigger as L}from"./TabTrigger.js";import{passPropsToChildren as z}from"./utils.js";const q=k("white",-.2),G=k(j.colors.primaryDark.value,-.2),C=W(M,{position:"absolute",transition:"all 125ms",variants:{theme:{light:{bg:`${q} !important`},dark:{bg:`${G} !important`,color:"currentColor !important"}},visible:{true:{opacity:1,visibility:"visible",pointerEvents:"all"},false:{opacity:0,visibility:"hidden",pointerEvents:"none"}}}}),T=W(_,{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:{"& button":{textTransform:"uppercase"}}}}}),H=({children:h,theme:i,appearance:d,enableTabScrolling:S,scrollPercentage:$=10,...b})=>{const n=F(null),[u,a]=f(!1),[v,c]=f(!1),[D,I]=f(),g=J(t=>{const e=n.current;if(e){const{scrollWidth:l,scrollLeft:s,offsetWidth:m}=e,E=Math.round(l*($/100));let p=s;if(t==="right"){const r=s+E;p=r+m<=l?r:l-m}else{const r=s-E;p=r>0?r:0}e.scroll({left:p,behavior:"smooth"}),setTimeout(()=>{const{scrollWidth:r,scrollLeft:w,offsetWidth:A}=e,B=r-(w+A);w===0?(a(!1),c(!0)):B<5?(c(!1),a(!0)):(a(!0),c(!0))},500)}},[]);return y(()=>{const t=K(500,()=>{I(window.innerWidth)});return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),y(()=>{var t;const e=n.current;if(e){const{offsetWidth:l,scrollWidth:s}=e,m=s>l;(t=e.scroll)==null||t.call(e,{left:0}),a(!1),c(m)}},[D]),u||v||S?o.createElement(X,{css:{position:"relative"}},o.createElement(C,{size:"xl",label:"Scroll Left",theme:i,onClick:()=>g("left"),visible:u,css:{left:0}},o.createElement(x,{is:P,size:"lg"})),o.createElement(T,{...b,ref:n,appearance:d,theme:i},z(h,{theme:i},[L])),o.createElement(C,{size:"xl",label:"Scroll right",theme:i,onClick:()=>g("right"),visible:v,css:{right:0}},o.createElement(x,{is:R,size:"lg"}))):o.createElement(T,{theme:i,...b,appearance:d,ref:n},z(h,{theme:i},[L]))};export{H as TriggerListWrapper};
@@ -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
+ import e from"react";const t=(n,o,i=[])=>e.Children.map(n,l=>e.isValidElement(l)&&i.includes(l==null?void 0:l.type)?e.cloneElement(l,{...o}):l);export{t as passPropsToChildren};
@@ -5,7 +5,7 @@ declare type TextSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
5
  export declare const textVariantSize: ({ applyCapsize }?: {
6
6
  applyCapsize?: boolean | undefined;
7
7
  }) => Record<TextSizes, CSS>;
8
- export declare const StyledParagraph: import("@stitches/react/types/styled-component").StyledComponent<"p", {
8
+ export declare const StyledText: import("@stitches/react/types/styled-component").StyledComponent<"p", {
9
9
  size?: TextSizes | undefined;
10
10
  }, {
11
11
  sm: string;
@@ -272,8 +272,8 @@ export declare const StyledParagraph: import("@stitches/react/types/styled-compo
272
272
  };
273
273
  };
274
274
  }>>;
275
- declare type TextProps = Override<React.ComponentProps<typeof StyledParagraph>, {
275
+ declare type TextProps = Override<React.ComponentProps<typeof StyledText>, {
276
276
  as?: 'blockquote' | 'caption' | 'dd' | 'dt' | 'figcaption' | 'li' | 'p' | 'span' | 'legend' | React.ComponentType | React.ElementType;
277
277
  }>;
278
- export declare const Text: React.FC<TextProps>;
278
+ export declare const Text: React.ForwardRefExoticComponent<TextProps>;
279
279
  export {};
@@ -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
+ import*as t from"react";import{styled as f}from"../../stitches.js";import{capsize as i}from"../../utilities/style/capsize.js";const o=({applyCapsize:e=!0}={})=>({xs:{fontSize:"$xs",lineHeight:1.6,...e?i(.4364):{}},sm:{fontSize:"$sm",lineHeight:1.53,...e?i(.4056):{}},md:{fontSize:"$md",lineHeight:1.5,...e?i(.3864):{}},lg:{fontSize:"$lg",lineHeight:1.52,...e?i(.3983):{}},xl:{fontSize:"$xl",lineHeight:1.42,...e?i(.3506):{}}}),n=f("p",{color:"$tonal600",fontFamily:"$body",fontWeight:400,margin:0,"& > &":{"&:before, &:after":{display:"none"}},variants:{size:o()}}),l=t.forwardRef(({size:e="md",...a},r)=>t.createElement(n,{size:e,...a,ref:r}));l.displayName="Text";export{n as StyledText,l as Text,o as textVariantSize};
@@ -1 +1 @@
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
+ import*as o from"react";import{styled as t}from"../../stitches.js";const n=t("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"}}}}),e=o.forwardRef((r,a)=>o.createElement(n,{...r,ref:a}));e.displayName="Textarea";export{e as Textarea};
@@ -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
+ import*as i from"react";import{useFormContext as c}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 u}from"../form/useFieldError.js";import{Textarea as x}from"../textarea/Textarea.js";const a=({css:m=void 0,label:p,name:r,validation:e,prompt:l,description:d,...s})=>{const{register:o}=c(),{error:t}=u(r),n=e?o(e):o;return i.createElement(f,{css:m,description:d,error:t,fieldId:r,label:p,prompt:l,required:Boolean(e==null?void 0:e.required)},i.createElement(x,{id:r,name:r,ref:n,...t&&{state:"error"},...s}))};a.displayName="TextareaField";export{a as TextareaField};
@@ -1 +1 @@
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 e}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as a}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=e("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=e("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"}}}}),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(a,{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(a,{is:$}))))});export{n as TOAST_WIDTH,z as Toast};
1
+ import{Error as g,Close as h}from"@atom-learning/icons";import*as e from"react";import{toast as $}from"react-hot-toast";import{keyframes as i,styled as a}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as s}from"../icon/Icon.js";import{Loader as y}from"../loader/Loader.js";import{Text as w}from"../text/Text.js";const n=400,x=i({"0%":{transform:"translate3d(0,-100%,0)",opacity:0},"100%":{transform:"translate3d(0,0,0)",opacity:1}}),E=i({"0%":{transform:"translate3d(0,0,0)",opacity:1},"100%":{transform:"translate3d(0,-100%,0)",opacity:0}}),k=a("div",{position:"absolute",width:"100%",variants:{visible:{true:{"@allowMotion":{animation:`${x} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}},false:{opacity:0,"@allowMotion":{animation:`${E} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}}}}}),I=a("div",{pointerEvents:"auto",alignItems:"center",borderRadius:"$0",boxShadow:"$1",boxSizing:"border-box",color:"white",display:"flex",minHeight:"$5",pl:"$4",position:"relative",pr:"$6",py:"$4",transition:"background-color 50ms ease-out",width:"100%","@sm":{width:n},"@allowMotion":{transition:"background-color 50ms ease-out, transform 150ms ease-out"},variants:{status:{blank:{bg:"$primary"},error:{bg:"$danger"},loading:{bg:"$primary"},success:{bg:"$success"}}}}),T=e.memo(({ariaLive:l,height:m,id:t,message:c,role:p,type:o="blank",visible:d,calculateOffset:u,updateHeight:b})=>{const f=u(t,{reverseOrder:!0,margin:8});return e.createElement(k,{visible:d},e.createElement(I,{ref:r=>{r&&m===void 0&&b(t,r.getBoundingClientRect().height)},status:o,role:p,"aria-live":l,style:{transform:`translateY(${f}px)`}},o==="error"&&e.createElement(s,{size:"sm",css:{mr:"$3",flex:"0 0 auto"},is:g}),e.createElement(w,{css:{color:"inherit"}},c),o==="loading"?e.createElement(y,{css:{flex:"0 0 auto",ml:"auto"}}):e.createElement(v,{css:{position:"absolute",top:"$2",right:"$2",color:"white","&:hover,&:focus":{color:"white",opacity:.5}},label:"Close alert",onClick:()=>$.dismiss(t)},e.createElement(s,{is:h}))))});export{n as TOAST_WIDTH,T as Toast};
@@ -1 +1 @@
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
+ import*as e from"react";import{useToaster as p}from"react-hot-toast";import{default as E}from"react-hot-toast";import{styled as c}from"../../stitches.js";import{TOAST_WIDTH as d,Toast as f}from"./Toast.js";const u=2147483647,T=c("div",{left:"$2",position:"fixed",top:"$2",right:"$2",zIndex:u,"@sm":{top:"$3",right:"auto",left:`calc(50% - ${d/2}px)`}}),a=({children:o})=>{const{toasts:r,handlers:s}=p(),{startPause:i,endPause:l,calculateOffset:n,updateHeight:m}=s;return e.createElement(e.Fragment,null,e.createElement(T,{onMouseEnter:i,onMouseLeave:l},r.map(t=>e.createElement(f,{key:t.id,calculateOffset:n,updateHeight:m,...t}))),o)};a.displayName="ToastProvider";export{a as ToastProvider,E as toast};