@atom-learning/components 4.0.0 → 4.1.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 +3 -22
- package/dist/components/text/Text.js.map +1 -1
- package/dist/components/top-bar/TopBar.d.ts +371 -2
- package/dist/components/top-bar/TopBar.js +1 -1
- package/dist/components/top-bar/TopBar.js.map +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,33 +1,14 @@
|
|
|
1
|
-
# [4.
|
|
1
|
+
# [4.1.0](https://github.com/Atom-Learning/components/compare/v4.0.0...v4.1.0) (2024-10-17)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
7
|
-
* props in docs ([1385bb8](https://github.com/Atom-Learning/components/commit/1385bb814a751d7f33c1c2622c23db9c51a73429))
|
|
8
|
-
* rename to normal ([078d4ed](https://github.com/Atom-Learning/components/commit/078d4ed04269ed1f459aaef43cb85b2829819010))
|
|
9
|
-
* snapshots ([bd0a914](https://github.com/Atom-Learning/components/commit/bd0a914cd55d746595b1ff109de210f412b7bd6e))
|
|
10
|
-
* snapshots, formatting ([759ec4d](https://github.com/Atom-Learning/components/commit/759ec4d229c424976db72cb5df03c35aef4eec6f))
|
|
11
|
-
* tonal token ([a5f35e6](https://github.com/Atom-Learning/components/commit/a5f35e6c9c4787d2e054bbf74a64cd768d6f4c1d))
|
|
12
|
-
* topbar logo spacing, docs logo and content, update theme ([9357fe9](https://github.com/Atom-Learning/components/commit/9357fe9d2de144083b9e4bc95c3bf33ead30838f))
|
|
13
|
-
* update heading style ([56c9dc1](https://github.com/Atom-Learning/components/commit/56c9dc1a9a64e20004f3394ffe7e313bcae9bfc8))
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### chore
|
|
17
|
-
|
|
18
|
-
* revert version ([d08483a](https://github.com/Atom-Learning/components/commit/d08483abe67d02fe9367567b5bfac4ec056b3eb8))
|
|
6
|
+
* commintlint not working on code commits ([2570a3e](https://github.com/Atom-Learning/components/commit/2570a3ec30e6403cc6dc9f06996dc40b3a6992b1))
|
|
19
7
|
|
|
20
8
|
|
|
21
9
|
### Features
|
|
22
10
|
|
|
23
|
-
*
|
|
24
|
-
* new theme, updated docs ([a9a70e9](https://github.com/Atom-Learning/components/commit/a9a70e95bc9d47d6ab741e62a07f294d0b49ce07))
|
|
25
|
-
* remove default weight, fallback to 400 ([96691ca](https://github.com/Atom-Learning/components/commit/96691cae85f1ea65bf3a5a74415d3b520d4bd86a))
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
### BREAKING CHANGES
|
|
29
|
-
|
|
30
|
-
* Ensure major version is deployed
|
|
11
|
+
* allow css overrides for TopBar wrapper element ([54e83b2](https://github.com/Atom-Learning/components/commit/54e83b2c1cf7c5cd372af14e51d13d544a2640db))
|
|
31
12
|
|
|
32
13
|
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
|
|
33
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sources":["../../../src/components/text/Text.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS, styled } from '~/stitches'\nimport type { Override } from '~/utilities'\nimport { capsize } from '~/utilities'\n\nexport const textVariants = {\n size: {\n xs: { fontSize: '$xs', lineHeight: 1.6, ...capsize(0.4364) },\n sm: { fontSize: '$sm', lineHeight: 1.53, ...capsize(0.4056) },\n md: { fontSize: '$md', lineHeight: 1.5, ...capsize(0.3864) },\n lg: { fontSize: '$lg', lineHeight: 1.52, ...capsize(0.3983) },\n xl: { fontSize: '$xl', lineHeight: 1.42, ...capsize(0.3506) }\n },\n noCapsize: {\n true: {\n '&::before, &::after': { display: 'none !important' }\n }\n }\n}\n\nexport const getTextVariant: (options: {\n size: keyof typeof textVariants.size\n noCapsize?: boolean\n}) => CSS = ({ size, noCapsize }) => ({\n ...textVariants.size[size],\n ...textVariants.noCapsize[`${noCapsize}`]\n})\n\nexport const StyledText = styled('p', {\n m: 0,\n /** Allow nesting `<Text />` inside `<Text />` without forcing a new line and spacing. */\n '& > &': {\n '&:before, &:after': { display: 'none' }\n },\n variants: {\n ...textVariants,\n weight: {\n normal: { fontWeight: 400 },\n bold: { fontWeight: 600 }\n },\n family: {\n body: { fontFamily: '$body' },\n display: { fontFamily: '$display' },\n mono: { fontFamily: '$mono' }\n }\n }\n})\n\ntype TextProps = Override<\n React.ComponentProps<typeof StyledText>,\n {\n as?:\n | 'blockquote'\n | 'caption'\n | 'dd'\n | 'dt'\n | 'figcaption'\n | 'li'\n | 'p'\n | 'span'\n | 'legend'\n | React.ComponentType\n | React.ElementType\n }\n>\n\nexport const Text: React.ForwardRefExoticComponent<TextProps> =\n React.forwardRef(\n (
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../src/components/text/Text.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS, styled } from '~/stitches'\nimport type { Override } from '~/utilities'\nimport { capsize } from '~/utilities'\n\nexport const textVariants = {\n size: {\n xs: { fontSize: '$xs', lineHeight: 1.6, ...capsize(0.4364) },\n sm: { fontSize: '$sm', lineHeight: 1.53, ...capsize(0.4056) },\n md: { fontSize: '$md', lineHeight: 1.5, ...capsize(0.3864) },\n lg: { fontSize: '$lg', lineHeight: 1.52, ...capsize(0.3983) },\n xl: { fontSize: '$xl', lineHeight: 1.42, ...capsize(0.3506) }\n },\n noCapsize: {\n true: {\n '&::before, &::after': { display: 'none !important' }\n }\n }\n}\n\nexport const getTextVariant: (options: {\n size: keyof typeof textVariants.size\n noCapsize?: boolean\n}) => CSS = ({ size, noCapsize }) => ({\n ...textVariants.size[size],\n ...textVariants.noCapsize[`${noCapsize}`]\n})\n\nexport const StyledText = styled('p', {\n m: 0,\n /** Allow nesting `<Text />` inside `<Text />` without forcing a new line and spacing. */\n '& > &': {\n '&:before, &:after': { display: 'none' }\n },\n variants: {\n ...textVariants,\n weight: {\n normal: { fontWeight: 400 },\n bold: { fontWeight: 600 }\n },\n family: {\n body: { fontFamily: '$body' },\n display: { fontFamily: '$display' },\n mono: { fontFamily: '$mono' }\n }\n }\n})\n\ntype TextProps = Override<\n React.ComponentProps<typeof StyledText>,\n {\n as?:\n | 'blockquote'\n | 'caption'\n | 'dd'\n | 'dt'\n | 'figcaption'\n | 'li'\n | 'p'\n | 'span'\n | 'legend'\n | React.ComponentType\n | React.ElementType\n }\n>\n\nexport const Text: React.ForwardRefExoticComponent<TextProps> =\n React.forwardRef(\n ({ size = 'md', family = 'body', ...remainingProps }, ref) => (\n <StyledText size={size} family={family} {...remainingProps} ref={ref} />\n )\n )\n\nText.displayName = 'Text'\n"],"names":["textVariants","capsize","getTextVariant","size","noCapsize","StyledText","styled","Text","React","family","remainingProps","ref"],"mappings":"sTAMa,MAAAA,EAAe,CAC1B,KAAM,CACJ,GAAI,CAAE,SAAU,MAAO,WAAY,IAAK,GAAGC,EAAQ,KAAM,CAAE,EAC3D,GAAI,CAAE,SAAU,MAAO,WAAY,KAAM,GAAGA,EAAQ,KAAM,CAAE,EAC5D,GAAI,CAAE,SAAU,MAAO,WAAY,IAAK,GAAGA,EAAQ,KAAM,CAAE,EAC3D,GAAI,CAAE,SAAU,MAAO,WAAY,KAAM,GAAGA,EAAQ,KAAM,CAAE,EAC5D,GAAI,CAAE,SAAU,MAAO,WAAY,KAAM,GAAGA,EAAQ,KAAM,CAAE,CAC9D,EACA,UAAW,CACT,KAAM,CACJ,sBAAuB,CAAE,QAAS,iBAAkB,CACtD,CACF,CACF,EAEaC,EAGD,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,KAAO,CACpC,GAAGJ,EAAa,KAAKG,GACrB,GAAGH,EAAa,UAAU,GAAGI,IAC/B,GAEaC,EAAaC,EAAO,IAAK,CACpC,EAAG,EAEH,QAAS,CACP,oBAAqB,CAAE,QAAS,MAAO,CACzC,EACA,SAAU,CACR,GAAGN,EACH,OAAQ,CACN,OAAQ,CAAE,WAAY,GAAI,EAC1B,KAAM,CAAE,WAAY,GAAI,CAC1B,EACA,OAAQ,CACN,KAAM,CAAE,WAAY,OAAQ,EAC5B,QAAS,CAAE,WAAY,UAAW,EAClC,KAAM,CAAE,WAAY,OAAQ,CAC9B,CACF,CACF,CAAC,EAoBYO,EACXC,EAAM,WACJ,CAAC,CAAE,KAAAL,EAAO,KAAM,OAAAM,EAAS,UAAWC,CAAe,EAAGC,IACpDH,EAAA,cAACH,EAAW,CAAA,KAAMF,EAAM,OAAQM,EAAS,GAAGC,EAAgB,IAAKC,EAAK,CAE1E,EAEFJ,EAAK,YAAc"}
|
|
@@ -1,6 +1,375 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CSS } from '../../stitches';
|
|
3
|
-
declare const StyledRoot: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<"div", {
|
|
3
|
+
declare const StyledRoot: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<import("@atom-learning/stitches-react/types/styled-component").StyledComponent<"div", {
|
|
4
|
+
direction?: "inherit" | "initial" | "revert" | "unset" | "row" | "column" | "column-reverse" | "row-reverse" | "revert-layer" | undefined;
|
|
5
|
+
wrap?: "inherit" | "initial" | "revert" | "unset" | "wrap" | "nowrap" | "wrap-reverse" | "revert-layer" | undefined;
|
|
6
|
+
justify?: "left" | "right" | "center" | "stretch" | "inherit" | "initial" | "revert" | "unset" | "end" | "start" | "space-around" | "space-between" | "space-evenly" | "flex-end" | "flex-start" | "normal" | "revert-layer" | "unsafe" | "safe" | undefined;
|
|
7
|
+
align?: "center" | "stretch" | "inherit" | "initial" | "revert" | "unset" | "end" | "start" | "flex-end" | "flex-start" | "baseline" | "normal" | "self-end" | "self-start" | "revert-layer" | "unsafe" | "safe" | "first baseline" | "last baseline" | undefined;
|
|
8
|
+
gap?: number | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
sm: string;
|
|
11
|
+
md: string;
|
|
12
|
+
lg: string;
|
|
13
|
+
xl: string;
|
|
14
|
+
reducedMotion: string;
|
|
15
|
+
allowMotion: string;
|
|
16
|
+
hover: string;
|
|
17
|
+
}, import("@atom-learning/stitches-react/types/css-util").CSS<{
|
|
18
|
+
sm: string;
|
|
19
|
+
md: string;
|
|
20
|
+
lg: string;
|
|
21
|
+
xl: string;
|
|
22
|
+
reducedMotion: string;
|
|
23
|
+
allowMotion: string;
|
|
24
|
+
hover: string;
|
|
25
|
+
}, {
|
|
26
|
+
colors: {
|
|
27
|
+
textBold: string;
|
|
28
|
+
textRegular: string;
|
|
29
|
+
textSubtle: string;
|
|
30
|
+
textMinimal: string;
|
|
31
|
+
background: string;
|
|
32
|
+
backgroundAccent: string;
|
|
33
|
+
grey100: string;
|
|
34
|
+
grey200: string;
|
|
35
|
+
grey300: string;
|
|
36
|
+
grey400: string;
|
|
37
|
+
grey500: string;
|
|
38
|
+
grey600: string;
|
|
39
|
+
grey700: string;
|
|
40
|
+
grey800: string;
|
|
41
|
+
grey900: string;
|
|
42
|
+
grey1000: string;
|
|
43
|
+
grey1100: string;
|
|
44
|
+
grey1200: string;
|
|
45
|
+
blue100: string;
|
|
46
|
+
blue200: string;
|
|
47
|
+
blue300: string;
|
|
48
|
+
blue400: string;
|
|
49
|
+
blue500: string;
|
|
50
|
+
blue600: string;
|
|
51
|
+
blue700: string;
|
|
52
|
+
blue800: string;
|
|
53
|
+
blue900: string;
|
|
54
|
+
blue1000: string;
|
|
55
|
+
blue1100: string;
|
|
56
|
+
blue1200: string;
|
|
57
|
+
pink100: string;
|
|
58
|
+
pink200: string;
|
|
59
|
+
pink300: string;
|
|
60
|
+
pink400: string;
|
|
61
|
+
pink500: string;
|
|
62
|
+
pink600: string;
|
|
63
|
+
pink700: string;
|
|
64
|
+
pink800: string;
|
|
65
|
+
pink900: string;
|
|
66
|
+
pink1000: string;
|
|
67
|
+
pink1100: string;
|
|
68
|
+
pink1200: string;
|
|
69
|
+
purple100: string;
|
|
70
|
+
purple200: string;
|
|
71
|
+
purple300: string;
|
|
72
|
+
purple400: string;
|
|
73
|
+
purple500: string;
|
|
74
|
+
purple600: string;
|
|
75
|
+
purple700: string;
|
|
76
|
+
purple800: string;
|
|
77
|
+
purple900: string;
|
|
78
|
+
purple1000: string;
|
|
79
|
+
purple1100: string;
|
|
80
|
+
purple1200: string;
|
|
81
|
+
cyan100: string;
|
|
82
|
+
cyan200: string;
|
|
83
|
+
cyan300: string;
|
|
84
|
+
cyan400: string;
|
|
85
|
+
cyan500: string;
|
|
86
|
+
cyan600: string;
|
|
87
|
+
cyan700: string;
|
|
88
|
+
cyan800: string;
|
|
89
|
+
cyan900: string;
|
|
90
|
+
cyan1000: string;
|
|
91
|
+
cyan1100: string;
|
|
92
|
+
cyan1200: string;
|
|
93
|
+
green100: string;
|
|
94
|
+
green200: string;
|
|
95
|
+
green300: string;
|
|
96
|
+
green400: string;
|
|
97
|
+
green500: string;
|
|
98
|
+
green600: string;
|
|
99
|
+
green700: string;
|
|
100
|
+
green800: string;
|
|
101
|
+
green900: string;
|
|
102
|
+
green1000: string;
|
|
103
|
+
green1100: string;
|
|
104
|
+
green1200: string;
|
|
105
|
+
magenta100: string;
|
|
106
|
+
magenta200: string;
|
|
107
|
+
magenta300: string;
|
|
108
|
+
magenta400: string;
|
|
109
|
+
magenta500: string;
|
|
110
|
+
magenta600: string;
|
|
111
|
+
magenta700: string;
|
|
112
|
+
magenta800: string;
|
|
113
|
+
magenta900: string;
|
|
114
|
+
magenta1000: string;
|
|
115
|
+
magenta1100: string;
|
|
116
|
+
magenta1200: string;
|
|
117
|
+
red100: string;
|
|
118
|
+
red200: string;
|
|
119
|
+
red300: string;
|
|
120
|
+
red400: string;
|
|
121
|
+
red500: string;
|
|
122
|
+
red600: string;
|
|
123
|
+
red700: string;
|
|
124
|
+
red800: string;
|
|
125
|
+
red900: string;
|
|
126
|
+
red1000: string;
|
|
127
|
+
red1100: string;
|
|
128
|
+
red1200: string;
|
|
129
|
+
teal100: string;
|
|
130
|
+
teal200: string;
|
|
131
|
+
teal300: string;
|
|
132
|
+
teal400: string;
|
|
133
|
+
teal500: string;
|
|
134
|
+
teal600: string;
|
|
135
|
+
teal700: string;
|
|
136
|
+
teal800: string;
|
|
137
|
+
teal900: string;
|
|
138
|
+
teal1000: string;
|
|
139
|
+
teal1100: string;
|
|
140
|
+
teal1200: string;
|
|
141
|
+
orange100: string;
|
|
142
|
+
orange200: string;
|
|
143
|
+
orange300: string;
|
|
144
|
+
orange400: string;
|
|
145
|
+
orange500: string;
|
|
146
|
+
orange600: string;
|
|
147
|
+
orange700: string;
|
|
148
|
+
orange800: string;
|
|
149
|
+
orange900: string;
|
|
150
|
+
orange1000: string;
|
|
151
|
+
orange1100: string;
|
|
152
|
+
orange1200: string;
|
|
153
|
+
yellow100: string;
|
|
154
|
+
yellow200: string;
|
|
155
|
+
yellow300: string;
|
|
156
|
+
yellow400: string;
|
|
157
|
+
yellow500: string;
|
|
158
|
+
yellow600: string;
|
|
159
|
+
yellow700: string;
|
|
160
|
+
yellow800: string;
|
|
161
|
+
yellow900: string;
|
|
162
|
+
yellow1000: string;
|
|
163
|
+
yellow1100: string;
|
|
164
|
+
yellow1200: string;
|
|
165
|
+
lime100: string;
|
|
166
|
+
lime200: string;
|
|
167
|
+
lime300: string;
|
|
168
|
+
lime400: string;
|
|
169
|
+
lime500: string;
|
|
170
|
+
lime600: string;
|
|
171
|
+
lime700: string;
|
|
172
|
+
lime800: string;
|
|
173
|
+
lime900: string;
|
|
174
|
+
lime1000: string;
|
|
175
|
+
lime1100: string;
|
|
176
|
+
lime1200: string;
|
|
177
|
+
lapis100: string;
|
|
178
|
+
lapis200: string;
|
|
179
|
+
lapis300: string;
|
|
180
|
+
lapis400: string;
|
|
181
|
+
lapis500: string;
|
|
182
|
+
lapis600: string;
|
|
183
|
+
lapis700: string;
|
|
184
|
+
lapis800: string;
|
|
185
|
+
lapis900: string;
|
|
186
|
+
lapis1000: string;
|
|
187
|
+
lapis1100: string;
|
|
188
|
+
lapis1200: string;
|
|
189
|
+
maroon100: string;
|
|
190
|
+
maroon200: string;
|
|
191
|
+
maroon300: string;
|
|
192
|
+
maroon400: string;
|
|
193
|
+
maroon500: string;
|
|
194
|
+
maroon600: string;
|
|
195
|
+
maroon700: string;
|
|
196
|
+
maroon800: string;
|
|
197
|
+
maroon900: string;
|
|
198
|
+
maroon1000: string;
|
|
199
|
+
maroon1100: string;
|
|
200
|
+
maroon1200: string;
|
|
201
|
+
marsh100: string;
|
|
202
|
+
marsh200: string;
|
|
203
|
+
marsh300: string;
|
|
204
|
+
marsh400: string;
|
|
205
|
+
marsh500: string;
|
|
206
|
+
marsh600: string;
|
|
207
|
+
marsh700: string;
|
|
208
|
+
marsh800: string;
|
|
209
|
+
marsh900: string;
|
|
210
|
+
marsh1000: string;
|
|
211
|
+
marsh1100: string;
|
|
212
|
+
marsh1200: string;
|
|
213
|
+
alpha100: string;
|
|
214
|
+
alpha150: string;
|
|
215
|
+
alpha200: string;
|
|
216
|
+
alpha250: string;
|
|
217
|
+
alpha600: string;
|
|
218
|
+
infoLight: string;
|
|
219
|
+
info: string;
|
|
220
|
+
infoMid: string;
|
|
221
|
+
infoDark: string;
|
|
222
|
+
successLight: string;
|
|
223
|
+
success: string;
|
|
224
|
+
successMid: string;
|
|
225
|
+
successDark: string;
|
|
226
|
+
dangerLight: string;
|
|
227
|
+
danger: string;
|
|
228
|
+
dangerMid: string;
|
|
229
|
+
dangerDark: string;
|
|
230
|
+
warningLight: string;
|
|
231
|
+
warning: string;
|
|
232
|
+
warningMid: string;
|
|
233
|
+
warningDark: string;
|
|
234
|
+
warningText: string;
|
|
235
|
+
subjectEnglish: string;
|
|
236
|
+
subjectMaths: string;
|
|
237
|
+
subjectScience: string;
|
|
238
|
+
subjectVerbalReasoning: string;
|
|
239
|
+
subjectNonVerbalReasoning: string;
|
|
240
|
+
subjectCreativeWriting: string;
|
|
241
|
+
subjectExamSkills: string;
|
|
242
|
+
glBlueLight: string;
|
|
243
|
+
glBluePrimary: string;
|
|
244
|
+
glBlueDark: string;
|
|
245
|
+
primary100: string;
|
|
246
|
+
primary200: string;
|
|
247
|
+
primary300: string;
|
|
248
|
+
primary400: string;
|
|
249
|
+
primary500: string;
|
|
250
|
+
primary600: string;
|
|
251
|
+
primary700: string;
|
|
252
|
+
primary800: string;
|
|
253
|
+
primary900: string;
|
|
254
|
+
primary1000: string;
|
|
255
|
+
primary1100: string;
|
|
256
|
+
primary1200: string;
|
|
257
|
+
};
|
|
258
|
+
space: {
|
|
259
|
+
"0": string;
|
|
260
|
+
"1": string;
|
|
261
|
+
"2": string;
|
|
262
|
+
"3": string;
|
|
263
|
+
"4": string;
|
|
264
|
+
"5": string;
|
|
265
|
+
"6": string;
|
|
266
|
+
"7": string;
|
|
267
|
+
"8": string;
|
|
268
|
+
"9": string;
|
|
269
|
+
"24": string;
|
|
270
|
+
};
|
|
271
|
+
fontSizes: {
|
|
272
|
+
xs: string;
|
|
273
|
+
sm: string;
|
|
274
|
+
md: string;
|
|
275
|
+
lg: string;
|
|
276
|
+
xl: string;
|
|
277
|
+
"2xl": string;
|
|
278
|
+
"3xl": string;
|
|
279
|
+
"4xl": string;
|
|
280
|
+
};
|
|
281
|
+
fonts: {
|
|
282
|
+
sans: string;
|
|
283
|
+
mono: string;
|
|
284
|
+
display: string;
|
|
285
|
+
body: string;
|
|
286
|
+
};
|
|
287
|
+
sizes: {
|
|
288
|
+
"0": string;
|
|
289
|
+
"1": string;
|
|
290
|
+
"2": string;
|
|
291
|
+
"3": string;
|
|
292
|
+
"4": string;
|
|
293
|
+
"5": string;
|
|
294
|
+
"6": string;
|
|
295
|
+
"7": string;
|
|
296
|
+
"8": string;
|
|
297
|
+
};
|
|
298
|
+
radii: {
|
|
299
|
+
"0": string;
|
|
300
|
+
"1": string;
|
|
301
|
+
"2": string;
|
|
302
|
+
"3": string;
|
|
303
|
+
round: string;
|
|
304
|
+
};
|
|
305
|
+
shadows: {
|
|
306
|
+
"0": string;
|
|
307
|
+
"1": string;
|
|
308
|
+
"2": string;
|
|
309
|
+
"3": string;
|
|
310
|
+
};
|
|
311
|
+
ratios: {
|
|
312
|
+
"16-9": string;
|
|
313
|
+
"3-2": string;
|
|
314
|
+
"4-3": string;
|
|
315
|
+
"1-1": string;
|
|
316
|
+
"3-4": string;
|
|
317
|
+
};
|
|
318
|
+
}, import("@atom-learning/stitches-react/types/config").DefaultThemeMap, {
|
|
319
|
+
bg: (value: import("@atom-learning/stitches-react").PropertyValue<"background">) => {
|
|
320
|
+
background: import("@atom-learning/stitches-react/types/css-util").WithPropertyValue<"background">;
|
|
321
|
+
};
|
|
322
|
+
size: (value: import("@atom-learning/stitches-react").ScaleValue<"size"> | number | string) => {
|
|
323
|
+
height: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"size">;
|
|
324
|
+
width: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"size">;
|
|
325
|
+
};
|
|
326
|
+
p: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
327
|
+
padding: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
328
|
+
};
|
|
329
|
+
pt: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
330
|
+
paddingTop: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
331
|
+
};
|
|
332
|
+
pr: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
333
|
+
paddingRight: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
334
|
+
};
|
|
335
|
+
pb: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
336
|
+
paddingBottom: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
337
|
+
};
|
|
338
|
+
pl: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
339
|
+
paddingLeft: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
340
|
+
};
|
|
341
|
+
px: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
342
|
+
paddingLeft: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
343
|
+
paddingRight: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
344
|
+
};
|
|
345
|
+
py: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
346
|
+
paddingTop: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
347
|
+
paddingBottom: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
348
|
+
};
|
|
349
|
+
m: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
350
|
+
margin: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
351
|
+
};
|
|
352
|
+
mt: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
353
|
+
marginTop: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
354
|
+
};
|
|
355
|
+
mr: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
356
|
+
marginRight: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
357
|
+
};
|
|
358
|
+
mb: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
359
|
+
marginBottom: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
360
|
+
};
|
|
361
|
+
ml: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
362
|
+
marginLeft: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
363
|
+
};
|
|
364
|
+
mx: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
365
|
+
marginLeft: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
366
|
+
marginRight: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
367
|
+
};
|
|
368
|
+
my: (value: import("@atom-learning/stitches-react").ScaleValue<"space"> | number | string) => {
|
|
369
|
+
marginTop: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
370
|
+
marginBottom: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
371
|
+
};
|
|
372
|
+
}>>, {
|
|
4
373
|
hasScrolled?: boolean | "true" | undefined;
|
|
5
374
|
size?: "md" | "lg" | undefined;
|
|
6
375
|
}, {
|
|
@@ -373,7 +742,7 @@ interface TopBarProps extends StyledRootProps {
|
|
|
373
742
|
className?: string;
|
|
374
743
|
}
|
|
375
744
|
export declare const TopBar: {
|
|
376
|
-
({
|
|
745
|
+
({ className, ...props }: TopBarProps): React.JSX.Element;
|
|
377
746
|
displayName: string;
|
|
378
747
|
} & {
|
|
379
748
|
Brand: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<"a", {}, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{styled as
|
|
1
|
+
import o from"react";import{styled as a}from"../../stitches.js";import{useWindowScrollPosition as n}from"../../utilities/hooks/useWindowScrollPosition.js";import{Divider as m}from"../divider/Divider.js";import{Flex as s}from"../flex/Flex.js";import{colorSchemes as d}from"./stitches.topBar.colorscheme.config.js";import{TopBarActionIcon as p}from"./TopBarActionIcon.js";import{TopBarBrand as c,TopBarBrandLogo as l,TopBarBrandName as g}from"./TopBarBrand.js";const h=()=>o.createElement(m,{orientation:"vertical",css:{height:"$2",bg:"$divider"}}),B=a(s,{bg:"$background",position:"sticky",width:"100vw",top:"0",zIndex:1,borderBottom:"1px solid $borderBottom",transition:"box-shadow .2s ease-out",px:"$4",py:"$2","@md":{px:"$5"},variants:{hasScrolled:{true:{boxShadow:"0px 4px 4px -2px rgba(31, 31, 31, 0.1);"}},size:{md:{height:"$6"},lg:{height:"$7"}}}}),r=({className:t=d.light,...e})=>{const{y:i}=n();return o.createElement(B,{align:"center",className:t,hasScrolled:!!i,...e})},x=Object.assign(r,{Brand:c,BrandLogo:l,BrandName:g,ActionIcon:p,Divider:h});r.displayName="TopBar";export{x as TopBar};
|
|
2
2
|
//# sourceMappingURL=TopBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopBar.js","sources":["../../../src/components/top-bar/TopBar.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CSS, styled } from '~/stitches'\nimport { useWindowScrollPosition } from '~/utilities/hooks/useWindowScrollPosition'\n\nimport { Divider } from '../divider'\nimport { Flex } from '../flex'\nimport { colorSchemes as topBarColorSchemes } from './stitches.topBar.colorscheme.config'\nimport { TopBarActionIcon } from './TopBarActionIcon'\nimport { TopBarBrand, TopBarBrandLogo, TopBarBrandName } from './TopBarBrand'\n\nconst TopBarDivider = () => (\n <Divider orientation=\"vertical\" css={{ height: '$2', bg: '$divider' }} />\n)\n\nconst StyledRoot = styled(
|
|
1
|
+
{"version":3,"file":"TopBar.js","sources":["../../../src/components/top-bar/TopBar.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CSS, styled } from '~/stitches'\nimport { useWindowScrollPosition } from '~/utilities/hooks/useWindowScrollPosition'\n\nimport { Divider } from '../divider'\nimport { Flex } from '../flex'\nimport { colorSchemes as topBarColorSchemes } from './stitches.topBar.colorscheme.config'\nimport { TopBarActionIcon } from './TopBarActionIcon'\nimport { TopBarBrand, TopBarBrandLogo, TopBarBrandName } from './TopBarBrand'\n\nconst TopBarDivider = () => (\n <Divider orientation=\"vertical\" css={{ height: '$2', bg: '$divider' }} />\n)\n\nconst StyledRoot = styled(Flex, {\n bg: '$background',\n position: 'sticky',\n width: '100vw',\n top: '0',\n zIndex: 1,\n borderBottom: '1px solid $borderBottom',\n transition: 'box-shadow .2s ease-out',\n px: '$4',\n py: '$2',\n '@md': {\n px: '$5'\n },\n variants: {\n hasScrolled: {\n true: { boxShadow: '0px 4px 4px -2px rgba(31, 31, 31, 0.1);' }\n },\n size: {\n md: { height: '$6' },\n lg: { height: '$7' }\n }\n }\n})\n\ntype StyledRootProps = React.ComponentProps<typeof StyledRoot>\n\ninterface TopBarProps extends StyledRootProps {\n css?: CSS\n className?: string\n}\n\nconst TopBarComponent = ({\n className = topBarColorSchemes['light'],\n ...props\n}: TopBarProps) => {\n const { y: scrollPositionY } = useWindowScrollPosition()\n\n return (\n <StyledRoot\n align=\"center\"\n className={className}\n hasScrolled={!!scrollPositionY}\n {...props}\n />\n )\n}\n\nexport const TopBar = Object.assign(TopBarComponent, {\n Brand: TopBarBrand,\n BrandLogo: TopBarBrandLogo,\n BrandName: TopBarBrandName,\n ActionIcon: TopBarActionIcon,\n Divider: TopBarDivider\n})\n\nTopBarComponent.displayName = 'TopBar'\n"],"names":["TopBarDivider","React","Divider","StyledRoot","styled","Flex","TopBarComponent","className","topBarColorSchemes","props","scrollPositionY","useWindowScrollPosition","TopBar","TopBarBrand","TopBarBrandLogo","TopBarBrandName","TopBarActionIcon"],"mappings":"2cAWA,MAAMA,EAAgB,IACpBC,EAAA,cAACC,EAAA,CAAQ,YAAY,WAAW,IAAK,CAAE,OAAQ,KAAM,GAAI,UAAW,CAAA,CAAG,EAGnEC,EAAaC,EAAOC,EAAM,CAC9B,GAAI,cACJ,SAAU,SACV,MAAO,QACP,IAAK,IACL,OAAQ,EACR,aAAc,0BACd,WAAY,0BACZ,GAAI,KACJ,GAAI,KACJ,MAAO,CACL,GAAI,IACN,EACA,SAAU,CACR,YAAa,CACX,KAAM,CAAE,UAAW,yCAA0C,CAC/D,EACA,KAAM,CACJ,GAAI,CAAE,OAAQ,IAAK,EACnB,GAAI,CAAE,OAAQ,IAAK,CACrB,CACF,CACF,CAAC,EASKC,EAAkB,CAAC,CACvB,UAAAC,EAAYC,EAAmB,SAC5BC,CACL,IAAmB,CACjB,KAAM,CAAE,EAAGC,CAAgB,EAAIC,IAE/B,OACEV,EAAA,cAACE,EAAA,CACC,MAAM,SACN,UAAWI,EACX,YAAa,CAAC,CAACG,EACd,GAAGD,EACN,CAEJ,EAEaG,EAAS,OAAO,OAAON,EAAiB,CACnD,MAAOO,EACP,UAAWC,EACX,UAAWC,EACX,WAAYC,EACZ,QAAShB,CACX,CAAC,EAEDM,EAAgB,YAAc"}
|