@atom-learning/components 2.0.0-beta.0 → 2.0.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.
- package/CHANGELOG.md +26 -0
- package/dist/components/accordion/Accordion.d.ts +0 -2
- package/dist/components/accordion/AccordionContent.d.ts +0 -2
- package/dist/components/accordion/AccordionContent.js +1 -1
- package/dist/components/accordion/AccordionItem.d.ts +0 -2
- package/dist/components/accordion/AccordionItem.js +1 -1
- package/dist/components/accordion/AccordionTrigger.d.ts +0 -2
- package/dist/components/action-icon/ActionIcon.constants.d.ts +6 -0
- package/dist/components/action-icon/ActionIcon.constants.js +1 -0
- package/dist/components/action-icon/ActionIcon.d.ts +1 -3
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/alert-dialog/AlertDialog.d.ts +0 -2
- package/dist/components/alert-dialog/AlertDialogContent.d.ts +0 -2
- package/dist/components/alert-dialog/AlertDialogContent.js +1 -1
- package/dist/components/alert-dialog/alert-context/AlertContext.js +1 -1
- package/dist/components/alert-dialog/alert-context/AlertDialog.js +1 -1
- package/dist/components/badge/Badge.d.ts +0 -4
- package/dist/components/badge/Badge.js +1 -1
- package/dist/components/box/Box.d.ts +0 -2
- package/dist/components/button/Button.d.ts +0 -2
- package/dist/components/button/Button.js +1 -1
- package/dist/components/calendar/Calendar.d.ts +3 -0
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/calendar/Day.d.ts +0 -2
- package/dist/components/calendar/constants.d.ts +7 -0
- package/dist/components/calendar/constants.js +1 -1
- package/dist/components/carousel/CarouselArrows.js +1 -1
- package/dist/components/carousel/CarouselPagination.d.ts +0 -2
- package/dist/components/carousel/CarouselSlide.d.ts +0 -2
- package/dist/components/carousel/CarouselSlider.d.ts +0 -2
- package/dist/components/checkbox/Checkbox.d.ts +0 -2
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/combobox/Combobox.d.ts +0 -2
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/combobox/ComboboxInput.d.ts +0 -2
- package/dist/components/combobox/ComboboxInput.js +1 -1
- package/dist/components/combobox/ComboboxList.d.ts +0 -2
- package/dist/components/combobox/ComboboxOption.d.ts +0 -2
- package/dist/components/combobox/ComboboxPopover.d.ts +0 -2
- package/dist/components/date-input/DateInput.js +1 -1
- package/dist/components/dialog/Dialog.d.ts +0 -2
- package/dist/components/dialog/DialogBackground.d.ts +0 -4
- package/dist/components/dialog/DialogClose.d.ts +0 -2
- package/dist/components/dialog/DialogContent.d.ts +0 -2
- package/dist/components/dialog/DialogContent.js +1 -1
- package/dist/components/divider/Divider.d.ts +0 -2
- package/dist/components/divider/Divider.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +0 -2
- package/dist/components/dropdown-menu/DropdownMenuContent.d.ts +0 -2
- package/dist/components/dropdown-menu/DropdownMenuItem.d.ts +0 -2
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuSeparator.d.ts +0 -2
- package/dist/components/dropdown-menu/DropdownMenuTrigger.d.ts +0 -2
- package/dist/components/empty-state/EmptyState.d.ts +0 -4
- package/dist/components/empty-state/EmptyState.js +1 -1
- package/dist/components/empty-state/EmptyStateBody.d.ts +0 -4
- package/dist/components/empty-state/EmptyStateBody.js +1 -1
- package/dist/components/empty-state/EmptyStateImage.d.ts +0 -4
- package/dist/components/empty-state/EmptyStateImage.js +1 -1
- package/dist/components/empty-state/EmptyStateTitle.d.ts +0 -2
- package/dist/components/field-wrapper/FieldDescription.js +1 -1
- package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
- package/dist/components/file-input/FileInput.js +1 -1
- package/dist/components/flex/Flex.d.ts +0 -2
- package/dist/components/form/Form.d.ts +0 -2
- package/dist/components/grid/Grid.d.ts +1 -3
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/heading/Heading.d.ts +0 -2
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/icon/Icon.d.ts +0 -2
- package/dist/components/image/Image.d.ts +0 -2
- package/dist/components/input/Input.d.ts +0 -2
- package/dist/components/label/Label.d.ts +0 -2
- package/dist/components/label/Label.js +1 -1
- package/dist/components/link/Link.d.ts +0 -2
- package/dist/components/link/Link.js +1 -1
- package/dist/components/list/List.d.ts +0 -4
- package/dist/components/markdown-content/MarkdownContent.js +1 -1
- package/dist/components/markdown-content/components/MarkdownCode.js +1 -1
- package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
- package/dist/components/markdown-content/components/MarkdownHeading.js +1 -1
- package/dist/components/markdown-content/components/MarkdownImage.js +1 -1
- package/dist/components/markdown-content/components/MarkdownLink.js +1 -1
- package/dist/components/markdown-content/components/MarkdownListItem.js +1 -1
- package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -1
- package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
- package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
- package/dist/components/notification-badge/NotificationBadge.d.ts +0 -4
- package/dist/components/notification-badge/NotificationBadge.js +1 -1
- package/dist/components/password-input/PasswordInput.js +1 -1
- package/dist/components/popover/Popover.d.ts +0 -2
- package/dist/components/popover/PopoverContent.d.ts +0 -2
- package/dist/components/popover/PopoverContent.js +1 -1
- package/dist/components/progress-bar/ProgressBar.d.ts +0 -2
- package/dist/components/radio-button/RadioButton.d.ts +0 -2
- package/dist/components/radio-button/RadioButtonGroup.d.ts +0 -2
- package/dist/components/radio-button/RadioButtonGroup.js +1 -1
- package/dist/components/radio-button-field/RadioButtonField.js +1 -1
- package/dist/components/radio-card/RadioCard.d.ts +0 -2
- package/dist/components/radio-card/RadioCard.js +1 -1
- package/dist/components/radio-card/RadioCardGroup.js +1 -1
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/select/Select.d.ts +0 -2
- package/dist/components/select/Select.js +1 -1
- package/dist/components/slider/Slider.d.ts +0 -2
- package/dist/components/slider-field/SliderField.js +1 -1
- package/dist/components/stack/Stack.d.ts +1 -3
- package/dist/components/stack/Stack.js +1 -1
- package/dist/components/stack-content/StackContent.d.ts +0 -2
- package/dist/components/stack-content/StackContent.js +1 -1
- package/dist/components/stepper/StepperStepBullet.d.ts +1 -5
- package/dist/components/stepper/StepperStepBullet.js +1 -1
- package/dist/components/stepper/StepperStepContainer.d.ts +1 -4
- package/dist/components/stepper/StepperStepContainer.js +1 -1
- package/dist/components/stepper/StepperStepForward.js +1 -1
- package/dist/components/stepper/StepperStepLabel.d.ts +1 -5
- package/dist/components/stepper/StepperStepLabel.js +1 -1
- package/dist/components/stepper/StepperSteps.js +1 -1
- package/dist/components/stepper/stepper-context/StepperContext.js +1 -1
- package/dist/components/stepper/types.d.ts +4 -1
- package/dist/components/stepper/types.js +1 -1
- package/dist/components/switch/Switch.d.ts +0 -2
- package/dist/components/switch/Switch.js +1 -1
- package/dist/components/table/Table.d.ts +0 -2
- package/dist/components/table/TableBody.d.ts +0 -2
- package/dist/components/table/TableBody.js +1 -1
- package/dist/components/table/TableCell.d.ts +0 -2
- package/dist/components/table/TableFooter.d.ts +0 -2
- package/dist/components/table/TableFooterCell.d.ts +0 -2
- package/dist/components/table/TableHeader.d.ts +0 -2
- package/dist/components/table/TableHeader.js +1 -1
- package/dist/components/table/TableHeaderCell.d.ts +0 -2
- package/dist/components/table/TableRow.d.ts +0 -2
- package/dist/components/tabs/TabTrigger.d.ts +0 -2
- package/dist/components/tabs/TabTrigger.js +1 -1
- package/dist/components/tabs/Tabs.d.ts +0 -4
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/TabsTriggerList.d.ts +0 -2
- package/dist/components/tabs/TabsTriggerList.js +1 -1
- package/dist/components/tabs/utils.js +1 -1
- package/dist/components/text/Text.d.ts +0 -2
- package/dist/components/textarea/Textarea.d.ts +0 -2
- package/dist/components/toast/Toast.d.ts +0 -2
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toast/ToastProvider.js +1 -1
- package/dist/components/toggle-group/ToggleGroupButton.d.ts +0 -4
- package/dist/components/toggle-group/ToggleGroupButton.js +1 -1
- package/dist/components/toggle-group/ToggleGroupItem.d.ts +0 -4
- package/dist/components/toggle-group/ToggleGroupRoot.d.ts +0 -2
- package/dist/components/toggle-group/index.d.ts +0 -10
- package/dist/components/tooltip/TooltipContent.d.ts +0 -2
- package/dist/components/validation-error/ValidationError.js +1 -1
- package/dist/components/video/Video.d.ts +0 -4
- package/dist/docgen.json +1 -1
- package/dist/docs/ActionIcon.mdx +13 -19
- package/dist/docs/Checkbox.mdx +4 -0
- package/dist/docs/Flex.mdx +3 -3
- package/dist/docs/Icon.mdx +1 -1
- package/dist/docs/Slider.mdx +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/stitches.d.ts +0 -20
- package/dist/utilities/hooks/useCallbackRef.d.ts +9 -0
- package/dist/utilities/hooks/useCallbackRef.js +1 -0
- package/dist/utilities/{use-is-mounted-ref/index.d.ts → hooks/useIsMountedRef.d.ts} +0 -0
- package/dist/utilities/{use-is-mounted-ref/index.js → hooks/useIsMountedRef.js} +0 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from"react";import{styled as t}from"../../../stitches.js";const d=t("strong",{fontWeight:600}),l=({node:e,handleNode:n})=>{var o;return r.createElement(d,null,(o=e.children)==null?void 0:o.map(n))};export{l as MarkdownStrong};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from"react";import{Divider as t}from"../../divider/Divider.js";const o=({css:e})=>r.createElement(t,{css:{width:"100%",...e}});export{o as MarkdownThematicBreak};
|
|
@@ -59,7 +59,6 @@ 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;
|
|
63
62
|
subjectEnglish: any;
|
|
64
63
|
subjectMaths: any;
|
|
65
64
|
subjectScience: any;
|
|
@@ -79,7 +78,6 @@ declare const StyledBadge: import("@stitches/react/types/styled-component").Styl
|
|
|
79
78
|
"7": any;
|
|
80
79
|
"8": any;
|
|
81
80
|
"9": any;
|
|
82
|
-
"10": any;
|
|
83
81
|
};
|
|
84
82
|
fontSizes: {
|
|
85
83
|
xs: any;
|
|
@@ -325,7 +323,6 @@ declare const StyledBadge: import("@stitches/react/types/styled-component").Styl
|
|
|
325
323
|
warning: any;
|
|
326
324
|
warningMid: any;
|
|
327
325
|
warningDark: any;
|
|
328
|
-
warningText: any;
|
|
329
326
|
subjectEnglish: any;
|
|
330
327
|
subjectMaths: any;
|
|
331
328
|
subjectScience: any;
|
|
@@ -345,7 +342,6 @@ declare const StyledBadge: import("@stitches/react/types/styled-component").Styl
|
|
|
345
342
|
"7": any;
|
|
346
343
|
"8": any;
|
|
347
344
|
"9": any;
|
|
348
|
-
"10": any;
|
|
349
345
|
};
|
|
350
346
|
fontSizes: {
|
|
351
347
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import{styled as o}from"../../stitches.js";import{Box as i}from"../box/Box.js";import{Flex as n}from"../flex/Flex.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
|
-
import{Eye as l,EyeCrossed as
|
|
1
|
+
import{Eye as l,EyeCrossed as f}from"@atom-learning/icons";import*as e from"react";import{useState as w}from"react";import{ActionIcon as u}from"../action-icon/ActionIcon.js";import{Box as E}from"../box/Box.js";import{Icon as h}from"../icon/Icon.js";import{Input as x}from"../input/Input.js";const r=e.forwardRef(({css:a,hidePasswordText:i="Hide password",showPasswordText:m="Show password",size:t="md",...p},n)=>{const[o,c]=w(!1),d=()=>c(s=>!s);return e.createElement(E,{css:{position:"relative",...a}},e.createElement(x,{...p,size:t,type:o?"text":"password",ref:n,css:{pr:"$sizes$2"}}),e.createElement(u,{appearance:"simple",theme:"neutral",css:{bottom:0,position:"absolute",right:0},label:o?i:m,onClick:d,onMouseDown:s=>s.preventDefault(),size:t},e.createElement(h,{is:o?l:f})))});r.displayName="PasswordInput";export{r as PasswordInput};
|
|
@@ -61,7 +61,6 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
|
|
|
61
61
|
warning: any;
|
|
62
62
|
warningMid: any;
|
|
63
63
|
warningDark: any;
|
|
64
|
-
warningText: any;
|
|
65
64
|
subjectEnglish: any;
|
|
66
65
|
subjectMaths: any;
|
|
67
66
|
subjectScience: any;
|
|
@@ -81,7 +80,6 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
|
|
|
81
80
|
"7": any;
|
|
82
81
|
"8": any;
|
|
83
82
|
"9": any;
|
|
84
|
-
"10": any;
|
|
85
83
|
};
|
|
86
84
|
fontSizes: {
|
|
87
85
|
xs: any;
|
|
@@ -62,7 +62,6 @@ declare const StyledContent: import("@stitches/react/types/styled-component").St
|
|
|
62
62
|
warning: any;
|
|
63
63
|
warningMid: any;
|
|
64
64
|
warningDark: any;
|
|
65
|
-
warningText: any;
|
|
66
65
|
subjectEnglish: any;
|
|
67
66
|
subjectMaths: any;
|
|
68
67
|
subjectScience: any;
|
|
@@ -82,7 +81,6 @@ declare const StyledContent: import("@stitches/react/types/styled-component").St
|
|
|
82
81
|
"7": any;
|
|
83
82
|
"8": any;
|
|
84
83
|
"9": any;
|
|
85
|
-
"10": any;
|
|
86
84
|
};
|
|
87
85
|
fontSizes: {
|
|
88
86
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Close as r}from"@atom-learning/icons";import{Content as l,Arrow as p,Close as h}from"@radix-ui/react-popover";import*as e from"react";import{styled as t}from"../../stitches.js";import{ActionIcon as c}from"../action-icon/ActionIcon.js";import{Icon as f}from"../icon/Icon.js";import{slideDownAndFade as $,slideLeftAndFade as
|
|
1
|
+
import{Close as r}from"@atom-learning/icons";import{Content as l,Arrow as p,Close as h}from"@radix-ui/react-popover";import*as e from"react";import{styled as t}from"../../stitches.js";import{ActionIcon as c}from"../action-icon/ActionIcon.js";import{Icon as f}from"../icon/Icon.js";import{slideDownAndFade as $,slideLeftAndFade as x,slideUpAndFade as g,slideRightAndFade as w}from"../../utilities/style/keyframe-animations.js";const b=t(l,{bg:"white",borderRadius:"$1",boxShadow:"$2",maxWidth:"90vw",p:"$sizes$2",pr:"$6",position:"relative","@allowMotion":{animationDuration:"75ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="open"]':{'&[data-side="top"]':{animationName:$},'&[data-side="right"]':{animationName:x},'&[data-side="bottom"]':{animationName:g},'&[data-side="left"]':{animationName:w}}},variants:{size:{sm:{maxWidth:"200px"},md:{maxWidth:"400px"},lg:{maxWidth:"600px"}}}}),z=t(p,{fill:"white",zIndex:1,'[data-align="end"] &':{mr:"$sizes$2"},'[data-align="start"] &':{ml:"$sizes$2"}}),C=({children:i,side:o="top",sideOffset:a=8,closePopoverText:s="Close popover",showCloseButton:n=!0,size:m="md",...d})=>e.createElement(b,{size:m,side:o,sideOffset:a,...d},n&&e.createElement(c,{as:h,css:{position:"absolute",right:"$0",top:"$0"},label:s,size:"md",theme:"neutral"},e.createElement(f,{is:r})),i,e.createElement(z,{width:16,height:8}));export{C as PopoverContent};
|
|
@@ -62,7 +62,6 @@ declare const StyledProgressBar: import("@stitches/react/types/styled-component"
|
|
|
62
62
|
warning: any;
|
|
63
63
|
warningMid: any;
|
|
64
64
|
warningDark: any;
|
|
65
|
-
warningText: any;
|
|
66
65
|
subjectEnglish: any;
|
|
67
66
|
subjectMaths: any;
|
|
68
67
|
subjectScience: any;
|
|
@@ -82,7 +81,6 @@ declare const StyledProgressBar: import("@stitches/react/types/styled-component"
|
|
|
82
81
|
"7": any;
|
|
83
82
|
"8": any;
|
|
84
83
|
"9": any;
|
|
85
|
-
"10": any;
|
|
86
84
|
};
|
|
87
85
|
fontSizes: {
|
|
88
86
|
xs: any;
|
|
@@ -61,7 +61,6 @@ declare const StyledRadioButton: import("@stitches/react/types/styled-component"
|
|
|
61
61
|
warning: any;
|
|
62
62
|
warningMid: any;
|
|
63
63
|
warningDark: any;
|
|
64
|
-
warningText: any;
|
|
65
64
|
subjectEnglish: any;
|
|
66
65
|
subjectMaths: any;
|
|
67
66
|
subjectScience: any;
|
|
@@ -81,7 +80,6 @@ declare const StyledRadioButton: import("@stitches/react/types/styled-component"
|
|
|
81
80
|
"7": any;
|
|
82
81
|
"8": any;
|
|
83
82
|
"9": any;
|
|
84
|
-
"10": any;
|
|
85
83
|
};
|
|
86
84
|
fontSizes: {
|
|
87
85
|
xs: any;
|
|
@@ -62,7 +62,6 @@ export declare const RadioButtonGroup: import("@stitches/react/types/styled-comp
|
|
|
62
62
|
warning: any;
|
|
63
63
|
warningMid: any;
|
|
64
64
|
warningDark: any;
|
|
65
|
-
warningText: any;
|
|
66
65
|
subjectEnglish: any;
|
|
67
66
|
subjectMaths: any;
|
|
68
67
|
subjectScience: any;
|
|
@@ -82,7 +81,6 @@ export declare const RadioButtonGroup: import("@stitches/react/types/styled-comp
|
|
|
82
81
|
"7": any;
|
|
83
82
|
"8": any;
|
|
84
83
|
"9": any;
|
|
85
|
-
"10": any;
|
|
86
84
|
};
|
|
87
85
|
fontSizes: {
|
|
88
86
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as r from"@radix-ui/react-radio-group";import{styled as t}from"../../stitches.js";const o=t(r.Root,{display:"flex",flexWrap:"wrap",variants:{direction:{row:{flexDirection:"row","& > *:not(:last-child)":{mr:"$
|
|
1
|
+
import*as r from"@radix-ui/react-radio-group";import{styled as t}from"../../stitches.js";const o=t(r.Root,{display:"flex",flexWrap:"wrap",variants:{direction:{row:{flexDirection:"row","& > *:not(:last-child)":{mr:"$5"}},column:{flexDirection:"column"}}}});o.displayName="RadioButtonGroup";export{o as RadioButtonGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useFormContext as V,Controller as C}from"react-hook-form";import{Description as F}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{Label as g}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as h}from"../radio-button/RadioButtonGroup.js";import{ValidationError as v}from"../validation-error/ValidationError.js";import{styled as B}from"../../stitches.js";import{RadioField as R}from"./RadioField.js";const
|
|
1
|
+
import*as e from"react";import{useFormContext as V,Controller as C}from"react-hook-form";import{Description as F}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{Label as g}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as h}from"../radio-button/RadioButtonGroup.js";import{ValidationError as v}from"../validation-error/ValidationError.js";import{styled as B}from"../../stitches.js";import{RadioField as R}from"./RadioField.js";const q=B("fieldset",{all:"unset"}),r=({children:d,css:u,direction:s="column",defaultValue:t,description:l,label:c,name:n,validation:o,onValueChange:a})=>{const{control:p}=V(),{error:i}=b(n);return e.createElement(q,{css:u},e.createElement(g,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(o==null?void 0:o.required)},c),l&&e.createElement(F,{css:{mb:"$3"}},l),e.createElement(C,{control:p,name:n,rules:o,defaultValue:t,render:({onChange:f,value:E})=>e.createElement(h,{direction:s,defaultValue:t,onValueChange:m=>{f(m),a==null||a(m)},value:E},d)}),i&&e.createElement(v,{css:{mt:"$2"}},i))};r.Item=R,r.displayName="RadioButtonField";export{r as RadioButtonField};
|
|
@@ -64,7 +64,6 @@ export declare const StyledRadioCard: import("@stitches/react/types/styled-compo
|
|
|
64
64
|
warning: any;
|
|
65
65
|
warningMid: any;
|
|
66
66
|
warningDark: any;
|
|
67
|
-
warningText: any;
|
|
68
67
|
subjectEnglish: any;
|
|
69
68
|
subjectMaths: any;
|
|
70
69
|
subjectScience: any;
|
|
@@ -84,7 +83,6 @@ export declare const StyledRadioCard: import("@stitches/react/types/styled-compo
|
|
|
84
83
|
"7": any;
|
|
85
84
|
"8": any;
|
|
86
85
|
"9": any;
|
|
87
|
-
"10": any;
|
|
88
86
|
};
|
|
89
87
|
fontSizes: {
|
|
90
88
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as l from"@radix-ui/react-radio-group";import*as e from"react";import{styled as t}from"../../stitches.js";import{Box as d}from"../box/Box.js";const o=t(l.Item,{alignItems:"center",bg:"white",border:"1px solid $tonal200",borderRadius:"$0",cursor:"pointer",display:"flex",textAlign:"left",'&[data-state="checked"]':{outline:"2px solid $primary",outlineOffset:"-2px"},variants:{align:{left:{flexDirection:"row"},right:{flexDirection:"row-reverse"}},size:{md:{px:"$4",py:"$3"},lg:{px:"$
|
|
1
|
+
import*as l from"@radix-ui/react-radio-group";import*as e from"react";import{styled as t}from"../../stitches.js";import{Box as d}from"../box/Box.js";const o=t(l.Item,{alignItems:"center",bg:"white",border:"1px solid $tonal200",borderRadius:"$0",cursor:"pointer",display:"flex",textAlign:"left",'&[data-state="checked"]':{outline:"2px solid $primary",outlineOffset:"-2px"},variants:{align:{left:{flexDirection:"row"},right:{flexDirection:"row-reverse"}},size:{md:{px:"$4",py:"$3"},lg:{px:"$5",py:"$4"}},isFullWidth:{true:{width:"100%"},false:{width:"max-content"}}}}),c=t("div",{alignItems:"center",appearance:"none",backgroundColor:"transparent",border:"1px solid $tonal500",borderRadius:"$round",display:"flex",flexShrink:0,justifyContent:"center",p:0,size:"$1",transition:"all 50ms ease-out",'[data-state="checked"] &':{backgroundColor:"$primary",borderColor:"$primary"},variants:{containerIsFullWidth:{true:{},false:{}},align:{left:{mr:"$4"},right:{}}},compoundVariants:[{containerIsFullWidth:!0,align:"right",css:{ml:"auto"}},{containerIsFullWidth:!1,align:"right",css:{ml:"$4"}}]}),p=t(l.Indicator,{backgroundColor:"white",borderRadius:"$round",position:"absolute",size:"6px"}),u=({children:a,isFullWidth:r=!1,size:n="md",align:i="left",...s})=>e.createElement(o,{...s,align:i,isFullWidth:r,size:n},e.createElement(c,{align:i,containerIsFullWidth:r},e.createElement(p,null)),e.createElement(d,null,a));export{u as RadioCard,o as StyledRadioCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as d from"@radix-ui/react-radio-group";import*as e from"react";import{Stack as p}from"../stack/Stack.js";import{RadioCard as c}from"./RadioCard.js";const f=({css:t,children:r,size:
|
|
1
|
+
import*as d from"@radix-ui/react-radio-group";import*as e from"react";import{Stack as p}from"../stack/Stack.js";import{RadioCard as c}from"./RadioCard.js";const f=({css:t,children:r,size:l,isFullWidth:o,align:a,gap:s="3",justify:m,...n})=>e.createElement(d.Root,{...n},e.createElement(p,{direction:"row",justify:m,gap:s,css:t},e.Children.map(r,i=>e.isValidElement(i)&&(i==null?void 0:i.type)===c?e.cloneElement(i,{size:l,isFullWidth:o,align:a}):i)));export{f as RadioCardGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Search as
|
|
1
|
+
import{Search as g,Close as w}from"@atom-learning/icons";import*as t from"react";import{ActionIcon as z}from"../action-icon/ActionIcon.js";import{Box as y}from"../box/Box.js";import{Icon as c}from"../icon/Icon.js";import{Input as I}from"../input/Input.js";import{styled as l}from"../../stitches.js";import{useCallbackRef as k}from"../../utilities/hooks/useCallbackRef.js";var H=(e=>(e.SEARCH="SEARCH",e.CLEAR="CLEAR",e))(H||{});const L=l(c,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),x=l(I,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),p=({size:e="md",css:u,value:n,clearText:m="Clear",onChange:a,...E})=>{const[h,C]=k(),[b,v]=t.useState(n||""),[f,d]=t.useState(n?"CLEAR":"SEARCH"),A=()=>{var r,i;const s=h.current;if(!s)return;const o=(r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set;(i=o==null?void 0:o.call)==null||i.call(o,s,"");const $=new Event("input",{bubbles:!0});s.dispatchEvent($),s.focus()},R=r=>{v(r.target.value),d(r.target.value?"CLEAR":"SEARCH"),a==null||a(r)},S=()=>f==="SEARCH"?t.createElement(L,{is:g,size:e,css:{size:e=="sm"?"$1":20}}):t.createElement(z,{label:m,theme:"neutral",size:e,css:{position:"absolute",top:"0",right:"$1"},onClick:A},t.createElement(c,{is:w}));return t.createElement(y,{css:{position:"relative",...u}},t.createElement(x,{ref:C,size:e,type:"search",...E,value:b,onChange:R,css:{pr:e==="sm"?"$5":"$6"}}),S())};p.displayName="SearchInput";export{p as SearchInput};
|
|
@@ -63,7 +63,6 @@ declare const StyledSelect: import("@stitches/react/types/styled-component").Sty
|
|
|
63
63
|
warning: any;
|
|
64
64
|
warningMid: any;
|
|
65
65
|
warningDark: any;
|
|
66
|
-
warningText: any;
|
|
67
66
|
subjectEnglish: any;
|
|
68
67
|
subjectMaths: any;
|
|
69
68
|
subjectScience: any;
|
|
@@ -83,7 +82,6 @@ declare const StyledSelect: import("@stitches/react/types/styled-component").Sty
|
|
|
83
82
|
"7": any;
|
|
84
83
|
"8": any;
|
|
85
84
|
"9": any;
|
|
86
|
-
"10": any;
|
|
87
85
|
};
|
|
88
86
|
fontSizes: {
|
|
89
87
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"react";import{styled as d,theme as s}from"../../stitches.js";import{encodeBackgroundIcon as c}from"../../utilities/style/encode-background-icon.js";const p=d("select",{appearance:"none",backgroundColor:"white",backgroundImage:c(s.colors.tonal300.value,"chevron"),backgroundRepeat:"no-repeat, repeat",border:"1px solid $tonal300",borderRadius:"$0",color:"$tonal600",display:"block",fontFamily:"$body",fontWeight:400,lineHeight:1.4,transition:"all 75ms ease-out",width:"100%","&:hover":{cursor:"pointer"},"&:focus":{borderColor:"$primary",outline:"none"},"&::-ms-expand":{display:"none"},"&[disabled], > option[disabled]":{backgroundColor:"$tonal100",color:"$tonal400",cursor:"not-allowed"},variants:{size:{sm:{backgroundPosition:"right $space$2 top 50%, 0 0",backgroundSize:"18px auto, 100%",fontSize:"$sm",height:"$3",pl:"$2",pr:"$
|
|
1
|
+
import*as o from"react";import{styled as d,theme as s}from"../../stitches.js";import{encodeBackgroundIcon as c}from"../../utilities/style/encode-background-icon.js";const p=d("select",{appearance:"none",backgroundColor:"white",backgroundImage:c(s.colors.tonal300.value,"chevron"),backgroundRepeat:"no-repeat, repeat",border:"1px solid $tonal300",borderRadius:"$0",color:"$tonal600",display:"block",fontFamily:"$body",fontWeight:400,lineHeight:1.4,transition:"all 75ms ease-out",width:"100%","&:hover":{cursor:"pointer"},"&:focus":{borderColor:"$primary",outline:"none"},"&::-ms-expand":{display:"none"},"&[disabled], > option[disabled]":{backgroundColor:"$tonal100",color:"$tonal400",cursor:"not-allowed"},variants:{size:{sm:{backgroundPosition:"right $space$2 top 50%, 0 0",backgroundSize:"18px auto, 100%",fontSize:"$sm",height:"$3",pl:"$2",pr:"$5"},md:{backgroundPosition:"right $space$3 top 50%, 0 0",backgroundSize:"20px auto, 100%",fontSize:"$md",height:"$4",pl:"$3",pr:"$6"}},state:{error:{border:"1px solid $danger"}}}}),t=o.forwardRef(({placeholder:r,children:n,size:l="md",...e},i)=>{const a={size:l,ref:i,...e};return!e.value&&!e.defaultValue&&(a.defaultValue=""),o.createElement(p,{...a},r&&o.createElement("option",{disabled:!0,hidden:!0,value:""},r),n)});t.displayName="Select";export{t as Select};
|
|
@@ -63,7 +63,6 @@ declare const StyledSlider: import("@stitches/react/types/styled-component").Sty
|
|
|
63
63
|
warning: any;
|
|
64
64
|
warningMid: any;
|
|
65
65
|
warningDark: any;
|
|
66
|
-
warningText: any;
|
|
67
66
|
subjectEnglish: any;
|
|
68
67
|
subjectMaths: any;
|
|
69
68
|
subjectScience: any;
|
|
@@ -83,7 +82,6 @@ declare const StyledSlider: import("@stitches/react/types/styled-component").Sty
|
|
|
83
82
|
"7": any;
|
|
84
83
|
"8": any;
|
|
85
84
|
"9": any;
|
|
86
|
-
"10": any;
|
|
87
85
|
};
|
|
88
86
|
fontSizes: {
|
|
89
87
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{useFormContext as x,Controller as E}from"react-hook-form";import{FieldWrapper as V}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import{Slider as l}from"../slider/Slider.js";const
|
|
1
|
+
import e from"react";import{useFormContext as x,Controller as E}from"react-hook-form";import{FieldWrapper as V}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import{Slider as l}from"../slider/Slider.js";const o=({css:u,label:i,name:t,defaultValue:a,outputLabel:d,min:r=0,max:m=100,steps:p=[],...s})=>{const{control:c}=x();return e.createElement(V,{css:u,fieldId:t,label:i},e.createElement(E,{control:c,name:t,defaultValue:a,render:({onChange:f,value:n})=>e.createElement(l,{name:t,defaultValue:a,onValueChange:f,value:n,min:r,max:m,...s},e.createElement(l.Steps,{min:r,max:m,steps:p}),e.createElement(l.Value,{value:n||a,outputLabel:d}))}))};o.displayName="SliderField";export{o as SliderField};
|
|
@@ -5,7 +5,7 @@ declare const StyledStack: import("@stitches/react/types/styled-component").Styl
|
|
|
5
5
|
wrap?: "wrap" | "wrap-reverse" | "no-wrap" | undefined;
|
|
6
6
|
justify?: boolean | "center" | "false" | "end" | "start" | undefined;
|
|
7
7
|
align?: boolean | "center" | "false" | "end" | "start" | undefined;
|
|
8
|
-
gap?: number | boolean | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
8
|
+
gap?: number | boolean | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "false" | undefined;
|
|
9
9
|
}, {
|
|
10
10
|
sm: string;
|
|
11
11
|
md: string;
|
|
@@ -66,7 +66,6 @@ declare const StyledStack: import("@stitches/react/types/styled-component").Styl
|
|
|
66
66
|
warning: any;
|
|
67
67
|
warningMid: any;
|
|
68
68
|
warningDark: any;
|
|
69
|
-
warningText: any;
|
|
70
69
|
subjectEnglish: any;
|
|
71
70
|
subjectMaths: any;
|
|
72
71
|
subjectScience: any;
|
|
@@ -86,7 +85,6 @@ declare const StyledStack: import("@stitches/react/types/styled-component").Styl
|
|
|
86
85
|
"7": any;
|
|
87
86
|
"8": any;
|
|
88
87
|
"9": any;
|
|
89
|
-
"10": any;
|
|
90
88
|
};
|
|
91
89
|
fontSizes: {
|
|
92
90
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as s from"react";import{theme as
|
|
1
|
+
import*as s from"react";import{theme as c,styled as o}from"../../stitches.js";import{CSSWrapper as f}from"../../utilities/css-wrapper/CSSWrapper.js";const m=Object.keys(c.space).reduce((t,e)=>({...t,[e]:{mt:`-$space$${e}`,ml:`-$space$${e}`,"& > *":{mt:`$space$${e}`,ml:`$space$${e}`}}}),{}),w=o("div",{display:"flex","& > *":{m:0},variants:{direction:{row:{flexDirection:"row"},"row-reverse":{flexDirection:"row-reverse"},column:{flexDirection:"column"}},wrap:{wrap:{flexWrap:"wrap"},"no-wrap":{flexWrap:"no-wrap"},"wrap-reverse":{flexWrap:"wrap-reverse"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},false:{}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"},false:{}},gap:{...m,false:{}}}}),n=({css:t,gap:e=2,direction:r="row",wrap:i="wrap",justify:l="start",align:a,...p})=>s.createElement(f,{css:t},s.createElement(w,{direction:r,gap:e,wrap:i,justify:l,align:typeof a>"u"&&r!=="column"?"center":a,...p}));n.displayName="Stack";export{n as Stack};
|
|
@@ -60,7 +60,6 @@ declare const StyledStackContent: import("@stitches/react/types/styled-component
|
|
|
60
60
|
warning: any;
|
|
61
61
|
warningMid: any;
|
|
62
62
|
warningDark: any;
|
|
63
|
-
warningText: any;
|
|
64
63
|
subjectEnglish: any;
|
|
65
64
|
subjectMaths: any;
|
|
66
65
|
subjectScience: any;
|
|
@@ -80,7 +79,6 @@ declare const StyledStackContent: import("@stitches/react/types/styled-component
|
|
|
80
79
|
"7": any;
|
|
81
80
|
"8": any;
|
|
82
81
|
"9": any;
|
|
83
|
-
"10": any;
|
|
84
82
|
};
|
|
85
83
|
fontSizes: {
|
|
86
84
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import{styled as r}from"../../stitches.js";import{StyledDivider as d}from"../divider/Divider.js";import{StyledHeading as e}from"../heading/Heading.js";import{StyledImage as l}from"../image/Image.js";import{StyledList as a}from"../list/List.js";import{StyledText as c}from"../text/Text.js";const n=r("div",{[`& > ${e}`]:{maxWidth:"65ch","&:not(:first-child)":{mt:"$
|
|
1
|
+
import*as t from"react";import{styled as r}from"../../stitches.js";import{StyledDivider as d}from"../divider/Divider.js";import{StyledHeading as e}from"../heading/Heading.js";import{StyledImage as l}from"../image/Image.js";import{StyledList as a}from"../list/List.js";import{StyledText as c}from"../text/Text.js";const n=r("div",{[`& > ${e}`]:{maxWidth:"65ch","&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}},[`& > ${c}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${a}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${d}`]:{my:"$5"},[`& > ${l}`]:{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}}),m=t.forwardRef((o,i)=>t.createElement(n,{ref:i,...o}));m.displayName="StackContent";export{m as StackContent};
|
|
@@ -58,7 +58,6 @@ export declare const StepperStepBullet: import("@stitches/react/types/styled-com
|
|
|
58
58
|
warning: any;
|
|
59
59
|
warningMid: any;
|
|
60
60
|
warningDark: any;
|
|
61
|
-
warningText: any;
|
|
62
61
|
subjectEnglish: any;
|
|
63
62
|
subjectMaths: any;
|
|
64
63
|
subjectScience: any;
|
|
@@ -78,7 +77,6 @@ export declare const StepperStepBullet: import("@stitches/react/types/styled-com
|
|
|
78
77
|
"7": any;
|
|
79
78
|
"8": any;
|
|
80
79
|
"9": any;
|
|
81
|
-
"10": any;
|
|
82
80
|
};
|
|
83
81
|
fontSizes: {
|
|
84
82
|
xs: any;
|
|
@@ -265,7 +263,7 @@ export declare const StepperStepBullet: import("@stitches/react/types/styled-com
|
|
|
265
263
|
};
|
|
266
264
|
};
|
|
267
265
|
}>>, {
|
|
268
|
-
status?: "success" | "default" | "active" | "viewed" | undefined;
|
|
266
|
+
status?: "success" | "default" | "active" | "viewed" | "completed" | "reviewed" | undefined;
|
|
269
267
|
}, {
|
|
270
268
|
sm: string;
|
|
271
269
|
md: string;
|
|
@@ -326,7 +324,6 @@ export declare const StepperStepBullet: import("@stitches/react/types/styled-com
|
|
|
326
324
|
warning: any;
|
|
327
325
|
warningMid: any;
|
|
328
326
|
warningDark: any;
|
|
329
|
-
warningText: any;
|
|
330
327
|
subjectEnglish: any;
|
|
331
328
|
subjectMaths: any;
|
|
332
329
|
subjectScience: any;
|
|
@@ -346,7 +343,6 @@ export declare const StepperStepBullet: import("@stitches/react/types/styled-com
|
|
|
346
343
|
"7": any;
|
|
347
344
|
"8": any;
|
|
348
345
|
"9": any;
|
|
349
|
-
"10": any;
|
|
350
346
|
};
|
|
351
347
|
fontSizes: {
|
|
352
348
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as e}from"../../stitches.js";import{Flex as o}from"../flex/Flex.js";const r=e(o,{position:"relative",p:"$2",justifyContent:"center",alignItems:"center",size:"$3",borderRadius:"50%",border:"none",bg:"$tonal50",zIndex:1,flex:"none",variants:{status:{default:{bg:"$tonal50",color:"$
|
|
1
|
+
import{styled as e}from"../../stitches.js";import{Flex as o}from"../flex/Flex.js";const r=e(o,{position:"relative",p:"$2",justifyContent:"center",alignItems:"center",size:"$3",borderRadius:"50%",border:"none",bg:"$tonal50",zIndex:1,flex:"none",variants:{status:{default:{bg:"$tonal50",color:"$tonal300"},active:{bg:"white",color:"$primaryMid",border:"2px solid",borderColor:"currentColor"},viewed:{bg:"white",border:"2px solid $tonal200",color:"$tonal600"},completed:{bg:"$primary",color:"white"},reviewed:{bg:"$primaryMid",color:"white"},success:{bg:"$success",color:"white"}}}});export{r as StepperStepBullet};
|
|
@@ -58,7 +58,6 @@ export declare const StepperStepContainer: import("@stitches/react/types/styled-
|
|
|
58
58
|
warning: any;
|
|
59
59
|
warningMid: any;
|
|
60
60
|
warningDark: any;
|
|
61
|
-
warningText: any;
|
|
62
61
|
subjectEnglish: any;
|
|
63
62
|
subjectMaths: any;
|
|
64
63
|
subjectScience: any;
|
|
@@ -78,7 +77,6 @@ export declare const StepperStepContainer: import("@stitches/react/types/styled-
|
|
|
78
77
|
"7": any;
|
|
79
78
|
"8": any;
|
|
80
79
|
"9": any;
|
|
81
|
-
"10": any;
|
|
82
80
|
};
|
|
83
81
|
fontSizes: {
|
|
84
82
|
xs: any;
|
|
@@ -267,6 +265,7 @@ export declare const StepperStepContainer: import("@stitches/react/types/styled-
|
|
|
267
265
|
}>>, {
|
|
268
266
|
direction?: "horizontal" | "vertical" | undefined;
|
|
269
267
|
separator?: "success" | "default" | "active" | undefined;
|
|
268
|
+
status?: "success" | "default" | "active" | "viewed" | "completed" | "reviewed" | undefined;
|
|
270
269
|
}, {
|
|
271
270
|
sm: string;
|
|
272
271
|
md: string;
|
|
@@ -327,7 +326,6 @@ export declare const StepperStepContainer: import("@stitches/react/types/styled-
|
|
|
327
326
|
warning: any;
|
|
328
327
|
warningMid: any;
|
|
329
328
|
warningDark: any;
|
|
330
|
-
warningText: any;
|
|
331
329
|
subjectEnglish: any;
|
|
332
330
|
subjectMaths: any;
|
|
333
331
|
subjectScience: any;
|
|
@@ -347,7 +345,6 @@ export declare const StepperStepContainer: import("@stitches/react/types/styled-
|
|
|
347
345
|
"7": any;
|
|
348
346
|
"8": any;
|
|
349
347
|
"9": any;
|
|
350
|
-
"10": any;
|
|
351
348
|
};
|
|
352
349
|
fontSizes: {
|
|
353
350
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as t}from"../../stitches.js";import{Flex as
|
|
1
|
+
import{styled as t}from"../../stitches.js";import{Flex as i}from"../flex/Flex.js";const o=t(i,{position:"relative",fontFamily:"$body",fontWeight:600,fontSize:"$md",alignItems:"center","&:not(:last-child)::after":{content:"",position:"absolute"},"&:focus-visible":{outline:"none"},variants:{direction:{vertical:{py:"$3",flexDirection:"row","&:not(:last-child)::after":{height:"100%",width:"4px",left:"14px",top:"50%"}},horizontal:{px:"$2",flexDirection:"column","&:not(:last-child)::after":{width:"100%",height:"4px",left:"50%",top:"14px"}}},separator:{default:{"&:not(:last-child)::after":{bg:"$tonal50"}},active:{"&:not(:last-child)::after":{bg:"$primary"}},success:{"&:not(:last-child)::after":{bg:"$success"}}},status:{completed:{"&:hover":{"& :first-child":{bg:"$primaryMid",color:"white !important"},"& :last-child":{color:"$primaryMid"}},"&:focus-visible":{"& :first-child":{outline:"2px solid $primary",outlineOffset:"2px"}}},active:{"&:hover":{"& :first-child":{borderColor:"$tonal400",color:"$tonal600"},"& :last-child":{color:"$tonal600"}},"&:focus-visible":{"& :first-child":{outline:"2px solid $primary",outlineOffset:"2px"}}},default:{},viewed:{"&:focus-visible":{"& :first-child":{outline:"2px solid $primary !important",outlineOffset:"2px !important"}}},success:{},reviewed:{"&:focus-visible":{"& :first-child":{outline:"2px solid $primary !important",outlineOffset:"2px !important"}}}}}});export{o as StepperStepContainer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as n from"react";import{Button as p}from"../button/Button.js";import{useStepper as m}from"./stepper-context/StepperContext.js";const c=({label:
|
|
1
|
+
import*as n from"react";import{Button as p}from"../button/Button.js";import{useStepper as m}from"./stepper-context/StepperContext.js";const c=({label:t,children:r,onClick:o,...i})=>{const{goToNextStep:e,activeStep:l}=m();return n.createElement(p,{size:"sm",...i,onClick:()=>{if(o)return o(e);e==null||e()},css:{ml:"auto"}},r||(t==null?void 0:t(l)))};export{c as StepperStepForward};
|
|
@@ -64,7 +64,6 @@ export declare const StepperStepLabel: import("@stitches/react/types/styled-comp
|
|
|
64
64
|
warning: any;
|
|
65
65
|
warningMid: any;
|
|
66
66
|
warningDark: any;
|
|
67
|
-
warningText: any;
|
|
68
67
|
subjectEnglish: any;
|
|
69
68
|
subjectMaths: any;
|
|
70
69
|
subjectScience: any;
|
|
@@ -84,7 +83,6 @@ export declare const StepperStepLabel: import("@stitches/react/types/styled-comp
|
|
|
84
83
|
"7": any;
|
|
85
84
|
"8": any;
|
|
86
85
|
"9": any;
|
|
87
|
-
"10": any;
|
|
88
86
|
};
|
|
89
87
|
fontSizes: {
|
|
90
88
|
xs: any;
|
|
@@ -275,7 +273,7 @@ export declare const StepperStepLabel: import("@stitches/react/types/styled-comp
|
|
|
275
273
|
as?: import("react").ElementType<any> | import("react").ComponentType<{}> | undefined;
|
|
276
274
|
}>, {
|
|
277
275
|
direction?: "horizontal" | "vertical" | undefined;
|
|
278
|
-
status?: "success" | "default" | "active" | "viewed" | undefined;
|
|
276
|
+
status?: "success" | "default" | "active" | "viewed" | "completed" | "reviewed" | undefined;
|
|
279
277
|
}, {
|
|
280
278
|
sm: string;
|
|
281
279
|
md: string;
|
|
@@ -336,7 +334,6 @@ export declare const StepperStepLabel: import("@stitches/react/types/styled-comp
|
|
|
336
334
|
warning: any;
|
|
337
335
|
warningMid: any;
|
|
338
336
|
warningDark: any;
|
|
339
|
-
warningText: any;
|
|
340
337
|
subjectEnglish: any;
|
|
341
338
|
subjectMaths: any;
|
|
342
339
|
subjectScience: any;
|
|
@@ -356,7 +353,6 @@ export declare const StepperStepLabel: import("@stitches/react/types/styled-comp
|
|
|
356
353
|
"7": any;
|
|
357
354
|
"8": any;
|
|
358
355
|
"9": any;
|
|
359
|
-
"10": any;
|
|
360
356
|
};
|
|
361
357
|
fontSizes: {
|
|
362
358
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as t}from"../../stitches.js";import{Text as e}from"../text/Text.js";const o=t(e,{fontWeight:600,variants:{direction:{vertical:{ml:"$3",textAlign:"left"},horizontal:{mt:"$3",textAlign:"center"}},status:{default:{color:"$
|
|
1
|
+
import{styled as t}from"../../stitches.js";import{Text as e}from"../text/Text.js";const o=t(e,{fontWeight:600,variants:{direction:{vertical:{ml:"$3",textAlign:"left"},horizontal:{mt:"$3",textAlign:"center"}},status:{default:{color:"$tonal300",fontWeight:400},active:{color:"$primaryMid"},viewed:{color:"$tonal600"},completed:{color:"$primary"},success:{color:"$success"},reviewed:{}}}});export{o as StepperStepLabel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ok as f}from"@atom-learning/icons";import*as i from"react";import{styled as b}from"../../stitches.js";import{Flex as
|
|
1
|
+
import{Ok as f}from"@atom-learning/icons";import*as i from"react";import{styled as b}from"../../stitches.js";import{Flex as h}from"../flex/Flex.js";import{Icon as v}from"../icon/Icon.js";import{useStepper as g}from"./stepper-context/StepperContext.js";import{StepperStepBullet as D}from"./StepperStepBullet.js";import{StepperStepContainer as I}from"./StepperStepContainer.js";import{StepperStepLabel as U}from"./StepperStepLabel.js";import{Status as r}from"./types.js";const x=b(h,{justifyContent:"space-between",variants:{direction:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),T=({css:u})=>{const{steps:s,goToStep:m,activeStep:l,viewedSteps:n,allowSkip:c,direction:a,hideLabels:S,completedSteps:p}=g(),d=t=>{const e=s[t];return e.status?e.status:p.length===s.length?r.SUCCESS:l===t&&p.includes(l)?r.REVIEWED:l===t?r.ACTIVE:p.includes(t)?r.COMPLETED:n.includes(t)?r.VIEWED:r.DEFAULT},E=t=>{var e;const o=(e=s[t])==null?void 0:e.status;return p.length===s.length?r.SUCCESS:o===r.SUCCESS?r.SUCCESS:o===r.VIEWED||t<Math.max(...n)?r.ACTIVE:r.DEFAULT};return i.createElement(x,{css:u,direction:a},s.map((t,e)=>{const o=d(e),C=E(e);return i.createElement(I,{tabIndex:0,key:`step_${e}`,direction:a,separator:C,status:o,css:a==="horizontal"?{width:`calc(100% / ${s.length})`}:{height:`calc(100% / ${s.length})`}},i.createElement(D,{as:c?"button":"div",onClick:()=>c&&n.includes(e)?m==null?void 0:m(e):void 0,status:o,"aria-current":e===l?"step":void 0,"aria-label":t.label?"":`step ${e+1}`,"aria-labelledby":t.label?`step-${e}`:void 0,css:{cursor:c&&n.includes(e)?"pointer":"auto"}},t.status==="success"?i.createElement(v,{is:f}):e+1),t.label&&!S&&i.createElement(U,{as:"span",id:`step-${e}`,direction:a,status:o},t.label))}))};export{T as StepperSteps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"react";const
|
|
1
|
+
import*as o from"react";const c=o.createContext({steps:[],goToPreviousStep:()=>null,goToNextStep:()=>null,goToStep:()=>null,activeStep:0,viewedSteps:[],allowSkip:!1,direction:"horizontal",hideLabels:!1,completedSteps:[]}),P=({children:n,stepCount:r,allowSkip:a,onComplete:p,onStepChange:s,direction:d,steps:v,hideLabels:h})=>{const[e,l]=o.useState(0),[w,m]=o.useState([0]),[g,f]=o.useState([]),u=!r;o.useEffect(()=>{m(t=>t.includes(e)?t:[...t,e]),s==null||s(e)},[e,s]);const T=()=>{const t=p&&e===r-1,S=e<r-1;if((p||S)&&f(i=>i.includes(e)?i:[...i,e]),t)return p==null?void 0:p();if(S)return l(i=>i+1)},x=()=>{l(t=>t-1)},C=t=>{l(t)};return o.createElement(c.Provider,{value:{steps:v||Array(r).fill(""),goToPreviousStep:u?void 0:x,goToNextStep:u?void 0:T,goToStep:u?void 0:C,activeStep:e,viewedSteps:w,completedSteps:g,allowSkip:a,direction:d,hideLabels:h}},n)},b=()=>{const n=o.useContext(c);if(!n)throw new Error("Ensure that you wrap any components with the root component Stepper");return n};export{P as StepperProvider,b as useStepper};
|
|
@@ -3,7 +3,9 @@ export declare enum Status {
|
|
|
3
3
|
ACTIVE = "active",
|
|
4
4
|
VIEWED = "viewed",
|
|
5
5
|
SUCCESS = "success",
|
|
6
|
-
DEFAULT = "default"
|
|
6
|
+
DEFAULT = "default",
|
|
7
|
+
COMPLETED = "completed",
|
|
8
|
+
REVIEWED = "reviewed"
|
|
7
9
|
}
|
|
8
10
|
export interface Step {
|
|
9
11
|
label?: string;
|
|
@@ -17,6 +19,7 @@ export declare type Context = {
|
|
|
17
19
|
goToStep?: (index: number) => void;
|
|
18
20
|
activeStep: number;
|
|
19
21
|
viewedSteps: number[];
|
|
22
|
+
completedSteps: number[];
|
|
20
23
|
allowSkip?: boolean;
|
|
21
24
|
direction?: Direction;
|
|
22
25
|
hideLabels: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var t=(E=>(E.ACTIVE="active",E.VIEWED="viewed",E.SUCCESS="success",E.DEFAULT="default",E.COMPLETED="completed",E.REVIEWED="reviewed",E))(t||{});export{t as Status};
|
|
@@ -60,7 +60,6 @@ declare const StyledSwitch: import("@stitches/react/types/styled-component").Sty
|
|
|
60
60
|
warning: any;
|
|
61
61
|
warningMid: any;
|
|
62
62
|
warningDark: any;
|
|
63
|
-
warningText: any;
|
|
64
63
|
subjectEnglish: any;
|
|
65
64
|
subjectMaths: any;
|
|
66
65
|
subjectScience: any;
|
|
@@ -80,7 +79,6 @@ declare const StyledSwitch: import("@stitches/react/types/styled-component").Sty
|
|
|
80
79
|
"7": any;
|
|
81
80
|
"8": any;
|
|
82
81
|
"9": any;
|
|
83
|
-
"10": any;
|
|
84
82
|
};
|
|
85
83
|
fontSizes: {
|
|
86
84
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"@radix-ui/react-switch";import*as r from"react";import{styled as
|
|
1
|
+
import*as o from"@radix-ui/react-switch";import*as r from"react";import{styled as e}from"../../stitches.js";const n=e(o.Root,{appearance:"none",backgroundColor:"$tonal200",border:"none",borderRadius:"$round",cursor:"pointer",display:"flex",overflow:"hidden",p:"$0",position:"relative",transition:"all 50ms ease-out",width:"$4","&:hover":{backgroundColor:"$tonal300"},"&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},'&[data-state="checked"]':{backgroundColor:"$primary"},'&[data-state="checked"]:hover':{backgroundColor:"$primaryMid"}}),i=e(o.Thumb,{backgroundColor:"white",borderRadius:"$round",display:"block",size:"$1",transition:"transform 50ms",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(calc($sizes$2 - $space$1))"}}),a=t=>r.createElement(n,{...t},r.createElement(i,null));a.displayName="Switch";export{a as Switch};
|
|
@@ -78,7 +78,6 @@ declare const StyledTable: import("@stitches/react/types/styled-component").Styl
|
|
|
78
78
|
warning: any;
|
|
79
79
|
warningMid: any;
|
|
80
80
|
warningDark: any;
|
|
81
|
-
warningText: any;
|
|
82
81
|
subjectEnglish: any;
|
|
83
82
|
subjectMaths: any;
|
|
84
83
|
subjectScience: any;
|
|
@@ -98,7 +97,6 @@ declare const StyledTable: import("@stitches/react/types/styled-component").Styl
|
|
|
98
97
|
"7": any;
|
|
99
98
|
"8": any;
|
|
100
99
|
"9": any;
|
|
101
|
-
"10": any;
|
|
102
100
|
};
|
|
103
101
|
fontSizes: {
|
|
104
102
|
xs: any;
|
|
@@ -61,7 +61,6 @@ declare const StyledTableBody: import("@stitches/react/types/styled-component").
|
|
|
61
61
|
warning: any;
|
|
62
62
|
warningMid: any;
|
|
63
63
|
warningDark: any;
|
|
64
|
-
warningText: any;
|
|
65
64
|
subjectEnglish: any;
|
|
66
65
|
subjectMaths: any;
|
|
67
66
|
subjectScience: any;
|
|
@@ -81,7 +80,6 @@ declare const StyledTableBody: import("@stitches/react/types/styled-component").
|
|
|
81
80
|
"7": any;
|
|
82
81
|
"8": any;
|
|
83
82
|
"9": any;
|
|
84
|
-
"10": any;
|
|
85
83
|
};
|
|
86
84
|
fontSizes: {
|
|
87
85
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as r from"react";import{styled as d}from"../../stitches.js";import{TableRow as i}from"./TableRow.js";const a=d("tbody",{variants:{striped:{true:{[`${i}`]:{"&:nth-child(odd)":{bg:"white"},"&:nth-child(even)":{bg:"$tonal50"}}},false:{bg:"white"}}}}),
|
|
1
|
+
import*as r from"react";import{styled as d}from"../../stitches.js";import{TableRow as i}from"./TableRow.js";const a=d("tbody",{variants:{striped:{true:{[`${i}`]:{"&:nth-child(odd)":{bg:"white"},"&:nth-child(even)":{bg:"$tonal50"}}},false:{bg:"white"}}}}),e=({striped:t=!0,...o})=>r.createElement(a,{striped:t,...o});e.displayName="TableBody";export{e as TableBody};
|
|
@@ -58,7 +58,6 @@ export declare const TableCell: import("@stitches/react/types/styled-component")
|
|
|
58
58
|
warning: any;
|
|
59
59
|
warningMid: any;
|
|
60
60
|
warningDark: any;
|
|
61
|
-
warningText: any;
|
|
62
61
|
subjectEnglish: any;
|
|
63
62
|
subjectMaths: any;
|
|
64
63
|
subjectScience: any;
|
|
@@ -78,7 +77,6 @@ export declare const TableCell: import("@stitches/react/types/styled-component")
|
|
|
78
77
|
"7": any;
|
|
79
78
|
"8": any;
|
|
80
79
|
"9": any;
|
|
81
|
-
"10": any;
|
|
82
80
|
};
|
|
83
81
|
fontSizes: {
|
|
84
82
|
xs: any;
|