@atom-learning/components 2.28.0-beta.0 → 2.28.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 +31 -0
- package/dist/components/accordion/AccordionContent.js +1 -1
- package/dist/components/accordion/AccordionItem.js +1 -1
- package/dist/components/accordion/AccordionTrigger.d.ts +4 -5
- package/dist/components/accordion/AccordionTrigger.js +1 -1
- package/dist/components/alert-dialog/AlertDialogContent.js +1 -1
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/carousel/CarouselArrows.js +1 -1
- package/dist/components/carousel/CarouselSlide.js +1 -1
- package/dist/components/checkbox-field/CheckboxField.js +1 -1
- package/dist/components/chip/Chip.js +1 -1
- package/dist/components/chip/ChipGroup.js +1 -1
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js +1 -1
- package/dist/components/data-table/DataTable.d.ts +5 -0
- package/dist/components/data-table/DataTable.js +1 -1
- package/dist/components/data-table/DataTable.types.d.ts +18 -2
- package/dist/components/data-table/DataTableBody.js +1 -1
- package/dist/components/data-table/DataTableContext.d.ts +5 -10
- package/dist/components/data-table/DataTableContext.js +1 -1
- package/dist/components/data-table/DataTableDataCell.js +1 -1
- package/dist/components/data-table/DataTableRow.d.ts +1 -2
- package/dist/components/data-table/DataTableRow.js +1 -1
- package/dist/components/data-table/DataTableTable.d.ts +1 -2
- package/dist/components/data-table/drag-and-drop/DragAndDropContainer.d.ts +21 -0
- package/dist/components/data-table/drag-and-drop/DragAndDropContainer.js +1 -0
- package/dist/components/data-table/drag-and-drop/DragAndDropTable.d.ts +8 -0
- package/dist/components/data-table/drag-and-drop/DragAndDropTable.js +1 -0
- package/dist/components/data-table/drag-and-drop/DragAndDropTableBody.d.ts +5 -0
- package/dist/components/data-table/drag-and-drop/DragAndDropTableBody.js +1 -0
- package/dist/components/data-table/drag-and-drop/DraggableRow.d.ts +7 -0
- package/dist/components/data-table/drag-and-drop/DraggableRow.js +1 -0
- package/dist/components/data-table/drag-and-drop/Handle.d.ts +564 -0
- package/dist/components/data-table/drag-and-drop/Handle.js +1 -0
- package/dist/components/data-table/drag-and-drop/index.d.ts +4 -0
- package/dist/components/data-table/usePagination.d.ts +8 -0
- package/dist/components/data-table/usePagination.js +1 -0
- package/dist/components/data-table/useSorting.d.ts +9 -0
- package/dist/components/data-table/useSorting.js +1 -0
- package/dist/components/dialog/DialogContent.js +1 -1
- package/dist/components/dismissible/DismissibleRoot.js +1 -1
- package/dist/components/dismissible/DismissibleTrigger.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
- 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/grid/Grid.js +1 -1
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/inline-message/InlineMessage.js +1 -1
- package/dist/components/label/Label.js +1 -1
- package/dist/components/link/Link.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/MarkdownInlineCode.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/navigation/NavigationMenuDropdownContent.js +1 -1
- package/dist/components/navigation/NavigationMenuLink.js +1 -1
- package/dist/components/notification-badge/NotificationBadge.js +1 -1
- package/dist/components/number-input/NumberInput.js +1 -1
- package/dist/components/number-input-field/NumberInputField.js +1 -1
- package/dist/components/popover/PopoverContent.js +1 -1
- package/dist/components/radio-button/RadioButton.js +1 -1
- package/dist/components/radio-button-field/RadioButtonField.js +1 -1
- package/dist/components/radio-button-field/RadioField.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-field/SelectField.js +1 -1
- package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionContent.js +1 -1
- package/dist/components/sidedrawer/SidedrawerContent.js +1 -1
- package/dist/components/slider-field/SliderField.js +1 -1
- package/dist/components/stack-content/StackContent.js +1 -1
- package/dist/components/stepper/StepperStepBack.js +1 -1
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/TableBody.js +1 -1
- package/dist/components/table/TableHeader.js +1 -1
- package/dist/components/table/TableRow.d.ts +272 -1
- package/dist/components/table/TableRow.js +1 -1
- package/dist/components/tabs/{TabsTrigger.d.ts → TabTrigger.d.ts} +6 -3
- package/dist/components/tabs/TabTrigger.js +1 -0
- package/dist/components/tabs/Tabs.d.ts +276 -7
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/TabsTriggerList.d.ts +9 -5
- package/dist/components/tabs/TabsTriggerList.js +1 -1
- package/dist/components/tabs/utils.d.ts +2 -0
- package/dist/components/tabs/utils.js +1 -0
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toast/ToastProvider.js +1 -1
- package/dist/components/toggle-group/ToggleGroupButton.js +1 -1
- package/dist/components/tooltip/TooltipContent.js +1 -1
- package/dist/components/video/Video.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/docs/Accordion.mdx +7 -56
- package/dist/docs/DataTable.mdx +37 -1
- package/dist/docs/Tabs.mdx +57 -31
- package/dist/index.cjs.js +1 -1
- package/dist/utilities/hooks/useCallbackRef.js +1 -1
- package/package.json +6 -3
- package/dist/components/tabs/TabsContent.d.ts +0 -267
- package/dist/components/tabs/TabsContent.js +0 -1
- package/dist/components/tabs/TabsTrigger.js +0 -1
|
@@ -1,9 +1,278 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
|
274
|
-
Trigger: typeof
|
|
275
|
-
Content: typeof
|
|
542
|
+
TriggerList: typeof TriggerListWrapper;
|
|
543
|
+
Trigger: typeof TabTrigger;
|
|
544
|
+
Content: typeof StyledTabContent;
|
|
276
545
|
};
|
|
277
546
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Root as
|
|
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 o}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:t="light",children:m,...a})=>p.createElement(h,{theme:t,...a},g(m,{theme:t},[o,i]));r.TriggerList=o,r.Trigger=s,r.Content=i,r.displayName="Tabs";export{r as Tabs};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
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
|
|
270
|
-
colorScheme?: typeof ColorScheme;
|
|
271
|
-
}>;
|
|
275
|
+
export declare const TriggerListWrapper: React.FC<ListProps>;
|
|
272
276
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{List 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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import n from"react";const i=(o,t,e=[])=>n.Children.map(o,l=>n.isValidElement(l)&&e.includes(l==null?void 0:l.type)?n.cloneElement(l,{...t}):l);export{i as passPropsToChildren};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Error as g,Close as
|
|
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 +1 @@
|
|
|
1
|
-
import*as t from"react";import{useToaster as p}from"react-hot-toast";import{default as
|
|
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 +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
|
|
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 +1 @@
|
|
|
1
|
-
import{Content as m,Arrow as l}from"@radix-ui/react-tooltip";import*as
|
|
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 +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:
|
|
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};
|