Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cavilha/breadcrumb

Package Overview
Dependencies
Maintainers
6
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cavilha/breadcrumb - npm Package Compare versions

Comparing version 0.0.0-alpha.3 to 0.0.0

CHANGELOG.md

606

dist/Breadcrumb.styles.d.ts

@@ -11,15 +11,17 @@ import { StitchesVariants } from '@cavilha/theme';

brandSecondary: string;
success: string;
error: string;
warning: string;
info: string;
facebook: string;
instagram: string;
youtube: string;
linkedin: string;
pinterest: string;
twitter: string;
neutral: string;
white: string;
black: string;
brandMadeira1: string;
brandMadeira2: string;
brandMadeira3: string;
brandMadeira4: string;
brandMadeira5: string;
brandMadeira6: string;
brandMadeira7: string;
brandMadeira8: string;
brandMadeira9: string;
mono1: string;
mono2: string;
background1: string;
background2: string;
alwaysBlack: string;
alwaysWhite: string;
primary1: string;

@@ -29,2 +31,6 @@ primary2: string;

primary4: string;
primary1Hover: string;
primary2Hover: string;
primary3Hover: string;
primary4Hover: string;
secondary1: string;

@@ -35,2 +41,7 @@ secondary2: string;

secondary4: string;
secondary0Hover: string;
secondary1Hover: string;
secondary2Hover: string;
secondary3Hover: string;
secondary4Hover: string;
secondary1Opacity: string;

@@ -42,2 +53,6 @@ secondary2Opacity: string;

success4: string;
success1Hover: string;
success2Hover: string;
success3Hover: string;
success4Hover: string;
danger1: string;

@@ -47,2 +62,6 @@ danger2: string;

danger4: string;
danger1Hover: string;
danger2Hover: string;
danger3Hover: string;
danger4Hover: string;
warning1: string;

@@ -52,2 +71,6 @@ warning2: string;

warning4: string;
warning1Hover: string;
warning2Hover: string;
warning3Hover: string;
warning4Hover: string;
info1: string;

@@ -57,2 +80,6 @@ info2: string;

info4: string;
info1Hover: string;
info2Hover: string;
info3Hover: string;
info4Hover: string;
neutral1: string;

@@ -64,2 +91,33 @@ neutral2: string;

neutral6: string;
linkedin: string;
linkedin1: string;
whatsapp1: string;
whatsapp2: string;
whatsapp3: string;
youtube1: string;
youtube2: string;
twitter: string;
twitter1: string;
facebook1: string;
instagram1: string;
pinterest: string;
pinterest1: string;
mono1Opacity1: string;
mono1Opacity2: string;
mono1Opacity3: string;
mono1Opacity4: string;
mono1Opacity5: string;
mono1Opacity6: string;
mono1Opacity7: string;
mono1Opacity8: string;
mono1Opacity9: string;
mono2Opacity1: string;
mono2Opacity2: string;
mono2Opacity3: string;
mono2Opacity4: string;
mono2Opacity5: string;
mono2Opacity6: string;
mono2Opacity7: string;
mono2Opacity8: string;
mono2Opacity9: string;
defaultBorderColor: string;

@@ -124,8 +182,8 @@ yellow100: string;

bodyMedium: string;
hero: string;
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
h4: string;
h3: string;
h2: string;
h1: string;
hero: string;
mobileHero: string;

@@ -137,2 +195,7 @@ mobileH1: string;

mobileH5: string;
iconXSmall: string;
iconSmall: string;
iconMedium: string;
iconLarge: string;
iconXLarge: string;
};

@@ -171,3 +234,2 @@ fontWeights: {

shadows: {
focus: string;
shadowNone: string;

@@ -178,2 +240,3 @@ shadowXSmall: string;

shadowLarge: string;
focusPressed: string;
};

@@ -244,15 +307,17 @@ zIndices: {

brandSecondary: string;
success: string;
error: string;
warning: string;
info: string;
facebook: string;
instagram: string;
youtube: string;
linkedin: string;
pinterest: string;
twitter: string;
neutral: string;
white: string;
black: string;
brandMadeira1: string;
brandMadeira2: string;
brandMadeira3: string;
brandMadeira4: string;
brandMadeira5: string;
brandMadeira6: string;
brandMadeira7: string;
brandMadeira8: string;
brandMadeira9: string;
mono1: string;
mono2: string;
background1: string;
background2: string;
alwaysBlack: string;
alwaysWhite: string;
primary1: string;

@@ -262,2 +327,6 @@ primary2: string;

primary4: string;
primary1Hover: string;
primary2Hover: string;
primary3Hover: string;
primary4Hover: string;
secondary1: string;

@@ -268,2 +337,7 @@ secondary2: string;

secondary4: string;
secondary0Hover: string;
secondary1Hover: string;
secondary2Hover: string;
secondary3Hover: string;
secondary4Hover: string;
secondary1Opacity: string;

@@ -275,2 +349,6 @@ secondary2Opacity: string;

success4: string;
success1Hover: string;
success2Hover: string;
success3Hover: string;
success4Hover: string;
danger1: string;

@@ -280,2 +358,6 @@ danger2: string;

danger4: string;
danger1Hover: string;
danger2Hover: string;
danger3Hover: string;
danger4Hover: string;
warning1: string;

@@ -285,2 +367,6 @@ warning2: string;

warning4: string;
warning1Hover: string;
warning2Hover: string;
warning3Hover: string;
warning4Hover: string;
info1: string;

@@ -290,2 +376,6 @@ info2: string;

info4: string;
info1Hover: string;
info2Hover: string;
info3Hover: string;
info4Hover: string;
neutral1: string;

@@ -297,2 +387,33 @@ neutral2: string;

neutral6: string;
linkedin: string;
linkedin1: string;
whatsapp1: string;
whatsapp2: string;
whatsapp3: string;
youtube1: string;
youtube2: string;
twitter: string;
twitter1: string;
facebook1: string;
instagram1: string;
pinterest: string;
pinterest1: string;
mono1Opacity1: string;
mono1Opacity2: string;
mono1Opacity3: string;
mono1Opacity4: string;
mono1Opacity5: string;
mono1Opacity6: string;
mono1Opacity7: string;
mono1Opacity8: string;
mono1Opacity9: string;
mono2Opacity1: string;
mono2Opacity2: string;
mono2Opacity3: string;
mono2Opacity4: string;
mono2Opacity5: string;
mono2Opacity6: string;
mono2Opacity7: string;
mono2Opacity8: string;
mono2Opacity9: string;
defaultBorderColor: string;

@@ -357,8 +478,8 @@ yellow100: string;

bodyMedium: string;
hero: string;
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
h4: string;
h3: string;
h2: string;
h1: string;
hero: string;
mobileHero: string;

@@ -370,2 +491,7 @@ mobileH1: string;

mobileH5: string;
iconXSmall: string;
iconSmall: string;
iconMedium: string;
iconLarge: string;
iconXLarge: string;
};

@@ -404,3 +530,2 @@ fontWeights: {

shadows: {
focus: string;
shadowNone: string;

@@ -411,2 +536,3 @@ shadowXSmall: string;

shadowLarge: string;
focusPressed: string;
};

@@ -469,15 +595,17 @@ zIndices: {

brandSecondary: string;
success: string;
error: string;
warning: string;
info: string;
facebook: string;
instagram: string;
youtube: string;
linkedin: string;
pinterest: string;
twitter: string;
neutral: string;
white: string;
black: string;
brandMadeira1: string;
brandMadeira2: string;
brandMadeira3: string;
brandMadeira4: string;
brandMadeira5: string;
brandMadeira6: string;
brandMadeira7: string;
brandMadeira8: string;
brandMadeira9: string;
mono1: string;
mono2: string;
background1: string;
background2: string;
alwaysBlack: string;
alwaysWhite: string;
primary1: string;

@@ -487,2 +615,6 @@ primary2: string;

primary4: string;
primary1Hover: string;
primary2Hover: string;
primary3Hover: string;
primary4Hover: string;
secondary1: string;

@@ -493,2 +625,7 @@ secondary2: string;

secondary4: string;
secondary0Hover: string;
secondary1Hover: string;
secondary2Hover: string;
secondary3Hover: string;
secondary4Hover: string;
secondary1Opacity: string;

@@ -500,2 +637,6 @@ secondary2Opacity: string;

success4: string;
success1Hover: string;
success2Hover: string;
success3Hover: string;
success4Hover: string;
danger1: string;

@@ -505,2 +646,6 @@ danger2: string;

danger4: string;
danger1Hover: string;
danger2Hover: string;
danger3Hover: string;
danger4Hover: string;
warning1: string;

@@ -510,2 +655,6 @@ warning2: string;

warning4: string;
warning1Hover: string;
warning2Hover: string;
warning3Hover: string;
warning4Hover: string;
info1: string;

@@ -515,2 +664,6 @@ info2: string;

info4: string;
info1Hover: string;
info2Hover: string;
info3Hover: string;
info4Hover: string;
neutral1: string;

@@ -522,2 +675,33 @@ neutral2: string;

neutral6: string;
linkedin: string;
linkedin1: string;
whatsapp1: string;
whatsapp2: string;
whatsapp3: string;
youtube1: string;
youtube2: string;
twitter: string;
twitter1: string;
facebook1: string;
instagram1: string;
pinterest: string;
pinterest1: string;
mono1Opacity1: string;
mono1Opacity2: string;
mono1Opacity3: string;
mono1Opacity4: string;
mono1Opacity5: string;
mono1Opacity6: string;
mono1Opacity7: string;
mono1Opacity8: string;
mono1Opacity9: string;
mono2Opacity1: string;
mono2Opacity2: string;
mono2Opacity3: string;
mono2Opacity4: string;
mono2Opacity5: string;
mono2Opacity6: string;
mono2Opacity7: string;
mono2Opacity8: string;
mono2Opacity9: string;
defaultBorderColor: string;

@@ -582,8 +766,8 @@ yellow100: string;

bodyMedium: string;
hero: string;
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
h4: string;
h3: string;
h2: string;
h1: string;
hero: string;
mobileHero: string;

@@ -595,2 +779,7 @@ mobileH1: string;

mobileH5: string;
iconXSmall: string;
iconSmall: string;
iconMedium: string;
iconLarge: string;
iconXLarge: string;
};

@@ -629,3 +818,2 @@ fontWeights: {

shadows: {
focus: string;
shadowNone: string;

@@ -636,2 +824,3 @@ shadowXSmall: string;

shadowLarge: string;
focusPressed: string;
};

@@ -698,15 +887,17 @@ zIndices: {

brandSecondary: string;
success: string;
error: string;
warning: string;
info: string;
facebook: string;
instagram: string;
youtube: string;
linkedin: string;
pinterest: string;
twitter: string;
neutral: string;
white: string;
black: string;
brandMadeira1: string;
brandMadeira2: string;
brandMadeira3: string;
brandMadeira4: string;
brandMadeira5: string;
brandMadeira6: string;
brandMadeira7: string;
brandMadeira8: string;
brandMadeira9: string;
mono1: string;
mono2: string;
background1: string;
background2: string;
alwaysBlack: string;
alwaysWhite: string;
primary1: string;

@@ -716,2 +907,6 @@ primary2: string;

primary4: string;
primary1Hover: string;
primary2Hover: string;
primary3Hover: string;
primary4Hover: string;
secondary1: string;

@@ -722,2 +917,7 @@ secondary2: string;

secondary4: string;
secondary0Hover: string;
secondary1Hover: string;
secondary2Hover: string;
secondary3Hover: string;
secondary4Hover: string;
secondary1Opacity: string;

@@ -729,2 +929,6 @@ secondary2Opacity: string;

success4: string;
success1Hover: string;
success2Hover: string;
success3Hover: string;
success4Hover: string;
danger1: string;

@@ -734,2 +938,6 @@ danger2: string;

danger4: string;
danger1Hover: string;
danger2Hover: string;
danger3Hover: string;
danger4Hover: string;
warning1: string;

@@ -739,2 +947,6 @@ warning2: string;

warning4: string;
warning1Hover: string;
warning2Hover: string;
warning3Hover: string;
warning4Hover: string;
info1: string;

@@ -744,2 +956,6 @@ info2: string;

info4: string;
info1Hover: string;
info2Hover: string;
info3Hover: string;
info4Hover: string;
neutral1: string;

@@ -751,2 +967,33 @@ neutral2: string;

neutral6: string;
linkedin: string;
linkedin1: string;
whatsapp1: string;
whatsapp2: string;
whatsapp3: string;
youtube1: string;
youtube2: string;
twitter: string;
twitter1: string;
facebook1: string;
instagram1: string;
pinterest: string;
pinterest1: string;
mono1Opacity1: string;
mono1Opacity2: string;
mono1Opacity3: string;
mono1Opacity4: string;
mono1Opacity5: string;
mono1Opacity6: string;
mono1Opacity7: string;
mono1Opacity8: string;
mono1Opacity9: string;
mono2Opacity1: string;
mono2Opacity2: string;
mono2Opacity3: string;
mono2Opacity4: string;
mono2Opacity5: string;
mono2Opacity6: string;
mono2Opacity7: string;
mono2Opacity8: string;
mono2Opacity9: string;
defaultBorderColor: string;

@@ -811,8 +1058,8 @@ yellow100: string;

bodyMedium: string;
hero: string;
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
h4: string;
h3: string;
h2: string;
h1: string;
hero: string;
mobileHero: string;

@@ -824,2 +1071,7 @@ mobileH1: string;

mobileH5: string;
iconXSmall: string;
iconSmall: string;
iconMedium: string;
iconLarge: string;
iconXLarge: string;
};

@@ -858,3 +1110,2 @@ fontWeights: {

shadows: {
focus: string;
shadowNone: string;

@@ -865,2 +1116,3 @@ shadowXSmall: string;

shadowLarge: string;
focusPressed: string;
};

@@ -923,15 +1175,17 @@ zIndices: {

brandSecondary: string;
success: string;
error: string;
warning: string;
info: string;
facebook: string;
instagram: string;
youtube: string;
linkedin: string;
pinterest: string;
twitter: string;
neutral: string;
white: string;
black: string;
brandMadeira1: string;
brandMadeira2: string;
brandMadeira3: string;
brandMadeira4: string;
brandMadeira5: string;
brandMadeira6: string;
brandMadeira7: string;
brandMadeira8: string;
brandMadeira9: string;
mono1: string;
mono2: string;
background1: string;
background2: string;
alwaysBlack: string;
alwaysWhite: string;
primary1: string;

@@ -941,2 +1195,6 @@ primary2: string;

primary4: string;
primary1Hover: string;
primary2Hover: string;
primary3Hover: string;
primary4Hover: string;
secondary1: string;

@@ -947,2 +1205,7 @@ secondary2: string;

secondary4: string;
secondary0Hover: string;
secondary1Hover: string;
secondary2Hover: string;
secondary3Hover: string;
secondary4Hover: string;
secondary1Opacity: string;

@@ -954,2 +1217,6 @@ secondary2Opacity: string;

success4: string;
success1Hover: string;
success2Hover: string;
success3Hover: string;
success4Hover: string;
danger1: string;

@@ -959,2 +1226,6 @@ danger2: string;

danger4: string;
danger1Hover: string;
danger2Hover: string;
danger3Hover: string;
danger4Hover: string;
warning1: string;

@@ -964,2 +1235,6 @@ warning2: string;

warning4: string;
warning1Hover: string;
warning2Hover: string;
warning3Hover: string;
warning4Hover: string;
info1: string;

@@ -969,2 +1244,6 @@ info2: string;

info4: string;
info1Hover: string;
info2Hover: string;
info3Hover: string;
info4Hover: string;
neutral1: string;

@@ -976,2 +1255,33 @@ neutral2: string;

neutral6: string;
linkedin: string;
linkedin1: string;
whatsapp1: string;
whatsapp2: string;
whatsapp3: string;
youtube1: string;
youtube2: string;
twitter: string;
twitter1: string;
facebook1: string;
instagram1: string;
pinterest: string;
pinterest1: string;
mono1Opacity1: string;
mono1Opacity2: string;
mono1Opacity3: string;
mono1Opacity4: string;
mono1Opacity5: string;
mono1Opacity6: string;
mono1Opacity7: string;
mono1Opacity8: string;
mono1Opacity9: string;
mono2Opacity1: string;
mono2Opacity2: string;
mono2Opacity3: string;
mono2Opacity4: string;
mono2Opacity5: string;
mono2Opacity6: string;
mono2Opacity7: string;
mono2Opacity8: string;
mono2Opacity9: string;
defaultBorderColor: string;

@@ -1036,8 +1346,8 @@ yellow100: string;

bodyMedium: string;
hero: string;
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
h4: string;
h3: string;
h2: string;
h1: string;
hero: string;
mobileHero: string;

@@ -1049,2 +1359,7 @@ mobileH1: string;

mobileH5: string;
iconXSmall: string;
iconSmall: string;
iconMedium: string;
iconLarge: string;
iconXLarge: string;
};

@@ -1083,3 +1398,2 @@ fontWeights: {

shadows: {
focus: string;
shadowNone: string;

@@ -1090,2 +1404,3 @@ shadowXSmall: string;

shadowLarge: string;
focusPressed: string;
};

@@ -1148,15 +1463,17 @@ zIndices: {

brandSecondary: string;
success: string;
error: string;
warning: string;
info: string;
facebook: string;
instagram: string;
youtube: string;
linkedin: string;
pinterest: string;
twitter: string;
neutral: string;
white: string;
black: string;
brandMadeira1: string;
brandMadeira2: string;
brandMadeira3: string;
brandMadeira4: string;
brandMadeira5: string;
brandMadeira6: string;
brandMadeira7: string;
brandMadeira8: string;
brandMadeira9: string;
mono1: string;
mono2: string;
background1: string;
background2: string;
alwaysBlack: string;
alwaysWhite: string;
primary1: string;

@@ -1166,2 +1483,6 @@ primary2: string;

primary4: string;
primary1Hover: string;
primary2Hover: string;
primary3Hover: string;
primary4Hover: string;
secondary1: string;

@@ -1172,2 +1493,7 @@ secondary2: string;

secondary4: string;
secondary0Hover: string;
secondary1Hover: string;
secondary2Hover: string;
secondary3Hover: string;
secondary4Hover: string;
secondary1Opacity: string;

@@ -1179,2 +1505,6 @@ secondary2Opacity: string;

success4: string;
success1Hover: string;
success2Hover: string;
success3Hover: string;
success4Hover: string;
danger1: string;

@@ -1184,2 +1514,6 @@ danger2: string;

danger4: string;
danger1Hover: string;
danger2Hover: string;
danger3Hover: string;
danger4Hover: string;
warning1: string;

@@ -1189,2 +1523,6 @@ warning2: string;

warning4: string;
warning1Hover: string;
warning2Hover: string;
warning3Hover: string;
warning4Hover: string;
info1: string;

@@ -1194,2 +1532,6 @@ info2: string;

info4: string;
info1Hover: string;
info2Hover: string;
info3Hover: string;
info4Hover: string;
neutral1: string;

@@ -1201,2 +1543,33 @@ neutral2: string;

neutral6: string;
linkedin: string;
linkedin1: string;
whatsapp1: string;
whatsapp2: string;
whatsapp3: string;
youtube1: string;
youtube2: string;
twitter: string;
twitter1: string;
facebook1: string;
instagram1: string;
pinterest: string;
pinterest1: string;
mono1Opacity1: string;
mono1Opacity2: string;
mono1Opacity3: string;
mono1Opacity4: string;
mono1Opacity5: string;
mono1Opacity6: string;
mono1Opacity7: string;
mono1Opacity8: string;
mono1Opacity9: string;
mono2Opacity1: string;
mono2Opacity2: string;
mono2Opacity3: string;
mono2Opacity4: string;
mono2Opacity5: string;
mono2Opacity6: string;
mono2Opacity7: string;
mono2Opacity8: string;
mono2Opacity9: string;
defaultBorderColor: string;

@@ -1261,8 +1634,8 @@ yellow100: string;

bodyMedium: string;
hero: string;
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
h4: string;
h3: string;
h2: string;
h1: string;
hero: string;
mobileHero: string;

@@ -1274,2 +1647,7 @@ mobileH1: string;

mobileH5: string;
iconXSmall: string;
iconSmall: string;
iconMedium: string;
iconLarge: string;
iconXLarge: string;
};

@@ -1308,3 +1686,2 @@ fontWeights: {

shadows: {
focus: string;
shadowNone: string;

@@ -1315,2 +1692,3 @@ shadowXSmall: string;

shadowLarge: string;
focusPressed: string;
};

@@ -1317,0 +1695,0 @@ zIndices: {

2

dist/index.cjs.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-responsive"),r=require("@cavilha/theme"),a=require("@cavilha/icon"),n=require("@fortawesome/pro-regular-svg-icons");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(e),i=l(a),u=function(){return(u=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function c(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}var d=r.styled("div",{display:"flex",flexWrap:"wrap",alignItems:"center",padding:"$small3 0"}),f=r.styled("div",{display:"flex",fontSize:"$bodySmall","& p":{margin:0},"& a":{textDecoration:"none",borderRadius:"$small","&:hover":{textDecoration:"underline"},"&:focus":{outline:"none",boxShadow:"$focus"},"&:active":{outline:"none",boxShadow:"$focus"}},variants:{active:{true:{color:"$neutral5","& a":{color:"$neutral5"}},false:{"& a":{color:"$secondary4"}}},isMobile:{true:{"& p":{maxWidth:"20ch",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}}}),s=r.styled("div",{color:"$neutral4",padding:"0 $small2"}),m=r.styled("div",{padding:"1px 2px",borderRadius:"$small",textDecoration:"none",variants:{active:{false:{"&:hover":{background:"$secondaryHover0"}}}}}),v=r.styled("button",{background:"none",border:"none",borderRadius:"$small",cursor:"pointer","&:hover":{textDecoration:"underline"},"&:focus":{outline:"none",boxShadow:"$focus"},"&:active":{outline:"none",boxShadow:"$focus"}}),h=r.styled("div",{display:"flex"}),p=function(e){var t=e.marker,r=c(e,["marker"]);return o.default.createElement(v,u({},r),t)},b=function(e){var t=e.marker,r="string"==typeof t?t:o.default.createElement(i.default,{icon:t,iconSize:14});return o.default.createElement(s,null,r)},y=function(e){var t=e.children,r=e.path,a=e.hasMark,l=void 0!==a&&a,i=e.markPosition,u=void 0===i?"left":i,c=e.isActive,d=void 0!==c&&c,s=e.isMobile,m=void 0!==s&&s,v="left"===u&&o.default.createElement(b,{marker:n.faChevronRight}),h="right"===u&&o.default.createElement(b,{marker:n.faChevronRight});return o.default.createElement(f,{active:d,isMobile:m},l&&v,function(e,t,r){return void 0===r&&(r=!1),r?o.default.createElement("p",null,e):"string"==typeof e&&t?o.default.createElement("a",{href:t},e):e}(t,r,d),l&&h)},E=function(e){var t=e.isActive,r=e.homePath;return o.default.createElement(m,{active:t},o.default.createElement(y,{isActive:t},t?o.default.createElement(i.default,{icon:n.faHomeAlt,iconSize:14}):o.default.createElement("a",{href:r},o.default.createElement(i.default,{icon:n.faHomeAlt,iconSize:14}))))},g=function(e){var t=e.crumbs,r=c(e,["crumbs"]),a=t[t.length-1],n=a.name,l=a.childElement;return o.default.createElement(h,null,o.default.createElement(y,{hasMark:!0},o.default.createElement(p,u({marker:"..."},r))),l?o.default.createElement(y,{hasMark:!0,isActive:!0,isMobile:!0},l):o.default.createElement(y,{hasMark:!0,isActive:!0,isMobile:!0},n))},x=function(e){var t=e.crumbs;return t.map((function(e,r){var a=e.key,n=e.path,l=e.name,i=e.childElement,u=void 0===i?null:i,c=function(e,t){return e===t-1}(r,t.length);return u?o.default.createElement(y,{key:a,hasMark:!0,isActive:c},u):o.default.createElement(y,{key:a,hasMark:!0,path:n,isActive:c,isMobile:!1},l)}))},k=function(a){var n=a.crumbs,l=t.useMediaQuery({query:r.media.md}),i=e.useState(!1),u=i[0],c=i[1];if(e.useEffect((function(){c(!l&&n.length>1)}),[n,l]),u){return o.default.createElement(g,{crumbs:n,onClick:function(e){e.preventDefault(),c(!1)}})}return o.default.createElement(x,{crumbs:n})};exports.BreadcrumbItem=y,exports.default=function(e){var t=e.crumbs,r=void 0===t?[]:t,a=e.homePath,n=void 0===a?"/":a;return o.default.createElement(d,null,o.default.createElement(E,{isActive:!(null==r?void 0:r.length),homePath:n}),(null==r?void 0:r.length)?o.default.createElement(k,{crumbs:r}):null)};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-responsive"),r=require("@cavilha/theme"),a=require("@cavilha/icon"),n=require("@fortawesome/pro-regular-svg-icons");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(e),i=l(a),u=function(){return u=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},u.apply(this,arguments)};function c(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}var d=r.styled("div",{display:"flex",flexWrap:"wrap",alignItems:"center",padding:"$small3 0"}),s=r.styled("div",{display:"flex",fontSize:"$bodySmall","& p":{margin:0},"& a":{textDecoration:"none",borderRadius:"$small","&:hover":{textDecoration:"underline"},"&:focus":{outline:"none",boxShadow:"$focusPressed"},"&:active":{outline:"none",boxShadow:"$focusPressed"}},variants:{active:{true:{color:"$neutral5","& a":{color:"$neutral5"}},false:{"& a":{color:"$secondary4"}}},isMobile:{true:{"& p":{maxWidth:"20ch",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}}}),f=r.styled("div",{color:"$neutral4",padding:"0 $small2"}),m=r.styled("div",{padding:"1px 2px",borderRadius:"$small",textDecoration:"none",variants:{active:{false:{"&:hover":{background:"$secondaryHover0"}}}}}),v=r.styled("button",{background:"none",border:"none",borderRadius:"$small",cursor:"pointer","&:hover":{textDecoration:"underline"},"&:focus":{outline:"none",boxShadow:"$focusPressed"},"&:active":{outline:"none",boxShadow:"$focusPressed"}}),h=r.styled("div",{display:"flex"}),p=function(e){var t=e.marker,r=c(e,["marker"]);return o.default.createElement(v,u({},r),t)},b=function(e){var t=e.marker,r="string"==typeof t?t:o.default.createElement(i.default,{icon:t,iconSize:14});return o.default.createElement(f,null,r)},y=function(e){var t=e.children,r=e.path,a=e.hasMark,l=void 0!==a&&a,i=e.markPosition,u=void 0===i?"left":i,c=e.isActive,d=void 0!==c&&c,f=e.isMobile,m=void 0!==f&&f,v="left"===u&&o.default.createElement(b,{marker:n.faChevronRight}),h="right"===u&&o.default.createElement(b,{marker:n.faChevronRight});return o.default.createElement(s,{active:d,isMobile:m},l&&v,function(e,t,r){return void 0===r&&(r=!1),r?o.default.createElement("p",null,e):"string"==typeof e&&t?o.default.createElement("a",{href:t},e):e}(t,r,d),l&&h)},E=function(e){var t=e.isActive,r=e.homePath;return o.default.createElement(m,{active:t},o.default.createElement(y,{isActive:t},t?o.default.createElement(i.default,{icon:n.faHomeAlt,iconSize:14}):o.default.createElement("a",{href:r},o.default.createElement(i.default,{icon:n.faHomeAlt,iconSize:14}))))},g=function(e){var t=e.crumbs,r=c(e,["crumbs"]),a=t[t.length-1],n=a.name,l=a.childElement;return o.default.createElement(h,null,o.default.createElement(y,{hasMark:!0},o.default.createElement(p,u({marker:"..."},r))),l?o.default.createElement(y,{hasMark:!0,isActive:!0,isMobile:!0},l):o.default.createElement(y,{hasMark:!0,isActive:!0,isMobile:!0},n))},x=function(e){var t=e.crumbs;return t.map((function(e,r){var a=e.key,n=e.path,l=e.name,i=e.childElement,u=void 0===i?null:i,c=function(e,t){return e===t-1}(r,t.length);return u?o.default.createElement(y,{key:a,hasMark:!0,isActive:c},u):o.default.createElement(y,{key:a,hasMark:!0,path:n,isActive:c,isMobile:!1},l)}))},k=function(a){var n=a.crumbs,l=t.useMediaQuery({query:r.media.md}),i=e.useState(!1),u=i[0],c=i[1];if(e.useEffect((function(){c(!l&&n.length>1)}),[n,l]),u){return o.default.createElement(g,{crumbs:n,onClick:function(e){e.preventDefault(),c(!1)}})}return o.default.createElement(x,{crumbs:n})};exports.BreadcrumbItem=y,exports.default=function(e){var t=e.crumbs,r=void 0===t?[]:t,a=e.homePath,n=void 0===a?"/":a;return o.default.createElement(d,null,o.default.createElement(E,{isActive:!(null==r?void 0:r.length),homePath:n}),(null==r?void 0:r.length)?o.default.createElement(k,{crumbs:r}):null)};

@@ -1,1 +0,1 @@

import e,{useState as t,useEffect as r}from"react";import{useMediaQuery as n}from"react-responsive";import{styled as o,media as a}from"@cavilha/theme";import i from"@cavilha/icon";import{faChevronRight as l,faHomeAlt as c}from"@fortawesome/pro-regular-svg-icons";var u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function m(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}var s=o("div",{display:"flex",flexWrap:"wrap",alignItems:"center",padding:"$small3 0"}),v=o("div",{display:"flex",fontSize:"$bodySmall","& p":{margin:0},"& a":{textDecoration:"none",borderRadius:"$small","&:hover":{textDecoration:"underline"},"&:focus":{outline:"none",boxShadow:"$focus"},"&:active":{outline:"none",boxShadow:"$focus"}},variants:{active:{true:{color:"$neutral5","& a":{color:"$neutral5"}},false:{"& a":{color:"$secondary4"}}},isMobile:{true:{"& p":{maxWidth:"20ch",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}}}),f=o("div",{color:"$neutral4",padding:"0 $small2"}),d=o("div",{padding:"1px 2px",borderRadius:"$small",textDecoration:"none",variants:{active:{false:{"&:hover":{background:"$secondaryHover0"}}}}}),p=o("button",{background:"none",border:"none",borderRadius:"$small",cursor:"pointer","&:hover":{textDecoration:"underline"},"&:focus":{outline:"none",boxShadow:"$focus"},"&:active":{outline:"none",boxShadow:"$focus"}}),h=o("div",{display:"flex"}),b=function(t){var r=t.marker,n=m(t,["marker"]);return e.createElement(p,u({},n),r)},E=function(t){var r=t.marker,n="string"==typeof r?r:e.createElement(i,{icon:r,iconSize:14});return e.createElement(f,null,n)},y=function(t){var r=t.children,n=t.path,o=t.hasMark,a=void 0!==o&&o,i=t.markPosition,c=void 0===i?"left":i,u=t.isActive,m=void 0!==u&&u,s=t.isMobile,f=void 0!==s&&s,d="left"===c&&e.createElement(E,{marker:l}),p="right"===c&&e.createElement(E,{marker:l});return e.createElement(v,{active:m,isMobile:f},a&&d,function(t,r,n){return void 0===n&&(n=!1),n?e.createElement("p",null,t):"string"==typeof t&&r?e.createElement("a",{href:r},t):t}(r,n,m),a&&p)},g=function(t){var r=t.isActive,n=t.homePath;return e.createElement(d,{active:r},e.createElement(y,{isActive:r},r?e.createElement(i,{icon:c,iconSize:14}):e.createElement("a",{href:n},e.createElement(i,{icon:c,iconSize:14}))))},k=function(t){var r=t.crumbs,n=m(t,["crumbs"]),o=r[r.length-1],a=o.name,i=o.childElement;return e.createElement(h,null,e.createElement(y,{hasMark:!0},e.createElement(b,u({marker:"..."},n))),i?e.createElement(y,{hasMark:!0,isActive:!0,isMobile:!0},i):e.createElement(y,{hasMark:!0,isActive:!0,isMobile:!0},a))},x=function(t){var r=t.crumbs;return r.map((function(t,n){var o=t.key,a=t.path,i=t.name,l=t.childElement,c=void 0===l?null:l,u=function(e,t){return e===t-1}(n,r.length);return c?e.createElement(y,{key:o,hasMark:!0,isActive:u},c):e.createElement(y,{key:o,hasMark:!0,path:a,isActive:u,isMobile:!1},i)}))},$=function(o){var i=o.crumbs,l=n({query:a.md}),c=t(!1),u=c[0],m=c[1];if(r((function(){m(!l&&i.length>1)}),[i,l]),u){return e.createElement(k,{crumbs:i,onClick:function(e){e.preventDefault(),m(!1)}})}return e.createElement(x,{crumbs:i})},w=function(t){var r=t.crumbs,n=void 0===r?[]:r,o=t.homePath,a=void 0===o?"/":o;return e.createElement(s,null,e.createElement(g,{isActive:!(null==n?void 0:n.length),homePath:a}),(null==n?void 0:n.length)?e.createElement($,{crumbs:n}):null)};export{y as BreadcrumbItem,w as default};
import e,{useState as r,useEffect as t}from"react";import{useMediaQuery as n}from"react-responsive";import{styled as o,media as a}from"@cavilha/theme";import i from"@cavilha/icon";import{faChevronRight as l,faHomeAlt as c}from"@fortawesome/pro-regular-svg-icons";var s=function(){return s=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},s.apply(this,arguments)};function u(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t}var m=o("div",{display:"flex",flexWrap:"wrap",alignItems:"center",padding:"$small3 0"}),v=o("div",{display:"flex",fontSize:"$bodySmall","& p":{margin:0},"& a":{textDecoration:"none",borderRadius:"$small","&:hover":{textDecoration:"underline"},"&:focus":{outline:"none",boxShadow:"$focusPressed"},"&:active":{outline:"none",boxShadow:"$focusPressed"}},variants:{active:{true:{color:"$neutral5","& a":{color:"$neutral5"}},false:{"& a":{color:"$secondary4"}}},isMobile:{true:{"& p":{maxWidth:"20ch",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}}}),d=o("div",{color:"$neutral4",padding:"0 $small2"}),f=o("div",{padding:"1px 2px",borderRadius:"$small",textDecoration:"none",variants:{active:{false:{"&:hover":{background:"$secondaryHover0"}}}}}),p=o("button",{background:"none",border:"none",borderRadius:"$small",cursor:"pointer","&:hover":{textDecoration:"underline"},"&:focus":{outline:"none",boxShadow:"$focusPressed"},"&:active":{outline:"none",boxShadow:"$focusPressed"}}),h=o("div",{display:"flex"}),b=function(r){var t=r.marker,n=u(r,["marker"]);return e.createElement(p,s({},n),t)},E=function(r){var t=r.marker,n="string"==typeof t?t:e.createElement(i,{icon:t,iconSize:14});return e.createElement(d,null,n)},y=function(r){var t=r.children,n=r.path,o=r.hasMark,a=void 0!==o&&o,i=r.markPosition,c=void 0===i?"left":i,s=r.isActive,u=void 0!==s&&s,m=r.isMobile,d=void 0!==m&&m,f="left"===c&&e.createElement(E,{marker:l}),p="right"===c&&e.createElement(E,{marker:l});return e.createElement(v,{active:u,isMobile:d},a&&f,function(r,t,n){return void 0===n&&(n=!1),n?e.createElement("p",null,r):"string"==typeof r&&t?e.createElement("a",{href:t},r):r}(t,n,u),a&&p)},g=function(r){var t=r.isActive,n=r.homePath;return e.createElement(f,{active:t},e.createElement(y,{isActive:t},t?e.createElement(i,{icon:c,iconSize:14}):e.createElement("a",{href:n},e.createElement(i,{icon:c,iconSize:14}))))},k=function(r){var t=r.crumbs,n=u(r,["crumbs"]),o=t[t.length-1],a=o.name,i=o.childElement;return e.createElement(h,null,e.createElement(y,{hasMark:!0},e.createElement(b,s({marker:"..."},n))),i?e.createElement(y,{hasMark:!0,isActive:!0,isMobile:!0},i):e.createElement(y,{hasMark:!0,isActive:!0,isMobile:!0},a))},x=function(r){var t=r.crumbs;return t.map((function(r,n){var o=r.key,a=r.path,i=r.name,l=r.childElement,c=void 0===l?null:l,s=function(e,r){return e===r-1}(n,t.length);return c?e.createElement(y,{key:o,hasMark:!0,isActive:s},c):e.createElement(y,{key:o,hasMark:!0,path:a,isActive:s,isMobile:!1},i)}))},$=function(o){var i=o.crumbs,l=n({query:a.md}),c=r(!1),s=c[0],u=c[1];if(t((function(){u(!l&&i.length>1)}),[i,l]),s){return e.createElement(k,{crumbs:i,onClick:function(e){e.preventDefault(),u(!1)}})}return e.createElement(x,{crumbs:i})},w=function(r){var t=r.crumbs,n=void 0===t?[]:t,o=r.homePath,a=void 0===o?"/":o;return e.createElement(m,null,e.createElement(g,{isActive:!(null==n?void 0:n.length),homePath:a}),(null==n?void 0:n.length)?e.createElement($,{crumbs:n}):null)};export{y as BreadcrumbItem,w as default};
{
"name": "@cavilha/breadcrumb",
"version": "0.0.0-alpha.3",
"version": "0.0.0",
"author": "MadeiraMadeira webstore squads",

@@ -71,6 +71,6 @@ "license": "ISC",

"dependencies": {
"@cavilha/icon": "0.0.0-alpha.2",
"@cavilha/theme": "0.0.0-alpha.4",
"@cavilha/icon": "0.0.0",
"@cavilha/theme": "0.0.0",
"react-responsive": "^9.0.0-beta.3"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc