@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.
Files changed (122) hide show
  1. package/dist/components/accordion/Accordion.js +1 -1
  2. package/dist/components/accordion/AccordionContent.js +1 -1
  3. package/dist/components/accordion/AccordionItem.js +1 -1
  4. package/dist/components/accordion/AccordionTrigger.js +1 -1
  5. package/dist/components/action-icon/ActionIcon.js +1 -1
  6. package/dist/components/alert-dialog/AlertDialog.js +1 -1
  7. package/dist/components/alert-dialog/AlertDialogContent.js +1 -1
  8. package/dist/components/alert-dialog/alert-context/AlertContext.js +1 -1
  9. package/dist/components/alert-dialog/alert-context/AlertDialog.js +1 -1
  10. package/dist/components/alert-dialog/alert-context/reducer.js +1 -1
  11. package/dist/components/box/Box.js +1 -1
  12. package/dist/components/button/Button.js +1 -1
  13. package/dist/components/calendar/Calendar.js +1 -1
  14. package/dist/components/calendar/constants.js +1 -1
  15. package/dist/components/carousel/Carousel.js +1 -1
  16. package/dist/components/carousel/CarouselArrows.js +1 -1
  17. package/dist/components/carousel/CarouselPagination.js +1 -1
  18. package/dist/components/carousel/CarouselSlide.js +1 -1
  19. package/dist/components/carousel/CarouselSlider.js +1 -1
  20. package/dist/components/checkbox/Checkbox.js +1 -1
  21. package/dist/components/checkbox-field/CheckboxField.js +1 -1
  22. package/dist/components/combobox/Combobox.js +1 -1
  23. package/dist/components/combobox/ComboboxInput.js +1 -1
  24. package/dist/components/combobox/ComboboxPopover.js +1 -1
  25. package/dist/components/date-field/DateField.js +1 -1
  26. package/dist/components/date-input/DateInput.d.ts +4 -2
  27. package/dist/components/date-input/DateInput.js +1 -1
  28. package/dist/components/date-input/constants.js +1 -1
  29. package/dist/components/date-input/use-date.js +1 -1
  30. package/dist/components/dialog/Dialog.js +1 -1
  31. package/dist/components/dialog/DialogContent.js +1 -1
  32. package/dist/components/divider/Divider.js +1 -1
  33. package/dist/components/dropdown-menu/DropdownMenu.js +1 -1
  34. package/dist/components/dropdown-menu/DropdownMenuContent.js +1 -1
  35. package/dist/components/dropdown-menu/DropdownMenuItem.js +1 -1
  36. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
  37. package/dist/components/dropdown-menu/DropdownMenuTrigger.js +1 -1
  38. package/dist/components/field-wrapper/FieldDescription.js +1 -1
  39. package/dist/components/field-wrapper/FieldWrapper.js +1 -1
  40. package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
  41. package/dist/components/flex/Flex.js +1 -1
  42. package/dist/components/form/Form.js +1 -1
  43. package/dist/components/form/Form.types.js +1 -1
  44. package/dist/components/form/useFieldError.js +1 -1
  45. package/dist/components/grid/Grid.js +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.js +1 -1
  49. package/dist/components/input/Input.js +1 -1
  50. package/dist/components/input-field/InputField.js +1 -1
  51. package/dist/components/label/Label.js +1 -1
  52. package/dist/components/link/Link.js +1 -1
  53. package/dist/components/list/List.js +1 -1
  54. package/dist/components/loader/Loader.js +1 -1
  55. package/dist/components/markdown-content/MarkdownContent.js +1 -1
  56. package/dist/components/markdown-content/components/MarkdownCode.js +1 -1
  57. package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
  58. package/dist/components/markdown-content/components/MarkdownHeading.js +1 -1
  59. package/dist/components/markdown-content/components/MarkdownImage.js +1 -1
  60. package/dist/components/markdown-content/components/MarkdownInlineCode.js +1 -1
  61. package/dist/components/markdown-content/components/MarkdownLink.js +1 -1
  62. package/dist/components/markdown-content/components/MarkdownList.js +1 -1
  63. package/dist/components/markdown-content/components/MarkdownListItem.js +1 -1
  64. package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -1
  65. package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
  66. package/dist/components/markdown-content/components/MarkdownText.js +1 -1
  67. package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
  68. package/dist/components/notification-badge/NotificationBadge.js +1 -1
  69. package/dist/components/password-field/PasswordField.js +1 -1
  70. package/dist/components/password-input/PasswordInput.js +1 -1
  71. package/dist/components/popover/Popover.js +1 -1
  72. package/dist/components/popover/PopoverContent.js +1 -1
  73. package/dist/components/progress-bar/ProgressBar.js +1 -1
  74. package/dist/components/radio-button/RadioButton.js +1 -1
  75. package/dist/components/radio-button/RadioButtonGroup.js +1 -1
  76. package/dist/components/radio-button-field/RadioButtonField.js +1 -1
  77. package/dist/components/radio-button-field/RadioField.js +1 -1
  78. package/dist/components/radio-card/RadioCard.js +1 -1
  79. package/dist/components/radio-card/RadioCardGroup.js +1 -1
  80. package/dist/components/search-input/SearchInput.d.ts +1 -0
  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.d.ts +1 -1
  86. package/dist/components/slider/SliderSteps.js +1 -1
  87. package/dist/components/slider/SliderValue.js +1 -1
  88. package/dist/components/slider-field/SliderField.js +1 -1
  89. package/dist/components/stack/Stack.js +1 -1
  90. package/dist/components/stack-content/StackContent.js +1 -1
  91. package/dist/components/switch/Switch.js +1 -1
  92. package/dist/components/table/Table.js +1 -1
  93. package/dist/components/table/TableBody.js +1 -1
  94. package/dist/components/table/TableCell.js +1 -1
  95. package/dist/components/table/TableFooter.js +1 -1
  96. package/dist/components/table/TableHeader.js +1 -1
  97. package/dist/components/table/TableHeaderCell.js +1 -1
  98. package/dist/components/table/TableRow.js +1 -1
  99. package/dist/components/tabs/TabTrigger.js +1 -1
  100. package/dist/components/tabs/Tabs.js +1 -1
  101. package/dist/components/tabs/TabsTriggerList.js +1 -1
  102. package/dist/components/tabs/utils.js +1 -1
  103. package/dist/components/text/Text.js +1 -1
  104. package/dist/components/textarea/Textarea.js +1 -1
  105. package/dist/components/textarea-field/TextareaField.js +1 -1
  106. package/dist/components/toast/Toast.js +1 -1
  107. package/dist/components/toast/ToastProvider.js +1 -1
  108. package/dist/components/tooltip/Tooltip.js +1 -1
  109. package/dist/components/tooltip/TooltipContent.js +1 -1
  110. package/dist/components/validation-error/ValidationError.js +1 -1
  111. package/dist/components/video/Video.js +1 -1
  112. package/dist/docgen.json +1 -1
  113. package/dist/docs/DateInput.mdx +6 -0
  114. package/dist/index.cjs.js +1 -1
  115. package/dist/index.js +1 -1
  116. package/dist/stitches.js +1 -1
  117. package/dist/utilities/css-wrapper/CSSWrapper.js +1 -1
  118. package/dist/utilities/style/capsize.js +1 -1
  119. package/dist/utilities/style/encode-background-icon.js +1 -1
  120. package/dist/utilities/style/keyframe-animations.js +1 -1
  121. package/dist/utilities/use-is-mounted-ref/index.js +1 -1
  122. package/package.json +22 -17
@@ -1 +1 @@
1
- function o(){return(o=Object.assign||function(o){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[r]=n[r])}return o}).apply(this,arguments)}import t from"mdast-util-directive";import n from"mdast-util-from-markdown";import r from"micromark-extension-directive";import{createElement as e}from"react";import{StackContent as m}from"../stack-content/StackContent.js";import{MarkdownCode as s}from"./components/MarkdownCode.js";import{MarkdownEmphasis as i}from"./components/MarkdownEmphasis.js";import{MarkdownHeading as a}from"./components/MarkdownHeading.js";import{MarkdownInlineCode as p}from"./components/MarkdownInlineCode.js";import{MarkdownImage as c}from"./components/MarkdownImage.js";import{MarkdownLink as d}from"./components/MarkdownLink.js";import{MarkdownList as f}from"./components/MarkdownList.js";import{MarkdownListItem as k}from"./components/MarkdownListItem.js";import{MarkdownParagraph as l}from"./components/MarkdownParagraph.js";import{MarkdownStrong as w}from"./components/MarkdownStrong.js";import{MarkdownText as j}from"./components/MarkdownText.js";import{MarkdownThematicBreak as u}from"./components/MarkdownThematicBreak.js";const M={code:s,emphasis:i,heading:a,inlineCode:p,image:c,link:d,list:f,listItem:k,paragraph:l,strong:w,text:j,thematicBreak:u},h=o=>{var t;if(null!=(t=o.position)&&t.start){var n;const{line:t,column:r,offset:e}=null==(n=o.position)?void 0:n.start;return`${o.type}${t}${r}${e}`}return`${o.type}${+new Date}`},g=({content:s,customComponents:i={},css:a})=>{const p=n(s,{extensions:[r()],mdastExtensions:[t.fromMarkdown]}),c=o({},M,i),d=o=>{const t=c[o.type];return t?e(t,{key:h(o),node:o,handleNode:d}):null};return e(m,{css:a},p.children.map(d))};g.displayName="MarkdownContent";export{g as MarkdownContent};
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 o}from"react";import{styled as t}from"../../../stitches.js";import{Box as r}from"../../box/Box.js";const e=t(r,{bg:"$tonal100",borderRadius:"$1",color:"$tonal600",fontFamily:"$mono",fontSize:"$sm",lineHeight:1.4,my:"$4",p:"$3"}),m=({node:t})=>o(e,{as:"pre"},t.value);export{m as MarkdownCode};
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 t}from"react";import{styled as e}from"../../../stitches.js";const o=e("em",{fontStyle:"italic"}),r=({node:e,handleNode:r})=>{var l;return t(o,null,null==(l=e.children)?void 0:l.map(r))};export{r as MarkdownEmphasis};
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
- function e(){return(e=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var t in s)Object.prototype.hasOwnProperty.call(s,t)&&(e[t]=s[t])}return e}).apply(this,arguments)}import{createElement as r}from"react";import{Heading as s}from"../../heading/Heading.js";const t=({node:t,handleNode:a,css:n})=>{var i;const{as:o,size:c}=(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"}}})(t.depth);return r(s,{as:o,size:c,css:e({color:"inherit"},n)},null==(i=t.children)?void 0:i.map(a))};export{t as MarkdownHeading};
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 r}from"react";import{Image as o}from"../../image/Image.js";const s=({node:s,css:t})=>r(o,{src:s.url,alt:s.alt,css:t});export{s as MarkdownImage};
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 o}from"react";import{styled as t}from"../../../stitches.js";import{Box as r}from"../../box/Box.js";const i=t(r,{bg:"$tonal100",borderRadius:"$0",color:"$tonal600",display:"inline-block",fontFamily:"$mono",fontSize:"85%",p:"$0 $1"}),e=({node:t})=>o(i,{as:"code"},t.value);export{e as MarkdownInlineCode};
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 r}from"react";import{Link as e}from"../../link/Link.js";const t=({node:t,handleNode:o})=>{var i;return r(e,{title:t.title,href:t.url},null==(i=t.children)?void 0:i.map(o))};export{t as MarkdownLink};
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
- function r(){return(r=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r}).apply(this,arguments)}import{createElement as e}from"react";import{List as o}from"../../list/List.js";const t=({node:t,handleNode:n,css:a})=>{var s;return e(o,{css:r({"& p:before, & p:after":{display:"none"}},a),ordered:t.ordered},null==(s=t.children)?void 0:s.map(n))};export{t as MarkdownList};
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 r}from"react";import{List as o}from"../../list/List.js";const t=({node:t,handleNode:e})=>{var l;return r(o.Item,null,null==(l=t.children)?void 0:l.map(e))};export{t as MarkdownListItem};
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
- function r(){return(r=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(r[e]=o[e])}return r}).apply(this,arguments)}import{createElement as t}from"react";import{Text as o}from"../../text/Text.js";const e=({node:e,handleNode:n,css:a})=>{var c;return t(o,{css:r({color:"inherit"},a)},null==(c=e.children)?void 0:c.map(n))};export{e as MarkdownParagraph};
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 o}from"react";import{styled as r}from"../../../stitches.js";const t=r("strong",{fontWeight:600}),e=({node:r,handleNode:e})=>{var n;return o(t,null,null==(n=r.children)?void 0:n.map(e))};export{e as MarkdownStrong};
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 e=({node:e})=>e.value;export{e as MarkdownText};
1
+ const o=({node:e})=>e.value;export{o as MarkdownText};
@@ -1 +1 @@
1
- function r(){return(r=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])}return r}).apply(this,arguments)}import{createElement as t}from"react";import{Divider as o}from"../../divider/Divider.js";const i=({css:i})=>t(o,{css:r({width:"100%"},i)});export{i as MarkdownThematicBreak};
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 t from"react";import{Box as e}from"../box/Box.js";import{Flex as o}from"../flex/Flex.js";import{styled as r}from"../../stitches.js";const i=r(e,{position:"relative"}),n=r(o,{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"}),l=({value:e,children:o})=>t.createElement(i,null,!!e&&t.createElement(n,{role:"status"},e),o);export{l as NotificationBadge};
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
- const r=["css","label","name","prompt","description","validation"];function e(){return(e=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r}).apply(this,arguments)}import{createElement as o}from"react";import{useFormContext as t}from"react-hook-form";import{FieldWrapper as i}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as n}from"../form/useFieldError.js";import{PasswordInput as s}from"../password-input/PasswordInput.js";const p=p=>{let{css:a={},label:l="Password",name:d,prompt:m,description:c,validation:f}=p,u=function(r,e){if(null==r)return{};var o,t,i={},n=Object.keys(r);for(t=0;t<n.length;t++)o=n[t],e.indexOf(o)>=0||(i[o]=r[o]);return i}(p,r);const{register:j}=t(),{error:v}=n(d),w=f?j(f):j;return o(i,{css:e({},a,{position:"relative"}),description:c,error:v,fieldId:d,label:l,prompt:m,required:Boolean(null==f?void 0:f.required)},o(s,Object.assign({autoComplete:"current-password",name:d,id:d,ref:w},u)))};p.displayName="PasswordField";export{p as PasswordField};
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
- const o=["css","hidePasswordText","showPasswordText"];function s(){return(s=Object.assign||function(o){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(o[r]=t[r])}return o}).apply(this,arguments)}import{Eye as t,EyeCrossed as r}from"@atom-learning/icons";import{forwardRef as e,useState as n,createElement as i}from"react";import{ActionIcon as a}from"../action-icon/ActionIcon.js";import{Box as c}from"../box/Box.js";import{Icon as p}from"../icon/Icon.js";import{Input as l}from"../input/Input.js";const m=e(((e,m)=>{let{css:f,hidePasswordText:u="Hide password",showPasswordText:d="Show password"}=e,w=function(o,s){if(null==o)return{};var t,r,e={},n=Object.keys(o);for(r=0;r<n.length;r++)t=n[r],s.indexOf(t)>=0||(e[t]=o[t]);return e}(e,o);const[h,x]=n(!1);return i(c,{css:s({position:"relative"},f)},i(l,Object.assign({},w,{type:h?"text":"password",ref:m,css:{pr:"$sizes$2"}})),i(a,{appearance:"simple",theme:"neutral",css:{bottom:0,position:"absolute",right:0},label:h?u:d,onClick:()=>x((o=>!o)),onMouseDown:o=>o.preventDefault(),size:"lg"},i(p,{is:h?t:r,css:{size:20}})))}));m.displayName="PasswordInput";export{m as PasswordInput};
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 o,Trigger as r}from"@radix-ui/react-popover";import{createElement as t}from"react";import{styled as e}from"../../stitches.js";import{PopoverContent as i}from"./PopoverContent.js";e(o,{});const p=r=>t(o,Object.assign({},r));p.Content=i,p.Trigger=r,p.displayName="Popover";export{p as Popover};
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
- const i=["children","side","sideOffset","closePopoverText","showCloseButton","size"];import{Close as t}from"@atom-learning/icons";import{Content as e,Arrow as o,Close as s}from"@radix-ui/react-popover";import{createElement as a}from"react";import{styled as n}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"polished";import{slideDownAndFade as r,slideLeftAndFade as m,slideUpAndFade as d,slideRightAndFade as l}from"../../utilities/style/keyframe-animations.js";import{ActionIcon as p}from"../action-icon/ActionIcon.js";import{Icon as c}from"../icon/Icon.js";const f=n(e,{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:r},'&[data-side="right"]':{animationName:m},'&[data-side="bottom"]':{animationName:d},'&[data-side="left"]':{animationName:l}}},variants:{size:{sm:{maxWidth:"200px"},md:{maxWidth:"400px"},lg:{maxWidth:"600px"}}}}),h=n(o,{fill:"white",zIndex:1,'[data-align="end"] &':{mr:"$sizes$2"},'[data-align="start"] &':{ml:"$sizes$2"}}),u=e=>{let{children:o,side:n="top",sideOffset:r=8,closePopoverText:m="Close popover",showCloseButton:d=!0,size:l="md"}=e,u=function(i,t){if(null==i)return{};var e,o,s={},a=Object.keys(i);for(o=0;o<a.length;o++)e=a[o],t.indexOf(e)>=0||(s[e]=i[e]);return s}(e,i);return a(f,Object.assign({size:l,side:n,sideOffset:r},u),d&&a(p,{as:s,css:{position:"absolute",right:"$0",top:"$0"},label:m,size:"lg",theme:"neutral"},a(c,{is:t})),o,a(h,{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{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
- const r=["value","theme"];import{Root as e,Indicator as o}from"@radix-ui/react-progress";import{createElement as t}from"react";import{styled as i}from"../../stitches.js";const n=i(e,{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"}}}}),a=i(o,{backgroundColor:"currentcolor",borderRadius:"$round",boxSizing:"border-box",height:"100%",position:"absolute",transition:"all 300ms ease-out"}),s=e=>{let{value:o,theme:i="primary"}=e,s=function(r,e){if(null==r)return{};var o,t,i={},n=Object.keys(r);for(t=0;t<n.length;t++)o=n[t],e.indexOf(o)>=0||(i[o]=r[o]);return i}(e,r);return t(n,Object.assign({theme:i},s),t(a,{style:{width:`${o}%`}}))};s.displayName="ProgressBar";export{s as ProgressBar};
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 o,Indicator as r}from"@radix-ui/react-radio-group";import{createElement as t}from"react";import{styled as e}from"../../stitches.js";const a=e(o,{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"}}),n=e(r,{size:"6px",borderRadius:"$round",backgroundColor:"currentcolor",position:"absolute"}),i=o=>t(a,Object.assign({},o),t(n,null));i.displayName="RadioButton";export{i as RadioButton};
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 o}from"@radix-ui/react-radio-group";import{styled as r}from"../../stitches.js";const i=r(o,{display:"flex",flexWrap:"wrap",variants:{direction:{row:{flexDirection:"row","& > *:not(:last-child)":{mr:"$5"}},column:{flexDirection:"column"}}}});i.displayName="RadioButtonGroup";export{i as RadioButtonGroup};
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 r,Controller as e}from"react-hook-form";import{Description as t}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as i}from"../form/useFieldError.js";import{Label as a}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as l}from"../radio-button/RadioButtonGroup.js";import{ValidationError as m}from"../validation-error/ValidationError.js";import{styled as s}from"../../stitches.js";import{RadioField as n}from"./RadioField.js";const d=s("fieldset",{all:"unset"}),u=({children:s,css:n,direction:u="column",defaultValue:p,description:c,label:f,name:j,validation:b})=>{const{control:h}=r(),{error:v}=i(j);return o(d,{css:n},o(a,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(null==b?void 0:b.required)},f),c&&o(t,{css:{mb:"$3"}},c),o(e,{control:h,name:j,rules:b,defaultValue:p,render:({onChange:r,value:e})=>o(l,{direction:u,defaultValue:p,onValueChange:r,value:e},s)}),v&&o(m,{css:{mt:"$2"}},v))};u.Item=n,u.displayName="RadioButtonField";export{u as RadioButtonField};
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
- const r=["css","label","value"];import{createElement as e}from"react";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as t}from"../field-wrapper/InlineFieldWrapper.js";import{RadioButton as o}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";const i=i=>{let{css:a,label:l,value:n}=i,p=function(r,e){if(null==r)return{};var t,o,i={},a=Object.keys(r);for(o=0;o<a.length;o++)t=a[o],e.indexOf(t)>=0||(i[t]=r[t]);return i}(i,r);return e(t,{css:a,label:l},e(o,Object.assign({value:n},p)))};i.displayName="RadioField";export{i as RadioField};
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
- const i=["children","isFullWidth","size","align"];import{Item as r,Indicator as t}from"@radix-ui/react-radio-group";import{createElement as e}from"react";import{styled as l}from"../../stitches.js";import{Box as n}from"../box/Box.js";const o=l(r,{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"}}}}),a=l("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"}}]}),s=l(t,{backgroundColor:"white",borderRadius:"$round",position:"absolute",size:"6px"}),d=r=>{let{children:t,isFullWidth:l=!1,size:d="md",align:u="left"}=r,c=function(i,r){if(null==i)return{};var t,e,l={},n=Object.keys(i);for(e=0;e<n.length;e++)t=n[e],r.indexOf(t)>=0||(l[t]=i[t]);return l}(r,i);return e(o,Object.assign({},c,{align:u,isFullWidth:l,size:d}),e(a,{align:u,containerIsFullWidth:l},e(s,null)),e(n,null,t))};export{d as RadioCard,o as StyledRadioCard};
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
- const i=["css","children","size","isFullWidth","align","gap","justify"];import{Root as r}from"@radix-ui/react-radio-group";import{createElement as t,Children as s,isValidElement as e,cloneElement as o}from"react";import{Stack as n}from"../stack/Stack.js";import{RadioCard as a}from"./RadioCard.js";const l=l=>{let{css:c,children:u,size:d,isFullWidth:f,align:p,gap:g="3",justify:m}=l,j=function(i,r){if(null==i)return{};var t,s,e={},o=Object.keys(i);for(s=0;s<o.length;s++)t=o[s],r.indexOf(t)>=0||(e[t]=i[t]);return e}(l,i);return t(r,Object.assign({},j),t(n,{direction:"row",justify:m,gap:g,css:c},s.map(u,(i=>e(i)&&(null==i?void 0:i.type)===a?o(i,{size:d,isFullWidth:f,align:p}):i))))};export{l as RadioCardGroup};
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
- const t=["size","css","value","clearText"];function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(t[o]=s[o])}return t}).apply(this,arguments)}import{Search as s,Close as o}from"@atom-learning/icons";import{useState as r,createElement as i}from"react";import{ActionIcon as n}from"../action-icon/ActionIcon.js";import{Box as a}from"../box/Box.js";import{Icon as c}from"../icon/Icon.js";import{Input as l}from"../input/Input.js";import{styled as p}from"../../stitches.js";var u;!function(t){t.SEARCH="SEARCH",t.CLEAR="CLEAR"}(u||(u={}));const m=p(c,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),h=p(l,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),f=l=>{let{size:p="md",css:f,value:b,clearText:v="Clear"}=l,C=function(t,e){if(null==t)return{};var s,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)s=i[o],e.indexOf(s)>=0||(r[s]=t[s]);return r}(l,t);const[g,A]=r(b||""),[E,R]=r(b?u.CLEAR:u.SEARCH),j=()=>{A(""),R(u.SEARCH)};return i(a,{css:e({position:"relative"},f)},i(h,Object.assign({size:p,type:"search"},C,{value:g,onChange:t=>{A(t.target.value),R(t.target.value?u.CLEAR:u.SEARCH)},css:{pr:"sm"===p?"$5":"$6"}})),E===u.SEARCH?i(m,{is:s,size:p,css:{size:"sm"==p?"$1":20}}):i(n,{label:v,theme:"neutral",size:"sm"==p?"md":"lg",css:{position:"absolute",top:0,right:0},onClick:j},i(c,{is:o})))};f.displayName="SearchInput";export{f as SearchInput};
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
- const e=["placeholder","children","size"];import{forwardRef as o,createElement as r}from"react";import{styled as t,theme as i}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import{encodeBackgroundIcon as a}from"../../utilities/style/encode-background-icon.js";import"../../utilities/style/keyframe-animations.js";const n=t("select",{appearance:"none",backgroundColor:"white",backgroundImage:a(i.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"}}}}),l=o(((o,t)=>{let{placeholder:i,children:a,size:l="md"}=o,s=function(e,o){if(null==e)return{};var r,t,i={},a=Object.keys(e);for(t=0;t<a.length;t++)r=a[t],o.indexOf(r)>=0||(i[r]=e[r]);return i}(o,e);return r(n,Object.assign({size:l,defaultValue:""},s,{ref:t}),i&&r("option",{disabled:!0,hidden:!0,value:""},i),a)}));l.displayName="Select";export{l as Select};
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
- const r=["css","children","name","label","validation","prompt","description"];import{createElement as e}from"react";import{useFormContext as o}from"react-hook-form";import{FieldWrapper as i}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as t}from"../form/useFieldError.js";import{Select as l}from"../select/Select.js";const n=n=>{let{css:p,children:s,name:m,label:a,validation:d,prompt:c,description:f}=n,u=function(r,e){if(null==r)return{};var o,i,t={},l=Object.keys(r);for(i=0;i<l.length;i++)o=l[i],e.indexOf(o)>=0||(t[o]=r[o]);return t}(n,r);const{register:j}=o(),{error:b}=t(m),F=d?j(d):j;return e(i,{css:p,description:f,error:b,fieldId:m,label:a,prompt:c,required:Boolean(null==d?void 0:d.required)},e(l,Object.assign({name:m,id:m},u,{ref:F},b&&{state:"error"}),s))};n.displayName="SelectField";export{n as SelectField};
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
- const e=["value","defaultValue","min","max","theme","css","children"];import{Track as t,Root as i,Range as r,Thumb as a}from"@radix-ui/react-slider";import{createElement as o}from"react";import{styled as l}from"../../stitches.js";import{CSSWrapper as n}from"../../utilities/css-wrapper/CSSWrapper.js";import"polished";import"../../utilities/style/keyframe-animations.js";import{SliderSteps as s}from"./SliderSteps.js";import{SliderValue as d}from"./SliderValue.js";const u=l(t,{borderRadius:"$round",flexGrow:1,position:"relative",'&[data-orientation="horizontal"]':{height:"$space$1"},'&[data-orientation="vertical"]':{width:"$space$1"}}),m=l(i,{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:{[`${u}`]:{bg:"#fff"}},tonal:{[`${u}`]:{bg:"$tonal200"}}}}}),p=l(r,{bg:"$primary",borderRadius:"$round",height:"100%",position:"absolute","&[data-disabled]":{bg:"$tonal200",cursor:"not-allowed"}}),c=l(a,{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"}}),h=t=>{let{value:i,defaultValue:r,min:a=0,max:l=100,theme:s="tonal",css:d,children:h}=t,f=function(e,t){if(null==e)return{};var i,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)i=o[r],t.indexOf(i)>=0||(a[i]=e[i]);return a}(t,e);const $=i||r;return o(n,{css:d},o(m,Object.assign({theme:s,defaultValue:r,value:i,min:a,max:l},f),o(u,null,o(p,null)),(null==$?void 0:$.length)&&$.map(((e,t)=>o(c,{key:`thumb${t}`})))),h)};h.Value=d,h.Steps=s,h.displayName="Slider";export{h as Slider};
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,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  export declare type SliderStepsType = {
3
- steps: {
3
+ steps?: {
4
4
  label: string;
5
5
  value: number;
6
6
  }[];
@@ -1 +1 @@
1
- import{createElement as t}from"react";import{styled as e}from"../../stitches.js";import{Text as s}from"../text/Text.js";const o=e("div",{height:"$space$3",mt:"$3",position:"relative",width:"100%"}),l=(t,e,s)=>(t-e)/(s-e)*100,a=(t,e,s)=>{const o=l(t,e,s);return o<=10?0:o>=90?100:50},r=({min:e,max:r,steps:i})=>0===i.length?null:t(o,null,i.map((o=>t(s,{as:"span",key:o.value,css:{position:"absolute",color:"$tonal300"},style:{left:`${l(o.value,e,r)}%`,transform:`translateX(-${a(o.value,e,r)}%)`}},o.label))));export{r as SliderSteps};
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 t}from"react";import{Text as o}from"../text/Text.js";const e=({value:e=[],outputLabel:r=(t=>`Current value is ${t}`)})=>t(o,{css:{mt:"$4",color:"$tonal300",width:"100%"}},r(1===e.length?e[0]:e));export{e as SliderValue};
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
- const e=["css","label","name","defaultValue","outputLabel","min","max","steps"];import t from"react";import{useFormContext as l,Controller as a}from"react-hook-form";import{FieldWrapper as r}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import{Slider as n}from"../slider/Slider.js";const o=o=>{let{css:m,label:s,name:u,defaultValue:i,outputLabel:p,min:c=0,max:d=100,steps:f=[]}=o,b=function(e,t){if(null==e)return{};var l,a,r={},n=Object.keys(e);for(a=0;a<n.length;a++)l=n[a],t.indexOf(l)>=0||(r[l]=e[l]);return r}(o,e);const{control:V}=l();return t.createElement(r,{css:m,fieldId:u,label:s},t.createElement(a,{control:V,name:u,defaultValue:i,render:({onChange:e,value:l})=>t.createElement(n,Object.assign({name:u,defaultValue:i,onValueChange:e,value:l},b),t.createElement(n.Steps,{min:c,max:d,steps:f}),t.createElement(n.Value,{value:l||i,outputLabel:p}))}))};o.displayName="SliderField";export{o as SliderField};
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
- const e=["css","gap","direction","justify"];function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}import{createElement as r}from"react";import{theme as n,styled as s}from"../../stitches.js";import{CSSWrapper as i}from"../../utilities/css-wrapper/CSSWrapper.js";const c=s("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:Object.keys(n.space).reduce(((e,r)=>t({},e,{[r]:{mt:`-$space$${r}`,ml:`-$space$${r}`,"& > *":{mt:`$space$${r}`,ml:`$space$${r}`}}})),{})}}),o=t=>{let{css:n,gap:s=2,direction:o="row",justify:a="start"}=t,p=function(e,t){if(null==e)return{};var r,n,s={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(s[r]=e[r]);return s}(t,e);return r(i,{css:n},r(c,Object.assign({direction:o,gap:s,justify:a},p)))};o.displayName="Stack";export{o as Stack};
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
- const o=["children"];function t(){return(t=Object.assign||function(o){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[r]=n[r])}return o}).apply(this,arguments)}import{createElement as n,Children as r,isValidElement as m,cloneElement as e}from"react";import{styled as i}from"../../stitches.js";import{Divider as s}from"../divider/Divider.js";import{Heading as a}from"../heading/Heading.js";import{Image as c}from"../image/Image.js";import{List as p}from"../list/List.js";import"../markdown-content/components/MarkdownCode.js";import"../markdown-content/components/MarkdownEmphasis.js";import{MarkdownHeading as d}from"../markdown-content/components/MarkdownHeading.js";import"../markdown-content/components/MarkdownInlineCode.js";import{MarkdownImage as l}from"../markdown-content/components/MarkdownImage.js";import"../link/Link.js";import{MarkdownList as k}from"../markdown-content/components/MarkdownList.js";import{MarkdownParagraph as f}from"../markdown-content/components/MarkdownParagraph.js";import"../markdown-content/components/MarkdownStrong.js";import{MarkdownThematicBreak as h}from"../markdown-content/components/MarkdownThematicBreak.js";import{Text as j}from"../text/Text.js";const w=i("div",{}),g=(o,n)=>e(o,{css:t({},n,o.props.css?o.props.css:{})}),u=t=>{let{children:e}=t,i=function(o,t){if(null==o)return{};var n,r,m={},e=Object.keys(o);for(r=0;r<e.length;r++)n=e[r],t.indexOf(n)>=0||(m[n]=o[n]);return m}(t,o);return n(w,Object.assign({},i),r.map(e,(o=>{if(!m(o))return o;const t=null==o?void 0:o.type;return t===a||t===d?g(o,{maxWidth:"65ch","&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}}):t===j||t===f||t===p||t===k?g(o,{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}}):t===s||t===h?g(o,{my:"$5"}):t===c||t===l?g(o,{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}):o})))};u.displayName="StackContent";export{u as StackContent};
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 o,Thumb as r}from"@radix-ui/react-switch";import{createElement as a}from"react";import{styled as e}from"../../stitches.js";const t=e(o,{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(r,{backgroundColor:"white",borderRadius:"$round",display:"block",size:"$1",transition:"transform 50ms",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(calc($sizes$2 - $space$1))"}}),s=o=>a(t,Object.assign({},o),a(i,null));s.displayName="Switch";export{s as Switch};
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
- const e=["size","corners"];import{createElement as r}from"react";import{styled as o}from"../../stitches.js";import{TableBody as t}from"./TableBody.js";import{TableCell as s}from"./TableCell.js";import{TableFooter as i}from"./TableFooter.js";import{TableFooterCell as l}from"./TableFooterCell.js";import{TableHeader as a}from"./TableHeader.js";import{TableHeaderCell as d}from"./TableHeaderCell.js";import{TableRow as m}from"./TableRow.js";const n=o("table",{borderCollapse:"separate",borderSpacing:0,fontFamily:"$sans",fontSize:"$sm",width:"100%",variants:{size:{md:{[`${s}, ${d}, ${l}`]:{height:"$4"}},lg:{[`${s}, ${d}, ${l}`]:{height:"$5"}}},corners:{round:{[`${d}`]:{"&:first-of-type":{borderTopLeftRadius:"$0"},"&:last-of-type":{borderTopRightRadius:"$0"}},[`${m}:last-child`]:{[`${s}:first-child`]:{borderBottomLeftRadius:"$0"},[`${s}:last-child`]:{borderBottomRightRadius:"$0"}}},square:{}}}}),f=o=>{let{size:t="md",corners:s="round"}=o,i=function(e,r){if(null==e)return{};var o,t,s={},i=Object.keys(e);for(t=0;t<i.length;t++)o=i[t],r.indexOf(o)>=0||(s[o]=e[o]);return s}(o,e);return r(n,Object.assign({size:t,corners:s},i))};f.Body=t,f.Cell=s,f.Footer=i,f.FooterCell=l,f.Header=a,f.HeaderCell=d,f.Row=m,f.displayName="Table";export{f as Table};
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 o}from"../../stitches.js";const t=o("tbody",{});t.displayName="TableBody";export{t as TableBody};
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 o=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"}});o.displayName="TableCell";export{o as TableCell};
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 o}from"../../stitches.js";const t=o("tfoot",{});t.displayName="TableFooter";export{t as TableFooter};
1
+ import{styled as t}from"../../stitches.js";const o=t("tfoot",{});o.displayName="TableFooter";export{o as TableFooter};
@@ -1 +1 @@
1
- const e=["theme"];import{styled as r}from"../../stitches.js";import t from"react";import{TableHeaderCell as a}from"./TableHeaderCell.js";const m=r("thead",{variants:{theme:{primary:{[`${a}`]:{bg:"$primary"}},primaryDark:{[`${a}`]:{bg:"$primaryDark"}}}}}),i=r=>{let{theme:a="primaryDark"}=r,i=function(e,r){if(null==e)return{};var t,a,m={},i=Object.keys(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||(m[t]=e[t]);return m}(r,e);return t.createElement(m,Object.assign({theme:a},i))};i.displayName="TableHeader";export{i as TableHeader};
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 e}from"../../stitches.js";const t=e("th",{color:"white",fontFamily:"$body",fontWeight:600,lineHeight:1.5,p:"$2 $3",textAlign:"left",verticalAlign:"middle"});t.displayName="TableHeaderCell";export{t as TableHeaderCell};
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 t}from"../../stitches.js";const o=t("tr",{});o.displayName="TableRow";export{o as TableRow};
1
+ import{styled as e}from"../../stitches.js";const o=e("tr",{});o.displayName="TableRow";export{o as TableRow};
@@ -1 +1 @@
1
- const t=["children","theme","disabled"];import{Trigger as e}from"@radix-ui/react-tabs";import{createElement as a}from"react";import{opacify as o}from"polished";import{styled as r,theme as i}from"../../stitches.js";const d=r(e,{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(-.9,i.colors.primary.value)},"&:not([data-disabled]):active":{color:"$primary",bg:o(-.8,i.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:o(-.8,"white")},"&:not([data-disabled]):active":{bg:o(-.7,"white"),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}}}}}),l=e=>{let{children:o,theme:r,disabled:i=!1}=e,l=function(t,e){if(null==t)return{};var a,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)a=i[o],e.indexOf(a)>=0||(r[a]=t[a]);return r}(e,t);return a(d,Object.assign({disabled:i,theme:r},l),o)};l.displayName="TabTrigger";export{l as TabTrigger};
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
- const r=["theme","children"];import{Root as t,Content as e}from"@radix-ui/react-tabs";import{createElement as i}from"react";import{styled as o}from"../../stitches.js";import{TabTrigger as m}from"./TabTrigger.js";import{TriggerListWrapper as a}from"./TabsTriggerList.js";import{passPropsToChildren as l}from"./utils.js";const n=o(t,{display:"flex",flexDirection:"column",variants:{theme:{light:{color:"$primary"},dark:{color:"white"}}}}),s=o(e,{flexGrow:1,fontFamily:"$body",variants:{theme:{light:{color:"$textForeground"},dark:{bg:"$primaryDark",color:"white"}}}}),c=t=>{let{theme:e="light",children:o}=t,m=function(r,t){if(null==r)return{};var e,i,o={},m=Object.keys(r);for(i=0;i<m.length;i++)e=m[i],t.indexOf(e)>=0||(o[e]=r[e]);return o}(t,r);return i(n,Object.assign({theme:e},m),l(o,{theme:e},[a,s]))};c.TriggerList=a,c.Trigger=m,c.Content=s,c.displayName="Tabs";export{c as Tabs};
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
- const e=["children","theme","appearance","enableTabScrolling"];import{List as t}from"@radix-ui/react-tabs";import r,{useRef as o,useState as i,useCallback as l,useEffect as n}from"react";import{ChevronLeft as s,ChevronRight as a}from"@atom-learning/icons";import{opacify as c}from"polished";import{debounce as m}from"throttle-debounce";import{theme as p,styled as f}from"../../stitches.js";import{ActionIcon as h}from"../action-icon/ActionIcon.js";import{Flex as d}from"../flex/Flex.js";import{Icon as b}from"../icon/Icon.js";import{TabTrigger as u}from"./TabTrigger.js";import{passPropsToChildren as g}from"./utils.js";const v=f(h,{position:"absolute",transition:"all 125ms",variants:{theme:{light:{bg:`${c(-.2,"white")} !important`},dark:{bg:`${c(-.2,p.colors.primaryDark.value)} !important`,color:"currentColor !important"}},visible:{true:{opacity:1,visibility:"visible",pointerEvents:"all"},false:{opacity:0,visibility:"hidden",pointerEvents:"none"}}}}),x=f(t,{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"}}}}),E=t=>{let{children:c,theme:p,appearance:f,enableTabScrolling:h}=t,E=function(e,t){if(null==e)return{};var r,o,i={},l=Object.keys(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||(i[r]=e[r]);return i}(t,e);const w=o(null),[j,k]=i(!1),[y,W]=i(!1),[z,L]=i(),T=l((e=>{const t=w.current;if(t){const{scrollWidth:r,scrollLeft:o}=t,i=Math.round(r/4);let l=o;if("right"===e){const e=t.scrollLeft+i;l=e<=r?e:o}else{const e=o-i;l=e>0?e:0}t.scroll({left:l,behavior:"smooth"}),setTimeout((()=>{const{scrollWidth:e,scrollLeft:r,offsetWidth:o}=t;0===r?(k(!1),W(!0)):r+o===e?(W(!1),k(!0)):(k(!0),W(!0))}),500)}}),[]);n((()=>{const e=m(500,(()=>{L(window.innerWidth)}));return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),n((()=>{const e=w.current;if(e){const{offsetWidth:t,scrollWidth:r}=e,o=r>t;null==e.scroll||e.scroll({left:0}),k(!1),W(o)}}),[z]);return j||y||h?r.createElement(d,{css:{position:"relative"}},r.createElement(v,{size:"xl",label:"Scroll Left",theme:p,onClick:()=>T("left"),visible:j,css:{left:0}},r.createElement(b,{is:s,size:"lg"})),r.createElement(x,Object.assign({},E,{ref:w,appearance:f,theme:p}),g(c,{theme:p},[u])),r.createElement(v,{size:"xl",label:"Scroll right",theme:p,onClick:()=>T("right"),visible:y,css:{right:0}},r.createElement(b,{is:a,size:"lg"}))):r.createElement(x,Object.assign({theme:p},E,{appearance:f,ref:w}),g(c,{theme:p},[u]))};export{E as TriggerListWrapper};
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
- function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}import e from"react";const n=(n,r,o=[])=>e.Children.map(n,(n=>e.isValidElement(n)&&o.includes(null==n?void 0:n.type)?e.cloneElement(n,t({},r)):n));export{n as passPropsToChildren};
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
- const e=["size"];function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}).apply(this,arguments)}import{forwardRef as i,createElement as r}from"react";import{styled as n}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import{capsize as s}from"../../utilities/style/capsize.js";import"polished";import"../../utilities/style/keyframe-animations.js";const o=({applyCapsize:e=!0}={})=>({xs:t({fontSize:"$xs",lineHeight:1.6},e?s(.4364):{}),sm:t({fontSize:"$sm",lineHeight:1.53},e?s(.4056):{}),md:t({fontSize:"$md",lineHeight:1.5},e?s(.3864):{}),lg:t({fontSize:"$lg",lineHeight:1.52},e?s(.3983):{}),xl:t({fontSize:"$xl",lineHeight:1.42},e?s(.3506):{})}),l=n("p",{color:"$tonal600",fontFamily:"$body",fontWeight:400,margin:0,"& > &":{"&:before, &:after":{display:"none"}},variants:{size:o()}}),a=i(((t,i)=>{let{size:n="md"}=t,s=function(e,t){if(null==e)return{};var i,r,n={},s=Object.keys(e);for(r=0;r<s.length;r++)i=s[r],t.indexOf(i)>=0||(n[i]=e[i]);return n}(t,e);return r(l,Object.assign({size:n},s,{ref:i}))}));a.displayName="Text";export{l as StyledParagraph,a as Text,o as textVariantSize};
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 o,createElement as r}from"react";import{styled as e}from"../../stitches.js";const a=e("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"}}}}),t=o(((o,e)=>r(a,Object.assign({},o,{ref:e}))));t.displayName="Textarea";export{t as Textarea};
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
- const r=["css","label","name","validation","prompt","description"];import{createElement as e}from"react";import{useFormContext as o}from"react-hook-form";import{FieldWrapper as t}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as i}from"../form/useFieldError.js";import{Textarea as a}from"../textarea/Textarea.js";const p=p=>{let{css:l,label:n,name:s,validation:m,prompt:d,description:f}=p,c=function(r,e){if(null==r)return{};var o,t,i={},a=Object.keys(r);for(t=0;t<a.length;t++)o=a[t],e.indexOf(o)>=0||(i[o]=r[o]);return i}(p,r);const{register:u}=o(),{error:j}=i(s),b=m?u(m):u;return e(t,{css:l,description:f,error:j,fieldId:s,label:n,prompt:d,required:Boolean(null==m?void 0:m.required)},e(a,Object.assign({id:s,name:s,ref:b},j&&{state:"error"},c)))};p.displayName="TextareaField";export{p as TextareaField};
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 o,Close as t}from"@atom-learning/icons";import{memo as i,createElement as r}from"react";import{toast as a}from"react-hot-toast";import{keyframes as e,styled as s}from"../../stitches.js";import{ActionIcon as n}from"../action-icon/ActionIcon.js";import{Icon as l}from"../icon/Icon.js";import{Loader as c}from"../loader/Loader.js";import{Text as m}from"../text/Text.js";const p=400,d=s("div",{position:"absolute",width:"100%",variants:{visible:{true:{"@allowMotion":{animation:`${e({"0%":{transform:"translate3d(0,-100%,0)",opacity:0},"100%":{transform:"translate3d(0,0,0)",opacity:1}})} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}},false:{opacity:0,"@allowMotion":{animation:`${e({"0%":{transform:"translate3d(0,0,0)",opacity:1},"100%":{transform:"translate3d(0,-100%,0)",opacity:0}})} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}}}}}),b=s("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:400},"@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"}}}}),u=i((({ariaLive:i,height:e,id:s,message:p,role:u,type:f="blank",visible:g,calculateOffset:h,updateHeight:$})=>{const v=h(s,{reverseOrder:!0,margin:8});return r(d,{visible:g},r(b,{ref:o=>{o&&void 0===e&&$(s,o.getBoundingClientRect().height)},status:f,role:u,"aria-live":i,style:{transform:`translateY(${v}px)`}},"error"===f&&r(l,{size:"sm",css:{mr:"$3",flex:"0 0 auto"},is:o}),r(m,{css:{color:"inherit"}},p),"loading"===f?r(c,{css:{flex:"0 0 auto",ml:"auto"}}):r(n,{css:{position:"absolute",top:"$2",right:"$2",color:"white","&:hover,&:focus":{color:"white",opacity:.5}},label:"Close alert",onClick:()=>a.dismiss(s)},r(l,{is:t}))))}));export{p as TOAST_WIDTH,u as Toast};
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 e}from"react";import{useToaster as o}from"react-hot-toast";export{default as toast}from"react-hot-toast";import{styled as a}from"../../stitches.js";import{TOAST_WIDTH as s,Toast as r}from"./Toast.js";const i=a("div",{left:"$2",position:"fixed",top:"$2",right:"$2",zIndex:2147483647,"@sm":{top:"$3",right:"auto",left:`calc(50% - ${s/2}px)`}}),c=({children:a})=>{const{toasts:s,handlers:c}=o(),{startPause:p,endPause:f,calculateOffset:l,updateHeight:n}=c;return t(e,null,t(i,{onMouseEnter:p,onMouseLeave:f},s.map((e=>t(r,Object.assign({key:e.id,calculateOffset:l,updateHeight:n},e))))),a)};c.displayName="ToastProvider";export{c as ToastProvider};
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
- const t=["children","delayDuration"];import{Root as r,Trigger as o}from"@radix-ui/react-tooltip";import{createElement as e}from"react";import{styled as i}from"../../stitches.js";import{TooltipContent as n}from"./TooltipContent.js";const a=o=>{let{children:i,delayDuration:n=350}=o,a=function(t,r){if(null==t)return{};var o,e,i={},n=Object.keys(t);for(e=0;e<n.length;e++)o=n[e],r.indexOf(o)>=0||(i[o]=t[o]);return i}(o,t);return e(r,Object.assign({delayDuration:n},a),i)};a.Content=n,a.Trigger=i(o,{}),a.displayName="Tooltip";export{a as Tooltip};
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
- const i=["children","side","sideOffset","size"];import{Content as t,Arrow as a}from"@radix-ui/react-tooltip";import{createElement as e}from"react";import{styled as o}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"polished";import{slideDownAndFade as n,slideLeftAndFade as r,slideUpAndFade as s,slideRightAndFade as m}from"../../utilities/style/keyframe-animations.js";const d=o(t,{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:n},'&[data-side="right"]':{animationName:r},'&[data-side="bottom"]':{animationName:s},'&[data-side="left"]':{animationName:m}}},variants:{size:{sm:{maxWidth:"100px"},md:{maxWidth:"250px"},lg:{maxWidth:"400px"}}}}),l=o(a,{fill:"$tonal500",'[data-align="end"] &':{mr:"$2"},'[data-align="start"] &':{ml:"$2"}}),p=t=>{let{children:a,side:o="top",sideOffset:n=4,size:r="md"}=t,s=function(i,t){if(null==i)return{};var a,e,o={},n=Object.keys(i);for(e=0;e<n.length;e++)a=n[e],t.indexOf(a)>=0||(o[a]=i[a]);return o}(t,i);return e(d,Object.assign({side:o,sideOffset:n,size:r},s),a,e(l,null))};export{p as TooltipContent};
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
- const r=["css","children"];function t(){return(t=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r}).apply(this,arguments)}import{Error as e}from"@atom-learning/icons";import{createElement as n}from"react";import{Flex as s}from"../flex/Flex.js";import{Icon as o}from"../icon/Icon.js";import{Text as i}from"../text/Text.js";const c=c=>{let{css:a,children:l}=c,f=function(r,t){if(null==r)return{};var e,n,s={},o=Object.keys(r);for(n=0;n<o.length;n++)e=o[n],t.indexOf(e)>=0||(s[e]=r[e]);return s}(c,r);return n(s,Object.assign({css:t({color:"$danger",alignItems:"flex-start"},a)},f),n(o,{is:e,size:"sm",css:{mr:"$2",flexShrink:0},"aria-hidden":!0}),n(i,{css:{color:"inherit",transform:"translateY($space$1)"},size:"sm"},l))};export{c as ValidationError};
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
- const r=["id","ratio","css"];import{forwardRef as t,createElement as e}from"react";import i from"react-player/vimeo";import{Box as o}from"../box/Box.js";import{styled as s}from"../../stitches.js";import{CSSWrapper as p}from"../../utilities/css-wrapper/CSSWrapper.js";const a=s(i,{}),c=t(((t,i)=>{let{id:s,ratio:c=9/16,css:n}=t,d=function(r,t){if(null==r)return{};var e,i,o={},s=Object.keys(r);for(i=0;i<s.length;i++)e=s[i],t.indexOf(e)>=0||(o[e]=r[e]);return o}(t,r);return e(p,{css:n},e(o,{css:{borderRadius:"$0",position:"relative",paddingTop:100*c+"%",overflow:"hidden",height:0,width:"100%"}},e(a,Object.assign({},d,{role:"figure",url:`https://player.vimeo.com/video/${s}`,height:"100%",width:"100%",css:{position:"absolute",top:0,left:0},ref:i}))))}));c.displayName="Video";export{c as Video};
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};