@atom-learning/components 2.28.3-beta.2 → 2.28.4

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 (108) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/components/accordion/AccordionContent.js +1 -1
  3. package/dist/components/accordion/AccordionItem.js +1 -1
  4. package/dist/components/accordion/AccordionTrigger.d.ts +4 -5
  5. package/dist/components/accordion/AccordionTrigger.js +1 -1
  6. package/dist/components/action-icon/ActionIcon.d.ts +44 -44
  7. package/dist/components/alert-dialog/AlertDialogContent.js +1 -1
  8. package/dist/components/avatar/Avatar.js +1 -1
  9. package/dist/components/button/Button.d.ts +44 -45
  10. package/dist/components/button/Button.js +1 -1
  11. package/dist/components/calendar/Calendar.js +1 -1
  12. package/dist/components/carousel/CarouselArrows.js +1 -1
  13. package/dist/components/carousel/CarouselSlide.js +1 -1
  14. package/dist/components/checkbox-field/CheckboxField.js +1 -1
  15. package/dist/components/chip/Chip.js +1 -1
  16. package/dist/components/chip/ChipGroup.js +1 -1
  17. package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js +1 -1
  18. package/dist/components/data-table/DataTable.js +1 -1
  19. package/dist/components/data-table/DataTableBody.js +1 -1
  20. package/dist/components/data-table/DataTableDataCell.js +1 -1
  21. package/dist/components/data-table/DataTableRow.js +1 -1
  22. package/dist/components/data-table/drag-and-drop/DraggableRow.js +1 -1
  23. package/dist/components/data-table/drag-and-drop/Handle.js +1 -1
  24. package/dist/components/dialog/DialogContent.js +1 -1
  25. package/dist/components/dismissible/DismissibleRoot.js +1 -1
  26. package/dist/components/dismissible/DismissibleTrigger.js +1 -1
  27. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
  28. package/dist/components/field-wrapper/FieldDescription.js +1 -1
  29. package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
  30. package/dist/components/file-input/FileInput.js +1 -1
  31. package/dist/components/grid/Grid.js +1 -1
  32. package/dist/components/icon/Icon.js +1 -1
  33. package/dist/components/inline-message/InlineMessage.js +1 -1
  34. package/dist/components/label/Label.js +1 -1
  35. package/dist/components/link/Link.js +1 -1
  36. package/dist/components/list/List.js +1 -1
  37. package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
  38. package/dist/components/markdown-content/components/MarkdownHeading.js +1 -1
  39. package/dist/components/markdown-content/components/MarkdownImage.js +1 -1
  40. package/dist/components/markdown-content/components/MarkdownInlineCode.js +1 -1
  41. package/dist/components/markdown-content/components/MarkdownLink.js +1 -1
  42. package/dist/components/markdown-content/components/MarkdownListItem.js +1 -1
  43. package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -1
  44. package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
  45. package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
  46. package/dist/components/navigation/NavigationMenuDropdownContent.js +1 -1
  47. package/dist/components/navigation/NavigationMenuLink.js +1 -1
  48. package/dist/components/notification-badge/NotificationBadge.js +1 -1
  49. package/dist/components/number-input/NumberInput.js +1 -1
  50. package/dist/components/number-input/NumberInputStepper.js +1 -1
  51. package/dist/components/number-input-field/NumberInputField.js +1 -1
  52. package/dist/components/popover/PopoverContent.js +1 -1
  53. package/dist/components/radio-button/RadioButton.js +1 -1
  54. package/dist/components/radio-button-field/RadioButtonField.js +1 -1
  55. package/dist/components/radio-button-field/RadioField.js +1 -1
  56. package/dist/components/radio-card/RadioCardGroup.d.ts +2 -2
  57. package/dist/components/radio-card/RadioCardGroup.js +1 -1
  58. package/dist/components/search-input/SearchInput.js +1 -1
  59. package/dist/components/select-field/SelectField.js +1 -1
  60. package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionContent.js +1 -1
  61. package/dist/components/sidedrawer/SidedrawerContent.js +1 -1
  62. package/dist/components/slider-field/SliderField.js +1 -1
  63. package/dist/components/stack-content/StackContent.js +1 -1
  64. package/dist/components/stepper/StepperStepBack.js +1 -1
  65. package/dist/components/table/TableHeader.js +1 -1
  66. package/dist/components/table/TableRow.js +1 -1
  67. package/dist/components/tabs/{TabsTrigger.d.ts → TabTrigger.d.ts} +6 -3
  68. package/dist/components/tabs/TabTrigger.js +1 -0
  69. package/dist/components/tabs/Tabs.d.ts +276 -7
  70. package/dist/components/tabs/Tabs.js +1 -1
  71. package/dist/components/tabs/TabsTriggerList.d.ts +9 -5
  72. package/dist/components/tabs/TabsTriggerList.js +1 -1
  73. package/dist/components/tabs/utils.d.ts +2 -0
  74. package/dist/components/tabs/utils.js +1 -0
  75. package/dist/components/toast/Toast.js +1 -1
  76. package/dist/components/toast/ToastProvider.js +1 -1
  77. package/dist/components/toggle-group/ToggleGroupButton.js +1 -1
  78. package/dist/components/tooltip/TooltipContent.js +1 -1
  79. package/dist/components/top-bar/TopBar.js +1 -1
  80. package/dist/components/video/Video.js +1 -1
  81. package/dist/docgen.json +1 -1
  82. package/dist/docs/Accordion.mdx +7 -56
  83. package/dist/docs/Button.mdx +0 -8
  84. package/dist/docs/Tabs.mdx +57 -31
  85. package/dist/index.cjs.js +1 -1
  86. package/dist/stitches.d.ts +338 -338
  87. package/dist/stitches.js +1 -1
  88. package/dist/utilities/hooks/useCallbackRef.js +1 -1
  89. package/dist/utilities/hooks/useScrollPosition.d.ts +3 -6
  90. package/dist/utilities/hooks/useScrollPosition.js +1 -1
  91. package/package.json +2 -3
  92. package/dist/components/tabs/TabsContent.d.ts +0 -267
  93. package/dist/components/tabs/TabsContent.js +0 -1
  94. package/dist/components/tabs/TabsTrigger.js +0 -1
  95. package/dist/docs/README.mdx +0 -79
  96. package/dist/experiments/color-scheme/ColorScheme.d.ts +0 -201
  97. package/dist/experiments/color-scheme/ColorScheme.js +0 -1
  98. package/dist/experiments/color-scheme/blue.json.js +0 -1
  99. package/dist/experiments/color-scheme/generateAlphaColors.d.ts +0 -1
  100. package/dist/experiments/color-scheme/generateAlphaColors.js +0 -1
  101. package/dist/experiments/color-scheme/index.d.ts +0 -1
  102. package/dist/experiments/color-scheme/slate.json.js +0 -1
  103. package/dist/experiments/color-scheme/stitches.colorscheme.config.d.ts +0 -452
  104. package/dist/experiments/color-scheme/stitches.colorscheme.config.js +0 -1
  105. package/dist/utilities/hooks/useWindowScrollPosition.d.ts +0 -6
  106. package/dist/utilities/hooks/useWindowScrollPosition.js +0 -1
  107. package/dist/utilities/hooks/useWindowSize.d.ts +0 -8
  108. package/dist/utilities/hooks/useWindowSize.js +0 -1
@@ -1,9 +1,278 @@
1
1
  import * as React from 'react';
2
- import { TabsTriggerList } from './TabsTriggerList';
3
- import { TabsTrigger } from './TabsTrigger';
4
- import { TabsContent } from './TabsContent';
2
+ import { TriggerListWrapper } from './TabsTriggerList';
3
+ import { TabTrigger } from './TabTrigger';
5
4
  declare type TabsProps = React.ComponentProps<typeof StyledRoot>;
6
- declare const StyledRoot: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & React.RefAttributes<HTMLDivElement>>, {}, {
5
+ declare const StyledRoot: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & React.RefAttributes<HTMLDivElement>>, {
6
+ theme?: "dark" | "light" | undefined;
7
+ }, {
8
+ sm: string;
9
+ md: string;
10
+ lg: string;
11
+ xl: string;
12
+ reducedMotion: string;
13
+ allowMotion: string;
14
+ hover: string;
15
+ }, import("@stitches/react/types/css-util").CSS<{
16
+ sm: string;
17
+ md: string;
18
+ lg: string;
19
+ xl: string;
20
+ reducedMotion: string;
21
+ allowMotion: string;
22
+ hover: string;
23
+ }, {
24
+ colors: {
25
+ textForeground: any;
26
+ textSubtle: any;
27
+ textPlaceholder: any;
28
+ background: any;
29
+ backgroundAccent: any;
30
+ tonal50: any;
31
+ tonal100: any;
32
+ tonal200: any;
33
+ tonal300: any;
34
+ tonal400: any;
35
+ tonal500: any;
36
+ tonal600: any;
37
+ alpha100: any;
38
+ alpha150: any;
39
+ alpha200: any;
40
+ alpha250: any;
41
+ alpha600: any;
42
+ primaryLight: any;
43
+ primary: any;
44
+ primaryMid: any;
45
+ primaryDark: any;
46
+ secondary: any;
47
+ brandRed: any;
48
+ brandRedAccent: any;
49
+ brandGreen: any;
50
+ brandGreenAccent: any;
51
+ brandPurple: any;
52
+ brandPurpleAccent: any;
53
+ brandYellow: any;
54
+ brandYellowAccent: any;
55
+ successLight: any;
56
+ success: any;
57
+ successMid: any;
58
+ successDark: any;
59
+ dangerLight: any;
60
+ danger: any;
61
+ dangerMid: any;
62
+ dangerDark: any;
63
+ warningLight: any;
64
+ warning: any;
65
+ warningMid: any;
66
+ warningDark: any;
67
+ warningText: any;
68
+ subjectEnglish: any;
69
+ subjectMaths: any;
70
+ subjectScience: any;
71
+ subjectVerbalReasoning: any;
72
+ subjectNonVerbalReasoning: any;
73
+ subjectCreativeWriting: any;
74
+ subjectExamSkills: any;
75
+ };
76
+ space: {
77
+ "0": any;
78
+ "1": any;
79
+ "2": any;
80
+ "3": any;
81
+ "4": any;
82
+ "5": any;
83
+ "6": any;
84
+ "7": any;
85
+ "8": any;
86
+ "9": any;
87
+ };
88
+ fontSizes: {
89
+ xs: any;
90
+ sm: any;
91
+ md: any;
92
+ lg: any;
93
+ xl: any;
94
+ "2xl": any;
95
+ "3xl": any;
96
+ "4xl": any;
97
+ };
98
+ fonts: {
99
+ sans: any;
100
+ mono: any;
101
+ display: any;
102
+ body: any;
103
+ };
104
+ sizes: {
105
+ "0": any;
106
+ "1": any;
107
+ "2": any;
108
+ "3": any;
109
+ "4": any;
110
+ "5": any;
111
+ "6": any;
112
+ "7": any;
113
+ "8": any;
114
+ };
115
+ radii: {
116
+ "0": any;
117
+ "1": any;
118
+ "2": any;
119
+ "3": any;
120
+ round: any;
121
+ };
122
+ shadows: {
123
+ "0": any;
124
+ "1": any;
125
+ "2": any;
126
+ "3": any;
127
+ };
128
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
129
+ bg: (value: {
130
+ readonly [$$PropertyValue]: "background";
131
+ }) => {
132
+ background: {
133
+ readonly [$$PropertyValue]: "background";
134
+ };
135
+ };
136
+ inset: (value: string | number | {
137
+ readonly [$$ScaleValue]: "space";
138
+ }) => {
139
+ top: string | number | {
140
+ readonly [$$ScaleValue]: "space";
141
+ };
142
+ right: string | number | {
143
+ readonly [$$ScaleValue]: "space";
144
+ };
145
+ bottom: string | number | {
146
+ readonly [$$ScaleValue]: "space";
147
+ };
148
+ left: string | number | {
149
+ readonly [$$ScaleValue]: "space";
150
+ };
151
+ };
152
+ size: (value: string | number | {
153
+ readonly [$$ScaleValue]: "size";
154
+ }) => {
155
+ height: string | number | {
156
+ readonly [$$ScaleValue]: "size";
157
+ };
158
+ width: string | number | {
159
+ readonly [$$ScaleValue]: "size";
160
+ };
161
+ };
162
+ p: (value: string | number | {
163
+ readonly [$$ScaleValue]: "space";
164
+ }) => {
165
+ padding: string | number | {
166
+ readonly [$$ScaleValue]: "space";
167
+ };
168
+ };
169
+ pt: (value: string | number | {
170
+ readonly [$$ScaleValue]: "space";
171
+ }) => {
172
+ paddingTop: string | number | {
173
+ readonly [$$ScaleValue]: "space";
174
+ };
175
+ };
176
+ pr: (value: string | number | {
177
+ readonly [$$ScaleValue]: "space";
178
+ }) => {
179
+ paddingRight: string | number | {
180
+ readonly [$$ScaleValue]: "space";
181
+ };
182
+ };
183
+ pb: (value: string | number | {
184
+ readonly [$$ScaleValue]: "space";
185
+ }) => {
186
+ paddingBottom: string | number | {
187
+ readonly [$$ScaleValue]: "space";
188
+ };
189
+ };
190
+ pl: (value: string | number | {
191
+ readonly [$$ScaleValue]: "space";
192
+ }) => {
193
+ paddingLeft: string | number | {
194
+ readonly [$$ScaleValue]: "space";
195
+ };
196
+ };
197
+ px: (value: string | number | {
198
+ readonly [$$ScaleValue]: "space";
199
+ }) => {
200
+ paddingLeft: string | number | {
201
+ readonly [$$ScaleValue]: "space";
202
+ };
203
+ paddingRight: string | number | {
204
+ readonly [$$ScaleValue]: "space";
205
+ };
206
+ };
207
+ py: (value: string | number | {
208
+ readonly [$$ScaleValue]: "space";
209
+ }) => {
210
+ paddingTop: string | number | {
211
+ readonly [$$ScaleValue]: "space";
212
+ };
213
+ paddingBottom: string | number | {
214
+ readonly [$$ScaleValue]: "space";
215
+ };
216
+ };
217
+ m: (value: string | number | {
218
+ readonly [$$ScaleValue]: "space";
219
+ }) => {
220
+ margin: string | number | {
221
+ readonly [$$ScaleValue]: "space";
222
+ };
223
+ };
224
+ mt: (value: string | number | {
225
+ readonly [$$ScaleValue]: "space";
226
+ }) => {
227
+ marginTop: string | number | {
228
+ readonly [$$ScaleValue]: "space";
229
+ };
230
+ };
231
+ mr: (value: string | number | {
232
+ readonly [$$ScaleValue]: "space";
233
+ }) => {
234
+ marginRight: string | number | {
235
+ readonly [$$ScaleValue]: "space";
236
+ };
237
+ };
238
+ mb: (value: string | number | {
239
+ readonly [$$ScaleValue]: "space";
240
+ }) => {
241
+ marginBottom: string | number | {
242
+ readonly [$$ScaleValue]: "space";
243
+ };
244
+ };
245
+ ml: (value: string | number | {
246
+ readonly [$$ScaleValue]: "space";
247
+ }) => {
248
+ marginLeft: string | number | {
249
+ readonly [$$ScaleValue]: "space";
250
+ };
251
+ };
252
+ mx: (value: string | number | {
253
+ readonly [$$ScaleValue]: "space";
254
+ }) => {
255
+ marginLeft: string | number | {
256
+ readonly [$$ScaleValue]: "space";
257
+ };
258
+ marginRight: string | number | {
259
+ readonly [$$ScaleValue]: "space";
260
+ };
261
+ };
262
+ my: (value: string | number | {
263
+ readonly [$$ScaleValue]: "space";
264
+ }) => {
265
+ marginTop: string | number | {
266
+ readonly [$$ScaleValue]: "space";
267
+ };
268
+ marginBottom: string | number | {
269
+ readonly [$$ScaleValue]: "space";
270
+ };
271
+ };
272
+ }>>;
273
+ declare const StyledTabContent: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsContentProps & React.RefAttributes<HTMLDivElement>>, {
274
+ theme?: "dark" | "light" | undefined;
275
+ }, {
7
276
  sm: string;
8
277
  md: string;
9
278
  lg: string;
@@ -270,8 +539,8 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
270
539
  };
271
540
  }>>;
272
541
  export declare const Tabs: React.FC<TabsProps> & {
273
- TriggerList: typeof TabsTriggerList;
274
- Trigger: typeof TabsTrigger;
275
- Content: typeof TabsContent;
542
+ TriggerList: typeof TriggerListWrapper;
543
+ Trigger: typeof TabTrigger;
544
+ Content: typeof StyledTabContent;
276
545
  };
277
546
  export {};
@@ -1 +1 @@
1
- import{Root as i}from"@radix-ui/react-tabs";import*as e from"react";import{styled as m}from"../../stitches.js";import{TabsTriggerList as s}from"./TabsTriggerList.js";import{TabsTrigger as a}from"./TabsTrigger.js";import{TabsContent as g}from"./TabsContent.js";const T=m(i,{width:"100%"}),r=({children:t,...o})=>e.createElement(T,{...o},t);r.TriggerList=s,r.Trigger=a,r.Content=g,r.displayName="Tabs";export{r as Tabs};
1
+ import{Root as l,Content as n}from"@radix-ui/react-tabs";import*as p from"react";import{styled as e}from"../../stitches.js";import{TriggerListWrapper as t}from"./TabsTriggerList.js";import{TabTrigger as s}from"./TabTrigger.js";import{passPropsToChildren as g}from"./utils.js";const h=e(l,{display:"flex",flexDirection:"column",variants:{theme:{light:{color:"$primary"},dark:{color:"white"}}}}),i=e(n,{flexGrow:1,fontFamily:"$body",variants:{theme:{light:{color:"$textForeground"},dark:{bg:"$primaryDark",color:"white"}}}}),r=({theme:o="light",children:m,...a})=>p.createElement(h,{theme:o,...a},g(m,{theme:o},[t,i]));r.TriggerList=t,r.Trigger=s,r.Content=i,r.displayName="Tabs";export{r as Tabs};
@@ -1,6 +1,12 @@
1
1
  import React from 'react';
2
- import { ColorScheme } from '../../experiments/color-scheme';
3
- declare const StyledTriggerList: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsListProps & React.RefAttributes<HTMLDivElement>>, {}, {
2
+ interface ListProps extends React.ComponentProps<typeof StyledTriggerList> {
3
+ enableTabScrolling?: boolean;
4
+ scrollPercentage?: number;
5
+ }
6
+ declare const StyledTriggerList: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsListProps & React.RefAttributes<HTMLDivElement>>, {
7
+ theme?: "dark" | "light" | undefined;
8
+ appearance?: "uppercase" | undefined;
9
+ }, {
4
10
  sm: string;
5
11
  md: string;
6
12
  lg: string;
@@ -266,7 +272,5 @@ declare const StyledTriggerList: import("@stitches/react/types/styled-component"
266
272
  };
267
273
  };
268
274
  }>>;
269
- export declare const TabsTriggerList: React.FC<React.ComponentProps<typeof StyledTriggerList> & {
270
- colorScheme?: typeof ColorScheme;
271
- }>;
275
+ export declare const TriggerListWrapper: React.FC<ListProps>;
272
276
  export {};
@@ -1 +1 @@
1
- import{List as g}from"@radix-ui/react-tabs";import t from"react";import{styled as i}from"../../stitches.js";import{useWindowSize as k}from"../../utilities/hooks/useWindowSize.js";import{useScrollPosition as C}from"../../utilities/hooks/useScrollPosition.js";import{useCallbackRefState as W}from"../../utilities/hooks/useCallbackRef.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as s}from"../icon/Icon.js";import{ChevronLeft as w,ChevronRight as y}from"@atom-learning/icons";import{ColorScheme as E}from"../../experiments/color-scheme/ColorScheme.js";const S=i(E,{position:"relative",borderBottom:"1px solid $base3",width:"100%"}),L=i(g,{flexShrink:0,display:"flex",width:"100%",overflowX:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}),a=i(v,{height:"100% !important",position:"absolute",top:"50%",transform:"translateY(-50%)",cursor:"pointer",background:"$background !important",color:"$interactive1 !important",borderRadius:0,opacity:.9}),c=({children:n,colorScheme:m={},...d})=>{const[e,f]=W(),{width:h}=k(),{left:o}=C({elRef:e,delay:100}),r=t.useMemo(()=>e?e.scrollWidth>e.clientWidth:!1,[h,e]),p=t.useMemo(()=>r?o>0:!1,[o,r]),b=t.useMemo(()=>!e||!r?!1:e.scrollWidth-o-e.clientWidth>1,[e,o,r]),l=t.useCallback(u=>{!e||e.scroll({left:e.scrollLeft+e.clientWidth*u,behavior:"smooth"})},[e]);return t.createElement(S,{base:"slate",accent:"blue",interactive:"hiContrast1",...m,...d},p&&t.createElement(a,{label:"scroll left",size:"md",css:{left:0},onClick:()=>l(-.8)},t.createElement(s,{is:w})),t.createElement(L,{ref:f},n),b&&t.createElement(a,{label:"scroll right",size:"md",css:{right:0},onClick:()=>l(.8)},t.createElement(s,{is:y})))};c.displayName="TabsTriggerList";export{c as TabsTriggerList};
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};
@@ -0,0 +1,2 @@
1
+ import { JSXElementConstructor } from 'react';
2
+ export declare const passPropsToChildren: (children: any, props: Record<string, any>, allowedChildNodeTypes?: JSXElementConstructor<any>[]) => any;
@@ -0,0 +1 @@
1
+ import o from"react";const t=(n,e,i=[])=>o.Children.map(n,l=>o.isValidElement(l)&&i.includes(l==null?void 0:l.type)?o.cloneElement(l,{...e}):l);export{t as passPropsToChildren};
@@ -1 +1 @@
1
- import{Error as g,Close as h}from"@atom-learning/icons";import*as t from"react";import{toast as v}from"react-hot-toast";import{keyframes as a,styled as i}from"../../stitches.js";import{ActionIcon as y}from"../action-icon/ActionIcon.js";import{Icon as s}from"../icon/Icon.js";import{Loader as $}from"../loader/Loader.js";import{Text as w}from"../text/Text.js";const n=400,x=a({"0%":{transform:"translate3d(0,-100%,0)",opacity:0},"100%":{transform:"translate3d(0,0,0)",opacity:1}}),E=a({"0%":{transform:"translate3d(0,0,0)",opacity:1},"100%":{transform:"translate3d(0,-100%,0)",opacity:0}}),k=i("div",{position:"absolute",width:"100%",variants:{visible:{true:{"@allowMotion":{animation:`${x} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}},false:{opacity:0,"@allowMotion":{animation:`${E} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}}}}}),I=i("div",{pointerEvents:"auto",alignItems:"center",borderRadius:"$0",boxShadow:"$1",boxSizing:"border-box",color:"white",display:"flex",minHeight:"$5",pl:"$4",position:"relative",pr:"$6",py:"$4",transition:"background-color 50ms ease-out",width:"100%","@sm":{width:n},"@allowMotion":{transition:"background-color 50ms ease-out, transform 150ms ease-out"},variants:{status:{blank:{bg:"$primary"},error:{bg:"$danger"},loading:{bg:"$primary"},success:{bg:"$success"}}}}),T=t.memo(({ariaLive:l,height:m,id:e,message:c,role:p,type:o="blank",visible:d,calculateOffset:u,updateHeight:b})=>{const f=u(e,{reverseOrder:!0,margin:8});return t.createElement(k,{visible:d},t.createElement(I,{ref:r=>{r&&m===void 0&&b(e,r.getBoundingClientRect().height)},status:o,role:p,"aria-live":l,style:{transform:`translateY(${f}px)`}},o==="error"&&t.createElement(s,{size:"sm",css:{mr:"$3",flex:"0 0 auto"},is:g}),t.createElement(w,null,c),o==="loading"?t.createElement($,{css:{flex:"0 0 auto",ml:"auto"}}):t.createElement(y,{css:{position:"absolute",top:"$2",right:"$2",color:"white","&:hover,&:focus":{color:"white",opacity:.5}},label:"Close alert",onClick:()=>v.dismiss(e)},t.createElement(s,{is:h}))))});export{n as TOAST_WIDTH,T as Toast};
1
+ import{Error as g,Close as $}from"@atom-learning/icons";import*as t from"react";import{toast as h}from"react-hot-toast";import{keyframes as a,styled as i}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as s}from"../icon/Icon.js";import{Loader as y}from"../loader/Loader.js";import{Text as w}from"../text/Text.js";const n=400,x=a({"0%":{transform:"translate3d(0,-100%,0)",opacity:0},"100%":{transform:"translate3d(0,0,0)",opacity:1}}),E=a({"0%":{transform:"translate3d(0,0,0)",opacity:1},"100%":{transform:"translate3d(0,-100%,0)",opacity:0}}),k=i("div",{position:"absolute",width:"100%",variants:{visible:{true:{"@allowMotion":{animation:`${x} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}},false:{opacity:0,"@allowMotion":{animation:`${E} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}}}}}),I=i("div",{pointerEvents:"auto",alignItems:"center",borderRadius:"$0",boxShadow:"$1",boxSizing:"border-box",color:"white",display:"flex",minHeight:"$5",pl:"$4",position:"relative",pr:"$6",py:"$4",transition:"background-color 50ms ease-out",width:"100%","@sm":{width:n},"@allowMotion":{transition:"background-color 50ms ease-out, transform 150ms ease-out"},variants:{status:{blank:{bg:"$primary"},error:{bg:"$danger"},loading:{bg:"$primary"},success:{bg:"$success"}}}}),T=t.memo(({ariaLive:l,height:m,id:e,message:c,role:p,type:o="blank",visible:d,calculateOffset:u,updateHeight:b})=>{const f=u(e,{reverseOrder:!0,margin:8});return t.createElement(k,{visible:d},t.createElement(I,{ref:r=>{r&&m===void 0&&b(e,r.getBoundingClientRect().height)},status:o,role:p,"aria-live":l,style:{transform:`translateY(${f}px)`}},o==="error"&&t.createElement(s,{size:"sm",css:{mr:"$3",flex:"0 0 auto"},is:g}),t.createElement(w,null,c),o==="loading"?t.createElement(y,{css:{flex:"0 0 auto",ml:"auto"}}):t.createElement(v,{css:{position:"absolute",top:"$2",right:"$2",color:"white","&:hover,&:focus":{color:"white",opacity:.5}},label:"Close alert",onClick:()=>h.dismiss(e)},t.createElement(s,{is:$}))))});export{n as TOAST_WIDTH,T as Toast};
@@ -1 +1 @@
1
- import*as t from"react";import{useToaster as p}from"react-hot-toast";import{default as P}from"react-hot-toast";import{styled as c}from"../../stitches.js";import{TOAST_WIDTH as d,Toast as f}from"./Toast.js";import{MAX_Z_INDEX as u}from"../../constants/zIndices.js";const T=c("div",{left:"$2",position:"fixed",top:"$2",right:"$2",zIndex:u,"@sm":{top:"$3",right:"auto",left:`calc(50% - ${d/2}px)`}}),o=({children:a})=>{const{toasts:r,handlers:s}=p(),{startPause:i,endPause:m,calculateOffset:n,updateHeight:l}=s;return t.createElement(t.Fragment,null,t.createElement(T,{onMouseEnter:i,onMouseLeave:m},r.map(e=>t.createElement(f,{key:e.id,calculateOffset:n,updateHeight:l,...e}))),a)};o.displayName="ToastProvider";export{o as ToastProvider,P as toast};
1
+ import*as t from"react";import{useToaster as p}from"react-hot-toast";import{default as _}from"react-hot-toast";import{styled as c}from"../../stitches.js";import{TOAST_WIDTH as d,Toast as f}from"./Toast.js";import{MAX_Z_INDEX as u}from"../../constants/zIndices.js";const T=c("div",{left:"$2",position:"fixed",top:"$2",right:"$2",zIndex:u,"@sm":{top:"$3",right:"auto",left:`calc(50% - ${d/2}px)`}}),o=({children:a})=>{const{toasts:r,handlers:s}=p(),{startPause:i,endPause:m,calculateOffset:n,updateHeight:l}=s;return t.createElement(t.Fragment,null,t.createElement(T,{onMouseEnter:i,onMouseLeave:m},r.map(e=>t.createElement(f,{key:e.id,calculateOffset:n,updateHeight:l,...e}))),a)};o.displayName="ToastProvider";export{o as ToastProvider,_ as toast};
@@ -1 +1 @@
1
- import*as n from"react";import{styled as g}from"../../stitches.js";import{StyledIcon as f,Icon as r}from"../icon/Icon.js";import{StyledItem as h}from"./ToggleGroupItem.js";const s={sm:"32px",md:"40px",lg:"48px"},u={sm:"$4",md:"$5",lg:"$5"},x={sm:"$2",md:"$3",lg:"$3"},l=i=>({fontSize:`$${i}`,px:u[i],minHeight:s[i],"& > *:not(:last-child)":{mr:x[i]}}),d=g(h,{flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,lineHeight:1,py:"$1",[`& ${f}`]:{flexShrink:0},variants:{size:{sm:l("sm"),md:l("md"),lg:l("lg")},isIconOnly:{true:{}}},compoundVariants:[{isIconOnly:!0,size:"sm",css:{minWidth:s.sm,p:0}},{isIconOnly:!0,size:"md",css:{minWidth:s.md,p:0}},{isIconOnly:!0,size:"lg",css:{minWidth:s.lg,p:0}}]}),I=n.forwardRef(({size:i="md",children:p,...c},a)=>{var m;const t=n.Children.toArray(p),o=t.length<=1,y=o&&n.isValidElement(t[0])&&((m=t[0])==null?void 0:m.type)===r;return n.createElement(d,{ref:a,size:i,isIconOnly:y,...c},t.map(e=>!o&&typeof e=="string"?n.createElement("span",{key:e},e):n.isValidElement(e)&&(e==null?void 0:e.type)===r?n.cloneElement(e,{...e.props,size:i}):e))});export{d as StyledButton,I as ToggleGroupButton};
1
+ import*as n from"react";import{styled as g}from"../../stitches.js";import{StyledIcon as f,Icon as r}from"../icon/Icon.js";import{StyledItem as h}from"./ToggleGroupItem.js";const t={sm:"32px",md:"40px",lg:"48px"},$={sm:"$4",md:"$5",lg:"$5"},u={sm:"$2",md:"$3",lg:"$3"},l=i=>({fontSize:`$${i}`,px:$[i],minHeight:t[i],"& > *:not(:last-child)":{mr:u[i]}}),d=g(h,{flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,lineHeight:1,py:"$1",[`& ${f}`]:{flexShrink:0},variants:{size:{sm:l("sm"),md:l("md"),lg:l("lg")},isIconOnly:{true:{}}},compoundVariants:[{isIconOnly:!0,size:"sm",css:{minWidth:t.sm,p:0}},{isIconOnly:!0,size:"md",css:{minWidth:t.md,p:0}},{isIconOnly:!0,size:"lg",css:{minWidth:t.lg,p:0}}]}),x=n.forwardRef(({size:i="md",children:p,...c},a)=>{var o;const s=n.Children.toArray(p),m=s.length<=1,y=m&&n.isValidElement(s[0])&&((o=s[0])==null?void 0:o.type)===r;return n.createElement(d,{ref:a,size:i,isIconOnly:y,...c},s.map(e=>!m&&typeof e=="string"?n.createElement("span",{key:e},e):n.isValidElement(e)&&(e==null?void 0:e.type)===r?n.cloneElement(e,{...e.props,size:i}):e))});export{d as StyledButton,x as ToggleGroupButton};
@@ -1 +1 @@
1
- import{Content as m,Arrow as l}from"@radix-ui/react-tooltip";import*as t from"react";import{TOOLTIP_Z_INDEX as r}from"../../constants/zIndices.js";import{styled as a}from"../../stitches.js";import{slideDownAndFade as s,slideLeftAndFade as p,slideUpAndFade as f,slideRightAndFade as c}from"../../utilities/style/keyframe-animations.js";const h=a(m,{backgroundColor:"$tonal500",borderRadius:"$0",boxShadow:"$0",color:"white",fontFamily:"$body",fontSize:"$sm",lineHeight:1.5,whiteSpace:"normal",px:"$3",py:"$2",zIndex:r,"@allowMotion":{animationDuration:"75ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="delayed-open"]':{'&[data-side="top"]':{animationName:s},'&[data-side="right"]':{animationName:p},'&[data-side="bottom"]':{animationName:f},'&[data-side="left"]':{animationName:c}}},variants:{size:{sm:{maxWidth:"100px"},md:{maxWidth:"250px"},lg:{maxWidth:"400px"}}}}),x=a(l,{fill:"$tonal500",'[data-align="end"] &':{mr:"$2"},'[data-align="start"] &':{ml:"$2"}}),$=({children:i,side:e="top",sideOffset:o=4,size:n="md",...d})=>t.createElement(h,{side:e,sideOffset:o,size:n,...d},i,t.createElement(x,null));export{$ as TooltipContent};
1
+ import{Content as m,Arrow as l}from"@radix-ui/react-tooltip";import*as a from"react";import{TOOLTIP_Z_INDEX as r}from"../../constants/zIndices.js";import{styled as t}from"../../stitches.js";import{slideDownAndFade as s,slideLeftAndFade as p,slideUpAndFade as f,slideRightAndFade as c}from"../../utilities/style/keyframe-animations.js";const h=t(m,{backgroundColor:"$tonal500",borderRadius:"$0",boxShadow:"$0",color:"white",fontFamily:"$body",fontSize:"$sm",lineHeight:1.5,whiteSpace:"normal",px:"$3",py:"$2",zIndex:r,"@allowMotion":{animationDuration:"75ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="delayed-open"]':{'&[data-side="top"]':{animationName:s},'&[data-side="right"]':{animationName:p},'&[data-side="bottom"]':{animationName:f},'&[data-side="left"]':{animationName:c}}},variants:{size:{sm:{maxWidth:"100px"},md:{maxWidth:"250px"},lg:{maxWidth:"400px"}}}}),x=t(l,{fill:"$tonal500",'[data-align="end"] &':{mr:"$2"},'[data-align="start"] &':{ml:"$2"}}),$=({children:i,side:e="top",sideOffset:o=4,size:n="md",...d})=>a.createElement(h,{side:e,sideOffset:o,size:n,...d},i,a.createElement(x,null));export{$ as TooltipContent};
@@ -1 +1 @@
1
- import t from"react";import{styled as r}from"../../stitches.js";import{useWindowScrollPosition as s}from"../../utilities/hooks/useWindowScrollPosition.js";import{Divider as d}from"../divider/Divider.js";import{Flex as m}from"../flex/Flex.js";import{TopBarActionIcon as l}from"./TopBarActionIcon.js";import{TopBarBrandLogo as e,TopBarBrand as p,TopBarBrandName as h}from"./TopBarBrand.js";const c=()=>t.createElement(d,{orientation:"vertical",css:{height:"$2",bg:"$tonal100"}}),g=r("div",{bg:"white",position:"sticky",display:"flex",alignItems:"center",width:"100vw",top:"0",zIndex:1,borderBottom:"1px solid $tonal100",transition:"box-shadow .2s ease-out",variants:{hasScrolled:{true:{boxShadow:"0px 4px 4px -2px rgba(31, 31, 31, 0.1);"}},size:{md:{height:"$6",[`& ${e}`]:{'&[src$=".svg"]':{height:24,width:"auto"}}},lg:{height:"$7",[`& ${e}`]:{'&[src$=".svg"]':{height:32,width:"auto"}}}}}}),x=r(m,{alignItems:"center",height:"$4",mx:"$4",width:"100%","@md":{mx:"$5"}}),o=({size:i="md",...a})=>{const{y:n}=s();return t.createElement(g,{hasScrolled:!!n,size:i},t.createElement(x,{...a}))};o.Brand=p,o.BrandLogo=e,o.BrandName=h,o.ActionIcon=l,o.Divider=c,o.displayName="TopBar";export{o as TopBar};
1
+ import t from"react";import{styled as r}from"../../stitches.js";import{useScrollPosition as s}from"../../utilities/hooks/useScrollPosition.js";import{Divider as m}from"../divider/Divider.js";import{Flex as d}from"../flex/Flex.js";import{TopBarActionIcon as l}from"./TopBarActionIcon.js";import{TopBarBrandLogo as e,TopBarBrand as p,TopBarBrandName as h}from"./TopBarBrand.js";const c=()=>t.createElement(m,{orientation:"vertical",css:{height:"$2",bg:"$tonal100"}}),g=r("div",{bg:"white",position:"sticky",display:"flex",alignItems:"center",width:"100vw",top:"0",zIndex:1,borderBottom:"1px solid $tonal100",transition:"box-shadow .2s ease-out",variants:{hasScrolled:{true:{boxShadow:"0px 4px 4px -2px rgba(31, 31, 31, 0.1);"}},size:{md:{height:"$6",[`& ${e}`]:{'&[src$=".svg"]':{height:24,width:"auto"}}},lg:{height:"$7",[`& ${e}`]:{'&[src$=".svg"]':{height:32,width:"auto"}}}}}}),x=r(d,{alignItems:"center",height:"$4",mx:"$4",width:"100%","@md":{mx:"$5"}}),o=({size:i="md",...a})=>{const{y:n}=s();return t.createElement(g,{hasScrolled:!!n,size:i},t.createElement(x,{...a}))};o.Brand=p,o.BrandLogo=e,o.BrandName=h,o.ActionIcon=l,o.Divider=c,o.displayName="TopBar";export{o as TopBar};
@@ -1 +1 @@
1
- import*as e from"react";import m from"react-player/vimeo";import{Box as p}from"../box/Box.js";import{styled as a}from"../../stitches.js";import{CSSWrapper as l}from"../../utilities/css-wrapper/CSSWrapper.js";const f=a(m,{}),o=e.forwardRef(({id:t,ratio:r=9/16,css:i,...s},d)=>e.createElement(l,{css:i},e.createElement(p,{css:{borderRadius:"$0",position:"relative",paddingTop:`${r*100}%`,overflow:"hidden",height:0,width:"100%"}},e.createElement(f,{...s,role:"figure",url:`https://player.vimeo.com/video/${t}`,height:"100%",width:"100%",css:{position:"absolute",top:0,left:0},ref:d}))));o.displayName="Video";export{o as Video};
1
+ import*as e from"react";import m from"react-player/vimeo";import{Box as p}from"../box/Box.js";import{styled as a}from"../../stitches.js";import{CSSWrapper as l}from"../../utilities/css-wrapper/CSSWrapper.js";const f=a(m,{}),o=e.forwardRef(({id:r,ratio:t=9/16,css:i,...s},d)=>e.createElement(l,{css:i},e.createElement(p,{css:{borderRadius:"$0",position:"relative",paddingTop:`${t*100}%`,overflow:"hidden",height:0,width:"100%"}},e.createElement(f,{...s,role:"figure",url:`https://player.vimeo.com/video/${r}`,height:"100%",width:"100%",css:{position:"absolute",top:0,left:0},ref:d}))));o.displayName="Video";export{o as Video};