@t2ca/gatsby-theme-showcase 1.0.54 → 1.0.55
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t2ca/gatsby-theme-showcase",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"devDependencies": {
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"@theme-ui/preset-tailwind": "^0.4.0-rc.1",
|
|
31
31
|
"@theme-ui/sidenav": "^0.4.0-rc.1",
|
|
32
32
|
"@theme-ui/typography": "^0.4.0-rc.1",
|
|
33
|
-
"deepmerge": "^4.0.0",
|
|
34
33
|
"framer-motion": "^1.10.3",
|
|
35
34
|
"gatsby": "^2.13.3",
|
|
36
35
|
"gatsby-image": "^2.2.7",
|
|
@@ -49,7 +48,6 @@
|
|
|
49
48
|
"react-icons": "^3.7.0",
|
|
50
49
|
"remark-slug": "^6.0.0",
|
|
51
50
|
"theme-ui": "^0.4.0-rc.1",
|
|
52
|
-
"typeface-righteous": "^0.0.72",
|
|
53
51
|
"yup": "^0.29.0"
|
|
54
52
|
},
|
|
55
53
|
"scripts": {
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx, css, ThemeProvider } from "theme-ui"
|
|
3
|
+
import { MDXProvider } from "@mdx-js/react"
|
|
4
|
+
import React, { useState } from "react"
|
|
5
|
+
import { Global } from "@emotion/core"
|
|
6
|
+
import merge from "deepmerge"
|
|
7
|
+
|
|
8
|
+
const Overlay = ({ onClick }) => (
|
|
9
|
+
<React.Fragment>
|
|
10
|
+
<div
|
|
11
|
+
onClick={onClick}
|
|
12
|
+
sx={{
|
|
13
|
+
position: "fixed",
|
|
14
|
+
top: 0,
|
|
15
|
+
right: 0,
|
|
16
|
+
bottom: 0,
|
|
17
|
+
left: 0,
|
|
18
|
+
}}
|
|
19
|
+
/>
|
|
20
|
+
<Global
|
|
21
|
+
styles={css({
|
|
22
|
+
body: {
|
|
23
|
+
overflow: ["hidden", "auto"],
|
|
24
|
+
},
|
|
25
|
+
})}
|
|
26
|
+
/>
|
|
27
|
+
</React.Fragment>
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
const createNestedLinks = (children, depth = 0) => {
|
|
31
|
+
const links = React.Children.toArray(children).reduce((acc, child) => {
|
|
32
|
+
const type = child.props && child.props.mdxType
|
|
33
|
+
if (!child.props || !child.props.children) return acc
|
|
34
|
+
if (type === "a") return [...acc, child]
|
|
35
|
+
if (depth > 0 && type === "ul") {
|
|
36
|
+
const last = acc[acc.length - 1]
|
|
37
|
+
acc[acc.length - 1] = React.cloneElement(last, {
|
|
38
|
+
links: createNestedLinks(child.props.children),
|
|
39
|
+
})
|
|
40
|
+
return acc
|
|
41
|
+
}
|
|
42
|
+
return [...acc, ...createNestedLinks(child.props.children, depth + 1)]
|
|
43
|
+
}, [])
|
|
44
|
+
return links
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const flattenLinks = (children) =>
|
|
48
|
+
React.Children.toArray(children).reduce((acc, child) => {
|
|
49
|
+
if (child.props && child.props.mdxType === "a") {
|
|
50
|
+
return [...acc, child]
|
|
51
|
+
}
|
|
52
|
+
if (!child.props || !child.props.children) return acc
|
|
53
|
+
return React.Children.toArray([
|
|
54
|
+
...acc,
|
|
55
|
+
...flattenLinks(child.props.children),
|
|
56
|
+
])
|
|
57
|
+
}, [])
|
|
58
|
+
|
|
59
|
+
export const Sidenav = React.forwardRef(
|
|
60
|
+
({ open, styles = {}, components, ...props }, ref) => {
|
|
61
|
+
return (
|
|
62
|
+
<ThemeProvider
|
|
63
|
+
theme={{
|
|
64
|
+
styles: merge(
|
|
65
|
+
{
|
|
66
|
+
ul: {
|
|
67
|
+
listStyle: "none",
|
|
68
|
+
p: 0,
|
|
69
|
+
m: 0,
|
|
70
|
+
ul: {
|
|
71
|
+
a: {
|
|
72
|
+
pl: 4,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
a: {
|
|
77
|
+
display: "block",
|
|
78
|
+
px: 2,
|
|
79
|
+
py: 2,
|
|
80
|
+
color: "inherit",
|
|
81
|
+
textDecoration: "none",
|
|
82
|
+
fontSize: 1,
|
|
83
|
+
fontWeight: "bold",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
styles
|
|
87
|
+
),
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
{open && <Overlay {...props} />}
|
|
91
|
+
<MDXProvider components={components}>
|
|
92
|
+
<div
|
|
93
|
+
{...props}
|
|
94
|
+
ref={ref}
|
|
95
|
+
sx={{
|
|
96
|
+
position: ["fixed", "sticky"],
|
|
97
|
+
top: 0,
|
|
98
|
+
left: 0,
|
|
99
|
+
bottom: [0, "auto"],
|
|
100
|
+
zIndex: 1,
|
|
101
|
+
minWidth: 0,
|
|
102
|
+
width: 256,
|
|
103
|
+
maxHeight: ["100vh", "none"],
|
|
104
|
+
overflowX: "visible",
|
|
105
|
+
overflowY: "auto",
|
|
106
|
+
WebkitOverflowScrolling: "touch",
|
|
107
|
+
transition: "transform .2s ease-out",
|
|
108
|
+
transform: [open ? "translateX(0)" : "translate(-100%)", "none"],
|
|
109
|
+
bg: ["background", "transparent"],
|
|
110
|
+
}}
|
|
111
|
+
/>
|
|
112
|
+
</MDXProvider>
|
|
113
|
+
</ThemeProvider>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
export const AccordionButton = (props) => {
|
|
119
|
+
const transform = props.open ? "rotate(-180 8 8)" : "rotate(0 8 8)"
|
|
120
|
+
const disabled = props.pathname && props.pathname.includes(props.href)
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<button
|
|
124
|
+
title="Expand Section"
|
|
125
|
+
disabled={disabled}
|
|
126
|
+
{...props}
|
|
127
|
+
sx={{
|
|
128
|
+
appearance: "none",
|
|
129
|
+
display: "flex",
|
|
130
|
+
alignItems: "center",
|
|
131
|
+
p: 2,
|
|
132
|
+
m: 0,
|
|
133
|
+
border: 0,
|
|
134
|
+
borderRadius: 0,
|
|
135
|
+
color: "inherit",
|
|
136
|
+
bg: "transparent",
|
|
137
|
+
":hover,:focus": {
|
|
138
|
+
color: "primary",
|
|
139
|
+
},
|
|
140
|
+
"&:disabled": {
|
|
141
|
+
opacity: 0.25,
|
|
142
|
+
},
|
|
143
|
+
}}
|
|
144
|
+
>
|
|
145
|
+
<svg viewBox="0 0 16 16" width="12" height="12">
|
|
146
|
+
<g
|
|
147
|
+
sx={{
|
|
148
|
+
transformOrigin: "8 8",
|
|
149
|
+
transition: "transform .1s ease-out",
|
|
150
|
+
}}
|
|
151
|
+
transform={transform}
|
|
152
|
+
>
|
|
153
|
+
<path
|
|
154
|
+
stroke="currentcolor"
|
|
155
|
+
strokeWidth="2"
|
|
156
|
+
fill="none"
|
|
157
|
+
d="M14 6 L8 12 L2 6"
|
|
158
|
+
/>
|
|
159
|
+
</g>
|
|
160
|
+
</svg>
|
|
161
|
+
</button>
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const NavLinks = ({ open, pathname = "", links, href, Link, ...props }) => {
|
|
166
|
+
if (!links) return false
|
|
167
|
+
if (!open && !pathname.includes(href)) return false
|
|
168
|
+
|
|
169
|
+
return (
|
|
170
|
+
<ul
|
|
171
|
+
sx={{
|
|
172
|
+
listStyle: "none",
|
|
173
|
+
m: 0,
|
|
174
|
+
p: 0,
|
|
175
|
+
}}
|
|
176
|
+
>
|
|
177
|
+
{links.map((link, j) => (
|
|
178
|
+
<li key={j}>
|
|
179
|
+
<Link
|
|
180
|
+
href={link.props.href}
|
|
181
|
+
children={link.props.children}
|
|
182
|
+
className={link.props.className}
|
|
183
|
+
sx={{
|
|
184
|
+
pl: 4,
|
|
185
|
+
}}
|
|
186
|
+
/>
|
|
187
|
+
</li>
|
|
188
|
+
))}
|
|
189
|
+
</ul>
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export const AccordionNav = React.forwardRef(
|
|
194
|
+
(
|
|
195
|
+
{ open, children, components = {}, className, pathname = "", ...props },
|
|
196
|
+
ref
|
|
197
|
+
) => {
|
|
198
|
+
const links = createNestedLinks(children)
|
|
199
|
+
const [expanded, setExpanded] = useState({})
|
|
200
|
+
const Link = components.a || "a"
|
|
201
|
+
|
|
202
|
+
const toggle = (i) => (e) => {
|
|
203
|
+
e.stopPropagation()
|
|
204
|
+
setExpanded({
|
|
205
|
+
...expanded,
|
|
206
|
+
[i]: !expanded[i],
|
|
207
|
+
})
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return (
|
|
211
|
+
<div>
|
|
212
|
+
{open && <Overlay {...props} />}
|
|
213
|
+
<div
|
|
214
|
+
ref={ref}
|
|
215
|
+
className={className}
|
|
216
|
+
sx={{
|
|
217
|
+
position: ["fixed", "sticky"],
|
|
218
|
+
top: 0,
|
|
219
|
+
left: 0,
|
|
220
|
+
bottom: [0, "auto"],
|
|
221
|
+
zIndex: 1,
|
|
222
|
+
minWidth: 0,
|
|
223
|
+
width: 256,
|
|
224
|
+
maxHeight: ["100vh", "none"],
|
|
225
|
+
overflowX: "visible",
|
|
226
|
+
overflowY: "auto",
|
|
227
|
+
WebkitOverflowScrolling: "touch",
|
|
228
|
+
transition: "transform .2s ease-out",
|
|
229
|
+
transform: [open ? "translateX(0)" : "translate(-100%)", "none"],
|
|
230
|
+
bg: ["background", "transparent"],
|
|
231
|
+
}}
|
|
232
|
+
>
|
|
233
|
+
<ul
|
|
234
|
+
sx={{
|
|
235
|
+
listStyle: "none",
|
|
236
|
+
p: 0,
|
|
237
|
+
m: 0,
|
|
238
|
+
}}
|
|
239
|
+
>
|
|
240
|
+
{links.map((link, i) => (
|
|
241
|
+
<li key={i}>
|
|
242
|
+
<div
|
|
243
|
+
sx={{
|
|
244
|
+
display: "flex",
|
|
245
|
+
alignItems: "center",
|
|
246
|
+
}}
|
|
247
|
+
>
|
|
248
|
+
<Link
|
|
249
|
+
href={link.props.href}
|
|
250
|
+
children={link.props.children}
|
|
251
|
+
className={link.props.className}
|
|
252
|
+
/>
|
|
253
|
+
{link.props.links && (
|
|
254
|
+
<AccordionButton
|
|
255
|
+
href={link.props.href}
|
|
256
|
+
pathname={pathname}
|
|
257
|
+
open={expanded[i]}
|
|
258
|
+
sx={{
|
|
259
|
+
ml: "auto",
|
|
260
|
+
}}
|
|
261
|
+
onClick={toggle(i)}
|
|
262
|
+
/>
|
|
263
|
+
)}
|
|
264
|
+
</div>
|
|
265
|
+
<NavLinks
|
|
266
|
+
{...link.props}
|
|
267
|
+
open={expanded[i]}
|
|
268
|
+
pathname={pathname}
|
|
269
|
+
Link={Link}
|
|
270
|
+
/>
|
|
271
|
+
</li>
|
|
272
|
+
))}
|
|
273
|
+
</ul>
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
)
|
|
277
|
+
}
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
const removeSlash = (str) => (str.length > 1 ? str.replace(/\/$/, "") : str)
|
|
281
|
+
|
|
282
|
+
const PaginationLink = ({
|
|
283
|
+
label,
|
|
284
|
+
children,
|
|
285
|
+
mdxType,
|
|
286
|
+
originalType,
|
|
287
|
+
parentName,
|
|
288
|
+
...props
|
|
289
|
+
}) => (
|
|
290
|
+
<a
|
|
291
|
+
{...props}
|
|
292
|
+
sx={{
|
|
293
|
+
fontSize: 1,
|
|
294
|
+
color: "inherit",
|
|
295
|
+
textDecoration: "none",
|
|
296
|
+
fontWeight: "bold",
|
|
297
|
+
}}
|
|
298
|
+
>
|
|
299
|
+
<div>{label}</div>
|
|
300
|
+
<div
|
|
301
|
+
sx={{
|
|
302
|
+
fontSize: 3,
|
|
303
|
+
}}
|
|
304
|
+
>
|
|
305
|
+
{children}
|
|
306
|
+
</div>
|
|
307
|
+
</a>
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
export const Pagination = ({ pathname = "", children, ...props }) => {
|
|
311
|
+
const links = flattenLinks(children)
|
|
312
|
+
const index = links.findIndex(
|
|
313
|
+
(link) => link.props.href === removeSlash(pathname)
|
|
314
|
+
)
|
|
315
|
+
const hasPagination = index > -1
|
|
316
|
+
const previous = links[index - 1]
|
|
317
|
+
const next = links[index + 1]
|
|
318
|
+
|
|
319
|
+
return (
|
|
320
|
+
<div
|
|
321
|
+
{...props}
|
|
322
|
+
sx={{
|
|
323
|
+
display: "flex",
|
|
324
|
+
}}
|
|
325
|
+
>
|
|
326
|
+
{hasPagination && previous && (
|
|
327
|
+
<PaginationLink {...previous.props} label="Previous:" />
|
|
328
|
+
)}
|
|
329
|
+
<div sx={{ mx: "auto" }} />
|
|
330
|
+
{hasPagination && next && (
|
|
331
|
+
<PaginationLink {...next.props} label="Next:" />
|
|
332
|
+
)}
|
|
333
|
+
</div>
|
|
334
|
+
)
|
|
335
|
+
}
|
package/src/components/header.js
CHANGED
|
@@ -64,7 +64,7 @@ export default ({
|
|
|
64
64
|
bg: "transparent",
|
|
65
65
|
border: 0,
|
|
66
66
|
color: "text",
|
|
67
|
-
display: ["initial", "none"],
|
|
67
|
+
display: ["initial", "initial", "none"],
|
|
68
68
|
fontFamily: "inherit",
|
|
69
69
|
fontSize: 24,
|
|
70
70
|
p: 0,
|
|
@@ -80,7 +80,7 @@ export default ({
|
|
|
80
80
|
<Burger />
|
|
81
81
|
)}
|
|
82
82
|
<Link to="/" sx={{ color: "inherit", textDecoration: "none" }}>
|
|
83
|
-
<div sx={{ display: ["none", "inherit"], pt: "4px" }}>
|
|
83
|
+
<div sx={{ display: ["none", "none", "inherit"], pt: "4px" }}>
|
|
84
84
|
<img
|
|
85
85
|
src={isDark ? desktopLogoWhite : desktopLogo}
|
|
86
86
|
height={35}
|
|
@@ -100,7 +100,7 @@ export default ({
|
|
|
100
100
|
loading="eager"
|
|
101
101
|
/>*/}
|
|
102
102
|
</div>
|
|
103
|
-
<div sx={{ display: ["inherit", "none"] }}>
|
|
103
|
+
<div sx={{ display: ["inherit", "inherit", "none"] }}>
|
|
104
104
|
<img
|
|
105
105
|
src={mobileLogo}
|
|
106
106
|
height={35}
|
|
@@ -131,7 +131,7 @@ export default ({
|
|
|
131
131
|
height: 59,
|
|
132
132
|
}}
|
|
133
133
|
>
|
|
134
|
-
<div sx={{ display: ["none", "inherit"] }}>
|
|
134
|
+
<div sx={{ display: ["none", "none", "inherit"] }}>
|
|
135
135
|
{menuList &&
|
|
136
136
|
menuList.map(({ node: { label, link, id } }) => (
|
|
137
137
|
<NavLink key={id} to={link}>
|
package/src/components/hero.js
CHANGED
package/src/components/layout.js
CHANGED
|
@@ -10,22 +10,24 @@ const components = {
|
|
|
10
10
|
a: NavLink,
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export default
|
|
14
|
-
const Menu =
|
|
13
|
+
export default ({ menuList, open }) => {
|
|
14
|
+
const Menu = menuList || MenuList
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<Menu
|
|
18
|
-
{...props}
|
|
19
18
|
components={components}
|
|
20
19
|
sx={{
|
|
21
|
-
width: 256,
|
|
22
|
-
flex: "none",
|
|
23
20
|
px: 3,
|
|
24
21
|
pt: 3,
|
|
25
22
|
pb: 4,
|
|
26
|
-
mt: [60, 0],
|
|
23
|
+
mt: [60, 60, 0],
|
|
24
|
+
position: ["fixed", "fixed", "sticky"],
|
|
25
|
+
bottom: [0, 0, "auto"],
|
|
26
|
+
maxHeight: ["100vh", "100vh", "none"],
|
|
27
|
+
bg: ["Menu", "Menu", "transparent"],
|
|
28
|
+
display: [null, null, "none"],
|
|
29
|
+
transform: [open ? "translateX(0)" : "translate(-100%) !important"],
|
|
27
30
|
zIndex: 10,
|
|
28
|
-
bg: "Menu",
|
|
29
31
|
}}
|
|
30
32
|
/>
|
|
31
33
|
)
|
|
@@ -1,173 +1,154 @@
|
|
|
1
|
-
import merge from "
|
|
1
|
+
import { merge } from "theme-ui"
|
|
2
2
|
import tailwind from "@theme-ui/preset-tailwind"
|
|
3
3
|
import styles from "./styles"
|
|
4
4
|
import colors from "./colors"
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// initialColorMode: `light`,
|
|
16
|
-
// useCustomProperties: true,
|
|
17
|
-
textStyles: {
|
|
18
|
-
heading: {
|
|
19
|
-
fontFamily: "heading",
|
|
20
|
-
fontWeight: "heading",
|
|
21
|
-
lineHeight: "heading",
|
|
22
|
-
},
|
|
6
|
+
export default merge(tailwind, {
|
|
7
|
+
colors,
|
|
8
|
+
styles,
|
|
9
|
+
buttons: {
|
|
10
|
+
primary: {
|
|
11
|
+
...tailwind.buttons.simple,
|
|
12
|
+
backgroundColor: `brand`,
|
|
13
|
+
outline: `none`,
|
|
14
|
+
"&:hover": { backgroundColor: `brandHover` },
|
|
23
15
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
color: `brand`,
|
|
43
|
-
"&:hover": { backgroundColor: `brand`, color: `white` },
|
|
44
|
-
},
|
|
16
|
+
secondary: {
|
|
17
|
+
...tailwind.buttons.elevated,
|
|
18
|
+
outline: `none`,
|
|
19
|
+
color: `gray.8`,
|
|
20
|
+
},
|
|
21
|
+
basic: {
|
|
22
|
+
...tailwind.buttons.outline,
|
|
23
|
+
outline: `none`,
|
|
24
|
+
borderColor: `brand`,
|
|
25
|
+
color: `brand`,
|
|
26
|
+
"&:hover": { backgroundColor: `brand`, color: `white` },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
inputs: {
|
|
30
|
+
primary: {
|
|
31
|
+
...tailwind.inputs.inline,
|
|
32
|
+
width: `full`,
|
|
33
|
+
caretColor: tailwind.colors.pink[6],
|
|
45
34
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
secondary: {
|
|
36
|
+
...tailwind.inputs.shadow,
|
|
37
|
+
width: `full`,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
links: {
|
|
41
|
+
primary: {
|
|
42
|
+
display: "inline-block",
|
|
43
|
+
px: 0,
|
|
44
|
+
py: 0,
|
|
45
|
+
color: "primary",
|
|
46
|
+
margin: 3,
|
|
47
|
+
textDecoration: "none",
|
|
48
|
+
lineHeight: 1.75,
|
|
49
|
+
position: `relative`,
|
|
50
|
+
"&.active": {
|
|
51
|
+
borderBottom: `1px solid transparent`,
|
|
52
|
+
borderColor: "secondary",
|
|
53
|
+
color: "secondary",
|
|
54
|
+
cursor: "default",
|
|
51
55
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
"&::after": {
|
|
57
|
+
content: '""',
|
|
58
|
+
position: "absolute",
|
|
59
|
+
height: "1px",
|
|
60
|
+
width: 0,
|
|
61
|
+
bottom: 0,
|
|
62
|
+
left: 0,
|
|
63
|
+
bg: "primary",
|
|
64
|
+
transition: `all .25s ease-in-out 0s`,
|
|
65
|
+
},
|
|
66
|
+
"&:hover:not(.active)::after": {
|
|
67
|
+
width: `100%`,
|
|
55
68
|
},
|
|
56
69
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
cursor: "default",
|
|
72
|
-
},
|
|
73
|
-
"&::after": {
|
|
74
|
-
content: '""',
|
|
75
|
-
position: "absolute",
|
|
76
|
-
height: "1px",
|
|
77
|
-
width: 0,
|
|
78
|
-
bottom: 0,
|
|
79
|
-
left: 0,
|
|
80
|
-
bg: "primary",
|
|
81
|
-
transition: `all .25s ease-in-out 0s`,
|
|
82
|
-
},
|
|
83
|
-
"&:hover:not(.active)::after": {
|
|
84
|
-
width: `100%`,
|
|
85
|
-
},
|
|
70
|
+
secondary: {
|
|
71
|
+
display: "inline-block",
|
|
72
|
+
px: 0,
|
|
73
|
+
py: 0,
|
|
74
|
+
color: "primary",
|
|
75
|
+
margin: 3,
|
|
76
|
+
textDecoration: "none",
|
|
77
|
+
lineHeight: 1.75,
|
|
78
|
+
position: `relative`,
|
|
79
|
+
"&.active": {
|
|
80
|
+
borderBottom: `1px solid transparent`,
|
|
81
|
+
borderColor: "secondary",
|
|
82
|
+
color: "secondary",
|
|
83
|
+
cursor: "default",
|
|
86
84
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
borderColor: "secondary",
|
|
99
|
-
color: "secondary",
|
|
100
|
-
cursor: "default",
|
|
101
|
-
},
|
|
102
|
-
"&::after": {
|
|
103
|
-
content: '""',
|
|
104
|
-
position: "absolute",
|
|
105
|
-
width: "100%",
|
|
106
|
-
height: "1px",
|
|
107
|
-
bottom: "0",
|
|
108
|
-
left: "0",
|
|
109
|
-
visibility: "hidden",
|
|
110
|
-
transform: "scaleX(0)",
|
|
111
|
-
transition: "all 0.25s ease-in-out 0s",
|
|
112
|
-
bg: "primary",
|
|
113
|
-
},
|
|
114
|
-
"&:hover:not(.active)::after": {
|
|
115
|
-
visibility: "visible",
|
|
116
|
-
transform: "scaleX(1)",
|
|
117
|
-
},
|
|
85
|
+
"&::after": {
|
|
86
|
+
content: '""',
|
|
87
|
+
position: "absolute",
|
|
88
|
+
width: "100%",
|
|
89
|
+
height: "1px",
|
|
90
|
+
bottom: "0",
|
|
91
|
+
left: "0",
|
|
92
|
+
visibility: "hidden",
|
|
93
|
+
transform: "scaleX(0)",
|
|
94
|
+
transition: "all 0.25s ease-in-out 0s",
|
|
95
|
+
bg: "primary",
|
|
118
96
|
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
py: 0,
|
|
123
|
-
color: "primary",
|
|
124
|
-
margin: 3,
|
|
125
|
-
textDecoration: "none",
|
|
126
|
-
borderBottom: `2px solid transparent`,
|
|
127
|
-
lineHeight: 2,
|
|
128
|
-
transition: `all .5s ease-in;`,
|
|
129
|
-
"&.active": {
|
|
130
|
-
borderBottom: `1px solid transparent`,
|
|
131
|
-
borderColor: "secondary",
|
|
132
|
-
color: "secondary",
|
|
133
|
-
cursor: "default",
|
|
134
|
-
},
|
|
135
|
-
"&:hover:not(.active)": {
|
|
136
|
-
borderColor: "primary",
|
|
137
|
-
},
|
|
97
|
+
"&:hover:not(.active)::after": {
|
|
98
|
+
visibility: "visible",
|
|
99
|
+
transform: "scaleX(1)",
|
|
138
100
|
},
|
|
139
101
|
},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
102
|
+
basic: {
|
|
103
|
+
display: "inline-block",
|
|
104
|
+
px: 0,
|
|
105
|
+
py: 0,
|
|
106
|
+
color: "primary",
|
|
107
|
+
margin: 3,
|
|
108
|
+
textDecoration: "none",
|
|
109
|
+
borderBottom: `2px solid transparent`,
|
|
110
|
+
lineHeight: 2,
|
|
111
|
+
transition: `all .5s ease-in;`,
|
|
112
|
+
"&.active": {
|
|
113
|
+
borderBottom: `1px solid transparent`,
|
|
114
|
+
borderColor: "secondary",
|
|
115
|
+
color: "secondary",
|
|
116
|
+
cursor: "default",
|
|
154
117
|
},
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
bg: `green.1`,
|
|
158
|
-
// border: `1px solid ${tailwind.colors.green[8]}`,
|
|
159
|
-
boxShadow: (t) =>
|
|
160
|
-
`inset 0 0 0 1px ${t.colors.green[8]}, 0 0 0 0 transparent`,
|
|
161
|
-
opacity: 0.7,
|
|
162
|
-
color: `green.8`,
|
|
163
|
-
p: 3,
|
|
164
|
-
my: 3,
|
|
165
|
-
fontWeight: `medium`,
|
|
166
|
-
display: `flex`,
|
|
167
|
-
width: `100%`,
|
|
168
|
-
alignItems: `center`,
|
|
118
|
+
"&:hover:not(.active)": {
|
|
119
|
+
borderColor: "primary",
|
|
169
120
|
},
|
|
170
121
|
},
|
|
171
122
|
},
|
|
172
|
-
|
|
173
|
-
|
|
123
|
+
alerts: {
|
|
124
|
+
error: {
|
|
125
|
+
borderRadius: `sm`,
|
|
126
|
+
bg: `red.1`,
|
|
127
|
+
// border: `1px solid ${tailwind.colors.red[8]}`,
|
|
128
|
+
boxShadow: `inset 0 0 0 1px ${tailwind.colors.red[8]}, 0 0 0 0 transparent`,
|
|
129
|
+
opacity: 0.7,
|
|
130
|
+
color: `red.8`,
|
|
131
|
+
p: 3,
|
|
132
|
+
my: 3,
|
|
133
|
+
fontWeight: `medium`,
|
|
134
|
+
display: `flex`,
|
|
135
|
+
width: `100%`,
|
|
136
|
+
alignItems: `center`,
|
|
137
|
+
},
|
|
138
|
+
success: {
|
|
139
|
+
borderRadius: `sm`,
|
|
140
|
+
bg: `green.1`,
|
|
141
|
+
// border: `1px solid ${tailwind.colors.green[8]}`,
|
|
142
|
+
boxShadow: (t) =>
|
|
143
|
+
`inset 0 0 0 1px ${t.colors.green[8]}, 0 0 0 0 transparent`,
|
|
144
|
+
opacity: 0.7,
|
|
145
|
+
color: `green.8`,
|
|
146
|
+
p: 3,
|
|
147
|
+
my: 3,
|
|
148
|
+
fontWeight: `medium`,
|
|
149
|
+
display: `flex`,
|
|
150
|
+
width: `100%`,
|
|
151
|
+
alignItems: `center`,
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
})
|