@atom-learning/components 1.24.2 → 2.1.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 (120) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/dist/components/accordion/Accordion.d.ts +1 -0
  3. package/dist/components/accordion/AccordionContent.d.ts +1 -0
  4. package/dist/components/accordion/AccordionItem.d.ts +1 -0
  5. package/dist/components/accordion/AccordionTrigger.d.ts +1 -0
  6. package/dist/components/action-icon/ActionIcon.constants.d.ts +6 -0
  7. package/dist/components/action-icon/ActionIcon.constants.js +1 -0
  8. package/dist/components/action-icon/ActionIcon.d.ts +2 -1
  9. package/dist/components/action-icon/ActionIcon.js +1 -1
  10. package/dist/components/alert-dialog/AlertDialog.d.ts +1 -0
  11. package/dist/components/alert-dialog/AlertDialogContent.d.ts +1 -0
  12. package/dist/components/badge/Badge.d.ts +2 -0
  13. package/dist/components/box/Box.d.ts +1 -0
  14. package/dist/components/button/Button.d.ts +1 -0
  15. package/dist/components/calendar/Calendar.js +1 -1
  16. package/dist/components/calendar/Day.d.ts +1 -0
  17. package/dist/components/carousel/CarouselPagination.d.ts +1 -0
  18. package/dist/components/carousel/CarouselSlide.d.ts +1 -0
  19. package/dist/components/carousel/CarouselSlider.d.ts +1 -0
  20. package/dist/components/checkbox/Checkbox.d.ts +1 -0
  21. package/dist/components/combobox/Combobox.d.ts +1 -0
  22. package/dist/components/combobox/ComboboxInput.d.ts +1 -0
  23. package/dist/components/combobox/ComboboxList.d.ts +1 -0
  24. package/dist/components/combobox/ComboboxOption.d.ts +1 -0
  25. package/dist/components/combobox/ComboboxPopover.d.ts +1 -0
  26. package/dist/components/date-input/DateInput.js +1 -1
  27. package/dist/components/dialog/Dialog.d.ts +1 -0
  28. package/dist/components/dialog/DialogBackground.d.ts +2 -0
  29. package/dist/components/dialog/DialogClose.d.ts +1 -0
  30. package/dist/components/dialog/DialogContent.d.ts +1 -0
  31. package/dist/components/dialog/DialogContent.js +1 -1
  32. package/dist/components/divider/Divider.d.ts +1 -0
  33. package/dist/components/dropdown-menu/DropdownMenu.d.ts +1 -0
  34. package/dist/components/dropdown-menu/DropdownMenuContent.d.ts +1 -0
  35. package/dist/components/dropdown-menu/DropdownMenuItem.d.ts +1 -0
  36. package/dist/components/dropdown-menu/DropdownMenuSeparator.d.ts +1 -0
  37. package/dist/components/dropdown-menu/DropdownMenuTrigger.d.ts +1 -0
  38. package/dist/components/empty-state/EmptyState.d.ts +2 -0
  39. package/dist/components/empty-state/EmptyStateBody.d.ts +2 -0
  40. package/dist/components/empty-state/EmptyStateImage.d.ts +2 -0
  41. package/dist/components/empty-state/EmptyStateTitle.d.ts +1 -0
  42. package/dist/components/field-wrapper/FieldWrapper.js +1 -1
  43. package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
  44. package/dist/components/flex/Flex.d.ts +1 -0
  45. package/dist/components/form/Form.d.ts +1 -0
  46. package/dist/components/grid/Grid.d.ts +1 -0
  47. package/dist/components/heading/Heading.d.ts +1 -0
  48. package/dist/components/icon/Icon.d.ts +1 -0
  49. package/dist/components/image/Image.d.ts +1 -0
  50. package/dist/components/index.d.ts +1 -1
  51. package/dist/components/inline-message/InlineMessage.config.d.ts +5 -0
  52. package/dist/components/inline-message/InlineMessage.config.js +1 -0
  53. package/dist/components/inline-message/InlineMessage.d.ts +541 -0
  54. package/dist/components/inline-message/InlineMessage.js +1 -0
  55. package/dist/components/inline-message/InlineMessage.types.d.ts +1 -0
  56. package/dist/components/inline-message/index.d.ts +1 -0
  57. package/dist/components/input/Input.d.ts +1 -0
  58. package/dist/components/label/Label.d.ts +1 -0
  59. package/dist/components/link/Link.d.ts +1 -0
  60. package/dist/components/list/List.d.ts +2 -0
  61. package/dist/components/notification-badge/NotificationBadge.d.ts +2 -0
  62. package/dist/components/password-input/PasswordInput.js +1 -1
  63. package/dist/components/popover/Popover.d.ts +1 -0
  64. package/dist/components/popover/PopoverContent.d.ts +1 -0
  65. package/dist/components/popover/PopoverContent.js +1 -1
  66. package/dist/components/progress-bar/ProgressBar.d.ts +1 -0
  67. package/dist/components/radio-button/RadioButton.d.ts +1 -0
  68. package/dist/components/radio-button/RadioButtonGroup.d.ts +1 -0
  69. package/dist/components/radio-button-field/RadioButtonField.js +1 -1
  70. package/dist/components/radio-card/RadioCard.d.ts +1 -0
  71. package/dist/components/search-input/SearchInput.js +1 -1
  72. package/dist/components/select/Select.d.ts +1 -0
  73. package/dist/components/slider/Slider.d.ts +1 -0
  74. package/dist/components/stack/Stack.d.ts +1 -0
  75. package/dist/components/stack-content/StackContent.d.ts +1 -0
  76. package/dist/components/stepper/StepperStepBullet.d.ts +2 -0
  77. package/dist/components/stepper/StepperStepContainer.d.ts +2 -0
  78. package/dist/components/stepper/StepperStepLabel.d.ts +2 -0
  79. package/dist/components/switch/Switch.d.ts +1 -0
  80. package/dist/components/table/Table.d.ts +1 -0
  81. package/dist/components/table/TableBody.d.ts +1 -0
  82. package/dist/components/table/TableCell.d.ts +1 -0
  83. package/dist/components/table/TableFooter.d.ts +1 -0
  84. package/dist/components/table/TableFooterCell.d.ts +1 -0
  85. package/dist/components/table/TableHeader.d.ts +1 -0
  86. package/dist/components/table/TableHeaderCell.d.ts +1 -0
  87. package/dist/components/table/TableRow.d.ts +1 -0
  88. package/dist/components/tabs/TabTrigger.d.ts +1 -0
  89. package/dist/components/tabs/Tabs.d.ts +2 -0
  90. package/dist/components/tabs/TabsTriggerList.d.ts +1 -0
  91. package/dist/components/tabs/TabsTriggerList.js +1 -1
  92. package/dist/components/text/Text.d.ts +1 -0
  93. package/dist/components/textarea/Textarea.d.ts +1 -0
  94. package/dist/components/toast/Toast.d.ts +1 -0
  95. package/dist/components/toggle-group/ToggleGroupButton.d.ts +2 -0
  96. package/dist/components/toggle-group/ToggleGroupItem.d.ts +2 -0
  97. package/dist/components/toggle-group/ToggleGroupRoot.d.ts +1 -0
  98. package/dist/components/toggle-group/index.d.ts +5 -0
  99. package/dist/components/tooltip/TooltipContent.d.ts +1 -0
  100. package/dist/components/video/Video.d.ts +2 -0
  101. package/dist/docgen.json +1 -1
  102. package/dist/docs/ActionIcon.mdx +13 -19
  103. package/dist/docs/CheckboxField.mdx +1 -1
  104. package/dist/docs/DateField.mdx +2 -2
  105. package/dist/docs/FieldWrapper.mdx +1 -1
  106. package/dist/docs/Form.mdx +3 -3
  107. package/dist/docs/Icon.mdx +1 -1
  108. package/dist/docs/InlineMessage.mdx +52 -0
  109. package/dist/docs/InputField.mdx +2 -2
  110. package/dist/docs/RadioButtonField.mdx +2 -2
  111. package/dist/docs/SelectField.mdx +2 -2
  112. package/dist/docs/TextareaField.mdx +1 -1
  113. package/dist/index.cjs.js +1 -1
  114. package/dist/index.js +1 -1
  115. package/dist/stitches.d.ts +10 -0
  116. package/package.json +3 -2
  117. package/dist/components/validation-error/ValidationError.d.ts +0 -7
  118. package/dist/components/validation-error/ValidationError.js +0 -1
  119. package/dist/components/validation-error/index.d.ts +0 -1
  120. package/dist/docs/ValidationError.mdx +0 -12
package/CHANGELOG.md CHANGED
@@ -1,9 +1,9 @@
1
- ## [1.24.2](https://github.com/Atom-Learning/components/compare/v1.24.1...v1.24.2) (2022-09-06)
1
+ # [2.1.0](https://github.com/Atom-Learning/components/compare/v2.0.0...v2.1.0) (2022-09-09)
2
2
 
3
3
 
4
- ### Bug Fixes
4
+ ### Features
5
5
 
6
- * add checkbox indeterminate state example ([a40eeab](https://github.com/Atom-Learning/components/commit/a40eeab88752e4a3bb0bb01f0244c2474b11fed2))
6
+ * inline message ([e973432](https://github.com/Atom-Learning/components/commit/e97343211f5ed65a53d3b82bba5157b3854161a5))
7
7
 
8
8
  # [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
9
9
 
@@ -62,6 +62,7 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
62
62
  warning: any;
63
63
  warningMid: any;
64
64
  warningDark: any;
65
+ warningText: any;
65
66
  subjectEnglish: any;
66
67
  subjectMaths: any;
67
68
  subjectScience: any;
@@ -59,6 +59,7 @@ declare const StyledContent: import("@stitches/react/types/styled-component").St
59
59
  warning: any;
60
60
  warningMid: any;
61
61
  warningDark: any;
62
+ warningText: any;
62
63
  subjectEnglish: any;
63
64
  subjectMaths: any;
64
65
  subjectScience: any;
@@ -59,6 +59,7 @@ declare const StyledItem: import("@stitches/react/types/styled-component").Style
59
59
  warning: any;
60
60
  warningMid: any;
61
61
  warningDark: any;
62
+ warningText: any;
62
63
  subjectEnglish: any;
63
64
  subjectMaths: any;
64
65
  subjectScience: any;
@@ -61,6 +61,7 @@ declare const StyledTrigger: import("@stitches/react/types/styled-component").St
61
61
  warning: any;
62
62
  warningMid: any;
63
63
  warningDark: any;
64
+ warningText: any;
64
65
  subjectEnglish: any;
65
66
  subjectMaths: any;
66
67
  subjectScience: any;
@@ -0,0 +1,6 @@
1
+ export declare const ActionIconSizeMap: {
2
+ xs: string;
3
+ sm: string;
4
+ md: string;
5
+ lg: string;
6
+ };
@@ -0,0 +1 @@
1
+ const m={xs:"sm",sm:"sm",md:"md",lg:"lg"};export{m as ActionIconSizeMap};
@@ -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" | "xl" | undefined;
8
+ size?: "sm" | "md" | "lg" | "xs" | undefined;
9
9
  isRounded?: boolean | "true" | undefined;
10
10
  }, {
11
11
  sm: string;
@@ -67,6 +67,7 @@ declare const StyledButton: import("@stitches/react/types/styled-component").Sty
67
67
  warning: any;
68
68
  warningMid: any;
69
69
  warningDark: any;
70
+ warningText: any;
70
71
  subjectEnglish: any;
71
72
  subjectMaths: any;
72
73
  subjectScience: any;
@@ -1 +1 @@
1
- import{darken as i}from"color2k";import g from"invariant";import*as n from"react";import{styled as D,theme as o}from"../../stitches.js";import{Icon as m}from"../icon/Icon.js";const c=(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"}}),l=(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"}}),p=(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"}}),w=D("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:c("$tonal300","$primaryMid","$primaryDark")},{theme:"primary",appearance:"simple",css:c("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"simple",css:c("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"simple",css:c("$success","$successMid","$successDark")},{theme:"warning",appearance:"simple",css:c("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"simple",css:c("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"solid",css:l("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"solid",css:l("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"solid",css:l("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:l("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"solid",css:l("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"outline",css:p("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"outline",css:p("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"outline",css:p("$success","$successMid","$successDark")},{theme:"warning",appearance:"outline",css:p("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"outline",css:p("$danger","$dangerMid","$dangerDark")}]}),t=n.forwardRef(({children:e,theme:r="primary",appearance:a="simple",size:u="md",label:h,href:$,disabled:d,...b},k)=>{const y=`A single ${m.displayName} component is permitted as a child of ${t.displayName}`;return g(n.Children.count(e)===1,y),n.createElement(w,{...b,...$?{as:"a",href:d?null:$,onClick:void 0,"aria-disabled":!!d}:{type:"button"},"aria-label":h,theme:r,appearance:a,size:u,ref:k,disabled:d},n.Children.map(e,s=>{if(!n.isValidElement(s))throw new Error(y);return g(s.type===m,`Children of type ${s==null?void 0:s.type} aren't permitted. Only an ${m.displayName} component is allowed in ${t.displayName}`),n.cloneElement(s,{css:{size:["lg","xl"].includes(u)?20:16,...s.props.css?s.props.css:{}}})}))});t.displayName="ActionIcon";export{t as ActionIcon};
1
+ import{darken as i}from"color2k";import g from"invariant";import*as o from"react";import{styled as D,theme as n}from"../../stitches.js";import{ActionIconSizeMap as w}from"./ActionIcon.constants.js";import{Icon as m}from"../icon/Icon.js";const c=(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"}}),l=(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"}}),p=(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"}}),f=D("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:{xs:{size:"$2"},sm:{size:"$3"},md:{size:"$4"},lg:{size:"$5"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"neutral",appearance:"simple",css:c("$tonal300","$primaryMid","$primaryDark")},{theme:"primary",appearance:"simple",css:c("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"simple",css:c("$primaryDark",i(n.colors.primaryDark.value,.1),i(n.colors.primaryDark.value,.15))},{theme:"success",appearance:"simple",css:c("$success","$successMid","$successDark")},{theme:"warning",appearance:"simple",css:c("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"simple",css:c("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"solid",css:l("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"solid",css:l("$primaryDark",i(n.colors.primaryDark.value,.1),i(n.colors.primaryDark.value,.15))},{theme:"success",appearance:"solid",css:l("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:l("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"solid",css:l("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"outline",css:p("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"outline",css:p("$primaryDark",i(n.colors.primaryDark.value,.1),i(n.colors.primaryDark.value,.15))},{theme:"success",appearance:"outline",css:p("$success","$successMid","$successDark")},{theme:"warning",appearance:"outline",css:p("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"outline",css:p("$danger","$dangerMid","$dangerDark")}]}),t=o.forwardRef(({children:e,theme:r="primary",appearance:a="simple",size:$="sm",label:b,href:u,disabled:d,...h},k)=>{const y=`A single ${m.displayName} component is permitted as a child of ${t.displayName}`;return g(o.Children.count(e)===1,y),o.createElement(f,{...h,...u?{as:"a",href:d?null:u,onClick:void 0,"aria-disabled":!!d}:{type:"button"},"aria-label":b,theme:r,appearance:a,size:$,ref:k,disabled:d},o.Children.map(e,s=>{if(!o.isValidElement(s))throw new Error(y);return g(s.type===m,`Children of type ${s==null?void 0:s.type} aren't permitted. Only an ${m.displayName} component is allowed in ${t.displayName}`),o.cloneElement(s,{size:w[$],css:{...s.props.css?s.props.css:{}}})}))});t.displayName="ActionIcon";export{t as ActionIcon};
@@ -61,6 +61,7 @@ declare const StyledAlertDialog: import("@stitches/react/types/styled-component"
61
61
  warning: any;
62
62
  warningMid: any;
63
63
  warningDark: any;
64
+ warningText: any;
64
65
  subjectEnglish: any;
65
66
  subjectMaths: any;
66
67
  subjectScience: any;
@@ -61,6 +61,7 @@ declare const StyledAlertDialogContent: import("@stitches/react/types/styled-com
61
61
  warning: any;
62
62
  warningMid: any;
63
63
  warningDark: any;
64
+ warningText: any;
64
65
  subjectEnglish: any;
65
66
  subjectMaths: any;
66
67
  subjectScience: any;
@@ -59,6 +59,7 @@ declare const StyledBadge: import("@stitches/react/types/styled-component").Styl
59
59
  warning: any;
60
60
  warningMid: any;
61
61
  warningDark: any;
62
+ warningText: any;
62
63
  subjectEnglish: any;
63
64
  subjectMaths: any;
64
65
  subjectScience: any;
@@ -326,6 +327,7 @@ declare const StyledBadge: import("@stitches/react/types/styled-component").Styl
326
327
  warning: any;
327
328
  warningMid: any;
328
329
  warningDark: any;
330
+ warningText: any;
329
331
  subjectEnglish: any;
330
332
  subjectMaths: any;
331
333
  subjectScience: any;
@@ -58,6 +58,7 @@ export declare const Box: import("@stitches/react/types/styled-component").Style
58
58
  warning: any;
59
59
  warningMid: any;
60
60
  warningDark: any;
61
+ warningText: any;
61
62
  subjectEnglish: any;
62
63
  subjectMaths: any;
63
64
  subjectScience: any;
@@ -69,6 +69,7 @@ export declare const StyledButton: import("@stitches/react/types/styled-componen
69
69
  warning: any;
70
70
  warningMid: any;
71
71
  warningDark: any;
72
+ warningText: any;
72
73
  subjectEnglish: any;
73
74
  subjectMaths: any;
74
75
  subjectScience: any;
@@ -1 +1 @@
1
- import{ChevronLeft as q,ChevronRight as H}from"@atom-learning/icons";import{useDayzed as J}from"dayzed";import*as e from"react";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Box as h}from"../box/Box.js";import{Flex as C}from"../flex/Flex.js";import{Icon as Y}from"../icon/Icon.js";import{Text as K}from"../text/Text.js";import{Button as w}from"../button/Button.js";import{styled as F}from"../../stitches.js";import{monthNamesShort as Q,weekdayNamesShort as V,DEFAULT_LABELS as X}from"./constants.js";import{Day as Z}from"./Day.js";const g=F("div",{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gridGap:"$1 $2"}),ee=F(w,{color:"$tonal600",p:"$3",width:"$6",variants:{selected:{false:{color:"$tonal600 !important",fontWeight:"400","&:hover":{bg:"$tonal100 !important",color:"$tonal600 !important"},"&[disabled]":{bg:"white !important"}}}}}),te=(i,c)=>{const u=i.slice(0,c);return i.slice(c).concat(u)},S=({css:i,refDateSelected:c,refDateToday:u,firstDayOfWeek:f=0,monthNames:N=Q,weekdayNames:T=V,labels:y=X,date:o=new Date,minDate:l,maxDate:s,setYear:A,...L})=>{const[a,E]=e.useState(!1),[m,k]=e.useState(o==null?void 0:o.getFullYear()),O=t=>{const r=o;r.setFullYear(t),A(r),E(!1)},W=l&&m-16<=l.getFullYear(),z=s&&m>=s.getFullYear(),B=Array.from({length:16},(t,r)=>{const n=m-r;return s&&n>s.getFullYear()||l&&n<l.getFullYear()?0:n}),{calendars:d,getBackProps:I,getForwardProps:M,getDateProps:G}=J({firstDayOfWeek:f,showOutsideDays:!0,date:o,minDate:l,maxDate:s,...L});return d.length?e.createElement(h,{css:{position:"relative",width:"min-content",mt:"-$1",...i}},e.createElement(C,{css:{position:"absolute",top:0,right:"-$1"}},e.createElement(x,{label:y[a?"previousYear":"previous"],theme:"neutral",size:"lg",...!a&&I({calendars:d}),...a&&{onClick:()=>k(m-16)},disabled:a&&W},e.createElement(Y,{is:q})),e.createElement(x,{label:y[a?"nextYear":"next"],theme:"neutral",size:"lg",...!a&&M({calendars:d}),...a&&{onClick:()=>k(m+16)},disabled:a&&z},e.createElement(Y,{is:H}))),a&&e.createElement(g,{css:{gridTemplateColumns:"repeat(4, 1fr)",pt:"$7",direction:"rtl",gridGap:"$3 $1"}},B.map((t,r)=>{const n=t===o.getFullYear();return t?e.createElement(ee,{key:`${t}${r}`,theme:n?"primary":"neutral",isRounded:!0,onClick:()=>O(t),selected:n},t):e.createElement(h,{key:r,css:{width:"$6",height:"$4"}})})),!a&&d.map(({month:t,year:r,weeks:n})=>e.createElement(h,{key:`${t}${r}`},e.createElement(C,{css:{height:"$4",alignItems:"center",mb:"$4"}},e.createElement(w,{theme:"neutral",css:{px:"0",color:"$tonal600"},onClick:()=>E(!0)},N[t]," ",r)),e.createElement(g,{css:{mb:"$3"}},te(T,f).map(p=>e.createElement(K,{as:"span",size:"sm",key:`${t}${r}${p}`,css:{fontWeight:600,textAlign:"center"}},p))),e.createElement(g,null,n.map((p,P)=>p.map(($,R)=>{const D=`${t}${r}${P}${R}`;if(!$)return e.createElement("div",{key:D});const{date:j,selected:b,today:v,prevMonth:U,nextMonth:_}=$;return e.createElement(Z,{isOutsideMonth:U||_,isSelected:b,isToday:v,key:D,ref:b?c:v?u:null,...G({dateObj:$}),type:"button"},j.getDate())})))))):null};S.displayName="Calendar";export{S as Calendar};
1
+ import{ChevronLeft as q,ChevronRight as H}from"@atom-learning/icons";import{useDayzed as J}from"dayzed";import*as e from"react";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Box as h}from"../box/Box.js";import{Flex as C}from"../flex/Flex.js";import{Icon as Y}from"../icon/Icon.js";import{Text as K}from"../text/Text.js";import{Button as w}from"../button/Button.js";import{styled as F}from"../../stitches.js";import{monthNamesShort as Q,weekdayNamesShort as V,DEFAULT_LABELS as X}from"./constants.js";import{Day as Z}from"./Day.js";const g=F("div",{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gridGap:"$1 $2"}),ee=F(w,{color:"$tonal600",p:"$3",width:"$6",variants:{selected:{false:{color:"$tonal600 !important",fontWeight:"400","&:hover":{bg:"$tonal100 !important",color:"$tonal600 !important"},"&[disabled]":{bg:"white !important"}}}}}),te=(i,c)=>{const u=i.slice(0,c);return i.slice(c).concat(u)},S=({css:i,refDateSelected:c,refDateToday:u,firstDayOfWeek:f=0,monthNames:N=Q,weekdayNames:T=V,labels:y=X,date:o=new Date,minDate:l,maxDate:s,setYear:A,...L})=>{const[a,E]=e.useState(!1),[m,k]=e.useState(o==null?void 0:o.getFullYear()),O=t=>{const r=o;r.setFullYear(t),A(r),E(!1)},W=l&&m-16<=l.getFullYear(),z=s&&m>=s.getFullYear(),B=Array.from({length:16},(t,r)=>{const n=m-r;return s&&n>s.getFullYear()||l&&n<l.getFullYear()?0:n}),{calendars:d,getBackProps:I,getForwardProps:M,getDateProps:G}=J({firstDayOfWeek:f,showOutsideDays:!0,date:o,minDate:l,maxDate:s,...L});return d.length?e.createElement(h,{css:{position:"relative",width:"min-content",mt:"-$1",...i}},e.createElement(C,{css:{position:"absolute",top:0,right:"-$1"}},e.createElement(x,{label:y[a?"previousYear":"previous"],theme:"neutral",size:"md",...!a&&I({calendars:d}),...a&&{onClick:()=>k(m-16)},disabled:a&&W},e.createElement(Y,{is:q})),e.createElement(x,{label:y[a?"nextYear":"next"],theme:"neutral",size:"md",...!a&&M({calendars:d}),...a&&{onClick:()=>k(m+16)},disabled:a&&z},e.createElement(Y,{is:H}))),a&&e.createElement(g,{css:{gridTemplateColumns:"repeat(4, 1fr)",pt:"$7",direction:"rtl",gridGap:"$3 $1"}},B.map((t,r)=>{const n=t===o.getFullYear();return t?e.createElement(ee,{key:`${t}${r}`,theme:n?"primary":"neutral",isRounded:!0,onClick:()=>O(t),selected:n},t):e.createElement(h,{key:r,css:{width:"$6",height:"$4"}})})),!a&&d.map(({month:t,year:r,weeks:n})=>e.createElement(h,{key:`${t}${r}`},e.createElement(C,{css:{height:"$4",alignItems:"center",mb:"$4"}},e.createElement(w,{theme:"neutral",css:{px:"0",color:"$tonal600"},onClick:()=>E(!0)},N[t]," ",r)),e.createElement(g,{css:{mb:"$3"}},te(T,f).map(p=>e.createElement(K,{as:"span",size:"sm",key:`${t}${r}${p}`,css:{fontWeight:600,textAlign:"center"}},p))),e.createElement(g,null,n.map((p,P)=>p.map(($,R)=>{const D=`${t}${r}${P}${R}`;if(!$)return e.createElement("div",{key:D});const{date:j,selected:b,today:v,prevMonth:U,nextMonth:_}=$;return e.createElement(Z,{isOutsideMonth:U||_,isSelected:b,isToday:v,key:D,ref:b?c:v?u:null,...G({dateObj:$}),type:"button"},j.getDate())})))))):null};S.displayName="Calendar";export{S as Calendar};
@@ -62,6 +62,7 @@ export declare const Day: import("@stitches/react/types/styled-component").Style
62
62
  warning: any;
63
63
  warningMid: any;
64
64
  warningDark: any;
65
+ warningText: any;
65
66
  subjectEnglish: any;
66
67
  subjectMaths: any;
67
68
  subjectScience: any;
@@ -59,6 +59,7 @@ export declare const CarouselPagination: import("@stitches/react/types/styled-co
59
59
  warning: any;
60
60
  warningMid: any;
61
61
  warningDark: any;
62
+ warningText: any;
62
63
  subjectEnglish: any;
63
64
  subjectMaths: any;
64
65
  subjectScience: any;
@@ -59,6 +59,7 @@ declare const StyledSlide: import("@stitches/react/types/styled-component").Styl
59
59
  warning: any;
60
60
  warningMid: any;
61
61
  warningDark: any;
62
+ warningText: any;
62
63
  subjectEnglish: any;
63
64
  subjectMaths: any;
64
65
  subjectScience: any;
@@ -61,6 +61,7 @@ export declare const CarouselSlider: import("@stitches/react/types/styled-compon
61
61
  warning: any;
62
62
  warningMid: any;
63
63
  warningDark: any;
64
+ warningText: any;
64
65
  subjectEnglish: any;
65
66
  subjectMaths: any;
66
67
  subjectScience: any;
@@ -62,6 +62,7 @@ declare const StyledCheckbox: import("@stitches/react/types/styled-component").S
62
62
  warning: any;
63
63
  warningMid: any;
64
64
  warningDark: any;
65
+ warningText: any;
65
66
  subjectEnglish: any;
66
67
  subjectMaths: any;
67
68
  subjectScience: any;
@@ -64,6 +64,7 @@ declare const StyledCombobox: import("@stitches/react/types/styled-component").S
64
64
  warning: any;
65
65
  warningMid: any;
66
66
  warningDark: any;
67
+ warningText: any;
67
68
  subjectEnglish: any;
68
69
  subjectMaths: any;
69
70
  subjectScience: any;
@@ -60,6 +60,7 @@ export declare const ComboboxInput: import("@stitches/react/types/styled-compone
60
60
  warning: any;
61
61
  warningMid: any;
62
62
  warningDark: any;
63
+ warningText: any;
63
64
  subjectEnglish: any;
64
65
  subjectMaths: any;
65
66
  subjectScience: any;
@@ -58,6 +58,7 @@ export declare const ComboboxList: import("@stitches/react/types/styled-componen
58
58
  warning: any;
59
59
  warningMid: any;
60
60
  warningDark: any;
61
+ warningText: any;
61
62
  subjectEnglish: any;
62
63
  subjectMaths: any;
63
64
  subjectScience: any;
@@ -58,6 +58,7 @@ export declare const ComboboxOption: import("@stitches/react/types/styled-compon
58
58
  warning: any;
59
59
  warningMid: any;
60
60
  warningDark: any;
61
+ warningText: any;
61
62
  subjectEnglish: any;
62
63
  subjectMaths: any;
63
64
  subjectScience: any;
@@ -58,6 +58,7 @@ export declare const ComboboxPopover: import("@stitches/react/types/styled-compo
58
58
  warning: any;
59
59
  warningMid: any;
60
60
  warningDark: any;
61
+ warningText: any;
61
62
  subjectEnglish: any;
62
63
  subjectMaths: any;
63
64
  subjectScience: any;
@@ -1 +1 @@
1
- import{CalendarEvent as I}from"@atom-learning/icons";import*as e from"react";import{ActionIcon as L}from"../action-icon/ActionIcon.js";import{Box as N}from"../box/Box.js";import{Calendar as O}from"../calendar/Calendar.js";import{DEFAULT_LABELS as S}from"../calendar/constants.js";import{Icon as k}from"../icon/Icon.js";import{Input as x}from"../input/Input.js";import{Popover as m}from"../popover/Popover.js";import{DEFAULT_DATE_FORMAT as R}from"./constants.js";import{useDate as B}from"./use-date.js";const D=e.forwardRef(({initialDate:E,dateFormat:g=R,firstDayOfWeek:h=1,disabled:s,monthNames:b,weekdayNames:v,size:l="md",labels:y,revalidate:o,onChange:n,minDate:C,maxDate:w,...A},z)=>{const{date:a,dateString:T,setDate:r}=B(E,g),i={...S,...y},[F,d]=e.useState(!1),f=e.useRef(null),c=e.useRef(null);return e.useEffect(()=>{n==null||n(a)},[a,n]),e.createElement(N,{css:{position:"relative"}},e.createElement(x,{name:"date",disabled:s,size:l,...A,onChange:t=>r(t.target.value,!0),value:T,ref:z}),e.createElement(m,{modal:!0,open:F,onOpenChange:d},e.createElement(m.Trigger,{asChild:!0},e.createElement(L,{css:{position:"absolute",top:0,right:0},disabled:s,label:i.open,size:l==="sm"?"md":"lg",theme:"neutral"},e.createElement(k,{size:"sm",is:I}))),e.createElement(m.Content,{css:{pr:"$sizes$2"},side:"bottom",align:"end",showCloseButton:!1,onOpenAutoFocus:t=>{var p,u;t.preventDefault(),a?(p=c.current)==null||p.focus():(u=f.current)==null||u.focus()}},e.createElement(O,{date:a||new Date,selected:a,onDateSelected:async t=>{d(!1),await r(t.date,!1),o&&o()},setYear:async t=>{await r(t,!1),o&&o()},minDate:C,maxDate:w,refDateToday:f,refDateSelected:c,firstDayOfWeek:h,monthNames:b,weekdayNames:v,labels:i}))))});D.displayName="DateInput";export{D as DateInput};
1
+ import{CalendarEvent as N}from"@atom-learning/icons";import*as e from"react";import{ActionIcon as O}from"../action-icon/ActionIcon.js";import{Box as S}from"../box/Box.js";import{Calendar as k}from"../calendar/Calendar.js";import{DEFAULT_LABELS as x}from"../calendar/constants.js";import{Icon as z}from"../icon/Icon.js";import{Input as L}from"../input/Input.js";import{Popover as m}from"../popover/Popover.js";import{DEFAULT_DATE_FORMAT as R}from"./constants.js";import{useDate as B}from"./use-date.js";const D=e.forwardRef(({initialDate:E,dateFormat:g=R,firstDayOfWeek:h=1,disabled:s,monthNames:C,weekdayNames:b,size:l="md",labels:v,revalidate:o,onChange:n,minDate:y,maxDate:w,...A},T)=>{const{date:a,dateString:F,setDate:r}=B(E,g),i={...x,...v},[I,d]=e.useState(!1),f=e.useRef(null),c=e.useRef(null);return e.useEffect(()=>{n==null||n(a)},[a,n]),e.createElement(S,{css:{position:"relative"}},e.createElement(L,{name:"date",disabled:s,size:l,...A,onChange:t=>r(t.target.value,!0),value:F,ref:T}),e.createElement(m,{modal:!0,open:I,onOpenChange:d},e.createElement(m.Trigger,{asChild:!0},e.createElement(O,{css:{position:"absolute",top:"0",right:"0"},disabled:s,label:i.open,size:l,theme:"neutral"},e.createElement(z,{is:N}))),e.createElement(m.Content,{css:{pr:"$sizes$2"},side:"bottom",align:"end",showCloseButton:!1,onOpenAutoFocus:t=>{var p,u;t.preventDefault(),a?(p=c.current)==null||p.focus():(u=f.current)==null||u.focus()}},e.createElement(k,{date:a||new Date,selected:a,onDateSelected:async t=>{d(!1),await r(t.date,!1),o&&o()},setYear:async t=>{await r(t,!1),o&&o()},minDate:y,maxDate:w,refDateToday:f,refDateSelected:c,firstDayOfWeek:h,monthNames:C,weekdayNames:b,labels:i}))))});D.displayName="DateInput";export{D as DateInput};
@@ -63,6 +63,7 @@ declare const StyledDialog: import("@stitches/react/types/styled-component").Sty
63
63
  warning: any;
64
64
  warningMid: any;
65
65
  warningDark: any;
66
+ warningText: any;
66
67
  subjectEnglish: any;
67
68
  subjectMaths: any;
68
69
  subjectScience: any;
@@ -58,6 +58,7 @@ export declare const DialogBackground: import("@stitches/react/types/styled-comp
58
58
  warning: any;
59
59
  warningMid: any;
60
60
  warningDark: any;
61
+ warningText: any;
61
62
  subjectEnglish: any;
62
63
  subjectMaths: any;
63
64
  subjectScience: any;
@@ -322,6 +323,7 @@ export declare const DialogBackground: import("@stitches/react/types/styled-comp
322
323
  warning: any;
323
324
  warningMid: any;
324
325
  warningDark: any;
326
+ warningText: any;
325
327
  subjectEnglish: any;
326
328
  subjectMaths: any;
327
329
  subjectScience: any;
@@ -59,6 +59,7 @@ export declare const DialogClose: import("@stitches/react/types/styled-component
59
59
  warning: any;
60
60
  warningMid: any;
61
61
  warningDark: any;
62
+ warningText: any;
62
63
  subjectEnglish: any;
63
64
  subjectMaths: any;
64
65
  subjectScience: any;
@@ -61,6 +61,7 @@ declare const StyledDialogContent: import("@stitches/react/types/styled-componen
61
61
  warning: any;
62
62
  warningMid: any;
63
63
  warningDark: any;
64
+ warningText: any;
64
65
  subjectEnglish: any;
65
66
  subjectMaths: any;
66
67
  subjectScience: any;
@@ -1 +1 @@
1
- import{Close as h}from"@atom-learning/icons";import{Overlay as x,Content as b,Portal as g,Close as w}from"@radix-ui/react-dialog";import*as o from"react";import{DIALOG_Z_INDEX as r}from"../../constants/dialog.js";import{keyframes as n,styled as l}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as $}from"../icon/Icon.js";import{DialogBackground as s}from"./DialogBackground.js";import{fadeIn as z,fadeOut as C}from"../../utilities/style/keyframe-animations.js";const e="translate3d(-50%, -50%, 0)",m="translate3d(-50%, 50vh, 0)",d="modal_overlay",D=n({"0%":{transform:m},"100%":{transform:e}}),I=n({"0%":{transform:e},"100%":{transform:m}}),y=l(x,{backgroundColor:"$alpha600",inset:0,position:"fixed",overflowY:"auto",zIndex:r,"@allowMotion":{'&[data-state="open"]':{animation:`${z} 250ms ease-out`},'&[data-state="closed"]':{animation:`${C} 550ms ease-out`}}}),E=l(b,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",maxHeight:"90vh",overflowY:"auto",p:"$5",position:"fixed",top:"50%",transform:e,zIndex:r,"&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${D} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${I} 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"}}}}),O=({size:p="sm",children:a,closeDialogText:f="Close dialog",showCloseButton:c=!0,...u})=>o.createElement(g,null,o.createElement(y,{id:d},o.Children.map(a,t=>(t==null?void 0:t.type)===s&&t),o.createElement(E,{size:p,"aria-label":"Dialog",onPointerDownOutside:t=>{const i=t.target;(i==null?void 0:i.id)!==d&&t.preventDefault()},...u},c&&o.createElement(v,{as:w,css:{position:"absolute",right:"$4",top:"$4"},label:f,size:"lg",theme:"neutral"},o.createElement($,{is:h})),o.Children.map(a,t=>(t==null?void 0:t.type)!==s&&t))));export{O as DialogContent};
1
+ import{Close as h}from"@atom-learning/icons";import{Overlay as x,Content as b,Portal as w,Close as g}from"@radix-ui/react-dialog";import*as o from"react";import{DIALOG_Z_INDEX as r}from"../../constants/dialog.js";import{keyframes as n,styled as l}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as $}from"../icon/Icon.js";import{DialogBackground as s}from"./DialogBackground.js";import{fadeIn as z,fadeOut as C}from"../../utilities/style/keyframe-animations.js";const e="translate3d(-50%, -50%, 0)",m="translate3d(-50%, 50vh, 0)",d="modal_overlay",D=n({"0%":{transform:m},"100%":{transform:e}}),I=n({"0%":{transform:e},"100%":{transform:m}}),y=l(x,{backgroundColor:"$alpha600",inset:0,position:"fixed",overflowY:"auto",zIndex:r,"@allowMotion":{'&[data-state="open"]':{animation:`${z} 250ms ease-out`},'&[data-state="closed"]':{animation:`${C} 550ms ease-out`}}}),E=l(b,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",maxHeight:"90vh",overflowY:"auto",p:"$5",position:"fixed",top:"50%",transform:e,zIndex:r,"&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${D} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${I} 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"}}}}),O=({size:p="sm",children:a,closeDialogText:f="Close dialog",showCloseButton:c=!0,...u})=>o.createElement(w,null,o.createElement(y,{id:d},o.Children.map(a,t=>(t==null?void 0:t.type)===s&&t),o.createElement(E,{size:p,"aria-label":"Dialog",onPointerDownOutside:t=>{const i=t.target;(i==null?void 0:i.id)!==d&&t.preventDefault()},...u},c&&o.createElement(v,{as:g,css:{position:"absolute",right:"$4",top:"$4"},label:f,size:"md",theme:"neutral"},o.createElement($,{is:h})),o.Children.map(a,t=>(t==null?void 0:t.type)!==s&&t))));export{O as DialogContent};
@@ -61,6 +61,7 @@ export declare const StyledDivider: import("@stitches/react/types/styled-compone
61
61
  warning: any;
62
62
  warningMid: any;
63
63
  warningDark: any;
64
+ warningText: any;
64
65
  subjectEnglish: any;
65
66
  subjectMaths: any;
66
67
  subjectScience: any;
@@ -64,6 +64,7 @@ declare const Root: import("@stitches/react/types/styled-component").StyledCompo
64
64
  warning: any;
65
65
  warningMid: any;
66
66
  warningDark: any;
67
+ warningText: any;
67
68
  subjectEnglish: any;
68
69
  subjectMaths: any;
69
70
  subjectScience: any;
@@ -59,6 +59,7 @@ export declare const DropdownMenuContent: import("@stitches/react/types/styled-c
59
59
  warning: any;
60
60
  warningMid: any;
61
61
  warningDark: any;
62
+ warningText: any;
62
63
  subjectEnglish: any;
63
64
  subjectMaths: any;
64
65
  subjectScience: any;
@@ -92,6 +92,7 @@ export declare const DropdownMenuItem: import("@stitches/react/types/styled-comp
92
92
  warning: any;
93
93
  warningMid: any;
94
94
  warningDark: any;
95
+ warningText: any;
95
96
  subjectEnglish: any;
96
97
  subjectMaths: any;
97
98
  subjectScience: any;
@@ -59,6 +59,7 @@ export declare const DropdownMenuSeparator: import("@stitches/react/types/styled
59
59
  warning: any;
60
60
  warningMid: any;
61
61
  warningDark: any;
62
+ warningText: any;
62
63
  subjectEnglish: any;
63
64
  subjectMaths: any;
64
65
  subjectScience: any;
@@ -59,6 +59,7 @@ export declare const DropdownMenuTrigger: import("@stitches/react/types/styled-c
59
59
  warning: any;
60
60
  warningMid: any;
61
61
  warningDark: any;
62
+ warningText: any;
62
63
  subjectEnglish: any;
63
64
  subjectMaths: any;
64
65
  subjectScience: any;
@@ -62,6 +62,7 @@ declare const EmptyStateContainer: import("@stitches/react/types/styled-componen
62
62
  warning: any;
63
63
  warningMid: any;
64
64
  warningDark: any;
65
+ warningText: any;
65
66
  subjectEnglish: any;
66
67
  subjectMaths: any;
67
68
  subjectScience: any;
@@ -328,6 +329,7 @@ declare const EmptyStateContainer: import("@stitches/react/types/styled-componen
328
329
  warning: any;
329
330
  warningMid: any;
330
331
  warningDark: any;
332
+ warningText: any;
331
333
  subjectEnglish: any;
332
334
  subjectMaths: any;
333
335
  subjectScience: any;
@@ -64,6 +64,7 @@ export declare const EmptyStateBody: import("@stitches/react/types/styled-compon
64
64
  warning: any;
65
65
  warningMid: any;
66
66
  warningDark: any;
67
+ warningText: any;
67
68
  subjectEnglish: any;
68
69
  subjectMaths: any;
69
70
  subjectScience: any;
@@ -333,6 +334,7 @@ export declare const EmptyStateBody: import("@stitches/react/types/styled-compon
333
334
  warning: any;
334
335
  warningMid: any;
335
336
  warningDark: any;
337
+ warningText: any;
336
338
  subjectEnglish: any;
337
339
  subjectMaths: any;
338
340
  subjectScience: any;
@@ -62,6 +62,7 @@ export declare const EmptyStateImage: import("@stitches/react/types/styled-compo
62
62
  warning: any;
63
63
  warningMid: any;
64
64
  warningDark: any;
65
+ warningText: any;
65
66
  subjectEnglish: any;
66
67
  subjectMaths: any;
67
68
  subjectScience: any;
@@ -331,6 +332,7 @@ export declare const EmptyStateImage: import("@stitches/react/types/styled-compo
331
332
  warning: any;
332
333
  warningMid: any;
333
334
  warningDark: any;
335
+ warningText: any;
334
336
  subjectEnglish: any;
335
337
  subjectMaths: any;
336
338
  subjectScience: any;
@@ -60,6 +60,7 @@ export declare const EmptyStateTitle: import("@stitches/react/types/styled-compo
60
60
  warning: any;
61
61
  warningMid: any;
62
62
  warningDark: any;
63
+ warningText: any;
63
64
  subjectEnglish: any;
64
65
  subjectMaths: any;
65
66
  subjectScience: any;
@@ -1 +1 @@
1
- import*as e from"react";import{Box as p}from"../box/Box.js";import{Flex as c}from"../flex/Flex.js";import{Label as d}from"../label/Label.js";import{Link as f}from"../link/Link.js";import{ValidationError as E}from"../validation-error/ValidationError.js";import{Description as b}from"./FieldDescription.js";const o=({css:i,children:l,error:t,fieldId:s,label:a,prompt:r,description:m,required:n})=>e.createElement(p,{css:i},e.createElement(c,{css:{justifyContent:"space-between",alignItems:"center",mb:"$3"}},e.createElement(d,{htmlFor:s,required:n},a),r&&e.createElement(f,{href:r.link,size:"sm"},r.label)),m&&e.createElement(b,{css:{mb:"$3"}},m),l,t&&e.createElement(E,{css:{mt:"$2"}},t));o.displayName="FieldWrapper";export{o as FieldWrapper};
1
+ import*as e from"react";import{Box as a}from"../box/Box.js";import{Flex as c}from"../flex/Flex.js";import{Label as f}from"../label/Label.js";import{Link as d}from"../link/Link.js";import{InlineMessage as b}from"../inline-message/InlineMessage.js";import{Description as E}from"./FieldDescription.js";const i=({css:o,children:l,error:t,fieldId:s,label:n,prompt:r,description:m,required:p})=>e.createElement(a,{css:o},e.createElement(c,{css:{justifyContent:"space-between",alignItems:"center",mb:"$3"}},e.createElement(f,{htmlFor:s,required:p},n),r&&e.createElement(d,{href:r.link,size:"sm"},r.label)),m&&e.createElement(E,{css:{mb:"$3"}},m),l,t&&e.createElement(b,{css:{mt:"$2"}},t));i.displayName="FieldWrapper";export{i as FieldWrapper};
@@ -1 +1 @@
1
- import*as e from"react";import{Box as m}from"../box/Box.js";import{Checkbox as d}from"../checkbox/Checkbox.js";import{Label as $}from"../label/Label.js";import{RadioButton as f}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";import{ValidationError as E}from"../validation-error/ValidationError.js";import{Description as u}from"./FieldDescription.js";const l=({align:n="start",children:a,css:s,description:i,direction:t="row",error:o,label:p,required:c})=>e.createElement(m,{css:s},e.createElement($,{align:n,direction:t,required:c,type:"inline"},e.Children.map(a,r=>e.createElement(m,{css:{[t==="reverse"?"ml":"mr"]:"$3",...((r==null?void 0:r.type)===d||(r==null?void 0:r.type)===f)&&{transform:"translateY($space$1)"}}},r)),p),o&&e.createElement(E,{css:{mt:"$2"}},o),i&&e.createElement(u,{css:{mt:"$2",[t==="reverse"?"mr":"ml"]:"calc($space$3 + $sizes$1)"}},i));l.displayName="InlineFieldWrapper";export{l as InlineFieldWrapper};
1
+ import*as e from"react";import{Box as o}from"../box/Box.js";import{Checkbox as d}from"../checkbox/Checkbox.js";import{Label as $}from"../label/Label.js";import{RadioButton as f}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";import{InlineMessage as u}from"../inline-message/InlineMessage.js";import{Description as E}from"./FieldDescription.js";const l=({align:n="start",children:a,css:s,description:i,direction:t="row",error:m,label:p,required:c})=>e.createElement(o,{css:s},e.createElement($,{align:n,direction:t,required:c,type:"inline"},e.Children.map(a,r=>e.createElement(o,{css:{[t==="reverse"?"ml":"mr"]:"$3",...((r==null?void 0:r.type)===d||(r==null?void 0:r.type)===f)&&{transform:"translateY($space$1)"}}},r)),p),m&&e.createElement(u,{css:{mt:"$2"}},m),i&&e.createElement(E,{css:{mt:"$2",[t==="reverse"?"mr":"ml"]:"calc($space$3 + $sizes$1)"}},i));l.displayName="InlineFieldWrapper";export{l as InlineFieldWrapper};
@@ -58,6 +58,7 @@ export declare const Flex: import("@stitches/react/types/styled-component").Styl
58
58
  warning: any;
59
59
  warningMid: any;
60
60
  warningDark: any;
61
+ warningText: any;
61
62
  subjectEnglish: any;
62
63
  subjectMaths: any;
63
64
  subjectScience: any;
@@ -60,6 +60,7 @@ declare const StyledForm: import("@stitches/react/types/styled-component").Style
60
60
  warning: any;
61
61
  warningMid: any;
62
62
  warningDark: any;
63
+ warningText: any;
63
64
  subjectEnglish: any;
64
65
  subjectMaths: any;
65
66
  subjectScience: any;
@@ -61,6 +61,7 @@ declare const GridContainer: import("@stitches/react/types/styled-component").St
61
61
  warning: any;
62
62
  warningMid: any;
63
63
  warningDark: any;
64
+ warningText: any;
64
65
  subjectEnglish: any;
65
66
  subjectMaths: any;
66
67
  subjectScience: any;
@@ -62,6 +62,7 @@ export declare const StyledHeading: import("@stitches/react/types/styled-compone
62
62
  warning: any;
63
63
  warningMid: any;
64
64
  warningDark: any;
65
+ warningText: any;
65
66
  subjectEnglish: any;
66
67
  subjectMaths: any;
67
68
  subjectScience: any;
@@ -62,6 +62,7 @@ export declare const StyledIcon: import("@stitches/react/types/styled-component"
62
62
  warning: any;
63
63
  warningMid: any;
64
64
  warningDark: any;
65
+ warningText: any;
65
66
  subjectEnglish: any;
66
67
  subjectMaths: any;
67
68
  subjectScience: any;
@@ -60,6 +60,7 @@ export declare const StyledImage: import("@stitches/react/types/styled-component
60
60
  warning: any;
61
61
  warningMid: any;
62
62
  warningDark: any;
63
+ warningText: any;
63
64
  subjectEnglish: any;
64
65
  subjectMaths: any;
65
66
  subjectScience: any;
@@ -22,6 +22,7 @@ export { Grid } from './grid';
22
22
  export { Heading } from './heading';
23
23
  export { Icon } from './icon';
24
24
  export { Image } from './image';
25
+ export { InlineMessage } from './inline-message';
25
26
  export { Input } from './input';
26
27
  export { FileInput } from './file-input';
27
28
  export { InputField } from './input-field';
@@ -55,5 +56,4 @@ export { TextareaField } from './textarea-field';
55
56
  export { ToastProvider, toast } from './toast';
56
57
  export { ToggleGroup } from './toggle-group';
57
58
  export { Tooltip } from './tooltip';
58
- export { ValidationError } from './validation-error';
59
59
  export { Video } from './video';
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import { InlineMessageTheme } from "./InlineMessage.types";
3
+ import type { CSS } from '../../stitches';
4
+ export declare const INLINE_MESSAGE_THEMES: Record<InlineMessageTheme, CSS>;
5
+ export declare const INLINE_MESSAGE_ICONS: Record<InlineMessageTheme, React.FC<React.SVGProps<SVGSVGElement>>>;
@@ -0,0 +1 @@
1
+ import{OkCircle as o,Danger as n,Info as r,Error as c}from"@atom-learning/icons";const e={success:{color:"$success"},warning:{color:"$warningText","& svg":{color:"$warningDark"}},info:{color:"$primary"},neutral:{color:"$tonal400"},error:{color:"$danger"}},a={success:o,warning:n,info:r,neutral:r,error:c};export{a as INLINE_MESSAGE_ICONS,e as INLINE_MESSAGE_THEMES};