@atom-learning/components 2.11.0-canary.0.2 → 2.11.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 +7 -0
- package/dist/components/image/Image.d.ts +1 -3
- package/dist/components/image/Image.js +1 -1
- package/dist/components/navigation/NavigationMenu.d.ts +2 -1
- package/dist/components/navigation/NavigationMenu.js +1 -1
- package/dist/components/navigation/NavigationMenuItem.d.ts +539 -0
- package/dist/components/navigation/NavigationMenuItem.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/docs/NavigationMenu.mdx +25 -15
- package/dist/index.cjs.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [2.11.0](https://github.com/Atom-Learning/components/compare/v2.10.1...v2.11.0) (2022-11-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* remove unnecessary template string ([cb46cda](https://github.com/Atom-Learning/components/commit/cb46cda965d0888ef051d4120bc98c1fb9cead64))
|
|
7
|
+
|
|
1
8
|
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Override } from '../../utilities/types';
|
|
3
|
-
export declare const StyledImage: import("@stitches/react/types/styled-component").StyledComponent<"img", {
|
|
4
|
-
fluid?: boolean | "true" | undefined;
|
|
5
|
-
}, {
|
|
3
|
+
export declare const StyledImage: import("@stitches/react/types/styled-component").StyledComponent<"img", {}, {
|
|
6
4
|
sm: string;
|
|
7
5
|
md: string;
|
|
8
6
|
lg: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as e}from"../../stitches.js";const t=e("img",{verticalAlign:"middle",maxWidth:"100%",
|
|
1
|
+
import{styled as e}from"../../stitches.js";const t=e("img",{verticalAlign:"middle",maxWidth:"100%","&[width]":{width:"auto"},"&[width][height]":{height:"auto"},'&[src$=".svg"]':{width:"100%",height:"auto",maxWidth:"none"}}),i=t;i.displayName="Image";export{i as Image,t as StyledImage};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CSS } from '../../stitches';
|
|
3
3
|
import { NavigationMenuDropdown } from './NavigationMenuDropdown';
|
|
4
|
-
import { NavigationMenuDropdownContent, NavigationMenuDropdownItem, NavigationMenuLink } from './NavigationMenuItem';
|
|
4
|
+
import { NavigationMenuDropdownContent, NavigationMenuDropdownItem, NavigationMenuDropdownItemTitle, NavigationMenuLink } from './NavigationMenuItem';
|
|
5
5
|
declare type NavigationMenuSubComponents = {
|
|
6
6
|
Link: typeof NavigationMenuLink;
|
|
7
7
|
Dropdown: typeof NavigationMenuDropdown;
|
|
8
8
|
DropdownContent: typeof NavigationMenuDropdownContent;
|
|
9
9
|
DropdownItem: typeof NavigationMenuDropdownItem;
|
|
10
|
+
DropdownItemTitle: typeof NavigationMenuDropdownItemTitle;
|
|
10
11
|
};
|
|
11
12
|
declare type NavigationMenuProps = {
|
|
12
13
|
css?: CSS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as l from"@radix-ui/react-navigation-menu";import t from"react";import{MAX_Z_INDEX as N}from"../../constants/zIndices.js";import{keyframes as
|
|
1
|
+
import*as l from"@radix-ui/react-navigation-menu";import t from"react";import{MAX_Z_INDEX as N}from"../../constants/zIndices.js";import{keyframes as w,styled as n}from"../../stitches.js";import{fadeOut as D}from"../../utilities/style/keyframe-animations.js";import{NavigationMenuContext as x}from"./NavigationMenuContext.js";import{NavigationMenuDropdown as E}from"./NavigationMenuDropdown.js";import{NavigationMenuLink as h,NavigationMenuDropdownContent as C,NavigationMenuDropdownItem as I,NavigationMenuDropdownItemTitle as $}from"./NavigationMenuItem.js";const L=w({"0%, 50%":{opacity:0},"100%":{opacity:1}}),T=n(l.Root,{display:"flex",justifyContent:"center",position:"relative"}),_=n(l.List,{all:"unset",display:"flex",justifyContent:"center",alignItems:"center",gap:"$1",listStyle:"none"}),k=n(l.Viewport,{zIndex:N}),S=n("div",{position:"absolute",left:0,top:"100%",width:"100%",display:"flex",justifyContent:"center"}),o=({children:f,css:m})=>{const[p,u]=t.useState(),[a,d]=t.useState(),[i,c]=t.useState(0),r=t.useRef(null),s=200;t.useLayoutEffect(()=>{r.current&&c(r.current.offsetWidth)},[]),t.useEffect(()=>{let e;return a===""&&(e=setTimeout(()=>u(null),s)),()=>{e!==null&&clearTimeout(e)}},[a]);const y=(e,v)=>{if(e&&i&&a===v){const g=i/2,M=i-e.offsetLeft-e.offsetWidth+e.offsetWidth/2;u(Math.round(g-M))}return e};return t.createElement(x.Provider,{value:{onNodeUpdate:y}},t.createElement(T,{onValueChange:d,css:m},t.createElement(_,{ref:r},f),t.createElement(S,null,t.createElement(k,{css:{transform:`translateX(${p||0}px)`,'&[data-state="open"]':{animation:`${L} ${s}ms ease`},'&[data-state="closed"]':{animation:`${D} ${s}ms ease-out`}}}))))};o.Link=h,o.Dropdown=E,o.DropdownContent=C,o.DropdownItem=I,o.DropdownItemTitle=$,o.displayName="NavigationMenu";export{o as NavigationMenu};
|
|
@@ -1,5 +1,544 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CSS } from '../../stitches';
|
|
3
|
+
export declare const NavigationMenuDropdownItemTitle: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "key" | keyof React.HTMLAttributes<HTMLParagraphElement>> & {
|
|
4
|
+
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
5
|
+
}, "size" | "css"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
6
|
+
size?: ("sm" | "md" | "lg" | "xl" | "xs") | undefined;
|
|
7
|
+
}, {
|
|
8
|
+
sm: string;
|
|
9
|
+
md: string;
|
|
10
|
+
lg: string;
|
|
11
|
+
xl: string;
|
|
12
|
+
reducedMotion: string;
|
|
13
|
+
allowMotion: string;
|
|
14
|
+
hover: string;
|
|
15
|
+
}> & {
|
|
16
|
+
css?: import("@stitches/react/types/css-util").CSS<{
|
|
17
|
+
sm: string;
|
|
18
|
+
md: string;
|
|
19
|
+
lg: string;
|
|
20
|
+
xl: string;
|
|
21
|
+
reducedMotion: string;
|
|
22
|
+
allowMotion: string;
|
|
23
|
+
hover: string;
|
|
24
|
+
}, {
|
|
25
|
+
colors: {
|
|
26
|
+
textForeground: any;
|
|
27
|
+
textSubtle: any;
|
|
28
|
+
textPlaceholder: any;
|
|
29
|
+
background: any;
|
|
30
|
+
backgroundAccent: any;
|
|
31
|
+
tonal50: any;
|
|
32
|
+
tonal100: any;
|
|
33
|
+
tonal200: any;
|
|
34
|
+
tonal300: any;
|
|
35
|
+
tonal400: any;
|
|
36
|
+
tonal500: any;
|
|
37
|
+
tonal600: any;
|
|
38
|
+
alpha100: any;
|
|
39
|
+
alpha150: any;
|
|
40
|
+
alpha200: any;
|
|
41
|
+
alpha250: any;
|
|
42
|
+
alpha600: any;
|
|
43
|
+
primaryLight: any;
|
|
44
|
+
primary: any;
|
|
45
|
+
primaryMid: any;
|
|
46
|
+
primaryDark: any;
|
|
47
|
+
secondary: any;
|
|
48
|
+
brandRed: any;
|
|
49
|
+
brandRedAccent: any;
|
|
50
|
+
brandGreen: any;
|
|
51
|
+
brandGreenAccent: any;
|
|
52
|
+
brandPurple: any;
|
|
53
|
+
brandPurpleAccent: any;
|
|
54
|
+
brandYellow: any;
|
|
55
|
+
brandYellowAccent: any;
|
|
56
|
+
successLight: any;
|
|
57
|
+
success: any;
|
|
58
|
+
successMid: any;
|
|
59
|
+
successDark: any;
|
|
60
|
+
dangerLight: any;
|
|
61
|
+
danger: any;
|
|
62
|
+
dangerMid: any;
|
|
63
|
+
dangerDark: any;
|
|
64
|
+
warningLight: any;
|
|
65
|
+
warning: any;
|
|
66
|
+
warningMid: any;
|
|
67
|
+
warningDark: any;
|
|
68
|
+
warningText: any;
|
|
69
|
+
subjectEnglish: any;
|
|
70
|
+
subjectMaths: any;
|
|
71
|
+
subjectScience: any;
|
|
72
|
+
subjectVerbalReasoning: any;
|
|
73
|
+
subjectNonVerbalReasoning: any;
|
|
74
|
+
subjectCreativeWriting: any;
|
|
75
|
+
subjectExamSkills: any;
|
|
76
|
+
};
|
|
77
|
+
space: {
|
|
78
|
+
"0": any;
|
|
79
|
+
"1": any;
|
|
80
|
+
"2": any;
|
|
81
|
+
"3": any;
|
|
82
|
+
"4": any;
|
|
83
|
+
"5": any;
|
|
84
|
+
"6": any;
|
|
85
|
+
"7": any;
|
|
86
|
+
"8": any;
|
|
87
|
+
"9": any;
|
|
88
|
+
};
|
|
89
|
+
fontSizes: {
|
|
90
|
+
xs: any;
|
|
91
|
+
sm: any;
|
|
92
|
+
md: any;
|
|
93
|
+
lg: any;
|
|
94
|
+
xl: any;
|
|
95
|
+
"2xl": any;
|
|
96
|
+
"3xl": any;
|
|
97
|
+
"4xl": any;
|
|
98
|
+
};
|
|
99
|
+
fonts: {
|
|
100
|
+
sans: any;
|
|
101
|
+
mono: any;
|
|
102
|
+
display: any;
|
|
103
|
+
body: any;
|
|
104
|
+
};
|
|
105
|
+
sizes: {
|
|
106
|
+
"0": any;
|
|
107
|
+
"1": any;
|
|
108
|
+
"2": any;
|
|
109
|
+
"3": any;
|
|
110
|
+
"4": any;
|
|
111
|
+
"5": any;
|
|
112
|
+
"6": any;
|
|
113
|
+
"7": any;
|
|
114
|
+
"8": any;
|
|
115
|
+
};
|
|
116
|
+
radii: {
|
|
117
|
+
"0": any;
|
|
118
|
+
"1": any;
|
|
119
|
+
"2": any;
|
|
120
|
+
"3": any;
|
|
121
|
+
round: any;
|
|
122
|
+
};
|
|
123
|
+
shadows: {
|
|
124
|
+
"0": any;
|
|
125
|
+
"1": any;
|
|
126
|
+
"2": any;
|
|
127
|
+
"3": any;
|
|
128
|
+
};
|
|
129
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
130
|
+
bg: (value: {
|
|
131
|
+
readonly [$$PropertyValue]: "background";
|
|
132
|
+
}) => {
|
|
133
|
+
background: {
|
|
134
|
+
readonly [$$PropertyValue]: "background";
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
inset: (value: string | number | {
|
|
138
|
+
readonly [$$ScaleValue]: "space";
|
|
139
|
+
}) => {
|
|
140
|
+
top: string | number | {
|
|
141
|
+
readonly [$$ScaleValue]: "space";
|
|
142
|
+
};
|
|
143
|
+
right: string | number | {
|
|
144
|
+
readonly [$$ScaleValue]: "space";
|
|
145
|
+
};
|
|
146
|
+
bottom: string | number | {
|
|
147
|
+
readonly [$$ScaleValue]: "space";
|
|
148
|
+
};
|
|
149
|
+
left: string | number | {
|
|
150
|
+
readonly [$$ScaleValue]: "space";
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
size: (value: string | number | {
|
|
154
|
+
readonly [$$ScaleValue]: "size";
|
|
155
|
+
}) => {
|
|
156
|
+
height: string | number | {
|
|
157
|
+
readonly [$$ScaleValue]: "size";
|
|
158
|
+
};
|
|
159
|
+
width: string | number | {
|
|
160
|
+
readonly [$$ScaleValue]: "size";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
p: (value: string | number | {
|
|
164
|
+
readonly [$$ScaleValue]: "space";
|
|
165
|
+
}) => {
|
|
166
|
+
padding: string | number | {
|
|
167
|
+
readonly [$$ScaleValue]: "space";
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
pt: (value: string | number | {
|
|
171
|
+
readonly [$$ScaleValue]: "space";
|
|
172
|
+
}) => {
|
|
173
|
+
paddingTop: string | number | {
|
|
174
|
+
readonly [$$ScaleValue]: "space";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
pr: (value: string | number | {
|
|
178
|
+
readonly [$$ScaleValue]: "space";
|
|
179
|
+
}) => {
|
|
180
|
+
paddingRight: string | number | {
|
|
181
|
+
readonly [$$ScaleValue]: "space";
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
pb: (value: string | number | {
|
|
185
|
+
readonly [$$ScaleValue]: "space";
|
|
186
|
+
}) => {
|
|
187
|
+
paddingBottom: string | number | {
|
|
188
|
+
readonly [$$ScaleValue]: "space";
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
pl: (value: string | number | {
|
|
192
|
+
readonly [$$ScaleValue]: "space";
|
|
193
|
+
}) => {
|
|
194
|
+
paddingLeft: string | number | {
|
|
195
|
+
readonly [$$ScaleValue]: "space";
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
px: (value: string | number | {
|
|
199
|
+
readonly [$$ScaleValue]: "space";
|
|
200
|
+
}) => {
|
|
201
|
+
paddingLeft: string | number | {
|
|
202
|
+
readonly [$$ScaleValue]: "space";
|
|
203
|
+
};
|
|
204
|
+
paddingRight: string | number | {
|
|
205
|
+
readonly [$$ScaleValue]: "space";
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
py: (value: string | number | {
|
|
209
|
+
readonly [$$ScaleValue]: "space";
|
|
210
|
+
}) => {
|
|
211
|
+
paddingTop: string | number | {
|
|
212
|
+
readonly [$$ScaleValue]: "space";
|
|
213
|
+
};
|
|
214
|
+
paddingBottom: string | number | {
|
|
215
|
+
readonly [$$ScaleValue]: "space";
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
m: (value: string | number | {
|
|
219
|
+
readonly [$$ScaleValue]: "space";
|
|
220
|
+
}) => {
|
|
221
|
+
margin: string | number | {
|
|
222
|
+
readonly [$$ScaleValue]: "space";
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
mt: (value: string | number | {
|
|
226
|
+
readonly [$$ScaleValue]: "space";
|
|
227
|
+
}) => {
|
|
228
|
+
marginTop: string | number | {
|
|
229
|
+
readonly [$$ScaleValue]: "space";
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
mr: (value: string | number | {
|
|
233
|
+
readonly [$$ScaleValue]: "space";
|
|
234
|
+
}) => {
|
|
235
|
+
marginRight: string | number | {
|
|
236
|
+
readonly [$$ScaleValue]: "space";
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
mb: (value: string | number | {
|
|
240
|
+
readonly [$$ScaleValue]: "space";
|
|
241
|
+
}) => {
|
|
242
|
+
marginBottom: string | number | {
|
|
243
|
+
readonly [$$ScaleValue]: "space";
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
ml: (value: string | number | {
|
|
247
|
+
readonly [$$ScaleValue]: "space";
|
|
248
|
+
}) => {
|
|
249
|
+
marginLeft: string | number | {
|
|
250
|
+
readonly [$$ScaleValue]: "space";
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
mx: (value: string | number | {
|
|
254
|
+
readonly [$$ScaleValue]: "space";
|
|
255
|
+
}) => {
|
|
256
|
+
marginLeft: string | number | {
|
|
257
|
+
readonly [$$ScaleValue]: "space";
|
|
258
|
+
};
|
|
259
|
+
marginRight: string | number | {
|
|
260
|
+
readonly [$$ScaleValue]: "space";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
my: (value: string | number | {
|
|
264
|
+
readonly [$$ScaleValue]: "space";
|
|
265
|
+
}) => {
|
|
266
|
+
marginTop: string | number | {
|
|
267
|
+
readonly [$$ScaleValue]: "space";
|
|
268
|
+
};
|
|
269
|
+
marginBottom: string | number | {
|
|
270
|
+
readonly [$$ScaleValue]: "space";
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
}> | undefined;
|
|
274
|
+
}, "as"> & {
|
|
275
|
+
as?: React.ElementType<any> | React.ComponentType<{}> | undefined;
|
|
276
|
+
}>, {}, {
|
|
277
|
+
sm: string;
|
|
278
|
+
md: string;
|
|
279
|
+
lg: string;
|
|
280
|
+
xl: string;
|
|
281
|
+
reducedMotion: string;
|
|
282
|
+
allowMotion: string;
|
|
283
|
+
hover: string;
|
|
284
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
285
|
+
sm: string;
|
|
286
|
+
md: string;
|
|
287
|
+
lg: string;
|
|
288
|
+
xl: string;
|
|
289
|
+
reducedMotion: string;
|
|
290
|
+
allowMotion: string;
|
|
291
|
+
hover: string;
|
|
292
|
+
}, {
|
|
293
|
+
colors: {
|
|
294
|
+
textForeground: any;
|
|
295
|
+
textSubtle: any;
|
|
296
|
+
textPlaceholder: any;
|
|
297
|
+
background: any;
|
|
298
|
+
backgroundAccent: any;
|
|
299
|
+
tonal50: any;
|
|
300
|
+
tonal100: any;
|
|
301
|
+
tonal200: any;
|
|
302
|
+
tonal300: any;
|
|
303
|
+
tonal400: any;
|
|
304
|
+
tonal500: any;
|
|
305
|
+
tonal600: any;
|
|
306
|
+
alpha100: any;
|
|
307
|
+
alpha150: any;
|
|
308
|
+
alpha200: any;
|
|
309
|
+
alpha250: any;
|
|
310
|
+
alpha600: any;
|
|
311
|
+
primaryLight: any;
|
|
312
|
+
primary: any;
|
|
313
|
+
primaryMid: any;
|
|
314
|
+
primaryDark: any;
|
|
315
|
+
secondary: any;
|
|
316
|
+
brandRed: any;
|
|
317
|
+
brandRedAccent: any;
|
|
318
|
+
brandGreen: any;
|
|
319
|
+
brandGreenAccent: any;
|
|
320
|
+
brandPurple: any;
|
|
321
|
+
brandPurpleAccent: any;
|
|
322
|
+
brandYellow: any;
|
|
323
|
+
brandYellowAccent: any;
|
|
324
|
+
successLight: any;
|
|
325
|
+
success: any;
|
|
326
|
+
successMid: any;
|
|
327
|
+
successDark: any;
|
|
328
|
+
dangerLight: any;
|
|
329
|
+
danger: any;
|
|
330
|
+
dangerMid: any;
|
|
331
|
+
dangerDark: any;
|
|
332
|
+
warningLight: any;
|
|
333
|
+
warning: any;
|
|
334
|
+
warningMid: any;
|
|
335
|
+
warningDark: any;
|
|
336
|
+
warningText: any;
|
|
337
|
+
subjectEnglish: any;
|
|
338
|
+
subjectMaths: any;
|
|
339
|
+
subjectScience: any;
|
|
340
|
+
subjectVerbalReasoning: any;
|
|
341
|
+
subjectNonVerbalReasoning: any;
|
|
342
|
+
subjectCreativeWriting: any;
|
|
343
|
+
subjectExamSkills: any;
|
|
344
|
+
};
|
|
345
|
+
space: {
|
|
346
|
+
"0": any;
|
|
347
|
+
"1": any;
|
|
348
|
+
"2": any;
|
|
349
|
+
"3": any;
|
|
350
|
+
"4": any;
|
|
351
|
+
"5": any;
|
|
352
|
+
"6": any;
|
|
353
|
+
"7": any;
|
|
354
|
+
"8": any;
|
|
355
|
+
"9": any;
|
|
356
|
+
};
|
|
357
|
+
fontSizes: {
|
|
358
|
+
xs: any;
|
|
359
|
+
sm: any;
|
|
360
|
+
md: any;
|
|
361
|
+
lg: any;
|
|
362
|
+
xl: any;
|
|
363
|
+
"2xl": any;
|
|
364
|
+
"3xl": any;
|
|
365
|
+
"4xl": any;
|
|
366
|
+
};
|
|
367
|
+
fonts: {
|
|
368
|
+
sans: any;
|
|
369
|
+
mono: any;
|
|
370
|
+
display: any;
|
|
371
|
+
body: any;
|
|
372
|
+
};
|
|
373
|
+
sizes: {
|
|
374
|
+
"0": any;
|
|
375
|
+
"1": any;
|
|
376
|
+
"2": any;
|
|
377
|
+
"3": any;
|
|
378
|
+
"4": any;
|
|
379
|
+
"5": any;
|
|
380
|
+
"6": any;
|
|
381
|
+
"7": any;
|
|
382
|
+
"8": any;
|
|
383
|
+
};
|
|
384
|
+
radii: {
|
|
385
|
+
"0": any;
|
|
386
|
+
"1": any;
|
|
387
|
+
"2": any;
|
|
388
|
+
"3": any;
|
|
389
|
+
round: any;
|
|
390
|
+
};
|
|
391
|
+
shadows: {
|
|
392
|
+
"0": any;
|
|
393
|
+
"1": any;
|
|
394
|
+
"2": any;
|
|
395
|
+
"3": any;
|
|
396
|
+
};
|
|
397
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
398
|
+
bg: (value: {
|
|
399
|
+
readonly [$$PropertyValue]: "background";
|
|
400
|
+
}) => {
|
|
401
|
+
background: {
|
|
402
|
+
readonly [$$PropertyValue]: "background";
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
inset: (value: string | number | {
|
|
406
|
+
readonly [$$ScaleValue]: "space";
|
|
407
|
+
}) => {
|
|
408
|
+
top: string | number | {
|
|
409
|
+
readonly [$$ScaleValue]: "space";
|
|
410
|
+
};
|
|
411
|
+
right: string | number | {
|
|
412
|
+
readonly [$$ScaleValue]: "space";
|
|
413
|
+
};
|
|
414
|
+
bottom: string | number | {
|
|
415
|
+
readonly [$$ScaleValue]: "space";
|
|
416
|
+
};
|
|
417
|
+
left: string | number | {
|
|
418
|
+
readonly [$$ScaleValue]: "space";
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
size: (value: string | number | {
|
|
422
|
+
readonly [$$ScaleValue]: "size";
|
|
423
|
+
}) => {
|
|
424
|
+
height: string | number | {
|
|
425
|
+
readonly [$$ScaleValue]: "size";
|
|
426
|
+
};
|
|
427
|
+
width: string | number | {
|
|
428
|
+
readonly [$$ScaleValue]: "size";
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
p: (value: string | number | {
|
|
432
|
+
readonly [$$ScaleValue]: "space";
|
|
433
|
+
}) => {
|
|
434
|
+
padding: string | number | {
|
|
435
|
+
readonly [$$ScaleValue]: "space";
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
pt: (value: string | number | {
|
|
439
|
+
readonly [$$ScaleValue]: "space";
|
|
440
|
+
}) => {
|
|
441
|
+
paddingTop: string | number | {
|
|
442
|
+
readonly [$$ScaleValue]: "space";
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
pr: (value: string | number | {
|
|
446
|
+
readonly [$$ScaleValue]: "space";
|
|
447
|
+
}) => {
|
|
448
|
+
paddingRight: string | number | {
|
|
449
|
+
readonly [$$ScaleValue]: "space";
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
pb: (value: string | number | {
|
|
453
|
+
readonly [$$ScaleValue]: "space";
|
|
454
|
+
}) => {
|
|
455
|
+
paddingBottom: string | number | {
|
|
456
|
+
readonly [$$ScaleValue]: "space";
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
pl: (value: string | number | {
|
|
460
|
+
readonly [$$ScaleValue]: "space";
|
|
461
|
+
}) => {
|
|
462
|
+
paddingLeft: string | number | {
|
|
463
|
+
readonly [$$ScaleValue]: "space";
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
px: (value: string | number | {
|
|
467
|
+
readonly [$$ScaleValue]: "space";
|
|
468
|
+
}) => {
|
|
469
|
+
paddingLeft: string | number | {
|
|
470
|
+
readonly [$$ScaleValue]: "space";
|
|
471
|
+
};
|
|
472
|
+
paddingRight: string | number | {
|
|
473
|
+
readonly [$$ScaleValue]: "space";
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
py: (value: string | number | {
|
|
477
|
+
readonly [$$ScaleValue]: "space";
|
|
478
|
+
}) => {
|
|
479
|
+
paddingTop: string | number | {
|
|
480
|
+
readonly [$$ScaleValue]: "space";
|
|
481
|
+
};
|
|
482
|
+
paddingBottom: string | number | {
|
|
483
|
+
readonly [$$ScaleValue]: "space";
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
m: (value: string | number | {
|
|
487
|
+
readonly [$$ScaleValue]: "space";
|
|
488
|
+
}) => {
|
|
489
|
+
margin: string | number | {
|
|
490
|
+
readonly [$$ScaleValue]: "space";
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
mt: (value: string | number | {
|
|
494
|
+
readonly [$$ScaleValue]: "space";
|
|
495
|
+
}) => {
|
|
496
|
+
marginTop: string | number | {
|
|
497
|
+
readonly [$$ScaleValue]: "space";
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
mr: (value: string | number | {
|
|
501
|
+
readonly [$$ScaleValue]: "space";
|
|
502
|
+
}) => {
|
|
503
|
+
marginRight: string | number | {
|
|
504
|
+
readonly [$$ScaleValue]: "space";
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
mb: (value: string | number | {
|
|
508
|
+
readonly [$$ScaleValue]: "space";
|
|
509
|
+
}) => {
|
|
510
|
+
marginBottom: string | number | {
|
|
511
|
+
readonly [$$ScaleValue]: "space";
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
ml: (value: string | number | {
|
|
515
|
+
readonly [$$ScaleValue]: "space";
|
|
516
|
+
}) => {
|
|
517
|
+
marginLeft: string | number | {
|
|
518
|
+
readonly [$$ScaleValue]: "space";
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
mx: (value: string | number | {
|
|
522
|
+
readonly [$$ScaleValue]: "space";
|
|
523
|
+
}) => {
|
|
524
|
+
marginLeft: string | number | {
|
|
525
|
+
readonly [$$ScaleValue]: "space";
|
|
526
|
+
};
|
|
527
|
+
marginRight: string | number | {
|
|
528
|
+
readonly [$$ScaleValue]: "space";
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
my: (value: string | number | {
|
|
532
|
+
readonly [$$ScaleValue]: "space";
|
|
533
|
+
}) => {
|
|
534
|
+
marginTop: string | number | {
|
|
535
|
+
readonly [$$ScaleValue]: "space";
|
|
536
|
+
};
|
|
537
|
+
marginBottom: string | number | {
|
|
538
|
+
readonly [$$ScaleValue]: "space";
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
}>>;
|
|
3
542
|
export declare const NavigationMenuDropdownTrigger: React.ForwardRefExoticComponent<{
|
|
4
543
|
active?: boolean | undefined;
|
|
5
544
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronDown as
|
|
1
|
+
import{ChevronDown as f}from"@atom-learning/icons";import*as c from"@radix-ui/react-navigation-menu";import e from"react";import{styled as t}from"../../stitches.js";import{Icon as b}from"../icon/Icon.js";import{Text as g}from"../text/Text.js";const d={fontWeight:"bold",color:"$tonal500","&::after":{backgroundColor:"$tonal500",borderRadius:"$1",bottom:0,content:"",display:"block",height:"2px",left:"50%",position:"absolute",transform:"translate(-50%,0)",width:"$2"}},s={background:"none",color:"$tonal400",opacity:"30%",cursor:"default"},i={all:"unset",position:"relative",color:"$tonal400",outline:"none",cursor:"pointer",fontFamily:"$body",userSelect:"none",padding:"$3",borderRadius:"$1","&:hover":{background:"$tonal50",color:"$tonal600"},"&:active":{background:"$tonal100",color:"$tonal600"},"&:focus-visible":{boxShadow:"inset 0 0 0 2px $colors$primary"},"&:disabled":{...s}},$=t(c.Trigger,i,{display:"flex",alignItems:"center",borderRadius:"$1",justifyContent:"space-between",gap:"$1",'&[data-state="open"]':{background:"$tonal100"},variants:{active:{true:{...d}}}}),v=t(c.Link,i,{display:"block",textDecoration:"none",lineHeight:1,variants:{elementType:{dropdownItem:{"&[data-active]":{background:"$primaryLight","*":{color:"$primary"},"&:hover":{background:"$tonal50"},"&:active":{background:"$tonal100"},"&:focus-visible":{boxShadow:"0 0 0 2px $colors$primary"}}},link:{"&[data-active]":{...d}}}}}),h=t(g,{color:"$tonal500",fontWeight:"600"}),k=e.forwardRef(({children:o,active:r,...a},n)=>e.createElement($,{active:r,...a,ref:n},o,e.createElement(b,{is:f,css:{"[data-state=open] &":{transform:"rotate(-180deg)"},"@media (prefers-reduced-motion: no-preference)":{transition:"transform .2s ease"}},size:"sm"}))),w=t("ul",{all:"unset"}),y=t("li",{all:"unset"}),x=t("button",{...i,...s}),m=e.forwardRef(({children:o,href:r,disabled:a,css:n,variant:p="link",...l},u)=>a?e.createElement(x,{disabled:!0,...l},o):e.createElement(y,null,e.createElement(v,{href:r,ref:u,elementType:p,css:n,...l},o))),D=e.forwardRef((o,r)=>e.createElement(m,{ref:r,variant:"dropdownItem",...o}));export{w as NavigationMenuDropdownContent,D as NavigationMenuDropdownItem,h as NavigationMenuDropdownItemTitle,k as NavigationMenuDropdownTrigger,m as NavigationMenuLink};
|