@atom-learning/components 1.2.3 → 1.5.0

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 (68) hide show
  1. package/dist/components/action-icon/ActionIcon.d.ts +2 -2
  2. package/dist/components/action-icon/ActionIcon.js +1 -1
  3. package/dist/components/calendar/Calendar.d.ts +19 -0
  4. package/dist/components/calendar/Calendar.js +1 -0
  5. package/dist/components/calendar/Day.d.ts +269 -0
  6. package/dist/components/calendar/Day.js +1 -0
  7. package/dist/components/calendar/constants.d.ts +2 -0
  8. package/dist/components/calendar/constants.js +1 -0
  9. package/dist/components/date-field/DateField.d.ts +17 -0
  10. package/dist/components/date-field/DateField.js +1 -0
  11. package/dist/components/date-field/index.d.ts +1 -0
  12. package/dist/components/date-input/DateInput.d.ts +17 -0
  13. package/dist/components/date-input/DateInput.js +1 -0
  14. package/dist/components/date-input/constants.d.ts +1 -0
  15. package/dist/components/date-input/constants.js +1 -0
  16. package/dist/components/date-input/index.d.ts +1 -0
  17. package/dist/components/date-input/use-date.d.ts +5 -0
  18. package/dist/components/date-input/use-date.js +1 -0
  19. package/dist/components/dialog/DialogContent.d.ts +1 -0
  20. package/dist/components/dialog/DialogContent.js +1 -1
  21. package/dist/components/form/Form.types.d.ts +2 -2
  22. package/dist/components/index.d.ts +6 -1
  23. package/dist/components/notification-badge/NotificationBadge.d.ts +535 -0
  24. package/dist/components/notification-badge/NotificationBadge.js +1 -0
  25. package/dist/components/notification-badge/index.d.ts +1 -0
  26. package/dist/components/popover/PopoverContent.d.ts +1 -0
  27. package/dist/components/popover/PopoverContent.js +1 -1
  28. package/dist/components/search-input/SearchInput.d.ts +3 -1
  29. package/dist/components/search-input/SearchInput.js +1 -1
  30. package/dist/components/slider/Slider.d.ts +276 -0
  31. package/dist/components/slider/Slider.js +1 -0
  32. package/dist/components/slider/SliderSteps.d.ts +13 -0
  33. package/dist/components/slider/SliderSteps.js +1 -0
  34. package/dist/components/slider/SliderValue.d.ts +9 -0
  35. package/dist/components/slider/SliderValue.js +1 -0
  36. package/dist/components/slider/index.d.ts +1 -0
  37. package/dist/components/slider-field/SliderField.d.ts +13 -0
  38. package/dist/components/slider-field/SliderField.js +1 -0
  39. package/dist/components/slider-field/index.d.ts +1 -0
  40. package/dist/components/table/Table.d.ts +1 -0
  41. package/dist/components/table/Table.js +1 -1
  42. package/dist/components/table/TableHeader.d.ts +7 -1
  43. package/dist/components/table/TableHeader.js +1 -1
  44. package/dist/components/table/TableHeaderCell.js +1 -1
  45. package/dist/components/table/TableRow.js +1 -1
  46. package/dist/components/tabs/TabTrigger.d.ts +5 -3
  47. package/dist/components/tabs/TabTrigger.js +1 -1
  48. package/dist/components/tabs/Tabs.d.ts +8 -268
  49. package/dist/components/tabs/Tabs.js +1 -1
  50. package/dist/components/tabs/TabsTriggerList.d.ts +274 -0
  51. package/dist/components/tabs/TabsTriggerList.js +1 -0
  52. package/dist/components/tabs/utils.d.ts +2 -0
  53. package/dist/components/tabs/utils.js +1 -0
  54. package/dist/components/text/Text.js +1 -1
  55. package/dist/docgen.json +1 -1
  56. package/dist/docs/DateField.mdx +20 -0
  57. package/dist/docs/DateInput.mdx +81 -0
  58. package/dist/docs/Dialog.mdx +16 -1
  59. package/dist/docs/NotificationBadge.mdx +33 -0
  60. package/dist/docs/RadioButton.mdx +1 -1
  61. package/dist/docs/SearchInput.mdx +2 -1
  62. package/dist/docs/Slider.mdx +117 -0
  63. package/dist/docs/SliderField.mdx +35 -0
  64. package/dist/docs/Table.mdx +14 -0
  65. package/dist/docs/Tabs.mdx +24 -1
  66. package/dist/index.cjs.js +1 -1
  67. package/dist/index.js +1 -1
  68. package/package.json +7 -2
@@ -5,7 +5,7 @@ import { Override } from '../../utilities';
5
5
  declare const StyledButton: import("@stitches/react/types/styled-component").StyledComponent<"button", {
6
6
  theme?: "primary" | "success" | "danger" | "warning" | "neutral" | undefined;
7
7
  appearance?: "outline" | "solid" | "simple" | undefined;
8
- size?: "md" | "lg" | undefined;
8
+ size?: "md" | "lg" | "xl" | undefined;
9
9
  isRounded?: boolean | "true" | undefined;
10
10
  }, {
11
11
  sm: string;
@@ -277,5 +277,5 @@ declare type ActionIconProps = Override<React.ComponentProps<typeof StyledButton
277
277
  children: React.ReactNode;
278
278
  label: string;
279
279
  } & NavigatorActions>;
280
- export declare const ActionIcon: React.ForwardRefExoticComponent<Pick<ActionIconProps, "appearance" | "color" | "translate" | "size" | "css" | "theme" | "onBlur" | "onSubmit" | "form" | "label" | "slot" | "style" | "title" | "hidden" | "key" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as" | "disabled" | "value" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "isRounded" | keyof NavigatorActions> & React.RefAttributes<HTMLButtonElement>>;
280
+ export declare const ActionIcon: React.ForwardRefExoticComponent<Pick<ActionIconProps, "appearance" | "color" | "translate" | "size" | "css" | "theme" | "onBlur" | "onChange" | "onSubmit" | "form" | "label" | "slot" | "style" | "title" | "hidden" | "key" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as" | "disabled" | "value" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "isRounded" | keyof NavigatorActions> & React.RefAttributes<HTMLButtonElement>>;
281
281
  export {};
@@ -1 +1 @@
1
- const e=["children","theme","appearance","size","label","href","disabled"];function r(){return(r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}import a from"invariant";import{forwardRef as s,Children as n,createElement as i,isValidElement as o,cloneElement as t}from"react";import{styled as c}from"../../stitches.js";import{Icon as l}from"../icon/Icon.js";const d=(e,r,a)=>({bg:"transparent",color:e,"&:not(:disabled):hover, &:not(:disabled):focus":{color:r},"&:not(:disabled):active":{color:a},"&[disabled]":{color:"$tonal400",cursor:"not-allowed"}}),p=(e,r,a)=>({bg:e,color:"white","&:not(:disabled):hover, &:not(:disabled):focus":{bg:r,color:"white"},"&:not(:disabled):active":{bg:a},"&[disabled]":{bg:"$tonal100",color:"$tonal400",cursor:"not-allowed"}}),m=(e,r,a)=>({border:"1px solid",borderColor:"currentColor",color:e,"&:not(:disabled):hover, &:not(:disabled):focus":{color:r},"&:not(:disabled):active":{color:a},"&[disabled]":{borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"}}),u=c("button",{alignItems:"center",appearance:"none",bg:"white",border:"unset",borderRadius:"$0",boxSizing:"border-box",cursor:"pointer",display:"flex",justifyContent:"center",p:"unset",transition:"all 100ms ease-out",variants:{theme:{neutral:{},primary:{},success:{},warning:{},danger:{}},appearance:{simple:{},outline:{},solid:{}},size:{md:{size:"$3"},lg:{size:"$4"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"neutral",appearance:"simple",css:d("$tonal300","$primaryMid","$primaryDark")},{theme:"primary",appearance:"simple",css:d("$primary","$primaryMid","$primaryDark")},{theme:"success",appearance:"simple",css:d("$success","$successMid","$successDark")},{theme:"warning",appearance:"simple",css:d("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"simple",css:d("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"solid",css:p("$primary","$primaryMid","$primaryDark")},{theme:"success",appearance:"solid",css:p("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:p("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"solid",css:p("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"outline",css:m("$primary","$primaryMid","$primaryDark")},{theme:"success",appearance:"outline",css:m("$success","$successMid","$successDark")},{theme:"warning",appearance:"outline",css:m("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"outline",css:m("$danger","$dangerMid","$dangerDark")}]}),$=s(((s,c)=>{let{children:d,theme:p="primary",appearance:m="simple",size:g="md",label:b,href:h,disabled:y}=s,f=function(e,r){if(null==e)return{};var a,s,n={},i=Object.keys(e);for(s=0;s<i.length;s++)a=i[s],r.indexOf(a)>=0||(n[a]=e[a]);return n}(s,e);const w=`A single ${l.displayName} component is permitted as a child of ${$.displayName}`;a(1===n.count(d),w);const k=h?{as:"a",href:y?null:h,onClick:void 0,"aria-disabled":!!y}:{type:"button"};return i(u,Object.assign({},f,k,{"aria-label":b,theme:p,appearance:m,size:g,ref:c,disabled:y}),n.map(d,(e=>{if(!o(e))throw new Error(w);return a(e.type===l,`Children of type ${null==e?void 0:e.type} aren't permitted. Only an ${l.displayName} component is allowed in ${$.displayName}`),t(e,{css:r({size:"lg"===g?20:16},e.props.css?e.props.css:{})})})))}));$.displayName="ActionIcon";export{$ as ActionIcon};
1
+ const e=["children","theme","appearance","size","label","href","disabled"];function r(){return(r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}import a from"invariant";import{darken as s}from"polished";import{forwardRef as i,Children as n,createElement as o,isValidElement as c,cloneElement as t}from"react";import{styled as l,theme as p}from"../../stitches.js";import{Icon as d}from"../icon/Icon.js";const m=(e,r,a)=>({bg:"transparent",color:e,"&:not(:disabled):hover, &:not(:disabled):focus":{color:r},"&:not(:disabled):active":{color:a},"&[disabled]":{color:"$tonal400",cursor:"not-allowed"}}),u=(e,r,a)=>({bg:e,color:"white","&:not(:disabled):hover, &:not(:disabled):focus":{bg:r,color:"white"},"&:not(:disabled):active":{bg:a},"&[disabled]":{bg:"$tonal100",color:"$tonal400",cursor:"not-allowed"}}),$=(e,r,a)=>({border:"1px solid",borderColor:"currentColor",color:e,"&:not(:disabled):hover, &:not(:disabled):focus":{color:r},"&:not(:disabled):active":{color:a},"&[disabled]":{borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"}}),y=l("button",{alignItems:"center",appearance:"none",bg:"white",border:"unset",borderRadius:"$0",boxSizing:"border-box",cursor:"pointer",display:"flex",justifyContent:"center",p:"unset",transition:"all 100ms ease-out",variants:{theme:{neutral:{},primary:{},success:{},warning:{},danger:{}},appearance:{simple:{},outline:{},solid:{}},size:{md:{size:"$3"},lg:{size:"$4"},xl:{size:"$5"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"neutral",appearance:"simple",css:m("$tonal300","$primaryMid","$primaryDark")},{theme:"primary",appearance:"simple",css:m("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"simple",css:m("$primaryDark",s(.1,p.colors.primaryDark.value),s(.15,p.colors.primaryDark.value))},{theme:"success",appearance:"simple",css:m("$success","$successMid","$successDark")},{theme:"warning",appearance:"simple",css:m("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"simple",css:m("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"solid",css:u("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"solid",css:u("$primaryDark",s(.1,p.colors.primaryDark.value),s(.15,p.colors.primaryDark.value))},{theme:"success",appearance:"solid",css:u("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:u("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"solid",css:u("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"outline",css:$("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"outline",css:$("$primaryDark",s(.1,p.colors.primaryDark.value),s(.15,p.colors.primaryDark.value))},{theme:"success",appearance:"outline",css:$("$success","$successMid","$successDark")},{theme:"warning",appearance:"outline",css:$("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"outline",css:$("$danger","$dangerMid","$dangerDark")}]}),g=i(((s,i)=>{let{children:l,theme:p="primary",appearance:m="simple",size:u="md",label:$,href:b,disabled:h}=s,k=function(e,r){if(null==e)return{};var a,s,i={},n=Object.keys(e);for(s=0;s<n.length;s++)a=n[s],r.indexOf(a)>=0||(i[a]=e[a]);return i}(s,e);const f=`A single ${d.displayName} component is permitted as a child of ${g.displayName}`;a(1===n.count(l),f);const D=b?{as:"a",href:h?null:b,onClick:void 0,"aria-disabled":!!h}:{type:"button"};return o(y,Object.assign({},k,D,{"aria-label":$,theme:p,appearance:m,size:u,ref:i,disabled:h}),n.map(l,(e=>{if(!c(e))throw new Error(f);return a(e.type===d,`Children of type ${null==e?void 0:e.type} aren't permitted. Only an ${d.displayName} component is allowed in ${g.displayName}`),t(e,{css:r({size:["lg","xl"].includes(u)?20:16},e.props.css?e.props.css:{})})})))}));g.displayName="ActionIcon";export{g as ActionIcon};
@@ -0,0 +1,19 @@
1
+ import type { Props as DayzedInterface } from 'dayzed';
2
+ import * as React from 'react';
3
+ import type { CSS } from '../../stitches';
4
+ export declare type CalendarTranslationProps = {
5
+ monthNames?: string[];
6
+ weekdayNames?: string[];
7
+ labels?: {
8
+ open: string;
9
+ next: string;
10
+ previous: string;
11
+ };
12
+ };
13
+ declare type CalendarProps = DayzedInterface & CalendarTranslationProps & {
14
+ css?: CSS;
15
+ refDateToday?: React.RefObject<HTMLButtonElement>;
16
+ refDateSelected?: React.RefObject<HTMLButtonElement>;
17
+ };
18
+ export declare const Calendar: React.FC<CalendarProps>;
19
+ export {};
@@ -0,0 +1 @@
1
+ const e=["css","refDateSelected","refDateToday","firstDayOfWeek","monthNames","weekdayNames","labels"];function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e}).apply(this,arguments)}import{ChevronLeft as s,ChevronRight as r}from"@atom-learning/icons";import{useDayzed as o}from"dayzed";import{createElement as n}from"react";import{ActionIcon as a}from"../action-icon/ActionIcon.js";import{Box as i}from"../box/Box.js";import{Flex as m}from"../flex/Flex.js";import{Heading as c}from"../heading/Heading.js";import{Icon as l}from"../icon/Icon.js";import{Text as p}from"../text/Text.js";import{styled as f}from"../../stitches.js";import{monthNamesShort as d,weekdayNamesShort as g}from"./constants.js";import{Day as u}from"./Day.js";const h=f("div",{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gridGap:"$1 $2"}),y=f=>{let{css:y,refDateSelected:j,refDateToday:$,firstDayOfWeek:b=0,monthNames:x=d,weekdayNames:O=g,labels:k={next:"Next month",previous:"Previous month"}}=f,v=function(e,t){if(null==e)return{};var s,r,o={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(o[s]=e[s]);return o}(f,e);const{calendars:D,getBackProps:w,getForwardProps:N,getDateProps:z}=o(t({firstDayOfWeek:b,showOutsideDays:!0},v));return D.length?n(i,{css:t({position:"relative",width:"min-content",mt:"-$1"},y)},n(m,{css:{position:"absolute",top:0,right:"-$1"}},n(a,Object.assign({label:k.previous,theme:"neutral",size:"lg"},w({calendars:D})),n(l,{is:s})),n(a,Object.assign({label:k.next,theme:"neutral",size:"lg"},N({calendars:D})),n(l,{is:r}))),D.map((({month:e,year:t,weeks:s})=>n(i,{key:`${e}${t}`},n(m,{css:{height:"$4",alignItems:"center",mb:"$4"}},n(c,{size:"xs"},x[e]," ",t)),n(h,{css:{mb:"$3"}},((e,t)=>{const s=e.slice(0,t);return e.slice(t).concat(s)})(O,b).map((s=>n(p,{as:"span",size:"sm",key:`${e}${t}${s}`,css:{fontWeight:600,textAlign:"center"}},s)))),n(h,null,s.map(((s,r)=>s.map(((s,o)=>{const a=`${e}${t}${r}${o}`;if(!s)return n("div",{key:a});const{date:i,selected:m,today:c,prevMonth:l,nextMonth:p}=s;return n(u,Object.assign({isOutsideMonth:l||p,isSelected:m,isToday:c,key:a,ref:m?j:c?$:null},z({dateObj:s})),i.getDate())}))))))))):null};y.displayName="Calendar";export{y as Calendar};
@@ -0,0 +1,269 @@
1
+ export declare const Day: import("@stitches/react/types/styled-component").StyledComponent<"button", {
2
+ isSelected?: boolean | "true" | undefined;
3
+ isToday?: boolean | "true" | undefined;
4
+ isOutsideMonth?: boolean | "true" | undefined;
5
+ }, {
6
+ sm: string;
7
+ md: string;
8
+ lg: string;
9
+ xl: string;
10
+ reducedMotion: string;
11
+ allowMotion: string;
12
+ hover: string;
13
+ }, import("@stitches/react/types/css-util").CSS<{
14
+ sm: string;
15
+ md: string;
16
+ lg: string;
17
+ xl: string;
18
+ reducedMotion: string;
19
+ allowMotion: string;
20
+ hover: string;
21
+ }, {
22
+ colors: {
23
+ textForeground: any;
24
+ textSubtle: any;
25
+ textPlaceholder: any;
26
+ background: any;
27
+ backgroundAccent: any;
28
+ tonal50: any;
29
+ tonal100: any;
30
+ tonal200: any;
31
+ tonal300: any;
32
+ tonal400: any;
33
+ tonal500: any;
34
+ tonal600: any;
35
+ alpha100: any;
36
+ alpha150: any;
37
+ alpha200: any;
38
+ alpha250: any;
39
+ alpha600: any;
40
+ primaryLight: any;
41
+ primary: any;
42
+ primaryMid: any;
43
+ primaryDark: any;
44
+ secondary: any;
45
+ brandRed: any;
46
+ brandRedAccent: any;
47
+ brandGreen: any;
48
+ brandGreenAccent: any;
49
+ brandPurple: any;
50
+ brandPurpleAccent: any;
51
+ brandYellow: any;
52
+ brandYellowAccent: any;
53
+ successLight: any;
54
+ success: any;
55
+ successMid: any;
56
+ successDark: any;
57
+ dangerLight: any;
58
+ danger: any;
59
+ dangerMid: any;
60
+ dangerDark: any;
61
+ warningLight: any;
62
+ warning: any;
63
+ warningMid: any;
64
+ warningDark: any;
65
+ subjectEnglish: any;
66
+ subjectMaths: any;
67
+ subjectScience: any;
68
+ subjectVerbalReasoning: any;
69
+ subjectNonVerbalReasoning: any;
70
+ subjectCreativeWriting: any;
71
+ subjectExamSkills: any;
72
+ };
73
+ space: {
74
+ "0": any;
75
+ "1": any;
76
+ "2": any;
77
+ "3": any;
78
+ "4": any;
79
+ "5": any;
80
+ "6": any;
81
+ "7": any;
82
+ "8": any;
83
+ "9": any;
84
+ };
85
+ fontSizes: {
86
+ xs: any;
87
+ sm: any;
88
+ md: any;
89
+ lg: any;
90
+ xl: any;
91
+ "2xl": any;
92
+ "3xl": any;
93
+ "4xl": any;
94
+ };
95
+ fonts: {
96
+ sans: any;
97
+ mono: any;
98
+ display: any;
99
+ body: any;
100
+ };
101
+ sizes: {
102
+ "0": any;
103
+ "1": any;
104
+ "2": any;
105
+ "3": any;
106
+ "4": any;
107
+ "5": any;
108
+ "6": any;
109
+ "7": any;
110
+ "8": any;
111
+ };
112
+ radii: {
113
+ "0": any;
114
+ "1": any;
115
+ "2": any;
116
+ "3": any;
117
+ round: any;
118
+ };
119
+ shadows: {
120
+ "0": any;
121
+ "1": any;
122
+ "2": any;
123
+ "3": any;
124
+ };
125
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
126
+ bg: (value: {
127
+ readonly [$$PropertyValue]: "background";
128
+ }) => {
129
+ background: {
130
+ readonly [$$PropertyValue]: "background";
131
+ };
132
+ };
133
+ inset: (value: string | number | {
134
+ readonly [$$ScaleValue]: "space";
135
+ }) => {
136
+ top: string | number | {
137
+ readonly [$$ScaleValue]: "space";
138
+ };
139
+ right: string | number | {
140
+ readonly [$$ScaleValue]: "space";
141
+ };
142
+ bottom: string | number | {
143
+ readonly [$$ScaleValue]: "space";
144
+ };
145
+ left: string | number | {
146
+ readonly [$$ScaleValue]: "space";
147
+ };
148
+ };
149
+ size: (value: string | number | {
150
+ readonly [$$ScaleValue]: "size";
151
+ }) => {
152
+ height: string | number | {
153
+ readonly [$$ScaleValue]: "size";
154
+ };
155
+ width: string | number | {
156
+ readonly [$$ScaleValue]: "size";
157
+ };
158
+ };
159
+ p: (value: string | number | {
160
+ readonly [$$ScaleValue]: "space";
161
+ }) => {
162
+ padding: string | number | {
163
+ readonly [$$ScaleValue]: "space";
164
+ };
165
+ };
166
+ pt: (value: string | number | {
167
+ readonly [$$ScaleValue]: "space";
168
+ }) => {
169
+ paddingTop: string | number | {
170
+ readonly [$$ScaleValue]: "space";
171
+ };
172
+ };
173
+ pr: (value: string | number | {
174
+ readonly [$$ScaleValue]: "space";
175
+ }) => {
176
+ paddingRight: string | number | {
177
+ readonly [$$ScaleValue]: "space";
178
+ };
179
+ };
180
+ pb: (value: string | number | {
181
+ readonly [$$ScaleValue]: "space";
182
+ }) => {
183
+ paddingBottom: string | number | {
184
+ readonly [$$ScaleValue]: "space";
185
+ };
186
+ };
187
+ pl: (value: string | number | {
188
+ readonly [$$ScaleValue]: "space";
189
+ }) => {
190
+ paddingLeft: string | number | {
191
+ readonly [$$ScaleValue]: "space";
192
+ };
193
+ };
194
+ px: (value: string | number | {
195
+ readonly [$$ScaleValue]: "space";
196
+ }) => {
197
+ paddingLeft: string | number | {
198
+ readonly [$$ScaleValue]: "space";
199
+ };
200
+ paddingRight: string | number | {
201
+ readonly [$$ScaleValue]: "space";
202
+ };
203
+ };
204
+ py: (value: string | number | {
205
+ readonly [$$ScaleValue]: "space";
206
+ }) => {
207
+ paddingTop: string | number | {
208
+ readonly [$$ScaleValue]: "space";
209
+ };
210
+ paddingBottom: string | number | {
211
+ readonly [$$ScaleValue]: "space";
212
+ };
213
+ };
214
+ m: (value: string | number | {
215
+ readonly [$$ScaleValue]: "space";
216
+ }) => {
217
+ margin: string | number | {
218
+ readonly [$$ScaleValue]: "space";
219
+ };
220
+ };
221
+ mt: (value: string | number | {
222
+ readonly [$$ScaleValue]: "space";
223
+ }) => {
224
+ marginTop: string | number | {
225
+ readonly [$$ScaleValue]: "space";
226
+ };
227
+ };
228
+ mr: (value: string | number | {
229
+ readonly [$$ScaleValue]: "space";
230
+ }) => {
231
+ marginRight: string | number | {
232
+ readonly [$$ScaleValue]: "space";
233
+ };
234
+ };
235
+ mb: (value: string | number | {
236
+ readonly [$$ScaleValue]: "space";
237
+ }) => {
238
+ marginBottom: string | number | {
239
+ readonly [$$ScaleValue]: "space";
240
+ };
241
+ };
242
+ ml: (value: string | number | {
243
+ readonly [$$ScaleValue]: "space";
244
+ }) => {
245
+ marginLeft: string | number | {
246
+ readonly [$$ScaleValue]: "space";
247
+ };
248
+ };
249
+ mx: (value: string | number | {
250
+ readonly [$$ScaleValue]: "space";
251
+ }) => {
252
+ marginLeft: string | number | {
253
+ readonly [$$ScaleValue]: "space";
254
+ };
255
+ marginRight: string | number | {
256
+ readonly [$$ScaleValue]: "space";
257
+ };
258
+ };
259
+ my: (value: string | number | {
260
+ readonly [$$ScaleValue]: "space";
261
+ }) => {
262
+ marginTop: string | number | {
263
+ readonly [$$ScaleValue]: "space";
264
+ };
265
+ marginBottom: string | number | {
266
+ readonly [$$ScaleValue]: "space";
267
+ };
268
+ };
269
+ }>>;
@@ -0,0 +1 @@
1
+ import{styled as o}from"../../stitches.js";const r=o("button",{bg:"transparent",border:"none",borderRadius:"$round",color:"$tonal900",cursor:"pointer",fontFamily:"$body",fontSize:"$sm",size:"$3",p:0,transition:"all 75ms","&:hover":{bg:"$tonal100"},"&:active":{color:"white",bg:"$primary"},"&:focus":{outline:"2px solid $primary",outlineOffset:"2px"},variants:{isSelected:{true:{bg:"$primary",color:"white","&:hover":{bg:"$primary"}}},isToday:{true:{bg:"$tonal100"}},isOutsideMonth:{true:{color:"$tonal200"}}}});export{r as Day};
@@ -0,0 +1,2 @@
1
+ export declare const monthNamesShort: string[];
2
+ export declare const weekdayNamesShort: string[];
@@ -0,0 +1 @@
1
+ const e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],u=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];export{e as monthNamesShort,u as weekdayNamesShort};
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import { DateInputProps } from '../../components/date-input';
3
+ import { ValidationOptions } from '../../components/form';
4
+ import type { CSS } from '../../stitches';
5
+ declare type DateFieldProps = DateInputProps & {
6
+ css?: CSS;
7
+ description?: string;
8
+ label: string;
9
+ name: string;
10
+ prompt?: {
11
+ link: string;
12
+ label: string;
13
+ };
14
+ validation?: ValidationOptions;
15
+ };
16
+ export declare const DateField: React.FC<DateFieldProps>;
17
+ export {};
@@ -0,0 +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{DateInput as t}from"../date-input/DateInput.js";import{FieldWrapper as i}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as p}from"../form/useFieldError.js";const a=a=>{let{css:n,label:l,name:s,validation:m,prompt:d,description:f}=a,c=function(r,e){if(null==r)return{};var o,t,i={},p=Object.keys(r);for(t=0;t<p.length;t++)o=p[t],e.indexOf(o)>=0||(i[o]=r[o]);return i}(a,r);const{register:u,trigger:j}=o(),{error:b}=p(s),g=m?u(m):u;return e(i,{css:n,description:f,error:b,fieldId:s,label:l,prompt:d,required:Boolean(null==m?void 0:m.required)},e(t,Object.assign({id:s,name:s,ref:g},b&&{state:"error"},c,{revalidate:j})))};a.displayName="DateField";export{a as DateField};
@@ -0,0 +1 @@
1
+ export { DateField } from './DateField';
@@ -0,0 +1,17 @@
1
+ import type { Props as DayzedInterface } from 'dayzed';
2
+ import * as React from 'react';
3
+ import { CalendarTranslationProps } from '../calendar/Calendar';
4
+ export declare type DateInputProps = DayzedInterface & CalendarTranslationProps & {
5
+ initialDate?: Date;
6
+ dateFormat?: string;
7
+ disabled?: boolean;
8
+ size?: 'sm' | 'md';
9
+ revalidate?: () => Promise<boolean>;
10
+ };
11
+ export declare const DateInput: React.ForwardRefExoticComponent<DayzedInterface & CalendarTranslationProps & {
12
+ initialDate?: Date | undefined;
13
+ dateFormat?: string | undefined;
14
+ disabled?: boolean | undefined;
15
+ size?: "sm" | "md" | undefined;
16
+ revalidate?: (() => Promise<boolean>) | undefined;
17
+ } & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ const e=["initialDate","dateFormat","firstDayOfWeek","disabled","monthNames","weekdayNames","size","labels","revalidate"];import{CalendarEvent as t}from"@atom-learning/icons";import{forwardRef as a,useState as o,useRef as n,createElement as s}from"react";import{ActionIcon as r}from"../action-icon/ActionIcon.js";import{Box as i}from"../box/Box.js";import{Calendar as l}from"../calendar/Calendar.js";import{Icon as m}from"../icon/Icon.js";import{Input as d}from"../input/Input.js";import{Popover as p}from"../popover/Popover.js";import{DEFAULT_DATE_FORMAT as c}from"./constants.js";import{useDate as u}from"./use-date.js";const f=a(((a,f)=>{let{initialDate:b,dateFormat:g=c,firstDayOfWeek:h=1,disabled:v,monthNames:D,weekdayNames:j,size:y="md",labels:O={open:"Open calendar",next:"Next month",previous:"Previous month"},revalidate:N}=a,k=function(e,t){if(null==e)return{};var a,o,n={},s=Object.keys(e);for(o=0;o<s.length;o++)a=s[o],t.indexOf(a)>=0||(n[a]=e[a]);return n}(a,e);const{date:w,dateString:x,setDate:z}=u(b,g),[C,I]=o(!1),F=n(null),S=n(null);return s(i,{css:{position:"relative"}},s(d,Object.assign({name:"date",disabled:v,size:y},k,{onChange:e=>z(e.target.value,!0),value:x,ref:f})),s(p,{modal:!0,open:C,onOpenChange:I},s(p.Trigger,{asChild:!0},s(r,{css:{position:"absolute",top:0,right:0},disabled:v,label:O.open,size:"sm"===y?"md":"lg",theme:"neutral"},s(m,{size:"sm",is:t}))),s(p.Content,{css:{pr:"$sizes$2"},side:"bottom",align:"end",showCloseButton:!1,onOpenAutoFocus:e=>{var t,a;(e.preventDefault(),w)?null==(t=S.current)||t.focus():null==(a=F.current)||a.focus()}},s(l,{date:w||new Date,selected:w,onDateSelected:async e=>{I(!1),await z(e.date,!1),N&&N()},refDateToday:F,refDateSelected:S,firstDayOfWeek:h,monthNames:D,weekdayNames:j,labels:O}))))}));f.displayName="DateInput";export{f as DateInput};
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_DATE_FORMAT = "DD/MM/YYYY";
@@ -0,0 +1 @@
1
+ const Y="DD/MM/YYYY";export{Y as DEFAULT_DATE_FORMAT};
@@ -0,0 +1 @@
1
+ export * from './DateInput';
@@ -0,0 +1,5 @@
1
+ export declare const useDate: (initialDate: Date | undefined, dateFormat?: string) => {
2
+ dateString: string;
3
+ date: Date | undefined;
4
+ setDate: (inputDate: Date | string, isDateString: boolean) => void;
5
+ };
@@ -0,0 +1 @@
1
+ import t from"dayjs";import o from"dayjs/plugin/customParseFormat";import{useState as r}from"react";import{DEFAULT_DATE_FORMAT as a}from"./constants.js";t.extend(o);const e=(o,e=a)=>{const[m,s]=r(o?t(o).toDate():void 0),[i,n]=r(o?t(o).format(e):"");return{dateString:i,date:m,setDate:(o,r=!1)=>{const a=r?t(o,e):t(o);s(a.isValid()?a.toDate():void 0),n(r?o:a.format(e))}}};export{e as useDate};
@@ -268,6 +268,7 @@ declare const StyledDialogContent: import("@stitches/react/types/styled-componen
268
268
  }>>;
269
269
  declare type DialogContentProps = React.ComponentProps<typeof StyledDialogContent> & {
270
270
  closeDialogText?: string;
271
+ showCloseButton?: boolean;
271
272
  };
272
273
  export declare const DialogContent: React.FC<DialogContentProps>;
273
274
  export {};
@@ -1 +1 @@
1
- const t=["size","children","closeDialogText"];import{Close as o}from"@atom-learning/icons";import{Overlay as i,Content as e,Close as a}from"@radix-ui/react-dialog";import{createElement as s,Fragment as r}from"react";import{keyframes as n,styled as l}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"polished";import{fadeIn as m,fadeOut as d}from"../../utilities/style/keyframe-animations.js";import{ActionIcon as c}from"../action-icon/ActionIcon.js";import{Icon as p}from"../icon/Icon.js";const f=n({"0%":{transform:"translate3d(-50%, 50vh, 0)"},"100%":{transform:"translate3d(-50%, -50%, 0)"}}),u=n({"0%":{transform:"translate3d(-50%, -50%, 0)"},"100%":{transform:"translate3d(-50%, 50vh, 0)"}}),h=l(i,{backgroundColor:"$alpha600",inset:0,position:"fixed","@allowMotion":{'&[data-state="open"]':{animation:`${m} 250ms ease-out`},'&[data-state="closed"]':{animation:`${d} 550ms ease-out`}}}),x=l(e,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",p:"$5",position:"fixed",top:"50%",transform:"translate3d(-50%, -50%, 0)","&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${f} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${u} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{xs:{width:"380px"},sm:{width:"480px"},md:{width:"600px"},lg:{width:"800px"},xl:{width:"1100px"}}}}),b=i=>{let{size:e="sm",children:n,closeDialogText:l="Close dialog"}=i,m=function(t,o){if(null==t)return{};var i,e,a={},s=Object.keys(t);for(e=0;e<s.length;e++)i=s[e],o.indexOf(i)>=0||(a[i]=t[i]);return a}(i,t);return s(r,null,s(h,null),s(x,Object.assign({size:e},m),s(c,{as:a,css:{position:"absolute",right:"$4",top:"$4"},label:l,size:"lg",theme:"neutral"},s(p,{is:o})),n))};export{b as DialogContent};
1
+ const t=["size","children","closeDialogText","showCloseButton"];import{Close as o}from"@atom-learning/icons";import{Overlay as i,Content as e,Close as s}from"@radix-ui/react-dialog";import{createElement as a,Fragment as r}from"react";import{keyframes as n,styled as l}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"polished";import{fadeIn as m,fadeOut as d}from"../../utilities/style/keyframe-animations.js";import{ActionIcon as c}from"../action-icon/ActionIcon.js";import{Icon as p}from"../icon/Icon.js";const u=n({"0%":{transform:"translate3d(-50%, 50vh, 0)"},"100%":{transform:"translate3d(-50%, -50%, 0)"}}),f=n({"0%":{transform:"translate3d(-50%, -50%, 0)"},"100%":{transform:"translate3d(-50%, 50vh, 0)"}}),h=l(i,{backgroundColor:"$alpha600",inset:0,position:"fixed","@allowMotion":{'&[data-state="open"]':{animation:`${m} 250ms ease-out`},'&[data-state="closed"]':{animation:`${d} 550ms ease-out`}}}),x=l(e,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",p:"$5",position:"fixed",top:"50%",transform:"translate3d(-50%, -50%, 0)","&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${u} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${f} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{xs:{width:"380px"},sm:{width:"480px"},md:{width:"600px"},lg:{width:"800px"},xl:{width:"1100px"}}}}),b=i=>{let{size:e="sm",children:n,closeDialogText:l="Close dialog",showCloseButton:m=!0}=i,d=function(t,o){if(null==t)return{};var i,e,s={},a=Object.keys(t);for(e=0;e<a.length;e++)i=a[e],o.indexOf(i)>=0||(s[i]=t[i]);return s}(i,t);return a(r,null,a(h,null),a(x,Object.assign({size:e},d),m&&a(c,{as:s,css:{position:"absolute",right:"$4",top:"$4"},label:l,size:"lg",theme:"neutral"},a(p,{is:o})),n))};export{b as DialogContent};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { UseFormMethods } from 'react-hook-form';
2
+ import type { UseFormMethods, Mode } from 'react-hook-form';
3
3
  export declare enum StorageEnum {
4
4
  LOCAL = "local",
5
5
  SESSION = "session"
@@ -32,7 +32,7 @@ export declare type FormValues = {
32
32
  [key: string]: string | number;
33
33
  };
34
34
  onSubmit: (data: any) => void | any;
35
- validationMode?: 'onBlur' | 'onSubmit';
35
+ validationMode?: Mode;
36
36
  persist?: PersistOptions;
37
37
  } & ({
38
38
  children: React.ReactNode;
@@ -9,6 +9,8 @@ export { Checkbox } from './checkbox';
9
9
  export { CheckboxField } from './checkbox-field';
10
10
  export { Combobox } from './combobox';
11
11
  export { Dialog } from './dialog';
12
+ export { DateInput } from './date-input';
13
+ export { DateField } from './date-field';
12
14
  export { Divider } from './divider';
13
15
  export { DropdownMenu } from './dropdown-menu';
14
16
  export { FieldWrapper, InlineFieldWrapper } from './field-wrapper';
@@ -25,16 +27,19 @@ export { Link, StyledLink } from './link';
25
27
  export { List } from './list';
26
28
  export { Loader } from './loader';
27
29
  export { MarkdownContent } from './markdown-content';
30
+ export { NotificationBadge } from './notification-badge';
28
31
  export { PasswordField } from './password-field';
29
32
  export { PasswordInput } from './password-input';
30
33
  export { Popover } from './popover';
31
34
  export { ProgressBar } from './progress-bar';
32
35
  export { RadioButton, RadioButtonGroup } from './radio-button';
33
- export { RadioCard, RadioCardGroup } from './radio-card';
34
36
  export { RadioButtonField } from './radio-button-field';
37
+ export { RadioCard, RadioCardGroup } from './radio-card';
35
38
  export { SearchInput } from './search-input';
36
39
  export { Select } from './select';
37
40
  export { SelectField } from './select-field';
41
+ export { Slider } from './slider';
42
+ export { SliderField } from './slider-field';
38
43
  export { Stack } from './stack';
39
44
  export { StackContent } from './stack-content';
40
45
  export { Switch } from './switch';