aura-ui-library 1.0.26 → 1.0.28
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/index.js +14 -13
- package/dist/index.mjs +14 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -277,9 +277,13 @@ var Navbar = ({
|
|
|
277
277
|
accentColor = "#6366f1",
|
|
278
278
|
theme = "dark",
|
|
279
279
|
// "dark" | "light"
|
|
280
|
+
transparent = false,
|
|
281
|
+
// Set to true to make navbar transparent until scrolled
|
|
280
282
|
style = {},
|
|
281
283
|
animationDuration = 1.2,
|
|
282
|
-
easing = "expo.inOut"
|
|
284
|
+
easing = "expo.inOut",
|
|
285
|
+
linkSize = "clamp(42px, 7vw, 100px)"
|
|
286
|
+
// Option to change navlink size
|
|
283
287
|
}) => {
|
|
284
288
|
const [isOpen, setIsOpen] = (0, import_react2.useState)(false);
|
|
285
289
|
const [isScrolled, setIsScrolled] = (0, import_react2.useState)(false);
|
|
@@ -380,9 +384,9 @@ var Navbar = ({
|
|
|
380
384
|
fontFamily: '"Inter", -apple-system, sans-serif',
|
|
381
385
|
boxSizing: "border-box",
|
|
382
386
|
padding: isScrolled ? "15px 5%" : "30px 5%",
|
|
383
|
-
backgroundColor: isScrolled ? headerBg : "transparent",
|
|
384
|
-
backdropFilter: isScrolled ? "blur(20px)" : "none",
|
|
385
|
-
boxShadow: isScrolled ? headerShadow :
|
|
387
|
+
backgroundColor: isScrolled ? headerBg : transparent ? "transparent" : headerBg,
|
|
388
|
+
backdropFilter: isScrolled || !transparent ? "blur(20px)" : "none",
|
|
389
|
+
boxShadow: isScrolled ? headerShadow : !transparent && headerShadow,
|
|
386
390
|
transition: "all 0.5s cubic-bezier(0.16, 1, 0.3, 1)",
|
|
387
391
|
...style
|
|
388
392
|
},
|
|
@@ -394,12 +398,10 @@ var Navbar = ({
|
|
|
394
398
|
fontWeight: "900",
|
|
395
399
|
letterSpacing: "1px",
|
|
396
400
|
textDecoration: "none",
|
|
397
|
-
color:
|
|
398
|
-
// Text logic handles contrast
|
|
401
|
+
color: textMain,
|
|
402
|
+
// Text logic handles contrast via theme
|
|
399
403
|
zIndex: 1001,
|
|
400
404
|
cursor: "pointer",
|
|
401
|
-
mixBlendMode: isOpen ? "normal" : "difference",
|
|
402
|
-
// Only difference when closed over unpredictable content
|
|
403
405
|
willChange: "transform",
|
|
404
406
|
transition: "transform 0.3s ease"
|
|
405
407
|
},
|
|
@@ -424,14 +426,13 @@ var Navbar = ({
|
|
|
424
426
|
cursor: "pointer",
|
|
425
427
|
zIndex: 1001,
|
|
426
428
|
border: `1px solid ${isOpen ? borderCol : "transparent"}`,
|
|
427
|
-
transition: "all 0.4s ease"
|
|
428
|
-
mixBlendMode: isOpen ? "normal" : "difference"
|
|
429
|
+
transition: "all 0.4s ease"
|
|
429
430
|
},
|
|
430
431
|
line: {
|
|
431
432
|
width: "22px",
|
|
432
433
|
height: "2px",
|
|
433
|
-
backgroundColor:
|
|
434
|
-
//
|
|
434
|
+
backgroundColor: textMain,
|
|
435
|
+
// Uses theme for color
|
|
435
436
|
borderRadius: "2px",
|
|
436
437
|
transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)",
|
|
437
438
|
transformOrigin: "center"
|
|
@@ -474,7 +475,7 @@ var Navbar = ({
|
|
|
474
475
|
willChange: "transform, opacity, color"
|
|
475
476
|
},
|
|
476
477
|
linkText: {
|
|
477
|
-
fontSize:
|
|
478
|
+
fontSize: linkSize,
|
|
478
479
|
fontWeight: "900",
|
|
479
480
|
letterSpacing: "-2px",
|
|
480
481
|
textTransform: "uppercase",
|
package/dist/index.mjs
CHANGED
|
@@ -221,9 +221,13 @@ var Navbar = ({
|
|
|
221
221
|
accentColor = "#6366f1",
|
|
222
222
|
theme = "dark",
|
|
223
223
|
// "dark" | "light"
|
|
224
|
+
transparent = false,
|
|
225
|
+
// Set to true to make navbar transparent until scrolled
|
|
224
226
|
style = {},
|
|
225
227
|
animationDuration = 1.2,
|
|
226
|
-
easing = "expo.inOut"
|
|
228
|
+
easing = "expo.inOut",
|
|
229
|
+
linkSize = "clamp(42px, 7vw, 100px)"
|
|
230
|
+
// Option to change navlink size
|
|
227
231
|
}) => {
|
|
228
232
|
const [isOpen, setIsOpen] = useState(false);
|
|
229
233
|
const [isScrolled, setIsScrolled] = useState(false);
|
|
@@ -324,9 +328,9 @@ var Navbar = ({
|
|
|
324
328
|
fontFamily: '"Inter", -apple-system, sans-serif',
|
|
325
329
|
boxSizing: "border-box",
|
|
326
330
|
padding: isScrolled ? "15px 5%" : "30px 5%",
|
|
327
|
-
backgroundColor: isScrolled ? headerBg : "transparent",
|
|
328
|
-
backdropFilter: isScrolled ? "blur(20px)" : "none",
|
|
329
|
-
boxShadow: isScrolled ? headerShadow :
|
|
331
|
+
backgroundColor: isScrolled ? headerBg : transparent ? "transparent" : headerBg,
|
|
332
|
+
backdropFilter: isScrolled || !transparent ? "blur(20px)" : "none",
|
|
333
|
+
boxShadow: isScrolled ? headerShadow : !transparent && headerShadow,
|
|
330
334
|
transition: "all 0.5s cubic-bezier(0.16, 1, 0.3, 1)",
|
|
331
335
|
...style
|
|
332
336
|
},
|
|
@@ -338,12 +342,10 @@ var Navbar = ({
|
|
|
338
342
|
fontWeight: "900",
|
|
339
343
|
letterSpacing: "1px",
|
|
340
344
|
textDecoration: "none",
|
|
341
|
-
color:
|
|
342
|
-
// Text logic handles contrast
|
|
345
|
+
color: textMain,
|
|
346
|
+
// Text logic handles contrast via theme
|
|
343
347
|
zIndex: 1001,
|
|
344
348
|
cursor: "pointer",
|
|
345
|
-
mixBlendMode: isOpen ? "normal" : "difference",
|
|
346
|
-
// Only difference when closed over unpredictable content
|
|
347
349
|
willChange: "transform",
|
|
348
350
|
transition: "transform 0.3s ease"
|
|
349
351
|
},
|
|
@@ -368,14 +370,13 @@ var Navbar = ({
|
|
|
368
370
|
cursor: "pointer",
|
|
369
371
|
zIndex: 1001,
|
|
370
372
|
border: `1px solid ${isOpen ? borderCol : "transparent"}`,
|
|
371
|
-
transition: "all 0.4s ease"
|
|
372
|
-
mixBlendMode: isOpen ? "normal" : "difference"
|
|
373
|
+
transition: "all 0.4s ease"
|
|
373
374
|
},
|
|
374
375
|
line: {
|
|
375
376
|
width: "22px",
|
|
376
377
|
height: "2px",
|
|
377
|
-
backgroundColor:
|
|
378
|
-
//
|
|
378
|
+
backgroundColor: textMain,
|
|
379
|
+
// Uses theme for color
|
|
379
380
|
borderRadius: "2px",
|
|
380
381
|
transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)",
|
|
381
382
|
transformOrigin: "center"
|
|
@@ -418,7 +419,7 @@ var Navbar = ({
|
|
|
418
419
|
willChange: "transform, opacity, color"
|
|
419
420
|
},
|
|
420
421
|
linkText: {
|
|
421
|
-
fontSize:
|
|
422
|
+
fontSize: linkSize,
|
|
422
423
|
fontWeight: "900",
|
|
423
424
|
letterSpacing: "-2px",
|
|
424
425
|
textTransform: "uppercase",
|