@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
@@ -64,6 +64,7 @@ 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;
67
68
  subjectEnglish: any;
68
69
  subjectMaths: any;
69
70
  subjectScience: any;
@@ -1 +1 @@
1
- import{Search as w,Close as z}from"@atom-learning/icons";import*as t from"react";import{ActionIcon as y}from"../action-icon/ActionIcon.js";import{Box as I}from"../box/Box.js";import{Icon as l}from"../icon/Icon.js";import{Input as $}from"../input/Input.js";import{styled as c}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=c(l,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),x=c($,{'&::-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:m,value:n,clearText:u="Clear",onChange:a,...E})=>{const[h,C]=k(),[b,v]=t.useState(n||""),[d,f]=t.useState(n?"CLEAR":"SEARCH"),A=()=>{var r,i;const o=h.current;if(!o)return;const s=(r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set;(i=s==null?void 0:s.call)==null||i.call(s,o,"");const R=new Event("input",{bubbles:!0});o.dispatchEvent(R),o.focus()},S=r=>{v(r.target.value),f(r.target.value?"CLEAR":"SEARCH"),a==null||a(r)},g=()=>d==="SEARCH"?t.createElement(L,{is:w,size:e,css:{size:e=="sm"?"$1":20}}):t.createElement(y,{label:u,theme:"neutral",size:e=="sm"?"md":"lg",css:{position:"absolute",top:0,right:0},onClick:A},t.createElement(l,{is:z}));return t.createElement(I,{css:{position:"relative",...m}},t.createElement(x,{ref:C,size:e,type:"search",...E,value:b,onChange:S,css:{pr:e==="sm"?"$5":"$6"}}),g())};p.displayName="SearchInput";export{p as SearchInput};
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,6 +63,7 @@ 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;
66
67
  subjectEnglish: any;
67
68
  subjectMaths: any;
68
69
  subjectScience: any;
@@ -63,6 +63,7 @@ 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;
66
67
  subjectEnglish: any;
67
68
  subjectMaths: any;
68
69
  subjectScience: any;
@@ -66,6 +66,7 @@ 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;
69
70
  subjectEnglish: any;
70
71
  subjectMaths: any;
71
72
  subjectScience: any;
@@ -60,6 +60,7 @@ declare const StyledStackContent: 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;
@@ -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;
@@ -60,6 +60,7 @@ 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;
63
64
  subjectEnglish: any;
64
65
  subjectMaths: any;
65
66
  subjectScience: any;
@@ -78,6 +78,7 @@ 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;
81
82
  subjectEnglish: any;
82
83
  subjectMaths: any;
83
84
  subjectScience: any;
@@ -61,6 +61,7 @@ declare const StyledTableBody: 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;
@@ -58,6 +58,7 @@ 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;
61
62
  subjectEnglish: any;
62
63
  subjectMaths: any;
63
64
  subjectScience: any;
@@ -58,6 +58,7 @@ export declare const TableFooter: import("@stitches/react/types/styled-component
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 TableFooterCell: 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;
@@ -61,6 +61,7 @@ declare const StyledTableHeader: 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;
@@ -58,6 +58,7 @@ export declare const TableHeaderCell: 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;
@@ -58,6 +58,7 @@ export declare const TableRow: import("@stitches/react/types/styled-component").
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;
@@ -61,6 +61,7 @@ declare const StyledTabTrigger: 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;
@@ -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;
@@ -66,6 +66,7 @@ declare const StyledTriggerList: import("@stitches/react/types/styled-component"
66
66
  warning: any;
67
67
  warningMid: any;
68
68
  warningDark: any;
69
+ warningText: any;
69
70
  subjectEnglish: any;
70
71
  subjectMaths: any;
71
72
  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 k}from"color2k";import o,{useRef as F,useState as f,useCallback as J,useEffect as y}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 x}from"../icon/Icon.js";import{theme as j,styled as W}from"../../stitches.js";import{TabTrigger as L}from"./TabTrigger.js";import{passPropsToChildren as z}from"./utils.js";const q=k("white",-.2),G=k(j.colors.primaryDark.value,-.2),C=W(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"}}}}),T=W(_,{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:S,scrollPercentage:$=10,...b})=>{const n=F(null),[u,a]=f(!1),[v,c]=f(!1),[D,I]=f(),g=J(t=>{const e=n.current;if(e){const{scrollWidth:l,scrollLeft:s,offsetWidth:m}=e,E=Math.round(l*($/100));let p=s;if(t==="right"){const r=s+E;p=r+m<=l?r:l-m}else{const r=s-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 y(()=>{const t=K(500,()=>{I(window.innerWidth)});return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),y(()=>{var t;const e=n.current;if(e){const{offsetWidth:l,scrollWidth:s}=e,m=s>l;(t=e.scroll)==null||t.call(e,{left:0}),a(!1),c(m)}},[D]),u||v||S?o.createElement(X,{css:{position:"relative"}},o.createElement(C,{size:"xl",label:"Scroll Left",theme:i,onClick:()=>g("left"),visible:u,css:{left:0}},o.createElement(x,{is:P,size:"lg"})),o.createElement(T,{...b,ref:n,appearance:d,theme:i},z(h,{theme:i},[L])),o.createElement(C,{size:"xl",label:"Scroll right",theme:i,onClick:()=>g("right"),visible:v,css:{right:0}},o.createElement(x,{is:R,size:"lg"}))):o.createElement(T,{theme:i,...b,appearance:d,ref:n},z(h,{theme:i},[L]))};export{H as TriggerListWrapper};
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};
@@ -67,6 +67,7 @@ export declare const StyledText: import("@stitches/react/types/styled-component"
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;
@@ -61,6 +61,7 @@ declare const StyledTextarea: import("@stitches/react/types/styled-component").S
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;
@@ -63,6 +63,7 @@ declare const StyledToast: import("@stitches/react/types/styled-component").Styl
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;
@@ -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;
@@ -70,6 +70,7 @@ export declare const StyledRoot: import("@stitches/react/types/styled-component"
70
70
  warning: any;
71
71
  warningMid: any;
72
72
  warningDark: any;
73
+ warningText: any;
73
74
  subjectEnglish: any;
74
75
  subjectMaths: any;
75
76
  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 StyledContent: import("@stitches/react/types/styled-component").St
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 @@ 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;