@pushwoosh/smart-components-kit 1.1.8 → 1.1.9

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.
@@ -0,0 +1,6 @@
1
+ import { type ComponentProps } from 'react';
2
+ declare const StyledItemDetailLink: import("styled-components").StyledComponent<"a", any, {}, never>;
3
+ export declare function ItemDetailLink({ withChevron, children, ...props }: ComponentProps<typeof StyledItemDetailLink> & {
4
+ withChevron?: boolean;
5
+ }): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import styled from 'styled-components';
3
+ import { Color, FontWeight } from '@pushwoosh/kit-constants';
4
+ import { ChevronIcon } from '@pushwoosh/kit-icons';
5
+ const StyledItemDetailLink = styled.a.withConfig({
6
+ displayName: "StyledItemDetailLink",
7
+ componentId: "sc-v0vtp2-0"
8
+ })(["display:flex;align-items:center;text-decoration:none;font-weight:", ";color:", ";width:100%;min-width:0;&:hover{text-decoration:none;color:", ";}"], FontWeight.MEDIUM, Color.MAIN, Color.PRIMARY_HOVER);
9
+ const Truncate = styled.span.withConfig({
10
+ displayName: "Truncate",
11
+ componentId: "sc-v0vtp2-1"
12
+ })(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;"]);
13
+ const Chevron = styled(ChevronIcon).withConfig({
14
+ displayName: "Chevron",
15
+ componentId: "sc-v0vtp2-2"
16
+ })(["flex-shrink:0;"]);
17
+ export function ItemDetailLink({
18
+ withChevron,
19
+ children,
20
+ ...props
21
+ }) {
22
+ if (!withChevron) return _jsx(StyledItemDetailLink, {
23
+ ...props,
24
+ children: children
25
+ });
26
+ return _jsxs(StyledItemDetailLink, {
27
+ ...props,
28
+ children: [_jsx(Truncate, {
29
+ children: children
30
+ }), _jsx(Chevron, {
31
+ size: "small",
32
+ direction: "right"
33
+ })]
34
+ });
35
+ }
@@ -0,0 +1 @@
1
+ export { ItemDetailLink } from './ItemDetailLink';
@@ -0,0 +1 @@
1
+ export { ItemDetailLink } from './ItemDetailLink';
package/Table/index.d.ts CHANGED
@@ -6,5 +6,6 @@ export { DataTableSortableCell } from './components/DataTableSortableCell';
6
6
  export { Loading } from './components/Loading';
7
7
  export { TablePagination } from './components/TablePagination';
8
8
  export { useDataTableContext, useDataTableGetParams } from './hooks';
9
- export { Table, Td, Tr, Th, ElementHover, ItemDetailLink, ItemName, LockedText, Description, } from './styles';
9
+ export { Table, Td, Tr, Th, ElementHover, ItemName, LockedText, Description, } from './styles';
10
+ export { ItemDetailLink } from './components/ItemDetailLink';
10
11
  export type { DataTableParams, DataTableData, DataTableContextType } from './types';
package/Table/index.js CHANGED
@@ -6,4 +6,5 @@ export { DataTableSortableCell } from './components/DataTableSortableCell';
6
6
  export { Loading } from './components/Loading';
7
7
  export { TablePagination } from './components/TablePagination';
8
8
  export { useDataTableContext, useDataTableGetParams } from './hooks';
9
- export { Table, Td, Tr, Th, ElementHover, ItemDetailLink, ItemName, LockedText, Description } from './styles';
9
+ export { Table, Td, Tr, Th, ElementHover, ItemName, LockedText, Description } from './styles';
10
+ export { ItemDetailLink } from './components/ItemDetailLink';
package/Table/styles.d.ts CHANGED
@@ -60,7 +60,6 @@ export declare const Th: import("styled-components").StyledComponent<"div", any,
60
60
  } & {
61
61
  $color?: string;
62
62
  }, "$padding">;
63
- export declare const ItemDetailLink: import("styled-components").StyledComponent<"a", any, {}, never>;
64
63
  export declare const ItemName: import("styled-components").StyledComponent<"div", any, {}, never>;
65
64
  export declare const Description: import("styled-components").StyledComponent<"div", any, {
66
65
  $maxLines?: number;
package/Table/styles.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import styled, { css } from 'styled-components';
2
- import { Color, FontSize, FontWeight, ShapeRadius } from '@pushwoosh/kit-constants';
2
+ import { Color, FontSize, FontWeight, LineHeight, ShapeRadius } from '@pushwoosh/kit-constants';
3
3
  import { GridContainer, Horizontal, Vertical, toCssValue } from '@pushwoosh/kit-helpers';
4
4
  export const Table = styled(Vertical).withConfig({
5
5
  displayName: "Table",
@@ -30,31 +30,27 @@ export const Tr = styled(Horizontal).attrs({
30
30
  }).withConfig({
31
31
  displayName: "Tr",
32
32
  componentId: "sc-1vdjaze-3"
33
- })(["grid-template-columns:var(--table-columns);&:hover{background-color:#89A4BF0D;}&:hover ", "{display:block;}"], ElementHover);
33
+ })(["grid-template-columns:var(--table-columns);&:hover{background-color:", ";}&:hover ", "{display:block;}"], Color.ROW_HOVER, ElementHover);
34
34
  export const Th = styled(Td).withConfig({
35
35
  displayName: "Th",
36
36
  componentId: "sc-1vdjaze-4"
37
- })(["padding:8px 12px;color:#969ca3;font-weight:", ";font-size:", ";line-height:1;text-transform:uppercase;"], FontWeight.MEDIUM, FontSize.SMALL);
38
- export const ItemDetailLink = styled.a.withConfig({
39
- displayName: "ItemDetailLink",
40
- componentId: "sc-1vdjaze-5"
41
- })(["display:flex;align-items:center;text-decoration:none;font-weight:", ";color:", ";width:100%;&:hover{text-decoration:none;color:", ";}"], FontWeight.MEDIUM, Color.MAIN, Color.PRIMARY_HOVER);
37
+ })(["padding:8px 12px;color:", ";font-weight:", ";font-size:", ";line-height:", ";text-transform:uppercase;"], Color.LOCKED, FontWeight.MEDIUM, FontSize.HEADING5, LineHeight.HEADING5);
42
38
  export const ItemName = styled.div.withConfig({
43
39
  displayName: "ItemName",
44
- componentId: "sc-1vdjaze-6"
40
+ componentId: "sc-1vdjaze-5"
45
41
  })(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
46
42
  const overflowStyles = css(["overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:", ";"], ({
47
43
  $maxLines
48
44
  }) => $maxLines);
49
45
  export const Description = styled.div.withConfig({
50
46
  displayName: "Description",
51
- componentId: "sc-1vdjaze-7"
52
- })(["color:", ";font-size:", ";font-style:normal;font-weight:", ";line-height:130%;", ""], Color.LOCKED, FontSize.SMALL, FontWeight.REGULAR, ({
47
+ componentId: "sc-1vdjaze-6"
48
+ })(["color:", ";font-size:", ";font-weight:", ";line-height:", ";", ""], Color.LOCKED, FontSize.SMALL, FontWeight.REGULAR, LineHeight.SMALL, ({
53
49
  $maxLines
54
50
  }) => $maxLines ? overflowStyles : undefined);
55
51
  export const LockedText = styled.div.withConfig({
56
52
  displayName: "LockedText",
57
- componentId: "sc-1vdjaze-8"
53
+ componentId: "sc-1vdjaze-7"
58
54
  })(["color:", ";font-size:", ";font-weight:", ";max-width:", ";"], Color.LOCKED, ({
59
55
  $fontSize
60
56
  }) => $fontSize || FontSize.REGULAR, ({
package/package.json CHANGED
@@ -48,5 +48,5 @@
48
48
  "react": "^16.14.0 || ^18.0.0",
49
49
  "react-dom": "^16.14.0 || ^18.0.0"
50
50
  },
51
- "version": "1.1.8"
51
+ "version": "1.1.9"
52
52
  }