@thecb/components 8.0.6-beta.4 → 8.0.6-beta.6

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
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
4
4
 
5
5
  interface ButtonWithActionProps {
6
- action?: React.SyntheticEvent;
6
+ action?: (event: React.ChangeEvent<HTMLInputElement>) => void;
7
7
  variant?: string;
8
8
  text?: string;
9
9
  textWrap?: boolean;
@@ -60,27 +60,18 @@ declare const Card: React.FC<Expand<CardProps> &
60
60
  React.HTMLAttributes<HTMLElement>>;
61
61
 
62
62
  interface ErrorMessage {
63
- [fieldName: string]: string;
64
- }
63
+ [fieldName: string]: string;
64
+ }
65
65
 
66
66
  interface FormInputProps {
67
- type?: string;
68
- labelTextWhenNoError?: string;
67
+ disabled?: boolean;
69
68
  errorMessages?: ErrorMessage[];
70
- isNum?: boolean;
71
- isEmail?: boolean;
72
69
  helperModal?: boolean;
73
- field?: any;
74
- fieldActions?: any;
70
+ isEmail?: boolean;
71
+ isNum?: boolean;
72
+ labelTextWhenNoError?: string;
75
73
  showErrors?: boolean;
76
- formatter?: any;
77
- decorator?: any;
78
- themeValues?: any;
79
- background?: any;
80
- customHeight?: any;
81
- autocomplete?: any;
82
- extraStyles?: any;
83
- removeFromValue?: any;
74
+ type?: string;
84
75
  }
85
76
 
86
77
  declare const FormInput: React.FC<Expand<FormInputProps> &
@@ -399,6 +390,11 @@ interface InternalLinkProps {
399
390
  declare const InternalLink: React.FC<Expand<InternalLinkProps> &
400
391
  React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLLinkElement> }>;
401
392
 
393
+ interface LoadingProps {}
394
+
395
+ declare const Loading: React.FC<Expand<LoadingProps> &
396
+ React.HTMLAttributes<HTMLElement>>;
397
+
402
398
  interface NavFooterProps {
403
399
  leftContent?: JSX.Element;
404
400
  rightContent?: JSX.Element;
@@ -449,6 +445,14 @@ interface ParagraphProps {
449
445
  declare const Paragraph: React.FC<Expand<ParagraphProps> &
450
446
  React.HTMLAttributes<HTMLElement>>;
451
447
 
448
+ interface SpinnerProps {
449
+ size: string;
450
+ centerSpinner: boolean;
451
+ }
452
+
453
+ declare const Spinner: React.FC<Expand<SpinnerProps> &
454
+ React.HTMLAttributes<HTMLElement>>;
455
+
452
456
  interface TableProps {
453
457
  extraStyles?: string;
454
458
  }
@@ -643,5 +647,5 @@ interface DefaultPageTemplateProps {
643
647
  declare const DefaultPageTemplate: React.FC<Expand<DefaultPageTemplateProps> &
644
648
  React.HTMLAttributes<HTMLElement>>;
645
649
 
646
- export { ArrowDownCircleIconSmall, ArrowDownCircleIconSmallProps, ArrowLeftCircleIconMedium, ArrowLeftCircleIconMediumProps, ArrowLeftCircleIconSmall, ArrowLeftCircleIconSmallProps, ArrowRightCircleIconSmall, ArrowRightCircleIconSmallProps, ArrowUpCircleIconSmall, ArrowUpCircleIconSmallProps, BankIconLarge, BankIconLargeProps, Box, BoxProps, ButtonWithAction, ButtonWithActionProps, ButtonWithLink, ButtonWithLinkProps, Card, CardProps, Center, CenterProps, ChargebackIconMedium, ChargebackIconMediumProps, ChargebackIconSmall, ChargebackIconSmallProps, ChargebackReversalIconMedium, ChargebackReversalIconMediumProps, ChargebackReversalIconSmall, ChargebackReversalIconSmallProps, Cluster, ClusterProps, CollapsibleSection, CollapsibleSectionProps, Copyable, CopyableProps, Cover, CoverProps, DefaultPageTemplate, DefaultPageTemplateProps, EditableTable, EditableTableProps, ExternalLink, ExternalLinkProps, FooterWithSubfooter, FooterWithSubfooterProps, FormInput, FormInputProps, FormSelect, FormSelectProps, GuidedCheckoutImage, HistoryIconSmall, InternalLink, InternalLinkProps, KioskImage, NavFooter, NavFooterProps, NavHeader, NavHeaderProps, NavTabs, NavTabsProps, Paragraph, ParagraphProps, PointOfSaleImage, Popover, PopoverProps, ProfileImage, RefundIconMedium, RefundIconMediumProps, RefundIconSmall, RefundIconSmallProps, RevenueManagementImage, Stack, StackProps, StandardCheckoutImage, SuccessfulIconMedium, SuccessfulIconMediumProps, SuccessfulIconSmall, SuccessfulIconSmallProps, Switcher, SwitcherProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableHead, TableHeadProps, TableHeading, TableHeadingProps, TableListItem, TableListItemProps, TableProps, TableRow, TableRowProps, Text, TextProps, Title, TitleProps, XCircleIconMedium, XCircleIconMediumProps, XCircleIconSmall, XCircleIconSmallProps };
650
+ export { ArrowDownCircleIconSmall, ArrowDownCircleIconSmallProps, ArrowLeftCircleIconMedium, ArrowLeftCircleIconMediumProps, ArrowLeftCircleIconSmall, ArrowLeftCircleIconSmallProps, ArrowRightCircleIconSmall, ArrowRightCircleIconSmallProps, ArrowUpCircleIconSmall, ArrowUpCircleIconSmallProps, BankIconLarge, BankIconLargeProps, Box, BoxProps, ButtonWithAction, ButtonWithActionProps, ButtonWithLink, ButtonWithLinkProps, Card, CardProps, Center, CenterProps, ChargebackIconMedium, ChargebackIconMediumProps, ChargebackIconSmall, ChargebackIconSmallProps, ChargebackReversalIconMedium, ChargebackReversalIconMediumProps, ChargebackReversalIconSmall, ChargebackReversalIconSmallProps, Cluster, ClusterProps, CollapsibleSection, CollapsibleSectionProps, Copyable, CopyableProps, Cover, CoverProps, DefaultPageTemplate, DefaultPageTemplateProps, EditableTable, EditableTableProps, ExternalLink, ExternalLinkProps, FooterWithSubfooter, FooterWithSubfooterProps, FormInput, FormInputProps, FormSelect, FormSelectProps, GuidedCheckoutImage, HistoryIconSmall, InternalLink, InternalLinkProps, KioskImage, Loading, LoadingProps, NavFooter, NavFooterProps, NavHeader, NavHeaderProps, NavTabs, NavTabsProps, Paragraph, ParagraphProps, PointOfSaleImage, Popover, PopoverProps, ProfileImage, RefundIconMedium, RefundIconMediumProps, RefundIconSmall, RefundIconSmallProps, RevenueManagementImage, Spinner, SpinnerProps, Stack, StackProps, StandardCheckoutImage, SuccessfulIconMedium, SuccessfulIconMediumProps, SuccessfulIconSmall, SuccessfulIconSmallProps, Switcher, SwitcherProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableHead, TableHeadProps, TableHeading, TableHeadingProps, TableListItem, TableListItemProps, TableProps, TableRow, TableRowProps, Text, TextProps, Title, TitleProps, XCircleIconMedium, XCircleIconMediumProps, XCircleIconSmall, XCircleIconSmallProps };
647
651
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "8.0.6-beta.4",
3
+ "version": "8.0.6-beta.6",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import Expand from "../../../util/expand";
3
3
 
4
4
  export interface ButtonWithActionProps {
5
- action?: React.SyntheticEvent;
5
+ action?: (event: React.ChangeEvent<HTMLInputElement>) => void;
6
6
  variant?: string;
7
7
  text?: string;
8
8
  textWrap?: boolean;
@@ -1,29 +1,16 @@
1
1
  import React from "react";
2
2
  import Expand from "../../../util/expand";
3
-
4
-
5
- interface ErrorMessage {
6
- [fieldName: string]: string;
7
- }
3
+ import ErrorMessage from "../../../types/common/ErrorMessage";
8
4
 
9
5
  export interface FormInputProps {
10
- type?: string;
11
- labelTextWhenNoError?: string;
6
+ disabled?: boolean;
12
7
  errorMessages?: ErrorMessage[];
13
- isNum?: boolean;
14
- isEmail?: boolean;
15
8
  helperModal?: boolean;
16
- field?: any;
17
- fieldActions?: any;
9
+ isEmail?: boolean;
10
+ isNum?: boolean;
11
+ labelTextWhenNoError?: string;
18
12
  showErrors?: boolean;
19
- formatter?: any;
20
- decorator?: any;
21
- themeValues?: any;
22
- background?: any;
23
- customHeight?: any;
24
- autocomplete?: any;
25
- extraStyles?: any;
26
- removeFromValue?: any;
13
+ type?: string;
27
14
  }
28
15
 
29
16
  export const FormInput: React.FC<Expand<FormInputProps> &
@@ -6,10 +6,12 @@ export * from "./form-select";
6
6
  export * from "./icons";
7
7
  export * from "./layouts";
8
8
  export * from "./link";
9
+ export * from "./loading";
9
10
  export * from "./nav-footer";
10
11
  export * from "./nav-header";
11
12
  export * from "./nav-tabs";
12
13
  export * from "./paragraph";
14
+ export * from "./spinner";
13
15
  export * from "./table";
14
16
  export * from "./text";
15
17
  export * from "./title";
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import Expand from "../../../util/expand";
3
+
4
+ export interface LoadingProps {}
5
+
6
+ export const Loading: React.FC<Expand<LoadingProps> &
7
+ React.HTMLAttributes<HTMLElement>>;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import Expand from "../../../util/expand";
3
+
4
+ export interface SpinnerProps {
5
+ size: string;
6
+ centerSpinner: boolean;
7
+ }
8
+
9
+ export const Spinner: React.FC<Expand<SpinnerProps> &
10
+ React.HTMLAttributes<HTMLElement>>;
@@ -0,0 +1,4 @@
1
+ export default interface ErrorMessage {
2
+ [fieldName: string]: string;
3
+ }
4
+