@thecb/components 7.7.3-beta.2 → 7.7.3-beta.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/dist/index.d.ts CHANGED
@@ -2,6 +2,32 @@ import React from 'react';
2
2
 
3
3
  type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
4
4
 
5
+ interface ButtonWithActionProps {
6
+ action?: React.SyntheticEvent;
7
+ variant?: string;
8
+ text?: string;
9
+ textWrap?: boolean;
10
+ isLoading?: boolean;
11
+ textExtraStyles?: string;
12
+ contentOverride?: boolean;
13
+ extraStyles?: string;
14
+ tabIndex?: string;
15
+ }
16
+
17
+ declare const ButtonWithAction: React.FC<Expand<ButtonWithActionProps> &
18
+ React.HTMLAttributes<HTMLElement>>;
19
+
20
+ interface ButtonWithLinkProps extends ButtonWithActionProps {
21
+ linkExtraStyles?: string;
22
+ url: string;
23
+ disabled?: boolean;
24
+ fileLink?: boolean;
25
+ newTab?: boolean;
26
+ }
27
+
28
+ declare const ButtonWithLink: React.FC<Expand<ButtonWithLinkProps> &
29
+ React.HTMLAttributes<HTMLElement>>;
30
+
5
31
  interface CardProps {
6
32
  text?: string;
7
33
  titleText?: string;
@@ -33,32 +59,6 @@ interface CardProps {
33
59
  declare const Card: React.FC<Expand<CardProps> &
34
60
  React.HTMLAttributes<HTMLElement>>;
35
61
 
36
- interface ButtonWithActionProps {
37
- action?: React.SyntheticEvent;
38
- variant?: string;
39
- text?: string;
40
- textWrap?: boolean;
41
- isLoading?: boolean;
42
- textExtraStyles?: string;
43
- contentOverride?: boolean;
44
- extraStyles?: string;
45
- tabIndex?: string;
46
- }
47
-
48
- declare const ButtonWithAction: React.FC<Expand<ButtonWithActionProps> &
49
- React.HTMLAttributes<HTMLElement>>;
50
-
51
- interface ButtonWithLinkProps extends ButtonWithActionProps {
52
- linkExtraStyles?: string;
53
- url: string;
54
- disabled?: boolean;
55
- fileLink?: boolean;
56
- newTab?: boolean;
57
- }
58
-
59
- declare const ButtonWithLink: React.FC<Expand<ButtonWithLinkProps> &
60
- React.HTMLAttributes<HTMLElement>>;
61
-
62
62
  declare const GuidedCheckoutImage: JSX.Element;
63
63
 
64
64
  declare const HistoryIconSmall: JSX.Element;
@@ -260,6 +260,54 @@ interface ParagraphProps {
260
260
  declare const Paragraph: React.FC<Expand<ParagraphProps> &
261
261
  React.HTMLAttributes<HTMLElement>>;
262
262
 
263
+ interface TableProps {
264
+ extraStyles?: string;
265
+ }
266
+
267
+ interface TableBodyProps {
268
+ extraStyles?: string;
269
+ }
270
+
271
+ interface TableCellProps {
272
+ extraStyles?: string;
273
+ fontSize?: string;
274
+ maxWidth?: string;
275
+ padding?: string;
276
+ }
277
+
278
+ interface TableHeadProps {
279
+ extraStyles?: string;
280
+ }
281
+ interface TableHeadingProps {
282
+ extraStyles?: string;
283
+ minWidth?: string;
284
+ padding?: string;
285
+ }
286
+
287
+ interface TableRowProps {
288
+ extraStyles?: string;
289
+ hoverCursor?: boolean;
290
+ hoverEffect?: boolean;
291
+ }
292
+
293
+ declare const Table: React.FC<Expand<TableProps> &
294
+ React.HTMLAttributes<HTMLElement>>;
295
+
296
+ declare const TableBody: React.FC<Expand<TableBodyProps> &
297
+ React.HTMLAttributes<HTMLElement>>;
298
+
299
+ declare const TableCell: React.FC<Expand<TableCellProps> &
300
+ React.HTMLAttributes<HTMLElement>>;
301
+
302
+ declare const TableHead: React.FC<Expand<TableHeadProps> &
303
+ React.HTMLAttributes<HTMLElement>>;
304
+
305
+ declare const TableHeading: React.FC<Expand<TableHeadingProps> &
306
+ React.HTMLAttributes<HTMLElement>>;
307
+
308
+ declare const TableRow: React.FC<Expand<TableRowProps> &
309
+ React.HTMLAttributes<HTMLElement>>;
310
+
263
311
  interface TextProps {
264
312
  weight?: string;
265
313
  color?: string;
@@ -383,6 +431,9 @@ interface PopoverProps {
383
431
  arrowDirection?: "left" | "right" | "top" | "bottom";
384
432
  transform?: string;
385
433
  disclosedExtraStyles?: string;
434
+ borderColor?: string;
435
+ backgroundColor?: string;
436
+ popoverExtraStyles?: string;
386
437
  }
387
438
 
388
439
  declare const Popover: React.FC<Expand<PopoverProps> &
@@ -402,5 +453,5 @@ interface DefaultPageTemplateProps {
402
453
  declare const DefaultPageTemplate: React.FC<Expand<DefaultPageTemplateProps> &
403
454
  React.HTMLAttributes<HTMLElement>>;
404
455
 
405
- export { Box, BoxProps, ButtonWithAction, ButtonWithActionProps, ButtonWithLink, ButtonWithLinkProps, Card, CardProps, Center, CenterProps, Cluster, ClusterProps, CollapsibleSection, CollapsibleSectionProps, Copyable, CopyableProps, Cover, CoverProps, DefaultPageTemplate, DefaultPageTemplateProps, EditableTable, EditableTableProps, ExternalLink, ExternalLinkProps, FooterWithSubfooter, FooterWithSubfooterProps, GuidedCheckoutImage, HistoryIconSmall, InternalLink, InternalLinkProps, NavFooter, NavFooterProps, NavHeader, NavHeaderProps, NavTabs, NavTabsProps, Paragraph, ParagraphProps, Popover, PopoverProps, ProfileImage, RevenueManagementImage, Stack, StackProps, StandardCheckoutImage, Switcher, SwitcherProps, TableListItem, TableListItemProps, Text, TextProps, Title, TitleProps };
456
+ export { Box, BoxProps, ButtonWithAction, ButtonWithActionProps, ButtonWithLink, ButtonWithLinkProps, Card, CardProps, Center, CenterProps, Cluster, ClusterProps, CollapsibleSection, CollapsibleSectionProps, Copyable, CopyableProps, Cover, CoverProps, DefaultPageTemplate, DefaultPageTemplateProps, EditableTable, EditableTableProps, ExternalLink, ExternalLinkProps, FooterWithSubfooter, FooterWithSubfooterProps, GuidedCheckoutImage, HistoryIconSmall, InternalLink, InternalLinkProps, NavFooter, NavFooterProps, NavHeader, NavHeaderProps, NavTabs, NavTabsProps, Paragraph, ParagraphProps, Popover, PopoverProps, ProfileImage, RevenueManagementImage, Stack, StackProps, StandardCheckoutImage, Switcher, SwitcherProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableHead, TableHeadProps, TableHeading, TableHeadingProps, TableListItem, TableListItemProps, TableProps, TableRow, TableRowProps, Text, TextProps, Title, TitleProps };
406
457
  //# sourceMappingURL=index.d.ts.map
package/dist/index.esm.js CHANGED
@@ -23688,10 +23688,10 @@ var fallbackValues$i = {
23688
23688
  popoverTriggerColor: popoverTriggerColor
23689
23689
  };
23690
23690
 
23691
- var arrowBorder = function arrowBorder(direction) {
23692
- var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "8px";
23691
+ var arrowBorder = function arrowBorder(borderColor, direction) {
23692
+ var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "8px";
23693
23693
  var angle = "".concat(width, " solid transparent");
23694
- var straight = "".concat(width, " solid rgba(255, 255, 255, 0.85)");
23694
+ var straight = "".concat(width, " solid ").concat(borderColor);
23695
23695
 
23696
23696
  if (direction == "down") {
23697
23697
  return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-top: ").concat(straight);
@@ -23733,7 +23733,12 @@ var Popover = function Popover(_ref) {
23733
23733
  arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
23734
23734
  _ref$transform = _ref.transform,
23735
23735
  transform = _ref$transform === void 0 ? "none" : _ref$transform,
23736
- buttonExtraStyles = _ref.buttonExtraStyles;
23736
+ buttonExtraStyles = _ref.buttonExtraStyles,
23737
+ _ref$backgroundColor = _ref.backgroundColor,
23738
+ backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
23739
+ _ref$borderColor = _ref.borderColor,
23740
+ borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor,
23741
+ popoverExtraStyles = _ref.popoverExtraStyles;
23737
23742
  var hoverColor = themeValues.hoverColor,
23738
23743
  activeColor = themeValues.activeColor,
23739
23744
  popoverTriggerColor = themeValues.popoverTriggerColor;
@@ -23819,7 +23824,7 @@ var Popover = function Popover(_ref) {
23819
23824
  color: popoverTriggerColor,
23820
23825
  extraStyles: "&:active { color: ".concat(activeColor, "; } &:hover { color: ").concat(hoverColor, " }; ").concat(textExtraStyles)
23821
23826
  }, triggerText)), /*#__PURE__*/React.createElement(Box, {
23822
- background: "white",
23827
+ background: backgroundColor,
23823
23828
  borderRadius: "4px",
23824
23829
  boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
23825
23830
  id: "Disclosed".concat(popoverID),
@@ -23828,10 +23833,10 @@ var Popover = function Popover(_ref) {
23828
23833
  tabIndex: popoverFocus && popoverOpen ? "0" : "-1",
23829
23834
  minWidth: minWidth,
23830
23835
  maxWidth: maxWidth,
23831
- extraStyles: "\n display: ".concat(popoverOpen ? "block" : "none", "; \n position: absolute; \n top: ").concat(top, "; \n right: ").concat(right, "; \n bottom: ").concat(bottom, "; \n left: ").concat(left, ";\n height: ").concat(height, ";\n transform: ").concat(transform, ";\n ")
23836
+ extraStyles: "\n display: ".concat(popoverOpen ? "block" : "none", "; \n position: absolute; \n top: ").concat(top, "; \n right: ").concat(right, "; \n bottom: ").concat(bottom, "; \n left: ").concat(left, ";\n height: ").concat(height, ";\n transform: ").concat(transform, ";\n ").concat(popoverExtraStyles, ";\n ")
23832
23837
  }, /*#__PURE__*/React.createElement(Paragraph$1, null, content), /*#__PURE__*/React.createElement(Box, {
23833
23838
  padding: "0",
23834
- extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(arrowDirection, "8px"), ";\n filter: drop-shadow(2px 8px 14px black);\n bottom: ").concat(arrowBottom, ";\n right: ").concat(arrowRight, ";\n top: ").concat(arrowTop, ";\n left: ").concat(arrowLeft, ";\n ")
23839
+ extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(borderColor, arrowDirection, "8px"), ";\n filter: drop-shadow(2px 8px 14px black);\n bottom: ").concat(arrowBottom, ";\n right: ").concat(arrowRight, ";\n top: ").concat(arrowTop, ";\n left: ").concat(arrowLeft, ";\n ")
23835
23840
  })));
23836
23841
  };
23837
23842
 
@@ -36419,7 +36424,7 @@ var LoadingLine = function LoadingLine(_ref) {
36419
36424
  var Table_styled = styled.table.withConfig({
36420
36425
  displayName: "Tablestyled",
36421
36426
  componentId: "sc-mveye7-0"
36422
- })(["width:100%;table-layout:auto;", ""], function (_ref) {
36427
+ })(["width:100%;table-layout:auto;border-collapse:collapse;", ""], function (_ref) {
36423
36428
  var extraStyles = _ref.extraStyles;
36424
36429
  return extraStyles;
36425
36430
  });
@@ -36435,11 +36440,20 @@ var TableBody_styled = styled.tbody.withConfig({
36435
36440
  var TableCell_styled = styled.td.withConfig({
36436
36441
  displayName: "TableCellstyled",
36437
36442
  componentId: "sc-iqndn8-0"
36438
- })(["padding:", ";font-size:0.875rem;white-space:nowrap;max-width:250px;overflow:hidden;text-overflow:ellipsis;&:last-child{text-align:right;}", ";"], function (_ref) {
36439
- var padding = _ref.padding;
36440
- return padding ? padding : "24px";
36443
+ })(["padding:", ";font-size:", " white-space:nowrap;max-width:", ";overflow:hidden;text-overflow:ellipsis;&:last-child{text-align:right;}", ";"], function (_ref) {
36444
+ var _ref$padding = _ref.padding,
36445
+ padding = _ref$padding === void 0 ? "24px" : _ref$padding;
36446
+ return padding;
36441
36447
  }, function (_ref2) {
36442
- var extraStyles = _ref2.extraStyles;
36448
+ var _ref2$fontSize = _ref2.fontSize,
36449
+ fontSize = _ref2$fontSize === void 0 ? "0.875rem" : _ref2$fontSize;
36450
+ return fontSize;
36451
+ }, function (_ref3) {
36452
+ var _ref3$maxWidth = _ref3.maxWidth,
36453
+ maxWidth = _ref3$maxWidth === void 0 ? "250px" : _ref3$maxWidth;
36454
+ return maxWidth;
36455
+ }, function (_ref4) {
36456
+ var extraStyles = _ref4.extraStyles;
36443
36457
  return extraStyles;
36444
36458
  });
36445
36459
 
@@ -36453,12 +36467,16 @@ var fallbackValues$A = {
36453
36467
  var StyledTableHead = styled.thead.withConfig({
36454
36468
  displayName: "TableHeadstyled",
36455
36469
  componentId: "sc-j8e6c1-0"
36456
- })(["background-color:", ";border-bottom:", ";font-size:0.875rem;"], function (_ref) {
36470
+ })(["background-color:", ";border-bottom:", ";font-size:", ";"], function (_ref) {
36457
36471
  var backgroundColor = _ref.backgroundColor;
36458
36472
  return backgroundColor;
36459
36473
  }, function (_ref2) {
36460
36474
  var borderColor = _ref2.borderColor;
36461
36475
  return "1px solid ".concat(borderColor);
36476
+ }, function (_ref3) {
36477
+ var _ref3$fontSize = _ref3.fontSize,
36478
+ fontSize = _ref3$fontSize === void 0 ? "0.875rem" : _ref3$fontSize;
36479
+ return fontSize;
36462
36480
  });
36463
36481
 
36464
36482
  var borderColor$4 = GREY_CHATEAU;
@@ -36526,11 +36544,16 @@ var TableHead$1 = themeComponent(TableHead, "TableHead", fallbackValues$A);
36526
36544
  var TableHeading_styled = styled.th.withConfig({
36527
36545
  displayName: "TableHeadingstyled",
36528
36546
  componentId: "sc-1ggk38d-0"
36529
- })(["padding:24px;min-width:", ";text-align:left;&:last-child{text-align:right;}", ""], function (_ref) {
36530
- var minWidth = _ref.minWidth;
36531
- return minWidth ? minWidth : "initial";
36547
+ })(["padding:", ";min-width:", ";text-align:left;&:last-child{text-align:right;}", ""], function (_ref) {
36548
+ var _ref$padding = _ref.padding,
36549
+ padding = _ref$padding === void 0 ? "24px" : _ref$padding;
36550
+ return padding;
36532
36551
  }, function (_ref2) {
36533
- var extraStyles = _ref2.extraStyles;
36552
+ var _ref2$minWidth = _ref2.minWidth,
36553
+ minWidth = _ref2$minWidth === void 0 ? "initial" : _ref2$minWidth;
36554
+ return minWidth;
36555
+ }, function (_ref3) {
36556
+ var extraStyles = _ref3.extraStyles;
36534
36557
  return extraStyles;
36535
36558
  });
36536
36559