@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.
- package/CHANGELOG.md +3 -3
- package/dist/components/accordion/Accordion.d.ts +1 -0
- package/dist/components/accordion/AccordionContent.d.ts +1 -0
- package/dist/components/accordion/AccordionItem.d.ts +1 -0
- package/dist/components/accordion/AccordionTrigger.d.ts +1 -0
- 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 +2 -1
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/alert-dialog/AlertDialog.d.ts +1 -0
- package/dist/components/alert-dialog/AlertDialogContent.d.ts +1 -0
- package/dist/components/badge/Badge.d.ts +2 -0
- package/dist/components/box/Box.d.ts +1 -0
- package/dist/components/button/Button.d.ts +1 -0
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/calendar/Day.d.ts +1 -0
- package/dist/components/carousel/CarouselPagination.d.ts +1 -0
- package/dist/components/carousel/CarouselSlide.d.ts +1 -0
- package/dist/components/carousel/CarouselSlider.d.ts +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +1 -0
- package/dist/components/combobox/Combobox.d.ts +1 -0
- package/dist/components/combobox/ComboboxInput.d.ts +1 -0
- package/dist/components/combobox/ComboboxList.d.ts +1 -0
- package/dist/components/combobox/ComboboxOption.d.ts +1 -0
- package/dist/components/combobox/ComboboxPopover.d.ts +1 -0
- package/dist/components/date-input/DateInput.js +1 -1
- package/dist/components/dialog/Dialog.d.ts +1 -0
- package/dist/components/dialog/DialogBackground.d.ts +2 -0
- package/dist/components/dialog/DialogClose.d.ts +1 -0
- package/dist/components/dialog/DialogContent.d.ts +1 -0
- package/dist/components/dialog/DialogContent.js +1 -1
- package/dist/components/divider/Divider.d.ts +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +1 -0
- package/dist/components/dropdown-menu/DropdownMenuContent.d.ts +1 -0
- package/dist/components/dropdown-menu/DropdownMenuItem.d.ts +1 -0
- package/dist/components/dropdown-menu/DropdownMenuSeparator.d.ts +1 -0
- package/dist/components/dropdown-menu/DropdownMenuTrigger.d.ts +1 -0
- package/dist/components/empty-state/EmptyState.d.ts +2 -0
- package/dist/components/empty-state/EmptyStateBody.d.ts +2 -0
- package/dist/components/empty-state/EmptyStateImage.d.ts +2 -0
- package/dist/components/empty-state/EmptyStateTitle.d.ts +1 -0
- package/dist/components/field-wrapper/FieldWrapper.js +1 -1
- package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
- package/dist/components/flex/Flex.d.ts +1 -0
- package/dist/components/form/Form.d.ts +1 -0
- package/dist/components/grid/Grid.d.ts +1 -0
- package/dist/components/heading/Heading.d.ts +1 -0
- package/dist/components/icon/Icon.d.ts +1 -0
- package/dist/components/image/Image.d.ts +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/inline-message/InlineMessage.config.d.ts +5 -0
- package/dist/components/inline-message/InlineMessage.config.js +1 -0
- package/dist/components/inline-message/InlineMessage.d.ts +541 -0
- package/dist/components/inline-message/InlineMessage.js +1 -0
- package/dist/components/inline-message/InlineMessage.types.d.ts +1 -0
- package/dist/components/inline-message/index.d.ts +1 -0
- package/dist/components/input/Input.d.ts +1 -0
- package/dist/components/label/Label.d.ts +1 -0
- package/dist/components/link/Link.d.ts +1 -0
- package/dist/components/list/List.d.ts +2 -0
- package/dist/components/notification-badge/NotificationBadge.d.ts +2 -0
- package/dist/components/password-input/PasswordInput.js +1 -1
- package/dist/components/popover/Popover.d.ts +1 -0
- package/dist/components/popover/PopoverContent.d.ts +1 -0
- package/dist/components/popover/PopoverContent.js +1 -1
- package/dist/components/progress-bar/ProgressBar.d.ts +1 -0
- package/dist/components/radio-button/RadioButton.d.ts +1 -0
- package/dist/components/radio-button/RadioButtonGroup.d.ts +1 -0
- package/dist/components/radio-button-field/RadioButtonField.js +1 -1
- package/dist/components/radio-card/RadioCard.d.ts +1 -0
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/select/Select.d.ts +1 -0
- package/dist/components/slider/Slider.d.ts +1 -0
- package/dist/components/stack/Stack.d.ts +1 -0
- package/dist/components/stack-content/StackContent.d.ts +1 -0
- package/dist/components/stepper/StepperStepBullet.d.ts +2 -0
- package/dist/components/stepper/StepperStepContainer.d.ts +2 -0
- package/dist/components/stepper/StepperStepLabel.d.ts +2 -0
- package/dist/components/switch/Switch.d.ts +1 -0
- package/dist/components/table/Table.d.ts +1 -0
- package/dist/components/table/TableBody.d.ts +1 -0
- package/dist/components/table/TableCell.d.ts +1 -0
- package/dist/components/table/TableFooter.d.ts +1 -0
- package/dist/components/table/TableFooterCell.d.ts +1 -0
- package/dist/components/table/TableHeader.d.ts +1 -0
- package/dist/components/table/TableHeaderCell.d.ts +1 -0
- package/dist/components/table/TableRow.d.ts +1 -0
- package/dist/components/tabs/TabTrigger.d.ts +1 -0
- package/dist/components/tabs/Tabs.d.ts +2 -0
- package/dist/components/tabs/TabsTriggerList.d.ts +1 -0
- package/dist/components/tabs/TabsTriggerList.js +1 -1
- package/dist/components/text/Text.d.ts +1 -0
- package/dist/components/textarea/Textarea.d.ts +1 -0
- package/dist/components/toast/Toast.d.ts +1 -0
- package/dist/components/toggle-group/ToggleGroupButton.d.ts +2 -0
- package/dist/components/toggle-group/ToggleGroupItem.d.ts +2 -0
- package/dist/components/toggle-group/ToggleGroupRoot.d.ts +1 -0
- package/dist/components/toggle-group/index.d.ts +5 -0
- package/dist/components/tooltip/TooltipContent.d.ts +1 -0
- package/dist/components/video/Video.d.ts +2 -0
- package/dist/docgen.json +1 -1
- package/dist/docs/ActionIcon.mdx +13 -19
- package/dist/docs/CheckboxField.mdx +1 -1
- package/dist/docs/DateField.mdx +2 -2
- package/dist/docs/FieldWrapper.mdx +1 -1
- package/dist/docs/Form.mdx +3 -3
- package/dist/docs/Icon.mdx +1 -1
- package/dist/docs/InlineMessage.mdx +52 -0
- package/dist/docs/InputField.mdx +2 -2
- package/dist/docs/RadioButtonField.mdx +2 -2
- package/dist/docs/SelectField.mdx +2 -2
- package/dist/docs/TextareaField.mdx +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.js +1 -1
- package/dist/stitches.d.ts +10 -0
- package/package.json +3 -2
- package/dist/components/validation-error/ValidationError.d.ts +0 -7
- package/dist/components/validation-error/ValidationError.js +0 -1
- package/dist/components/validation-error/index.d.ts +0 -1
- package/dist/docs/ValidationError.mdx +0 -12
|
@@ -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};
|
|
@@ -58,6 +58,7 @@ 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;
|
|
61
62
|
subjectEnglish: any;
|
|
62
63
|
subjectMaths: any;
|
|
63
64
|
subjectScience: any;
|
|
@@ -324,6 +325,7 @@ export declare const StepperStepBullet: import("@stitches/react/types/styled-com
|
|
|
324
325
|
warning: any;
|
|
325
326
|
warningMid: any;
|
|
326
327
|
warningDark: any;
|
|
328
|
+
warningText: any;
|
|
327
329
|
subjectEnglish: any;
|
|
328
330
|
subjectMaths: any;
|
|
329
331
|
subjectScience: any;
|
|
@@ -58,6 +58,7 @@ export declare const StepperStepContainer: import("@stitches/react/types/styled-
|
|
|
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;
|
|
@@ -326,6 +327,7 @@ export declare const StepperStepContainer: import("@stitches/react/types/styled-
|
|
|
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;
|
|
@@ -64,6 +64,7 @@ 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;
|
|
67
68
|
subjectEnglish: any;
|
|
68
69
|
subjectMaths: any;
|
|
69
70
|
subjectScience: any;
|
|
@@ -334,6 +335,7 @@ export declare const StepperStepLabel: import("@stitches/react/types/styled-comp
|
|
|
334
335
|
warning: any;
|
|
335
336
|
warningMid: any;
|
|
336
337
|
warningDark: any;
|
|
338
|
+
warningText: any;
|
|
337
339
|
subjectEnglish: any;
|
|
338
340
|
subjectMaths: any;
|
|
339
341
|
subjectScience: any;
|
|
@@ -64,6 +64,7 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
|
|
|
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;
|
|
@@ -331,6 +332,7 @@ declare const StyledTabContent: import("@stitches/react/types/styled-component")
|
|
|
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronLeft as P,ChevronRight as R}from"@atom-learning/icons";import{List as _}from"@radix-ui/react-tabs";import{opacify as
|
|
1
|
+
import{ChevronLeft as P,ChevronRight as R}from"@atom-learning/icons";import{List as _}from"@radix-ui/react-tabs";import{opacify as y}from"color2k";import o,{useRef as F,useState as f,useCallback as J,useEffect as k}from"react";import{debounce as K}from"throttle-debounce";import{ActionIcon as M}from"../action-icon/ActionIcon.js";import{Flex as X}from"../flex/Flex.js";import{Icon as W}from"../icon/Icon.js";import{theme as j,styled as x}from"../../stitches.js";import{TabTrigger as L}from"./TabTrigger.js";import{passPropsToChildren as C}from"./utils.js";const q=y("white",-.2),G=y(j.colors.primaryDark.value,-.2),T=x(M,{position:"absolute",transition:"all 125ms",variants:{theme:{light:{bg:`${q} !important`},dark:{bg:`${G} !important`,color:"currentColor !important"}},visible:{true:{opacity:1,visibility:"visible",pointerEvents:"all"},false:{opacity:0,visibility:"hidden",pointerEvents:"none"}}}}),S=x(_,{flexShrink:0,display:"flex",width:"100%",overflowX:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none",variants:{theme:{light:{borderBottom:"1px solid $tonal300"},dark:{bg:"$primaryDark",borderBottom:"1px solid $tonal200"}},appearance:{uppercase:{"& button":{textTransform:"uppercase"}}}}}),H=({children:h,theme:i,appearance:d,enableTabScrolling:$,scrollPercentage:z=10,...b})=>{const s=F(null),[u,a]=f(!1),[v,c]=f(!1),[D,I]=f(),g=J(t=>{const e=s.current;if(e){const{scrollWidth:l,scrollLeft:n,offsetWidth:m}=e,E=Math.round(l*(z/100));let p=n;if(t==="right"){const r=n+E;p=r+m<=l?r:l-m}else{const r=n-E;p=r>0?r:0}e.scroll({left:p,behavior:"smooth"}),setTimeout(()=>{const{scrollWidth:r,scrollLeft:w,offsetWidth:A}=e,B=r-(w+A);w===0?(a(!1),c(!0)):B<5?(c(!1),a(!0)):(a(!0),c(!0))},500)}},[]);return k(()=>{const t=K(500,()=>{I(window.innerWidth)});return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),k(()=>{var t;const e=s.current;if(e){const{offsetWidth:l,scrollWidth:n}=e,m=n>l;(t=e.scroll)==null||t.call(e,{left:0}),a(!1),c(m)}},[D]),u||v||$?o.createElement(X,{css:{position:"relative"}},o.createElement(T,{size:"lg",label:"Scroll Left",theme:i,onClick:()=>g("left"),visible:u,css:{left:0}},o.createElement(W,{is:P})),o.createElement(S,{...b,ref:s,appearance:d,theme:i},C(h,{theme:i},[L])),o.createElement(T,{size:"lg",label:"Scroll right",theme:i,onClick:()=>g("right"),visible:v,css:{right:0}},o.createElement(W,{is:R}))):o.createElement(S,{theme:i,...b,appearance:d,ref:s},C(h,{theme:i},[L]))};export{H as TriggerListWrapper};
|
|
@@ -59,6 +59,7 @@ export declare const StyledButton: import("@stitches/react/types/styled-componen
|
|
|
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 @@ export declare const StyledButton: import("@stitches/react/types/styled-componen
|
|
|
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;
|
|
@@ -60,6 +60,7 @@ export declare const StyledItem: 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;
|
|
@@ -325,6 +326,7 @@ export declare const ToggleGroupItem: import("@stitches/react/types/styled-compo
|
|
|
325
326
|
warning: any;
|
|
326
327
|
warningMid: any;
|
|
327
328
|
warningDark: any;
|
|
329
|
+
warningText: any;
|
|
328
330
|
subjectEnglish: any;
|
|
329
331
|
subjectMaths: any;
|
|
330
332
|
subjectScience: any;
|
|
@@ -60,6 +60,7 @@ export declare const ToggleGroup: {
|
|
|
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;
|
|
@@ -326,6 +327,7 @@ export declare const ToggleGroup: {
|
|
|
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;
|
|
@@ -595,6 +597,7 @@ export declare const ToggleGroup: {
|
|
|
595
597
|
warning: any;
|
|
596
598
|
warningMid: any;
|
|
597
599
|
warningDark: any;
|
|
600
|
+
warningText: any;
|
|
598
601
|
subjectEnglish: any;
|
|
599
602
|
subjectMaths: any;
|
|
600
603
|
subjectScience: any;
|
|
@@ -866,6 +869,7 @@ export declare const ToggleGroup: {
|
|
|
866
869
|
warning: any;
|
|
867
870
|
warningMid: any;
|
|
868
871
|
warningDark: any;
|
|
872
|
+
warningText: any;
|
|
869
873
|
subjectEnglish: any;
|
|
870
874
|
subjectMaths: any;
|
|
871
875
|
subjectScience: any;
|
|
@@ -1136,6 +1140,7 @@ export declare const ToggleGroup: {
|
|
|
1136
1140
|
warning: any;
|
|
1137
1141
|
warningMid: any;
|
|
1138
1142
|
warningDark: any;
|
|
1143
|
+
warningText: any;
|
|
1139
1144
|
subjectEnglish: any;
|
|
1140
1145
|
subjectMaths: any;
|
|
1141
1146
|
subjectScience: any;
|
|
@@ -62,6 +62,7 @@ declare const StyledVideo: import("@stitches/react/types/styled-component").Styl
|
|
|
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;
|
|
@@ -332,6 +333,7 @@ export declare const Video: React.ForwardRefExoticComponent<Pick<VideoProps, str
|
|
|
332
333
|
warning: any;
|
|
333
334
|
warningMid: any;
|
|
334
335
|
warningDark: any;
|
|
336
|
+
warningText: any;
|
|
335
337
|
subjectEnglish: any;
|
|
336
338
|
subjectMaths: any;
|
|
337
339
|
subjectScience: any;
|