@atom-learning/components 1.3.1 → 1.4.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/dist/components/action-icon/ActionIcon.d.ts +1 -1
- package/dist/components/form/Form.types.d.ts +2 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/notification-badge/NotificationBadge.d.ts +535 -0
- package/dist/components/notification-badge/NotificationBadge.js +1 -0
- package/dist/components/notification-badge/index.d.ts +1 -0
- package/dist/components/tabs/TabTrigger.js +1 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/TabsTriggerList.d.ts +1 -0
- package/dist/components/tabs/TabsTriggerList.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/docs/NotificationBadge.mdx +33 -0
- package/dist/docs/Tabs.mdx +15 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -277,5 +277,5 @@ declare type ActionIconProps = Override<React.ComponentProps<typeof StyledButton
|
|
|
277
277
|
children: React.ReactNode;
|
|
278
278
|
label: string;
|
|
279
279
|
} & NavigatorActions>;
|
|
280
|
-
export declare const ActionIcon: React.ForwardRefExoticComponent<Pick<ActionIconProps, "appearance" | "color" | "translate" | "size" | "css" | "theme" | "onBlur" | "onSubmit" | "form" | "label" | "slot" | "style" | "title" | "hidden" | "key" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "
|
|
280
|
+
export declare const ActionIcon: React.ForwardRefExoticComponent<Pick<ActionIconProps, "appearance" | "color" | "translate" | "size" | "css" | "theme" | "onBlur" | "onChange" | "onSubmit" | "form" | "label" | "slot" | "style" | "title" | "hidden" | "key" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as" | "disabled" | "value" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "isRounded" | keyof NavigatorActions> & React.RefAttributes<HTMLButtonElement>>;
|
|
281
281
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { UseFormMethods } from 'react-hook-form';
|
|
2
|
+
import type { UseFormMethods, Mode } from 'react-hook-form';
|
|
3
3
|
export declare enum StorageEnum {
|
|
4
4
|
LOCAL = "local",
|
|
5
5
|
SESSION = "session"
|
|
@@ -32,7 +32,7 @@ export declare type FormValues = {
|
|
|
32
32
|
[key: string]: string | number;
|
|
33
33
|
};
|
|
34
34
|
onSubmit: (data: any) => void | any;
|
|
35
|
-
validationMode?:
|
|
35
|
+
validationMode?: Mode;
|
|
36
36
|
persist?: PersistOptions;
|
|
37
37
|
} & ({
|
|
38
38
|
children: React.ReactNode;
|
|
@@ -25,6 +25,7 @@ export { Link, StyledLink } from './link';
|
|
|
25
25
|
export { List } from './list';
|
|
26
26
|
export { Loader } from './loader';
|
|
27
27
|
export { MarkdownContent } from './markdown-content';
|
|
28
|
+
export { NotificationBadge } from './notification-badge';
|
|
28
29
|
export { PasswordField } from './password-field';
|
|
29
30
|
export { PasswordInput } from './password-input';
|
|
30
31
|
export { Popover } from './popover';
|
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const StyledBadge: import("@stitches/react/types/styled-component").StyledComponent<import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
|
|
3
|
+
sm: string;
|
|
4
|
+
md: string;
|
|
5
|
+
lg: string;
|
|
6
|
+
xl: string;
|
|
7
|
+
reducedMotion: string;
|
|
8
|
+
allowMotion: string;
|
|
9
|
+
hover: string;
|
|
10
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
11
|
+
sm: string;
|
|
12
|
+
md: string;
|
|
13
|
+
lg: string;
|
|
14
|
+
xl: string;
|
|
15
|
+
reducedMotion: string;
|
|
16
|
+
allowMotion: string;
|
|
17
|
+
hover: string;
|
|
18
|
+
}, {
|
|
19
|
+
colors: {
|
|
20
|
+
textForeground: any;
|
|
21
|
+
textSubtle: any;
|
|
22
|
+
textPlaceholder: any;
|
|
23
|
+
background: any;
|
|
24
|
+
backgroundAccent: any;
|
|
25
|
+
tonal50: any;
|
|
26
|
+
tonal100: any;
|
|
27
|
+
tonal200: any;
|
|
28
|
+
tonal300: any;
|
|
29
|
+
tonal400: any;
|
|
30
|
+
tonal500: any;
|
|
31
|
+
tonal600: any;
|
|
32
|
+
alpha100: any;
|
|
33
|
+
alpha150: any;
|
|
34
|
+
alpha200: any;
|
|
35
|
+
alpha250: any;
|
|
36
|
+
alpha600: any;
|
|
37
|
+
primaryLight: any;
|
|
38
|
+
primary: any;
|
|
39
|
+
primaryMid: any;
|
|
40
|
+
primaryDark: any;
|
|
41
|
+
secondary: any;
|
|
42
|
+
brandRed: any;
|
|
43
|
+
brandRedAccent: any;
|
|
44
|
+
brandGreen: any;
|
|
45
|
+
brandGreenAccent: any;
|
|
46
|
+
brandPurple: any;
|
|
47
|
+
brandPurpleAccent: any;
|
|
48
|
+
brandYellow: any;
|
|
49
|
+
brandYellowAccent: any;
|
|
50
|
+
successLight: any;
|
|
51
|
+
success: any;
|
|
52
|
+
successMid: any;
|
|
53
|
+
successDark: any;
|
|
54
|
+
dangerLight: any;
|
|
55
|
+
danger: any;
|
|
56
|
+
dangerMid: any;
|
|
57
|
+
dangerDark: any;
|
|
58
|
+
warningLight: any;
|
|
59
|
+
warning: any;
|
|
60
|
+
warningMid: any;
|
|
61
|
+
warningDark: any;
|
|
62
|
+
subjectEnglish: any;
|
|
63
|
+
subjectMaths: any;
|
|
64
|
+
subjectScience: any;
|
|
65
|
+
subjectVerbalReasoning: any;
|
|
66
|
+
subjectNonVerbalReasoning: any;
|
|
67
|
+
subjectCreativeWriting: any;
|
|
68
|
+
subjectExamSkills: any;
|
|
69
|
+
};
|
|
70
|
+
space: {
|
|
71
|
+
"0": any;
|
|
72
|
+
"1": any;
|
|
73
|
+
"2": any;
|
|
74
|
+
"3": any;
|
|
75
|
+
"4": any;
|
|
76
|
+
"5": any;
|
|
77
|
+
"6": any;
|
|
78
|
+
"7": any;
|
|
79
|
+
"8": any;
|
|
80
|
+
"9": any;
|
|
81
|
+
};
|
|
82
|
+
fontSizes: {
|
|
83
|
+
xs: any;
|
|
84
|
+
sm: any;
|
|
85
|
+
md: any;
|
|
86
|
+
lg: any;
|
|
87
|
+
xl: any;
|
|
88
|
+
"2xl": any;
|
|
89
|
+
"3xl": any;
|
|
90
|
+
"4xl": any;
|
|
91
|
+
};
|
|
92
|
+
fonts: {
|
|
93
|
+
sans: any;
|
|
94
|
+
mono: any;
|
|
95
|
+
display: any;
|
|
96
|
+
body: any;
|
|
97
|
+
};
|
|
98
|
+
sizes: {
|
|
99
|
+
"0": any;
|
|
100
|
+
"1": any;
|
|
101
|
+
"2": any;
|
|
102
|
+
"3": any;
|
|
103
|
+
"4": any;
|
|
104
|
+
"5": any;
|
|
105
|
+
"6": any;
|
|
106
|
+
"7": any;
|
|
107
|
+
"8": any;
|
|
108
|
+
};
|
|
109
|
+
radii: {
|
|
110
|
+
"0": any;
|
|
111
|
+
"1": any;
|
|
112
|
+
"2": any;
|
|
113
|
+
"3": any;
|
|
114
|
+
round: any;
|
|
115
|
+
};
|
|
116
|
+
shadows: {
|
|
117
|
+
"0": any;
|
|
118
|
+
"1": any;
|
|
119
|
+
"2": any;
|
|
120
|
+
"3": any;
|
|
121
|
+
};
|
|
122
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
123
|
+
bg: (value: {
|
|
124
|
+
readonly [$$PropertyValue]: "background";
|
|
125
|
+
}) => {
|
|
126
|
+
background: {
|
|
127
|
+
readonly [$$PropertyValue]: "background";
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
inset: (value: string | number | {
|
|
131
|
+
readonly [$$ScaleValue]: "space";
|
|
132
|
+
}) => {
|
|
133
|
+
top: string | number | {
|
|
134
|
+
readonly [$$ScaleValue]: "space";
|
|
135
|
+
};
|
|
136
|
+
right: string | number | {
|
|
137
|
+
readonly [$$ScaleValue]: "space";
|
|
138
|
+
};
|
|
139
|
+
bottom: string | number | {
|
|
140
|
+
readonly [$$ScaleValue]: "space";
|
|
141
|
+
};
|
|
142
|
+
left: string | number | {
|
|
143
|
+
readonly [$$ScaleValue]: "space";
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
size: (value: string | number | {
|
|
147
|
+
readonly [$$ScaleValue]: "size";
|
|
148
|
+
}) => {
|
|
149
|
+
height: string | number | {
|
|
150
|
+
readonly [$$ScaleValue]: "size";
|
|
151
|
+
};
|
|
152
|
+
width: string | number | {
|
|
153
|
+
readonly [$$ScaleValue]: "size";
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
p: (value: string | number | {
|
|
157
|
+
readonly [$$ScaleValue]: "space";
|
|
158
|
+
}) => {
|
|
159
|
+
padding: string | number | {
|
|
160
|
+
readonly [$$ScaleValue]: "space";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
pt: (value: string | number | {
|
|
164
|
+
readonly [$$ScaleValue]: "space";
|
|
165
|
+
}) => {
|
|
166
|
+
paddingTop: string | number | {
|
|
167
|
+
readonly [$$ScaleValue]: "space";
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
pr: (value: string | number | {
|
|
171
|
+
readonly [$$ScaleValue]: "space";
|
|
172
|
+
}) => {
|
|
173
|
+
paddingRight: string | number | {
|
|
174
|
+
readonly [$$ScaleValue]: "space";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
pb: (value: string | number | {
|
|
178
|
+
readonly [$$ScaleValue]: "space";
|
|
179
|
+
}) => {
|
|
180
|
+
paddingBottom: string | number | {
|
|
181
|
+
readonly [$$ScaleValue]: "space";
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
pl: (value: string | number | {
|
|
185
|
+
readonly [$$ScaleValue]: "space";
|
|
186
|
+
}) => {
|
|
187
|
+
paddingLeft: string | number | {
|
|
188
|
+
readonly [$$ScaleValue]: "space";
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
px: (value: string | number | {
|
|
192
|
+
readonly [$$ScaleValue]: "space";
|
|
193
|
+
}) => {
|
|
194
|
+
paddingLeft: string | number | {
|
|
195
|
+
readonly [$$ScaleValue]: "space";
|
|
196
|
+
};
|
|
197
|
+
paddingRight: string | number | {
|
|
198
|
+
readonly [$$ScaleValue]: "space";
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
py: (value: string | number | {
|
|
202
|
+
readonly [$$ScaleValue]: "space";
|
|
203
|
+
}) => {
|
|
204
|
+
paddingTop: string | number | {
|
|
205
|
+
readonly [$$ScaleValue]: "space";
|
|
206
|
+
};
|
|
207
|
+
paddingBottom: string | number | {
|
|
208
|
+
readonly [$$ScaleValue]: "space";
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
m: (value: string | number | {
|
|
212
|
+
readonly [$$ScaleValue]: "space";
|
|
213
|
+
}) => {
|
|
214
|
+
margin: string | number | {
|
|
215
|
+
readonly [$$ScaleValue]: "space";
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
mt: (value: string | number | {
|
|
219
|
+
readonly [$$ScaleValue]: "space";
|
|
220
|
+
}) => {
|
|
221
|
+
marginTop: string | number | {
|
|
222
|
+
readonly [$$ScaleValue]: "space";
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
mr: (value: string | number | {
|
|
226
|
+
readonly [$$ScaleValue]: "space";
|
|
227
|
+
}) => {
|
|
228
|
+
marginRight: string | number | {
|
|
229
|
+
readonly [$$ScaleValue]: "space";
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
mb: (value: string | number | {
|
|
233
|
+
readonly [$$ScaleValue]: "space";
|
|
234
|
+
}) => {
|
|
235
|
+
marginBottom: string | number | {
|
|
236
|
+
readonly [$$ScaleValue]: "space";
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
ml: (value: string | number | {
|
|
240
|
+
readonly [$$ScaleValue]: "space";
|
|
241
|
+
}) => {
|
|
242
|
+
marginLeft: string | number | {
|
|
243
|
+
readonly [$$ScaleValue]: "space";
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
mx: (value: string | number | {
|
|
247
|
+
readonly [$$ScaleValue]: "space";
|
|
248
|
+
}) => {
|
|
249
|
+
marginLeft: string | number | {
|
|
250
|
+
readonly [$$ScaleValue]: "space";
|
|
251
|
+
};
|
|
252
|
+
marginRight: string | number | {
|
|
253
|
+
readonly [$$ScaleValue]: "space";
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
my: (value: string | number | {
|
|
257
|
+
readonly [$$ScaleValue]: "space";
|
|
258
|
+
}) => {
|
|
259
|
+
marginTop: string | number | {
|
|
260
|
+
readonly [$$ScaleValue]: "space";
|
|
261
|
+
};
|
|
262
|
+
marginBottom: string | number | {
|
|
263
|
+
readonly [$$ScaleValue]: "space";
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
}>>, {}, {
|
|
267
|
+
sm: string;
|
|
268
|
+
md: string;
|
|
269
|
+
lg: string;
|
|
270
|
+
xl: string;
|
|
271
|
+
reducedMotion: string;
|
|
272
|
+
allowMotion: string;
|
|
273
|
+
hover: string;
|
|
274
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
275
|
+
sm: string;
|
|
276
|
+
md: string;
|
|
277
|
+
lg: string;
|
|
278
|
+
xl: string;
|
|
279
|
+
reducedMotion: string;
|
|
280
|
+
allowMotion: string;
|
|
281
|
+
hover: string;
|
|
282
|
+
}, {
|
|
283
|
+
colors: {
|
|
284
|
+
textForeground: any;
|
|
285
|
+
textSubtle: any;
|
|
286
|
+
textPlaceholder: any;
|
|
287
|
+
background: any;
|
|
288
|
+
backgroundAccent: any;
|
|
289
|
+
tonal50: any;
|
|
290
|
+
tonal100: any;
|
|
291
|
+
tonal200: any;
|
|
292
|
+
tonal300: any;
|
|
293
|
+
tonal400: any;
|
|
294
|
+
tonal500: any;
|
|
295
|
+
tonal600: any;
|
|
296
|
+
alpha100: any;
|
|
297
|
+
alpha150: any;
|
|
298
|
+
alpha200: any;
|
|
299
|
+
alpha250: any;
|
|
300
|
+
alpha600: any;
|
|
301
|
+
primaryLight: any;
|
|
302
|
+
primary: any;
|
|
303
|
+
primaryMid: any;
|
|
304
|
+
primaryDark: any;
|
|
305
|
+
secondary: any;
|
|
306
|
+
brandRed: any;
|
|
307
|
+
brandRedAccent: any;
|
|
308
|
+
brandGreen: any;
|
|
309
|
+
brandGreenAccent: any;
|
|
310
|
+
brandPurple: any;
|
|
311
|
+
brandPurpleAccent: any;
|
|
312
|
+
brandYellow: any;
|
|
313
|
+
brandYellowAccent: any;
|
|
314
|
+
successLight: any;
|
|
315
|
+
success: any;
|
|
316
|
+
successMid: any;
|
|
317
|
+
successDark: any;
|
|
318
|
+
dangerLight: any;
|
|
319
|
+
danger: any;
|
|
320
|
+
dangerMid: any;
|
|
321
|
+
dangerDark: any;
|
|
322
|
+
warningLight: any;
|
|
323
|
+
warning: any;
|
|
324
|
+
warningMid: any;
|
|
325
|
+
warningDark: any;
|
|
326
|
+
subjectEnglish: any;
|
|
327
|
+
subjectMaths: any;
|
|
328
|
+
subjectScience: any;
|
|
329
|
+
subjectVerbalReasoning: any;
|
|
330
|
+
subjectNonVerbalReasoning: any;
|
|
331
|
+
subjectCreativeWriting: any;
|
|
332
|
+
subjectExamSkills: any;
|
|
333
|
+
};
|
|
334
|
+
space: {
|
|
335
|
+
"0": any;
|
|
336
|
+
"1": any;
|
|
337
|
+
"2": any;
|
|
338
|
+
"3": any;
|
|
339
|
+
"4": any;
|
|
340
|
+
"5": any;
|
|
341
|
+
"6": any;
|
|
342
|
+
"7": any;
|
|
343
|
+
"8": any;
|
|
344
|
+
"9": any;
|
|
345
|
+
};
|
|
346
|
+
fontSizes: {
|
|
347
|
+
xs: any;
|
|
348
|
+
sm: any;
|
|
349
|
+
md: any;
|
|
350
|
+
lg: any;
|
|
351
|
+
xl: any;
|
|
352
|
+
"2xl": any;
|
|
353
|
+
"3xl": any;
|
|
354
|
+
"4xl": any;
|
|
355
|
+
};
|
|
356
|
+
fonts: {
|
|
357
|
+
sans: any;
|
|
358
|
+
mono: any;
|
|
359
|
+
display: any;
|
|
360
|
+
body: any;
|
|
361
|
+
};
|
|
362
|
+
sizes: {
|
|
363
|
+
"0": any;
|
|
364
|
+
"1": any;
|
|
365
|
+
"2": any;
|
|
366
|
+
"3": any;
|
|
367
|
+
"4": any;
|
|
368
|
+
"5": any;
|
|
369
|
+
"6": any;
|
|
370
|
+
"7": any;
|
|
371
|
+
"8": any;
|
|
372
|
+
};
|
|
373
|
+
radii: {
|
|
374
|
+
"0": any;
|
|
375
|
+
"1": any;
|
|
376
|
+
"2": any;
|
|
377
|
+
"3": any;
|
|
378
|
+
round: any;
|
|
379
|
+
};
|
|
380
|
+
shadows: {
|
|
381
|
+
"0": any;
|
|
382
|
+
"1": any;
|
|
383
|
+
"2": any;
|
|
384
|
+
"3": any;
|
|
385
|
+
};
|
|
386
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
387
|
+
bg: (value: {
|
|
388
|
+
readonly [$$PropertyValue]: "background";
|
|
389
|
+
}) => {
|
|
390
|
+
background: {
|
|
391
|
+
readonly [$$PropertyValue]: "background";
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
inset: (value: string | number | {
|
|
395
|
+
readonly [$$ScaleValue]: "space";
|
|
396
|
+
}) => {
|
|
397
|
+
top: string | number | {
|
|
398
|
+
readonly [$$ScaleValue]: "space";
|
|
399
|
+
};
|
|
400
|
+
right: string | number | {
|
|
401
|
+
readonly [$$ScaleValue]: "space";
|
|
402
|
+
};
|
|
403
|
+
bottom: string | number | {
|
|
404
|
+
readonly [$$ScaleValue]: "space";
|
|
405
|
+
};
|
|
406
|
+
left: string | number | {
|
|
407
|
+
readonly [$$ScaleValue]: "space";
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
size: (value: string | number | {
|
|
411
|
+
readonly [$$ScaleValue]: "size";
|
|
412
|
+
}) => {
|
|
413
|
+
height: string | number | {
|
|
414
|
+
readonly [$$ScaleValue]: "size";
|
|
415
|
+
};
|
|
416
|
+
width: string | number | {
|
|
417
|
+
readonly [$$ScaleValue]: "size";
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
p: (value: string | number | {
|
|
421
|
+
readonly [$$ScaleValue]: "space";
|
|
422
|
+
}) => {
|
|
423
|
+
padding: string | number | {
|
|
424
|
+
readonly [$$ScaleValue]: "space";
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
pt: (value: string | number | {
|
|
428
|
+
readonly [$$ScaleValue]: "space";
|
|
429
|
+
}) => {
|
|
430
|
+
paddingTop: string | number | {
|
|
431
|
+
readonly [$$ScaleValue]: "space";
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
pr: (value: string | number | {
|
|
435
|
+
readonly [$$ScaleValue]: "space";
|
|
436
|
+
}) => {
|
|
437
|
+
paddingRight: string | number | {
|
|
438
|
+
readonly [$$ScaleValue]: "space";
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
pb: (value: string | number | {
|
|
442
|
+
readonly [$$ScaleValue]: "space";
|
|
443
|
+
}) => {
|
|
444
|
+
paddingBottom: string | number | {
|
|
445
|
+
readonly [$$ScaleValue]: "space";
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
pl: (value: string | number | {
|
|
449
|
+
readonly [$$ScaleValue]: "space";
|
|
450
|
+
}) => {
|
|
451
|
+
paddingLeft: string | number | {
|
|
452
|
+
readonly [$$ScaleValue]: "space";
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
px: (value: string | number | {
|
|
456
|
+
readonly [$$ScaleValue]: "space";
|
|
457
|
+
}) => {
|
|
458
|
+
paddingLeft: string | number | {
|
|
459
|
+
readonly [$$ScaleValue]: "space";
|
|
460
|
+
};
|
|
461
|
+
paddingRight: string | number | {
|
|
462
|
+
readonly [$$ScaleValue]: "space";
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
py: (value: string | number | {
|
|
466
|
+
readonly [$$ScaleValue]: "space";
|
|
467
|
+
}) => {
|
|
468
|
+
paddingTop: string | number | {
|
|
469
|
+
readonly [$$ScaleValue]: "space";
|
|
470
|
+
};
|
|
471
|
+
paddingBottom: string | number | {
|
|
472
|
+
readonly [$$ScaleValue]: "space";
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
m: (value: string | number | {
|
|
476
|
+
readonly [$$ScaleValue]: "space";
|
|
477
|
+
}) => {
|
|
478
|
+
margin: string | number | {
|
|
479
|
+
readonly [$$ScaleValue]: "space";
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
mt: (value: string | number | {
|
|
483
|
+
readonly [$$ScaleValue]: "space";
|
|
484
|
+
}) => {
|
|
485
|
+
marginTop: string | number | {
|
|
486
|
+
readonly [$$ScaleValue]: "space";
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
mr: (value: string | number | {
|
|
490
|
+
readonly [$$ScaleValue]: "space";
|
|
491
|
+
}) => {
|
|
492
|
+
marginRight: string | number | {
|
|
493
|
+
readonly [$$ScaleValue]: "space";
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
mb: (value: string | number | {
|
|
497
|
+
readonly [$$ScaleValue]: "space";
|
|
498
|
+
}) => {
|
|
499
|
+
marginBottom: string | number | {
|
|
500
|
+
readonly [$$ScaleValue]: "space";
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
ml: (value: string | number | {
|
|
504
|
+
readonly [$$ScaleValue]: "space";
|
|
505
|
+
}) => {
|
|
506
|
+
marginLeft: string | number | {
|
|
507
|
+
readonly [$$ScaleValue]: "space";
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
mx: (value: string | number | {
|
|
511
|
+
readonly [$$ScaleValue]: "space";
|
|
512
|
+
}) => {
|
|
513
|
+
marginLeft: string | number | {
|
|
514
|
+
readonly [$$ScaleValue]: "space";
|
|
515
|
+
};
|
|
516
|
+
marginRight: string | number | {
|
|
517
|
+
readonly [$$ScaleValue]: "space";
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
my: (value: string | number | {
|
|
521
|
+
readonly [$$ScaleValue]: "space";
|
|
522
|
+
}) => {
|
|
523
|
+
marginTop: string | number | {
|
|
524
|
+
readonly [$$ScaleValue]: "space";
|
|
525
|
+
};
|
|
526
|
+
marginBottom: string | number | {
|
|
527
|
+
readonly [$$ScaleValue]: "space";
|
|
528
|
+
};
|
|
529
|
+
};
|
|
530
|
+
}>>;
|
|
531
|
+
declare type NotificationBadgeProps = React.ComponentProps<typeof StyledBadge> & {
|
|
532
|
+
value: number | string;
|
|
533
|
+
};
|
|
534
|
+
export declare const NotificationBadge: React.FC<NotificationBadgeProps>;
|
|
535
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"react";import{Box as e}from"../box/Box.js";import{Flex as o}from"../flex/Flex.js";import{styled as r}from"../../stitches.js";const i=r(e,{position:"relative"}),n=r(o,{fontFamily:"$body",fontSize:"$sm",flexDirection:"column",justifyContent:"center",position:"absolute",top:"0",right:"0",transform:"translate(calc($sizes$2 / 2), -50%)",borderRadius:"$round",p:"$2",height:"$2",minWidth:"$2",textAlign:"center",color:"#fff",bg:"$primary"}),l=({value:e,children:o})=>t.createElement(i,null,!!e&&t.createElement(n,{role:"status"},e),o);export{l as NotificationBadge};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NotificationBadge } from './NotificationBadge';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t=["children","theme","disabled"];import{Trigger as e}from"@radix-ui/react-tabs";import{createElement as a}from"react";import{opacify as o}from"polished";import{styled as r,theme as i}from"../../stitches.js";const d=r(e,{cursor:"pointer",flexShrink:0,fontFamily:"$body",p:"$4",height:"$5",userSelect:"none",transition:"0.3s",variants:{theme:{light:{'&[data-state="active"]':{color:"$primary",fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},'&[data-state="inactive"]':{color:"$tonal500"},"&:not([data-disabled]):hover":{color:"$primary",bg:o(-.9,i.colors.primary.value)},"&:not([data-disabled]):active":{color:"$primary",bg:o(-.8,i.colors.primary.value),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}},dark:{color:"white",'&[data-state="active"]':{fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},"&:not([data-disabled]):hover":{bg:o(-.8,"white")},"&:not([data-disabled]):active":{bg:o(-.7,"white"),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}}}}}),l=e=>{let{children:o,theme:r,disabled:i=!1}=e,l=function(t,e){if(null==t)return{};var a,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)a=i[o],e.indexOf(a)>=0||(r[a]=t[a]);return r}(e,t);return a(d,Object.assign({disabled:i,theme:r},l),o)};l.displayName="TabTrigger";export{l as TabTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const r=["theme","children"];import{Root as t,Content as e}from"@radix-ui/react-tabs";import{createElement as i}from"react";import{styled as o}from"../../stitches.js";import{TabTrigger as m}from"./TabTrigger.js";import{TriggerListWrapper as a}from"./TabsTriggerList.js";import{passPropsToChildren as l}from"./utils.js";const n=o(t,{display:"flex",flexDirection:"column",variants:{theme:{light:{color:"$primary"},dark:{color:"white"}}}}),s=o(e,{flexGrow:1,fontFamily:"$body",variants:{theme:{light:{
|
|
1
|
+
const r=["theme","children"];import{Root as t,Content as e}from"@radix-ui/react-tabs";import{createElement as i}from"react";import{styled as o}from"../../stitches.js";import{TabTrigger as m}from"./TabTrigger.js";import{TriggerListWrapper as a}from"./TabsTriggerList.js";import{passPropsToChildren as l}from"./utils.js";const n=o(t,{display:"flex",flexDirection:"column",variants:{theme:{light:{color:"$primary"},dark:{color:"white"}}}}),s=o(e,{flexGrow:1,fontFamily:"$body",variants:{theme:{light:{color:"$textForeground"},dark:{bg:"$primaryDark",color:"white"}}}}),c=t=>{let{theme:e="light",children:o}=t,m=function(r,t){if(null==r)return{};var e,i,o={},m=Object.keys(r);for(i=0;i<m.length;i++)e=m[i],t.indexOf(e)>=0||(o[e]=r[e]);return o}(t,r);return i(n,Object.assign({theme:e},m),l(o,{theme:e},[a,s]))};c.TriggerList=a,c.Trigger=m,c.Content=s,c.displayName="Tabs";export{c as Tabs};
|
|
@@ -4,6 +4,7 @@ interface ListProps extends React.ComponentProps<typeof StyledTriggerList> {
|
|
|
4
4
|
}
|
|
5
5
|
declare const StyledTriggerList: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsListProps & React.RefAttributes<HTMLDivElement>>, {
|
|
6
6
|
theme?: "dark" | "light" | undefined;
|
|
7
|
+
appearance?: "uppercase" | undefined;
|
|
7
8
|
}, {
|
|
8
9
|
sm: string;
|
|
9
10
|
md: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=["children","theme","enableTabScrolling"];import{List as t}from"@radix-ui/react-tabs";import r,{useRef as o,useState as i,useCallback as l,useEffect as n}from"react";import{ChevronLeft as s,ChevronRight as
|
|
1
|
+
const e=["children","theme","appearance","enableTabScrolling"];import{List as t}from"@radix-ui/react-tabs";import r,{useRef as o,useState as i,useCallback as l,useEffect as n}from"react";import{ChevronLeft as s,ChevronRight as a}from"@atom-learning/icons";import{opacify as c}from"polished";import{debounce as m}from"throttle-debounce";import{theme as p,styled as f}from"../../stitches.js";import{ActionIcon as h}from"../action-icon/ActionIcon.js";import{Flex as d}from"../flex/Flex.js";import{Icon as b}from"../icon/Icon.js";import{TabTrigger as u}from"./TabTrigger.js";import{passPropsToChildren as g}from"./utils.js";const v=f(h,{position:"absolute",transition:"all 125ms",variants:{theme:{light:{bg:`${c(-.2,"white")} !important`},dark:{bg:`${c(-.2,p.colors.primaryDark.value)} !important`,color:"currentColor !important"}},visible:{true:{opacity:1,visibility:"visible",pointerEvents:"all"},false:{opacity:0,visibility:"hidden",pointerEvents:"none"}}}}),x=f(t,{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:{textTransform:"uppercase"}}}}),E=t=>{let{children:c,theme:p,appearance:f,enableTabScrolling:h}=t,E=function(e,t){if(null==e)return{};var r,o,i={},l=Object.keys(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||(i[r]=e[r]);return i}(t,e);const w=o(null),[j,k]=i(!1),[y,W]=i(!1),[z,L]=i(),T=l((e=>{const t=w.current;if(t){const{scrollWidth:r,scrollLeft:o}=t,i=Math.round(r/4);let l=o;if("right"===e){const e=t.scrollLeft+i;l=e<=r?e:o}else{const e=o-i;l=e>0?e:0}t.scroll({left:l,behavior:"smooth"}),setTimeout((()=>{const{scrollWidth:e,scrollLeft:r,offsetWidth:o}=t;0===r?(k(!1),W(!0)):r+o===e?(W(!1),k(!0)):(k(!0),W(!0))}),500)}}),[]);n((()=>{const e=m(500,(()=>{L(window.innerWidth)}));return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),n((()=>{const e=w.current;if(e){const{offsetWidth:t,scrollWidth:r}=e,o=r>t;null==e.scroll||e.scroll({left:0}),k(!1),W(o)}}),[z]);return j||y||h?r.createElement(d,{css:{position:"relative"}},r.createElement(v,{size:"xl",label:"Scroll Left",theme:p,onClick:()=>T("left"),visible:j,css:{left:0}},r.createElement(b,{is:s,size:"lg"})),r.createElement(x,Object.assign({},E,{ref:w,appearance:f,theme:p}),g(c,{theme:p},[u])),r.createElement(v,{size:"xl",label:"Scroll right",theme:p,onClick:()=>T("right"),visible:y,css:{right:0}},r.createElement(b,{is:a,size:"lg"}))):r.createElement(x,Object.assign({theme:p},E,{appearance:f,ref:w}),g(c,{theme:p},[u]))};export{E as TriggerListWrapper};
|