@atom-learning/components 2.25.0-beta.1 → 2.25.1
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 +207 -0
- package/dist/components/accordion/AccordionContent.js +1 -1
- package/dist/components/accordion/AccordionItem.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 +24 -2
- package/dist/components/data-table/DataTable.js +1 -1
- package/dist/components/data-table/DataTable.types.d.ts +28 -0
- package/dist/components/data-table/DataTable.types.js +1 -0
- package/dist/components/data-table/DataTableBody.js +1 -1
- package/dist/components/data-table/DataTableContext.d.ts +13 -11
- package/dist/components/data-table/DataTableContext.js +1 -1
- package/dist/components/data-table/DataTableDataCell.js +1 -1
- package/dist/components/data-table/DataTableError.d.ts +7 -0
- package/dist/components/data-table/DataTableError.js +1 -0
- package/dist/components/data-table/DataTableGlobalFilter.js +1 -1
- package/dist/components/data-table/DataTableLoading.d.ts +273 -0
- package/dist/components/data-table/DataTableLoading.js +1 -0
- package/dist/components/data-table/DataTableRow.js +1 -1
- package/dist/components/data-table/DataTableTable.js +1 -1
- package/dist/components/data-table/getNewAsyncData.d.ts +3 -0
- package/dist/components/data-table/getNewAsyncData.js +1 -0
- package/dist/components/data-table/pagination/Pagination.d.ts +1 -3
- package/dist/components/data-table/pagination/Pagination.js +1 -1
- package/dist/components/data-table/pagination/PaginationButtons.d.ts +1 -0
- package/dist/components/data-table/pagination/PaginationButtons.js +1 -1
- 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/index.d.ts +11 -11
- 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/loader/Loader.js +1 -1
- package/dist/components/markdown-content/components/MarkdownEmphasis.d.ts +266 -0
- 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/markdown-content/components/index.d.ts +1 -1
- package/dist/components/navigation/NavigationMenuDropdownContent.d.ts +2 -7
- package/dist/components/navigation/NavigationMenuDropdownContent.js +1 -1
- package/dist/components/navigation/NavigationMenuDropdownTrigger.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/TableHeader.js +1 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/utils.js +1 -1
- 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/Avatar.mdx +1 -1
- package/dist/docs/ChipDismissibleGroup.mdx +1 -1
- package/dist/docs/ChipToggleGroup.mdx +1 -1
- package/dist/docs/DataTable.mdx +86 -1
- package/dist/docs/Dismissible.mdx +1 -1
- package/dist/docs/DismissibleGroup.mdx +1 -1
- package/dist/docs/Tabs.mdx +1 -1
- package/dist/docs/Toast.mdx +1 -0
- package/dist/docs/ToggleGroup.mdx +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.js +1 -1
- package/dist/utilities/hooks/useCallbackRef.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const PendingState: import("@stitches/react/types/styled-component").StyledComponent<React.FC<{
|
|
3
|
+
message?: string | undefined;
|
|
4
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
5
|
+
css?: import("../../stitches").CSS | undefined;
|
|
6
|
+
}>, {}, {
|
|
7
|
+
sm: string;
|
|
8
|
+
md: string;
|
|
9
|
+
lg: string;
|
|
10
|
+
xl: string;
|
|
11
|
+
reducedMotion: string;
|
|
12
|
+
allowMotion: string;
|
|
13
|
+
hover: string;
|
|
14
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
15
|
+
sm: string;
|
|
16
|
+
md: string;
|
|
17
|
+
lg: string;
|
|
18
|
+
xl: string;
|
|
19
|
+
reducedMotion: string;
|
|
20
|
+
allowMotion: string;
|
|
21
|
+
hover: string;
|
|
22
|
+
}, {
|
|
23
|
+
colors: {
|
|
24
|
+
textForeground: any;
|
|
25
|
+
textSubtle: any;
|
|
26
|
+
textPlaceholder: any;
|
|
27
|
+
background: any;
|
|
28
|
+
backgroundAccent: any;
|
|
29
|
+
tonal50: any;
|
|
30
|
+
tonal100: any;
|
|
31
|
+
tonal200: any;
|
|
32
|
+
tonal300: any;
|
|
33
|
+
tonal400: any;
|
|
34
|
+
tonal500: any;
|
|
35
|
+
tonal600: any;
|
|
36
|
+
alpha100: any;
|
|
37
|
+
alpha150: any;
|
|
38
|
+
alpha200: any;
|
|
39
|
+
alpha250: any;
|
|
40
|
+
alpha600: any;
|
|
41
|
+
primaryLight: any;
|
|
42
|
+
primary: any;
|
|
43
|
+
primaryMid: any;
|
|
44
|
+
primaryDark: any;
|
|
45
|
+
secondary: any;
|
|
46
|
+
brandRed: any;
|
|
47
|
+
brandRedAccent: any;
|
|
48
|
+
brandGreen: any;
|
|
49
|
+
brandGreenAccent: any;
|
|
50
|
+
brandPurple: any;
|
|
51
|
+
brandPurpleAccent: any;
|
|
52
|
+
brandYellow: any;
|
|
53
|
+
brandYellowAccent: any;
|
|
54
|
+
successLight: any;
|
|
55
|
+
success: any;
|
|
56
|
+
successMid: any;
|
|
57
|
+
successDark: any;
|
|
58
|
+
dangerLight: any;
|
|
59
|
+
danger: any;
|
|
60
|
+
dangerMid: any;
|
|
61
|
+
dangerDark: any;
|
|
62
|
+
warningLight: any;
|
|
63
|
+
warning: any;
|
|
64
|
+
warningMid: any;
|
|
65
|
+
warningDark: any;
|
|
66
|
+
warningText: any;
|
|
67
|
+
subjectEnglish: any;
|
|
68
|
+
subjectMaths: any;
|
|
69
|
+
subjectScience: any;
|
|
70
|
+
subjectVerbalReasoning: any;
|
|
71
|
+
subjectNonVerbalReasoning: any;
|
|
72
|
+
subjectCreativeWriting: any;
|
|
73
|
+
subjectExamSkills: any;
|
|
74
|
+
};
|
|
75
|
+
space: {
|
|
76
|
+
"0": any;
|
|
77
|
+
"1": any;
|
|
78
|
+
"2": any;
|
|
79
|
+
"3": any;
|
|
80
|
+
"4": any;
|
|
81
|
+
"5": any;
|
|
82
|
+
"6": any;
|
|
83
|
+
"7": any;
|
|
84
|
+
"8": any;
|
|
85
|
+
"9": any;
|
|
86
|
+
};
|
|
87
|
+
fontSizes: {
|
|
88
|
+
xs: any;
|
|
89
|
+
sm: any;
|
|
90
|
+
md: any;
|
|
91
|
+
lg: any;
|
|
92
|
+
xl: any;
|
|
93
|
+
"2xl": any;
|
|
94
|
+
"3xl": any;
|
|
95
|
+
"4xl": any;
|
|
96
|
+
};
|
|
97
|
+
fonts: {
|
|
98
|
+
sans: any;
|
|
99
|
+
mono: any;
|
|
100
|
+
display: any;
|
|
101
|
+
body: any;
|
|
102
|
+
};
|
|
103
|
+
sizes: {
|
|
104
|
+
"0": any;
|
|
105
|
+
"1": any;
|
|
106
|
+
"2": any;
|
|
107
|
+
"3": any;
|
|
108
|
+
"4": any;
|
|
109
|
+
"5": any;
|
|
110
|
+
"6": any;
|
|
111
|
+
"7": any;
|
|
112
|
+
"8": any;
|
|
113
|
+
};
|
|
114
|
+
radii: {
|
|
115
|
+
"0": any;
|
|
116
|
+
"1": any;
|
|
117
|
+
"2": any;
|
|
118
|
+
"3": any;
|
|
119
|
+
round: any;
|
|
120
|
+
};
|
|
121
|
+
shadows: {
|
|
122
|
+
"0": any;
|
|
123
|
+
"1": any;
|
|
124
|
+
"2": any;
|
|
125
|
+
"3": any;
|
|
126
|
+
};
|
|
127
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
128
|
+
bg: (value: {
|
|
129
|
+
readonly [$$PropertyValue]: "background";
|
|
130
|
+
}) => {
|
|
131
|
+
background: {
|
|
132
|
+
readonly [$$PropertyValue]: "background";
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
inset: (value: string | number | {
|
|
136
|
+
readonly [$$ScaleValue]: "space";
|
|
137
|
+
}) => {
|
|
138
|
+
top: string | number | {
|
|
139
|
+
readonly [$$ScaleValue]: "space";
|
|
140
|
+
};
|
|
141
|
+
right: string | number | {
|
|
142
|
+
readonly [$$ScaleValue]: "space";
|
|
143
|
+
};
|
|
144
|
+
bottom: string | number | {
|
|
145
|
+
readonly [$$ScaleValue]: "space";
|
|
146
|
+
};
|
|
147
|
+
left: string | number | {
|
|
148
|
+
readonly [$$ScaleValue]: "space";
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
size: (value: string | number | {
|
|
152
|
+
readonly [$$ScaleValue]: "size";
|
|
153
|
+
}) => {
|
|
154
|
+
height: string | number | {
|
|
155
|
+
readonly [$$ScaleValue]: "size";
|
|
156
|
+
};
|
|
157
|
+
width: string | number | {
|
|
158
|
+
readonly [$$ScaleValue]: "size";
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
p: (value: string | number | {
|
|
162
|
+
readonly [$$ScaleValue]: "space";
|
|
163
|
+
}) => {
|
|
164
|
+
padding: string | number | {
|
|
165
|
+
readonly [$$ScaleValue]: "space";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
pt: (value: string | number | {
|
|
169
|
+
readonly [$$ScaleValue]: "space";
|
|
170
|
+
}) => {
|
|
171
|
+
paddingTop: string | number | {
|
|
172
|
+
readonly [$$ScaleValue]: "space";
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
pr: (value: string | number | {
|
|
176
|
+
readonly [$$ScaleValue]: "space";
|
|
177
|
+
}) => {
|
|
178
|
+
paddingRight: string | number | {
|
|
179
|
+
readonly [$$ScaleValue]: "space";
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
pb: (value: string | number | {
|
|
183
|
+
readonly [$$ScaleValue]: "space";
|
|
184
|
+
}) => {
|
|
185
|
+
paddingBottom: string | number | {
|
|
186
|
+
readonly [$$ScaleValue]: "space";
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
pl: (value: string | number | {
|
|
190
|
+
readonly [$$ScaleValue]: "space";
|
|
191
|
+
}) => {
|
|
192
|
+
paddingLeft: string | number | {
|
|
193
|
+
readonly [$$ScaleValue]: "space";
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
px: (value: string | number | {
|
|
197
|
+
readonly [$$ScaleValue]: "space";
|
|
198
|
+
}) => {
|
|
199
|
+
paddingLeft: string | number | {
|
|
200
|
+
readonly [$$ScaleValue]: "space";
|
|
201
|
+
};
|
|
202
|
+
paddingRight: string | number | {
|
|
203
|
+
readonly [$$ScaleValue]: "space";
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
py: (value: string | number | {
|
|
207
|
+
readonly [$$ScaleValue]: "space";
|
|
208
|
+
}) => {
|
|
209
|
+
paddingTop: string | number | {
|
|
210
|
+
readonly [$$ScaleValue]: "space";
|
|
211
|
+
};
|
|
212
|
+
paddingBottom: string | number | {
|
|
213
|
+
readonly [$$ScaleValue]: "space";
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
m: (value: string | number | {
|
|
217
|
+
readonly [$$ScaleValue]: "space";
|
|
218
|
+
}) => {
|
|
219
|
+
margin: string | number | {
|
|
220
|
+
readonly [$$ScaleValue]: "space";
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
mt: (value: string | number | {
|
|
224
|
+
readonly [$$ScaleValue]: "space";
|
|
225
|
+
}) => {
|
|
226
|
+
marginTop: string | number | {
|
|
227
|
+
readonly [$$ScaleValue]: "space";
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
mr: (value: string | number | {
|
|
231
|
+
readonly [$$ScaleValue]: "space";
|
|
232
|
+
}) => {
|
|
233
|
+
marginRight: string | number | {
|
|
234
|
+
readonly [$$ScaleValue]: "space";
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
mb: (value: string | number | {
|
|
238
|
+
readonly [$$ScaleValue]: "space";
|
|
239
|
+
}) => {
|
|
240
|
+
marginBottom: string | number | {
|
|
241
|
+
readonly [$$ScaleValue]: "space";
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
ml: (value: string | number | {
|
|
245
|
+
readonly [$$ScaleValue]: "space";
|
|
246
|
+
}) => {
|
|
247
|
+
marginLeft: string | number | {
|
|
248
|
+
readonly [$$ScaleValue]: "space";
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
mx: (value: string | number | {
|
|
252
|
+
readonly [$$ScaleValue]: "space";
|
|
253
|
+
}) => {
|
|
254
|
+
marginLeft: string | number | {
|
|
255
|
+
readonly [$$ScaleValue]: "space";
|
|
256
|
+
};
|
|
257
|
+
marginRight: string | number | {
|
|
258
|
+
readonly [$$ScaleValue]: "space";
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
my: (value: string | number | {
|
|
262
|
+
readonly [$$ScaleValue]: "space";
|
|
263
|
+
}) => {
|
|
264
|
+
marginTop: string | number | {
|
|
265
|
+
readonly [$$ScaleValue]: "space";
|
|
266
|
+
};
|
|
267
|
+
marginBottom: string | number | {
|
|
268
|
+
readonly [$$ScaleValue]: "space";
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
}>>;
|
|
272
|
+
export declare const DataTableLoading: React.FC<React.ComponentProps<typeof PendingState>>;
|
|
273
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as a from"react";import{styled as r}from"../../stitches.js";import{Loader as e}from"../loader/Loader.js";import{AsyncDataState as m}from"./DataTable.types.js";import{useDataTable as n}from"./DataTableContext.js";const s=r(e,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:1}),l=t=>{const{asyncDataState:o}=n();return o!==m.PENDING?null:a.createElement(s,{...t})};export{l as DataTableLoading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as l from"react";import{Table as
|
|
1
|
+
import*as l from"react";import{Table as a}from"../table/Table.js";import{DataTableDataCell as o}from"./DataTableDataCell.js";const r=({row:t})=>l.createElement(a.Row,null,t.getVisibleCells().map(e=>l.createElement(o,{key:e.id,cell:e})));export{r as DataTableRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Table as
|
|
1
|
+
import*as e from"react";import{Table as i}from"../table/Table.js";import{DataTable as t}from"./DataTable.js";import{AsyncDataState as c}from"./DataTable.types.js";import{useDataTable as p}from"./DataTableContext.js";import{DataTableLoading as b}from"./DataTableLoading.js";const D=({sortable:a,striped:r,theme:o,css:m,...n})=>{const{asyncDataState:s}=p(),l=s===c.PENDING;return e.createElement(e.Fragment,null,e.createElement(b,null),e.createElement(i,{...n,css:{...m,...l&&{opacity:.5,pointerEvents:"none",transition:"opacity 250ms linear 150ms"}}},e.createElement(t.Head,{theme:o,sortable:a}),e.createElement(t.Body,{striped:r})))};export{D as DataTableTable};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PaginationState, SortingState } from '@tanstack/react-table';
|
|
2
|
+
import type { TAsyncDataOptions, TAsyncDataResult, TGetAsyncData } from './DataTable.types';
|
|
3
|
+
export declare const getNewAsyncData: (getAsyncData: TGetAsyncData, asyncDataOptions: Partial<TAsyncDataOptions>, paginationState: PaginationState, sorting: SortingState, globalFilter: string) => Promise<TAsyncDataResult | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import c from"invariant";const h=e=>{if(e[0])return e[0].desc?"desc":"asc"},m=async(e,t,g,n,p)=>{var l,o,a,i,u,s;const{pageIndex:d,pageSize:y}=g,b={pageIndex:(l=t==null?void 0:t.pageIndex)!=null?l:d,pageSize:(o=t==null?void 0:t.pageSize)!=null?o:y,sortBy:(i=t==null?void 0:t.sortBy)!=null?i:(a=n[0])==null?void 0:a.id,sortDirection:(u=t==null?void 0:t.sortDirection)!=null?u:h(n),globalFilter:(s=t.globalFilter)!=null?s:p},r=await e(b);return c(Array.isArray(r==null?void 0:r.results),"The getAsyncData function must return an object with a property `result` which must be an array"),c(r&&Number.isInteger(r.total)&&r.total>=0,"The getAsyncData function must return an object with a property `total` which must be a positive integer or zero"),r};export{m as getNewAsyncData};
|
|
@@ -265,9 +265,7 @@ declare const StyledNav: import("@stitches/react/types/styled-component").Styled
|
|
|
265
265
|
};
|
|
266
266
|
};
|
|
267
267
|
}>>;
|
|
268
|
-
declare type PaginationProps = React.ComponentProps<typeof StyledNav
|
|
269
|
-
pageSize?: number;
|
|
270
|
-
};
|
|
268
|
+
declare type PaginationProps = React.ComponentProps<typeof StyledNav>;
|
|
271
269
|
/** Applies pagination to parent DataTableProvider and renders UI to switch pages etc */
|
|
272
270
|
export declare const Pagination: React.FC<PaginationProps>;
|
|
273
271
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as
|
|
1
|
+
import*as e from"react";import{styled as E}from"../../../stitches.js";import{Flex as P}from"../../flex/Flex.js";import{Text as I}from"../../text/Text.js";import{AsyncDataState as s}from"../DataTable.types.js";import{useDataTable as b}from"../DataTableContext.js";import{GotoPageSelect as y,DirectionButton as m}from"./PaginationButtons.js";const C=E("nav",{display:"flex",justifyContent:"space-between",alignItems:"center",fontVariantNumeric:"tabular-nums"}),S=c=>{const{applyPagination:n,getState:g,getRowModel:l,getPageCount:o,previousPage:p,nextPage:d,setPageIndex:f,getTotalRows:u,asyncDataState:i}=b();e.useEffect(()=>{n()},[n]);const{pagination:t}=g(),r=t.pageIndex*t.pageSize+1,x=r+l().rows.length-1,a=i===s.PENDING||i===s.REJECTED;return e.createElement(C,{...c},e.createElement(I,{size:"sm"},`${r.toString()} - ${x.toString()} of ${u()} items`),e.createElement(y,{gotoPage:f,pageCount:o(),pageIndex:t.pageIndex,disabled:a}),e.createElement(P,{css:{justifyContent:"flex-end"}},e.createElement(m,{direction:"previous",disabled:t.pageIndex===0||a,onClick:p,css:{mr:"$4"}}),e.createElement(m,{direction:"next",disabled:t.pageIndex===o()-1||a,onClick:d})))};export{S as Pagination};
|
|
@@ -12,6 +12,7 @@ export declare const GotoPageSelect: React.FC<{
|
|
|
12
12
|
pageIndex: number;
|
|
13
13
|
pageCount: number;
|
|
14
14
|
gotoPage: (pageNumber: number) => void;
|
|
15
|
+
disabled: boolean;
|
|
15
16
|
}>;
|
|
16
17
|
declare type TooltipActionIconProps = React.ComponentProps<typeof ActionIcon> & React.ComponentProps<typeof Icon> & {
|
|
17
18
|
icon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronRight as
|
|
1
|
+
import{ChevronRight as c,ChevronLeft as p}from"@atom-learning/icons";import e from"react";import{Flex as s}from"../../flex/Flex.js";import{Select as g}from"../../select/Select.js";import{Text as u}from"../../text/Text.js";import{ActionIcon as f}from"../../action-icon/ActionIcon.js";import{Icon as d}from"../../icon/Icon.js";import{Tooltip as a}from"../../tooltip/Tooltip.js";const E=({direction:n,...t})=>{const o=n==="next";return e.createElement(l,{appearance:"outline",icon:o?c:p,isRounded:!0,label:o?"Next page":"Previous page",name:o?"Next page":"Previous page",size:"md",...t})},x=({gotoPage:n,pageCount:t,pageIndex:o,disabled:m})=>e.createElement(s,{css:{alignItems:"center"}},e.createElement(g,{value:o,size:"sm",css:{mr:"$3"},disabled:m,onChange:r=>{n(Number(r.target.value))}},Array.from({length:t},(r,i)=>i).map(r=>e.createElement("option",{key:r,value:r},r+1))),e.createElement(u,{size:"sm",css:{flex:"none"}},`of ${t} ${t>1?"pages":"page"}`)),l=({icon:n,label:t,...o})=>e.createElement(a,null,e.createElement(a.Trigger,{asChild:!0},e.createElement(f,{label:t,...o},e.createElement(d,{is:n}))),e.createElement(a.Content,null,t));export{E as DirectionButton,x as GotoPageSelect,l as TooltipActionIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Close as h}from"@atom-learning/icons";import{Overlay as x,Content as b,Portal as w,Close as g}from"@radix-ui/react-dialog";import*as
|
|
1
|
+
import{Close as h}from"@atom-learning/icons";import{Overlay as x,Content as b,Portal as w,Close as g}from"@radix-ui/react-dialog";import*as o from"react";import{DIALOG_Z_INDEX as r}from"../../constants/zIndices.js";import{keyframes as n,styled as l}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as $}from"../icon/Icon.js";import{DialogBackground as s}from"./DialogBackground.js";import{fadeIn as z,fadeOut as C}from"../../utilities/style/keyframe-animations.js";const e="translate3d(-50%, -50%, 0)",m="translate3d(-50%, 50vh, 0)",d="modal_overlay",D=n({"0%":{transform:m},"100%":{transform:e}}),I=n({"0%":{transform:e},"100%":{transform:m}}),y=l(x,{backgroundColor:"$alpha600",inset:0,position:"fixed",overflowY:"auto",zIndex:r,"@allowMotion":{'&[data-state="open"]':{animation:`${z} 250ms ease-out`},'&[data-state="closed"]':{animation:`${C} 550ms ease-out`}}}),E=l(b,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",maxHeight:"90vh",overflowY:"auto",p:"$5",position:"fixed",top:"50%",transform:e,zIndex:r,"&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${D} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${I} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{xs:{width:"380px"},sm:{width:"480px"},md:{width:"600px"},lg:{width:"800px"},xl:{width:"1100px"}}}}),O=({size:p="sm",children:a,closeDialogText:f="Close dialog",showCloseButton:c=!0,...u})=>o.createElement(w,null,o.createElement(y,{id:d},o.Children.map(a,t=>(t==null?void 0:t.type)===s&&t),o.createElement(E,{size:p,"aria-label":"Dialog",onPointerDownOutside:t=>{const i=t.target;(i==null?void 0:i.id)!==d&&t.preventDefault()},...u},c&&o.createElement(v,{as:g,css:{position:"absolute",right:"$4",top:"$4"},label:f,size:"md",theme:"neutral"},o.createElement($,{is:h})),o.Children.map(a,t=>(t==null?void 0:t.type)!==s&&t))));export{O as DialogContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Slot as c}from"@radix-ui/react-slot";const r=e.createContext({isDismissed:!1,setIsDismissed:()=>null}),n=({children:
|
|
1
|
+
import*as e from"react";import{Slot as c}from"@radix-ui/react-slot";const r=e.createContext({isDismissed:!1,setIsDismissed:()=>null}),n=({children:t,disabled:s})=>{const[i,l]=e.useState(!1),o=e.useMemo(()=>({disabled:s,isDismissed:i,setIsDismissed:l}),[s,i]);return e.createElement(r.Provider,{value:o},t)},u=({asChild:t=!1,value:s,onDismiss:i,...l})=>{const o=e.useContext(r),{isDismissed:d,disabled:a}=o;if(e.useEffect(()=>{d&&(i==null||i(s))},[d]),d)return null;const m={...a&&{["data-disabled"]:""},...l};return e.createElement(t?c:"div",{...m})},b=({disabled:t=!1,...s})=>e.createElement(n,{disabled:t},e.createElement(u,{...s}));export{b as DismissibleRoot,r as DismissibleRootContext,n as DismissibleRootProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{Slot as m}from"@radix-ui/react-slot";import{DismissibleRootContext as l}from"./DismissibleRoot.js";const b=s=>t.createElement("button",{type:"button",...s},"Dismiss"),a=({asChild:s=!1,...i})=>{const e=t.useContext(l);if(e===void 0)throw new Error("Dismissible.Trigger can only be used within a Dismissible.Item");const{setIsDismissed:o,disabled:r}=e,n={disabled:r,onClick:()=>{o(!0)},...i};return t.createElement(s?m:b,{...n})};export{a as DismissibleTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{styled as n}from"../../stitches.js";import{DropdownMenuItem as m}from"./DropdownMenuItem.js";const i=n("a",{textDecoration:"none"}),l=({children:
|
|
1
|
+
import e from"react";import{styled as n}from"../../stitches.js";import{DropdownMenuItem as m}from"./DropdownMenuItem.js";const i=n("a",{textDecoration:"none"}),l=({children:t,href:o,...r})=>e.createElement(m,{...r,asChild:!0},e.createElement(i,{href:o,role:"menuitem"},t));export{l as DropdownMenuLinkItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Text as r}from"../text/Text.js";const s=({children:
|
|
1
|
+
import*as e from"react";import{Text as r}from"../text/Text.js";const s=({children:t,css:o})=>e.createElement(r,{size:"sm",css:{color:"$tonal300",maxWidth:"80ch",...o}},t);export{s as Description};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Box as
|
|
1
|
+
import*as e from"react";import{Box as o}from"../box/Box.js";import{Checkbox as d}from"../checkbox/Checkbox.js";import{Label as f}from"../label/Label.js";import{RadioButton as $}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";import{InlineMessage as u}from"../inline-message/InlineMessage.js";import{Description as E}from"./FieldDescription.js";const l=({align:n="start",children:a,css:s,description:i,direction:t="row",error:m,label:p,required:c})=>e.createElement(o,{css:s},e.createElement(f,{align:n,direction:t,required:c,type:"inline"},e.Children.map(a,r=>e.createElement(o,{css:{[t==="reverse"?"ml":"mr"]:"$3",...((r==null?void 0:r.type)===d||(r==null?void 0:r.type)===$)&&{transform:"translateY($space$1)"}}},r)),p),m&&e.createElement(u,{css:{mt:"$2"}},m),i&&e.createElement(E,{css:{mt:"$2",[t==="reverse"?"mr":"ml"]:"calc($space$3 + $sizes$1)"}},i));l.displayName="InlineFieldWrapper";export{l as InlineFieldWrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Upload as c}from"@atom-learning/icons";import*as e from"react";import{Button as s}from"../button/Button.js";import{Icon as u}from"../icon/Icon.js";const t=({accept:l,children:
|
|
1
|
+
import{Upload as c}from"@atom-learning/icons";import*as e from"react";import{Button as s}from"../button/Button.js";import{Icon as u}from"../icon/Icon.js";const t=({accept:l,children:i,multiple:n=!1,onFileSelect:o,...r})=>{const p=a=>{const{files:m}=a.target;o(m)};return e.createElement(s,{as:"label",...r},e.createElement(u,{is:c}),i,e.createElement("input",{type:"file",onChange:p,accept:l,multiple:n,hidden:!0}))};t.displayName="FileInput";export{t as FileInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as s from"react";import{styled as p}from"../../stitches.js";import{createThemeVariants as o}from"../../utilities/create-theme-variants/createThemeVariants.js";const d=p("div",{display:"grid",variants:{gap:o("space",{gap:"$key"})}}),a=({css:
|
|
1
|
+
import*as s from"react";import{styled as p}from"../../stitches.js";import{createThemeVariants as o}from"../../utilities/create-theme-variants/createThemeVariants.js";const d=p("div",{display:"grid",variants:{gap:o("space",{gap:"$key"})}}),a=({css:t,gap:m=2,minItemSize:e,maxItemSize:i="1fr",...r})=>s.createElement(d,{css:{...e&&{gridTemplateColumns:`repeat(auto-fit, minmax(${e}, ${i}))`},...t},gap:m,...r});a.displayName="Grid";export{a as Grid};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as n}from"../../stitches.js";const i=n("svg",{display:"inline-block",fill:"none",stroke:"currentcolor",strokeLinecap:"round",strokeLinejoin:"round",verticalAlign:"middle",variants:{size:{sm:{size:"$1",strokeWidth:"1.5"},md:{size:"$2",strokeWidth:"1.75"},lg:{size:"$3",strokeWidth:"2"}}}}),d=e.forwardRef(({is:r,size:o="md",...
|
|
1
|
+
import*as e from"react";import{styled as n}from"../../stitches.js";const i=n("svg",{display:"inline-block",fill:"none",stroke:"currentcolor",strokeLinecap:"round",strokeLinejoin:"round",verticalAlign:"middle",variants:{size:{sm:{size:"$1",strokeWidth:"1.5"},md:{size:"$2",strokeWidth:"1.75"},lg:{size:"$3",strokeWidth:"2"}}}}),d=e.forwardRef(({is:r,size:o="md",...t},s)=>e.createElement(i,{size:o,"aria-hidden":"true",...t,as:r,ref:s}));export{d as Icon,i as StyledIcon};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export type { ValidationOptions } from './form';
|
|
2
2
|
export { Accordion } from './accordion';
|
|
3
|
-
export { EmptyState } from './empty-state';
|
|
4
3
|
export { ActionIcon } from './action-icon';
|
|
5
4
|
export { AlertDialog, useAlert, AlertProvider } from './alert-dialog';
|
|
6
5
|
export { Avatar } from './avatar';
|
|
@@ -15,14 +14,16 @@ export { ChipDismissibleGroup } from './chip-dismissible-group';
|
|
|
15
14
|
export { ChipToggleGroup } from './chip-toggle-group';
|
|
16
15
|
export { Combobox } from './combobox';
|
|
17
16
|
export { DataTable, useDataTable } from './data-table';
|
|
18
|
-
export { Dialog } from './dialog';
|
|
19
|
-
export { DateInput } from './date-input';
|
|
20
17
|
export { DateField } from './date-field';
|
|
18
|
+
export { DateInput } from './date-input';
|
|
19
|
+
export { Dialog } from './dialog';
|
|
21
20
|
export { Dismissible } from './dismissible';
|
|
22
21
|
export { DismissibleGroup } from './dismissible-group';
|
|
23
22
|
export { Divider } from './divider';
|
|
24
23
|
export { DropdownMenu } from './dropdown-menu';
|
|
24
|
+
export { EmptyState } from './empty-state';
|
|
25
25
|
export { FieldWrapper, InlineFieldWrapper } from './field-wrapper';
|
|
26
|
+
export { FileInput } from './file-input';
|
|
26
27
|
export { Flex } from './flex';
|
|
27
28
|
export { Form } from './form';
|
|
28
29
|
export { Grid } from './grid';
|
|
@@ -31,32 +32,33 @@ export { Icon } from './icon';
|
|
|
31
32
|
export { Image } from './image';
|
|
32
33
|
export { InlineMessage } from './inline-message';
|
|
33
34
|
export { Input } from './input';
|
|
34
|
-
export { FileInput } from './file-input';
|
|
35
35
|
export { InputField } from './input-field';
|
|
36
36
|
export { Label } from './label';
|
|
37
37
|
export { Link, StyledLink } from './link';
|
|
38
38
|
export { List } from './list';
|
|
39
39
|
export { Loader } from './loader';
|
|
40
40
|
export { MarkdownContent } from './markdown-content';
|
|
41
|
-
export {
|
|
41
|
+
export { NavigationMenu } from './navigation';
|
|
42
42
|
export { NotificationBadge } from './notification-badge';
|
|
43
|
+
export { NumberInput } from './number-input';
|
|
44
|
+
export { NumberInputField } from './number-input-field';
|
|
43
45
|
export { PasswordField } from './password-field';
|
|
44
46
|
export { PasswordInput } from './password-input';
|
|
45
47
|
export { Popover } from './popover';
|
|
46
48
|
export { ProgressBar } from './progress-bar';
|
|
47
|
-
export { Sidedrawer } from './sidedrawer';
|
|
48
|
-
export { Stepper } from './stepper';
|
|
49
49
|
export { RadioButton, RadioButtonGroup } from './radio-button';
|
|
50
50
|
export { RadioButtonField } from './radio-button-field';
|
|
51
51
|
export { RadioCard, RadioCardGroup } from './radio-card';
|
|
52
|
-
export { SearchInput } from './search-input';
|
|
53
52
|
export { SearchField } from './search-field';
|
|
53
|
+
export { SearchInput } from './search-input';
|
|
54
54
|
export { Select } from './select';
|
|
55
55
|
export { SelectField } from './select-field';
|
|
56
|
+
export { Sidedrawer } from './sidedrawer';
|
|
56
57
|
export { Slider } from './slider';
|
|
57
58
|
export { SliderField } from './slider-field';
|
|
58
59
|
export { Stack } from './stack';
|
|
59
60
|
export { StackContent } from './stack-content';
|
|
61
|
+
export { Stepper } from './stepper';
|
|
60
62
|
export { Switch } from './switch';
|
|
61
63
|
export { Table } from './table';
|
|
62
64
|
export { Tabs } from './tabs';
|
|
@@ -66,7 +68,5 @@ export { TextareaField } from './textarea-field';
|
|
|
66
68
|
export { ToastProvider, toast } from './toast';
|
|
67
69
|
export { ToggleGroup } from './toggle-group';
|
|
68
70
|
export { Tooltip } from './tooltip';
|
|
71
|
+
export { TopBar } from './top-bar';
|
|
69
72
|
export { Video } from './video';
|
|
70
|
-
export { NavigationMenu } from './navigation';
|
|
71
|
-
export { NumberInput } from './number-input';
|
|
72
|
-
export { NumberInputField } from './number-input-field';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{INLINE_MESSAGE_THEMES as a,INLINE_MESSAGE_ICONS as c}from"./InlineMessage.config.js";import{Flex as E}from"../flex/Flex.js";import{Text as f}from"../text/Text.js";import{Icon as l}from"../icon/Icon.js";import{styled as
|
|
1
|
+
import*as e from"react";import{INLINE_MESSAGE_THEMES as a,INLINE_MESSAGE_ICONS as c}from"./InlineMessage.config.js";import{Flex as E}from"../flex/Flex.js";import{Text as f}from"../text/Text.js";import{Icon as l}from"../icon/Icon.js";import{styled as t}from"../../stitches.js";const p=t(E,{variants:{theme:a}}),I=t(l,{flexShrink:"0",mr:"$2"}),S=({css:s,showIcon:m=!0,theme:r="error",size:o="sm",children:n,...i})=>e.createElement(p,{theme:r,css:s,...i},m&&e.createElement(I,{size:"sm",is:c[r]}),e.createElement(f,{as:"span",size:o,css:{transform:"translateY($space$0)"}},n));export{S as InlineMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as
|
|
1
|
+
import*as e from"react";import{styled as t}from"../../stitches.js";import{getTextVariant as i}from"../text/Text.js";const p=t("label",{color:"$tonal500",fontFamily:"$body",m:0,variants:{size:{sm:i({size:"sm"}),md:i({size:"md"})},type:{block:{display:"block",fontWeight:600},inline:{display:"flex",fontWeight:400,maxWidth:"max-content"}},align:{start:{},center:{}},direction:{reverse:{},row:{}}},compoundVariants:[{type:"inline",align:"start",css:{alignItems:"flex-start"}},{type:"inline",align:"center",css:{alignItems:"center"}},{type:"inline",direction:"reverse",css:{flexDirection:"row-reverse"}},{type:"inline",direction:"row",css:{flexDirection:"row"}}]}),y=t("span",{color:"$danger",ml:"$1",fontWeight:400}),n=({align:r="start",as:a="label",direction:l="row",size:o="md",type:s="block",children:c,required:m,...d})=>e.createElement(p,{as:a,size:o,type:s,align:r,direction:l,...d},c,m&&e.createElement(y,{"aria-hidden":!0},"*"));n.displayName="Label";export{n as Label};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{styled as a}from"../../stitches.js";import{StyledHeading as p}from"../heading/Heading.js";import{StyledLi as s}from"../list/List.js";import"../markdown-content/components/MarkdownCode.js";import{StyledMarkdownEmphasis as f}from"../markdown-content/components/MarkdownEmphasis.js";import"../markdown-content/components/MarkdownInlineCode.js";import"../image/Image.js";import{StyledText as d,textVariants as l}from"../text/Text.js";import"../markdown-content/components/MarkdownStrong.js";import"../divider/Divider.js";const e=a("a",{bg:"unset",border:"unset",p:"unset",color:"$primary",cursor:"pointer",fontFamily:"$body",textDecoration:"none","&:focus, &:hover":{color:"$primaryMid",textDecoration:"underline"},"&:active":{color:"$primaryDark"},[`${d} > &, ${p} > &, ${s} > &, ${f} > &`]:{fontSize:"100%",lineHeight:1,"&::before, &::after":{content:"none"}},variants:l}),o=t.forwardRef(({size:i="md",href:r,...n},m)=>t.createElement(e,{...!r&&{as:"button",noCapsize:!0},size:i,href:r,...n,ref:m}));o.displayName="Link";export{o as Link,e as StyledLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as m from"@radix-ui/react-visually-hidden";import*as e from"react";import{Flex as r}from"../flex/Flex.js";import{keyframes as s,styled as l}from"../../stitches.js";const c=s({"0%":{opacity:0},"30%":{opacity:1},"50%":{opacity:1},"80%":{opacity:0},"100%":{opacity:0}}),t=l("div",{animationName:`${c}`,animationDuration:"1s",animationFillMode:"both",animationIterationCount:"infinite",animationTimingFunction:"linear",backgroundColor:"currentColor",borderRadius:"$round","&:nth-child(1)":{animationDelay:"-300ms"},"&:nth-child(2)":{animationDelay:"-150ms"},"&:nth-child(3)":{animationDelay:0},variants:{size:{sm:{size:"4px",mx:"2px"},md:{size:"6px",mx:"2px"},lg:{size:"8px",mx:"3px"}}}}),p=({css:n={},message:a="Loading",size:i="md",...o})=>e.createElement(r,{css:{justifyContent:"center",...n},role:"alert",...o},e.createElement(m.Root,null,a),e.createElement(t,{size:i}),e.createElement(t,{size:i}),e.createElement(t,{size:i}));export{p as Loader};
|