@kvdbil/components 15.0.3 → 15.0.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.
@@ -1,20 +1,21 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("styled-components"),r=require("../../typography/BodyText/index.js");require("../../shared/media-queries.js");var i,o=(i=t)&&i.__esModule?i:{default:i};const l=o.default.li`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("styled-components"),n=require("../../typography/BodyText/index.js");require("../../shared/media-queries.js");var r,o=(r=t)&&r.__esModule?r:{default:r};const i=o.default.li`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  margin: 0;
5
5
  text-indent: 0;
6
6
  list-style-type: none;
7
- overflow: hidden;
7
+ ${({$onlyLastTruncated:e})=>!e&&"\n overflow: hidden;\n "}
8
8
 
9
9
  a {
10
- ${r.BodyTextStyle}
10
+ ${n.BodyTextStyle}
11
11
  font-weight: ${({theme:e})=>e.typography.fontBaseBoldWeight};
12
12
  color: ${({theme:e})=>e.colors.info.main};
13
13
  text-decoration: none;
14
- overflow: hidden;
15
- text-overflow: ellipsis;
14
+ ${({$onlyLastTruncated:e})=>!e&&"\n overflow: hidden;\n text-overflow: ellipsis;\n "}
16
15
  }
17
- `,n=o.default(r.BodyText)`
16
+
17
+ ${({$onlyLastTruncated:e})=>e&&"\n &:last-child {\n overflow: hidden;\n }\n "}
18
+ `,l=o.default(n.BodyText)`
18
19
  color: ${({theme:e})=>e.colors.text.dark};
19
20
  overflow: hidden;
20
21
  text-overflow: ellipsis;
@@ -33,4 +34,4 @@
33
34
  width: 1rem;
34
35
  height: 1rem;
35
36
  }
36
- `;exports.default=({link:t,separator:r,isLast:i})=>e.jsx(e.Fragment,{children:e.jsxs(l,{children:[t.prefixIcon&&e.jsx(s,{children:t.prefixIcon}),i?e.jsx(n,{as:"span",children:t.component}):e.jsxs(e.Fragment,{children:[t.component,e.jsx(d,{children:r})]})]})});
37
+ `;exports.default=({link:t,separator:n,isLast:r,onlyLastTruncated:o})=>e.jsx(e.Fragment,{children:e.jsxs(i,{$onlyLastTruncated:o,children:[t.prefixIcon&&e.jsx(s,{children:t.prefixIcon}),r?e.jsx(l,{as:"span",children:t.component}):e.jsxs(e.Fragment,{children:[t.component,e.jsx(d,{children:n})]})]})});
@@ -4,4 +4,4 @@
4
4
  padding: 0;
5
5
  white-space: nowrap;
6
6
  overflow: hidden;
7
- `;exports.default=({links:e,separator:s=r.jsx(a.default,{})})=>r.jsx(i,{children:e.map(((a,i)=>r.jsx(t.default,{link:a,separator:s,isLast:i===e.length-1},i)))});
7
+ `;exports.default=({links:e,separator:s=r.jsx(a.default,{}),onlyLastTruncated:n=!1})=>r.jsx(i,{children:e.map(((a,i)=>r.jsx(t.default,{link:a,separator:s,isLast:i===e.length-1,onlyLastTruncated:n},i)))});
@@ -1,31 +1,41 @@
1
- import{jsx as o,Fragment as t,jsxs as r}from"react/jsx-runtime";import i from"styled-components";import{BodyTextStyle as d,BodyText as s}from"../../typography/BodyText/index.js";import"../../shared/media-queries.js";const a=i.li`
1
+ import{jsx as t,Fragment as n,jsxs as i}from"react/jsx-runtime";import o from"styled-components";import{BodyTextStyle as a,BodyText as s}from"../../typography/BodyText/index.js";import"../../shared/media-queries.js";const h=o.li`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  margin: 0;
5
5
  text-indent: 0;
6
6
  list-style-type: none;
7
- overflow: hidden;
7
+ ${({$onlyLastTruncated:e})=>!e&&`
8
+ overflow: hidden;
9
+ `}
8
10
 
9
11
  a {
10
- ${d}
12
+ ${a}
11
13
  font-weight: ${({theme:e})=>e.typography.fontBaseBoldWeight};
12
14
  color: ${({theme:e})=>e.colors.info.main};
13
15
  text-decoration: none;
14
- overflow: hidden;
15
- text-overflow: ellipsis;
16
+ ${({$onlyLastTruncated:e})=>!e&&`
17
+ overflow: hidden;
18
+ text-overflow: ellipsis;
19
+ `}
16
20
  }
17
- `,h=i(s)`
21
+
22
+ ${({$onlyLastTruncated:e})=>e&&`
23
+ &:last-child {
24
+ overflow: hidden;
25
+ }
26
+ `}
27
+ `,c=o(s)`
18
28
  color: ${({theme:e})=>e.colors.text.dark};
19
29
  overflow: hidden;
20
30
  text-overflow: ellipsis;
21
- `,m=i.span`
31
+ `,m=o.span`
22
32
  display: inline-flex;
23
33
  padding-right: 0.5rem;
24
34
  svg {
25
35
  width: 1rem;
26
36
  height: 1rem;
27
37
  }
28
- `,p=i.span`
38
+ `,p=o.span`
29
39
  display: inline-flex;
30
40
  padding: 0 0.5rem;
31
41
  color: ${({theme:e})=>e.colors.gray.light1};
@@ -33,4 +43,4 @@ import{jsx as o,Fragment as t,jsxs as r}from"react/jsx-runtime";import i from"st
33
43
  width: 1rem;
34
44
  height: 1rem;
35
45
  }
36
- `,c=({link:e,separator:n,isLast:l})=>o(t,{children:r(a,{children:[e.prefixIcon&&o(m,{children:e.prefixIcon}),l?o(h,{as:"span",children:e.component}):r(t,{children:[e.component,o(p,{children:n})]})]})});export{c as default};
46
+ `,f=({link:e,separator:r,isLast:l,onlyLastTruncated:d})=>t(n,{children:i(h,{$onlyLastTruncated:d,children:[e.prefixIcon&&t(m,{children:e.prefixIcon}),l?t(c,{as:"span",children:e.component}):i(n,{children:[e.component,t(p,{children:r})]})]})});export{f as default};
@@ -1,7 +1,7 @@
1
- import{jsx as r}from"react/jsx-runtime";import p from"styled-components";import a from"./BreadcrumbsItem.js";import m from"../../icons/components/NextIcon.js";import"../../typography/BodyText/index.js";import"../../shared/media-queries.js";const n=p.ul`
1
+ import{jsx as r}from"react/jsx-runtime";import n from"styled-components";import p from"./BreadcrumbsItem.js";import m from"../../icons/components/NextIcon.js";import"../../typography/BodyText/index.js";import"../../shared/media-queries.js";const s=n.ul`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  padding: 0;
5
5
  white-space: nowrap;
6
6
  overflow: hidden;
7
- `,s=({links:o,separator:t=r(m,{})})=>r(n,{children:o.map((e,i)=>r(a,{link:e,separator:t,isLast:i===o.length-1},i))});export{s as default};
7
+ `,l=({links:t,separator:a=r(m,{}),onlyLastTruncated:e=!1})=>r(s,{children:t.map((i,o)=>r(p,{link:i,separator:a,isLast:o===t.length-1,onlyLastTruncated:e},o))});export{l as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kvdbil/components",
3
- "version": "15.0.3",
3
+ "version": "15.0.4",
4
4
  "sideEffects": false,
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
package/package.json.tmp CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kvdbil/components",
3
- "version": "15.0.3",
3
+ "version": "15.0.4",
4
4
  "sideEffects": false,
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -4,6 +4,7 @@ interface Props {
4
4
  link: BreadcrumbLink;
5
5
  separator?: ReactNode;
6
6
  isLast: boolean;
7
+ onlyLastTruncated: boolean;
7
8
  }
8
- declare const BreadcrumbsItem: ({ link, separator, isLast }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const BreadcrumbsItem: ({ link, separator, isLast, onlyLastTruncated, }: Props) => import("react/jsx-runtime").JSX.Element;
9
10
  export default BreadcrumbsItem;
@@ -6,6 +6,7 @@ export interface BreadcrumbLink {
6
6
  export interface Props {
7
7
  links: BreadcrumbLink[];
8
8
  separator?: ReactNode;
9
+ onlyLastTruncated?: boolean;
9
10
  }
10
- declare const Breadcrumbs: ({ links, separator }: Props) => import("react/jsx-runtime").JSX.Element;
11
+ declare const Breadcrumbs: ({ links, separator, onlyLastTruncated, }: Props) => import("react/jsx-runtime").JSX.Element;
11
12
  export default Breadcrumbs;