@elliemae/ds-breadcrumb 2.2.1 → 2.3.0-alpha.4

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/esm/styles.js CHANGED
@@ -1,57 +1,78 @@
1
- import styled from 'styled-components';
2
-
1
+ import * as React from "react";
2
+ import styled from "styled-components";
3
3
  const handleColor = (theme, isActive, color, isTitle) => {
4
- if (isActive) return theme.colors.neutral[800];else if (color) return color;else if (isTitle) return theme.colors.neutral[700];else return theme.colors.brand[600];
4
+ if (isActive)
5
+ return theme.colors.neutral[800];
6
+ else if (color)
7
+ return color;
8
+ else if (isTitle)
9
+ return theme.colors.neutral[700];
10
+ else
11
+ return theme.colors.brand[600];
5
12
  };
6
-
7
- const StyledList = /*#__PURE__*/styled.ol.withConfig({
8
- componentId: "sc-12gvmg4-0"
9
- })(["width:100%;list-style:none;display:flex;padding:0;margin:0;li:first-child *{margin-left:0;}"]);
10
- const StyledCrumbWrapper = /*#__PURE__*/styled.li.withConfig({
11
- componentId: "sc-12gvmg4-1"
12
- })(["display:inline-flex;align-items:center;flex-shrink:20;transition:flex-shrink 0.1s cubic-bezier(0.64,0,0.35,1);height:16px;min-width:10px;&:hover{flex-shrink:0;}", ""], _ref => {
13
- let {
14
- theme,
15
- isTitle,
16
- trailingSlash
17
- } = _ref;
18
- return isTitle || !trailingSlash ? "&:not(:last-child):after {\n display: inline-block;\n content: '/';\n color: ".concat(theme.colors.neutral[700], ";\n }\n ") : "&:after {\n display: inline-block;\n content: '/';\n color: ".concat(theme.colors.neutral[700], ";\n }\n ");
19
- });
20
- const StyledContainer = /*#__PURE__*/styled.nav.withConfig({
21
- componentId: "sc-12gvmg4-2"
22
- })(["display:flex;align-items:center;padding:0;"]);
23
- const StyledLink = /*#__PURE__*/styled.a.withConfig({
24
- componentId: "sc-12gvmg4-3"
25
- })(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-decoration:none;font-size:12px;outline:none;margin:0 2px;border:2px solid transparent;-webkit-text-stroke:0.4px transparent;font-weight:", ";color:", ";&:hover{color:", ";cursor:pointer;", ";}&:focus{", " border-radius:2px;}"], _ref2 => {
26
- let {
27
- theme
28
- } = _ref2;
29
- return theme.fontWeights.regular;
30
- }, _ref3 => {
31
- let {
32
- theme,
33
- isActive,
34
- color,
35
- isTitle
36
- } = _ref3;
37
- return handleColor(theme, isActive, color, isTitle);
38
- }, _ref4 => {
39
- let {
40
- theme,
41
- color
42
- } = _ref4;
43
- return color ? color : theme.colors.brand[800];
44
- }, _ref5 => {
45
- let {
46
- theme,
47
- color
48
- } = _ref5;
49
- return "-webkit-text-stroke: 0.4px ".concat(color ? color : theme.colors.brand[800]);
50
- }, _ref6 => {
51
- let {
52
- theme
53
- } = _ref6;
54
- return "border: 2px solid ".concat(theme.colors.brand[700], ";");
55
- });
56
-
57
- export { StyledContainer, StyledCrumbWrapper, StyledLink, StyledList };
13
+ const StyledList = styled.ol`
14
+ width: 100%;
15
+ list-style: none;
16
+ display: flex;
17
+ padding: 0;
18
+ margin: 0;
19
+ li:first-child * {
20
+ margin-left: 0;
21
+ }
22
+ `;
23
+ const StyledCrumbWrapper = styled.li`
24
+ display: inline-flex;
25
+ align-items: center;
26
+ flex-shrink: 20;
27
+ transition: flex-shrink 0.1s cubic-bezier(0.64, 0, 0.35, 1);
28
+ height: 16px;
29
+ min-width: 10px;
30
+ &:hover {
31
+ flex-shrink: 0;
32
+ }
33
+ ${({ theme, isTitle, trailingSlash }) => isTitle || !trailingSlash ? `&:not(:last-child):after {
34
+ display: inline-block;
35
+ content: '/';
36
+ color: ${theme.colors.neutral[700]};
37
+ }
38
+ ` : `&:after {
39
+ display: inline-block;
40
+ content: '/';
41
+ color: ${theme.colors.neutral[700]};
42
+ }
43
+ `}
44
+ `;
45
+ const StyledContainer = styled.nav`
46
+ display: flex;
47
+ align-items: center;
48
+ padding: 0;
49
+ `;
50
+ const StyledLink = styled.a`
51
+ white-space: nowrap;
52
+ overflow: hidden;
53
+ text-overflow: ellipsis;
54
+ text-decoration: none;
55
+ font-size: 12px;
56
+ outline: none;
57
+ margin: 0 2px;
58
+ border: 2px solid transparent;
59
+ -webkit-text-stroke: 0.4px transparent;
60
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
61
+ color: ${({ theme, isActive, color, isTitle }) => handleColor(theme, isActive, color, isTitle)};
62
+ &:hover {
63
+ color: ${({ theme, color }) => color ? color : theme.colors.brand[800]};
64
+ cursor: pointer;
65
+ ${({ theme, color }) => `-webkit-text-stroke: 0.4px ${color ? color : theme.colors.brand[800]}`};
66
+ }
67
+ &:focus {
68
+ ${({ theme }) => `border: 2px solid ${theme.colors.brand[700]};`}
69
+ border-radius: 2px;
70
+ }
71
+ `;
72
+ export {
73
+ StyledContainer,
74
+ StyledCrumbWrapper,
75
+ StyledLink,
76
+ StyledList
77
+ };
78
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { Theme } from '@elliemae/pui-theme';\nimport styled from 'styled-components';\nimport type { DSBreadcrumbItemPropsT } from './index.d';\n\nconst handleColor = (theme: Theme, isActive: boolean, color: string, isTitle: boolean): string => {\n if (isActive) return theme.colors.neutral[800];\n else if (color) return color;\n else if (isTitle) return theme.colors.neutral[700];\n else return theme.colors.brand[600];\n};\n\nconst StyledList = styled.ol`\n width: 100%;\n list-style: none;\n display: flex;\n padding: 0;\n margin: 0;\n li:first-child * {\n margin-left: 0;\n }\n`;\n\nconst StyledCrumbWrapper = styled.li<Partial<DSBreadcrumbItemPropsT>>`\n display: inline-flex;\n align-items: center;\n flex-shrink: 20;\n transition: flex-shrink 0.1s cubic-bezier(0.64, 0, 0.35, 1);\n height: 16px;\n min-width: 10px;\n &:hover {\n flex-shrink: 0;\n }\n ${({ theme, isTitle, trailingSlash }) =>\n isTitle || !trailingSlash\n ? `&:not(:last-child):after {\n display: inline-block;\n content: '/';\n color: ${theme.colors.neutral[700]};\n }\n `\n : `&:after {\n display: inline-block;\n content: '/';\n color: ${theme.colors.neutral[700]};\n }\n `}\n`;\n\nconst StyledContainer = styled.nav`\n display: flex;\n align-items: center;\n padding: 0;\n`;\n\nconst StyledLink = styled.a<Partial<DSBreadcrumbItemPropsT>>`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-decoration: none;\n font-size: 12px;\n outline: none;\n margin: 0 2px;\n border: 2px solid transparent;\n -webkit-text-stroke: 0.4px transparent;\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: ${({ theme, isActive, color, isTitle }) => handleColor(theme, isActive, color, isTitle)};\n &:hover {\n color: ${({ theme, color }) => (color ? color : theme.colors.brand[800])};\n cursor: pointer;\n ${({ theme, color }) => `-webkit-text-stroke: 0.4px ${color ? color : theme.colors.brand[800]}`};\n }\n &:focus {\n ${({ theme }) => `border: 2px solid ${theme.colors.brand[700]};`}\n border-radius: 2px;\n }\n`;\n\nexport { StyledList, StyledCrumbWrapper, StyledContainer, StyledLink };\n"],
5
+ "mappings": "AAAA;ACCA;AAGA,MAAM,cAAc,CAAC,OAAc,UAAmB,OAAe,YAA6B;AAChG,MAAI;AAAU,WAAO,MAAM,OAAO,QAAQ;AAAA,WACjC;AAAO,WAAO;AAAA,WACd;AAAS,WAAO,MAAM,OAAO,QAAQ;AAAA;AACzC,WAAO,MAAM,OAAO,MAAM;AAAA;AAGjC,MAAM,aAAa,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW1B,MAAM,qBAAqB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAU9B,CAAC,EAAE,OAAO,SAAS,oBACnB,WAAW,CAAC,gBACR;AAAA;AAAA;AAAA,aAGK,MAAM,OAAO,QAAQ;AAAA;AAAA,MAG1B;AAAA;AAAA;AAAA,aAGK,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAKlC,MAAM,kBAAkB,OAAO;AAAA;AAAA;AAAA;AAAA;AAM/B,MAAM,aAAa,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAUT,CAAC,EAAE,YAAY,MAAM,YAAY;AAAA,WACvC,CAAC,EAAE,OAAO,UAAU,OAAO,cAAc,YAAY,OAAO,UAAU,OAAO;AAAA;AAAA,aAE3E,CAAC,EAAE,OAAO,YAAa,QAAQ,QAAQ,MAAM,OAAO,MAAM;AAAA;AAAA,MAEjE,CAAC,EAAE,OAAO,YAAY,8BAA8B,QAAQ,QAAQ,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,MAGvF,CAAC,EAAE,YAAY,qBAAqB,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-breadcrumb",
3
- "version": "2.2.1",
3
+ "version": "2.3.0-alpha.4",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Breadcrumb",
6
6
  "module": "./esm/index.js",
@@ -48,7 +48,7 @@
48
48
  "build": "node ../../scripts/build/build.js"
49
49
  },
50
50
  "dependencies": {
51
- "@elliemae/ds-system": "2.2.1",
51
+ "@elliemae/ds-system": "2.3.0-alpha.4",
52
52
  "react-desc": "~4.1.3"
53
53
  },
54
54
  "devDependencies": {