@thecb/components 8.4.7-beta.0 → 8.4.7-beta.2

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
@@ -429,6 +429,11 @@ interface FormSelectOption {
429
429
  value?: string;
430
430
  }
431
431
 
432
+ interface SearchableSelectOption {
433
+ name?: string;
434
+ value?: string;
435
+ }
436
+
432
437
  interface ErrorMessageDictionary {
433
438
  [fieldName: string]: string;
434
439
  }
@@ -814,6 +819,23 @@ interface ParagraphProps {
814
819
  declare const Paragraph: React.FC<Expand<ParagraphProps> &
815
820
  React.HTMLAttributes<HTMLElement>>;
816
821
 
822
+ interface SearchableSelectProps {
823
+ items: SearchableSelectOption[];
824
+ selectedItems: SearchableSelectOption[];
825
+ allSelected: boolean;
826
+ toggleSelectAllItems: (bool: boolean) => void;
827
+ selectItem: (item: SearchableSelectOption) => void;
828
+ fields: {
829
+ searchTerm: Field;
830
+ };
831
+ actions: FieldActions;
832
+ disabled: boolean;
833
+ placeholder: string;
834
+ }
835
+
836
+ declare const SearchableSelect: React.FC<Expand<SearchableSelectProps> &
837
+ React.HTMLAttributes<HTMLElement>>;
838
+
817
839
  interface SpinnerProps {
818
840
  size?: string;
819
841
  centerSpinner?: boolean;
@@ -1005,7 +1027,7 @@ declare const Popover: React.FC<Expand<PopoverProps> &
1005
1027
  interface RadioOption {
1006
1028
  id: string;
1007
1029
  labelText: string;
1008
- value: string;
1030
+ value: string | boolean;
1009
1031
  }
1010
1032
 
1011
1033
  interface RadioGroupProps {
@@ -1036,5 +1058,5 @@ interface DefaultPageTemplateProps {
1036
1058
  declare const DefaultPageTemplate: React.FC<Expand<DefaultPageTemplateProps> &
1037
1059
  React.HTMLAttributes<HTMLElement>>;
1038
1060
 
1039
- export { AddValidatorAction, Alert, AlertProps, 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, ClearAction, Cluster, ClusterProps, CollapsibleSection, CollapsibleSectionProps, Copyable, CopyableProps, Cover, CoverProps, DefaultPageTemplate, DefaultPageTemplateProps, EditableTable, EditableTableProps, ErrorMessageDictionary, ExternalLink, ExternalLinkProps, Field, FieldActionPayload, FieldActions, FooterWithSubfooter, FooterWithSubfooterProps, FormInput, FormInputProps, FormSelect, FormSelectOption, FormSelectProps, GuidedCheckoutImage, HistoryIconSmall, InternalLink, InternalLinkProps, KioskImage, Loading, LoadingProps, NavFooter, NavFooterProps, NavHeader, NavHeaderProps, NavTabs, NavTabsProps, Paragraph, ParagraphProps, PointOfSaleImage, Popover, PopoverProps, ProfileImage, RadioGroup, RadioGroupProps, ReduxAction, RefundIconMedium, RefundIconMediumProps, RefundIconSmall, RefundIconSmallProps, RemoveValidatorAction, RevenueManagementImage, SetAction, 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, ValidatorFn, XCircleIconMedium, XCircleIconMediumProps, XCircleIconSmall, XCircleIconSmallProps, index_d as constants };
1061
+ export { AddValidatorAction, Alert, AlertProps, 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, ClearAction, Cluster, ClusterProps, CollapsibleSection, CollapsibleSectionProps, Copyable, CopyableProps, Cover, CoverProps, DefaultPageTemplate, DefaultPageTemplateProps, EditableTable, EditableTableProps, ErrorMessageDictionary, ExternalLink, ExternalLinkProps, Field, FieldActionPayload, FieldActions, FooterWithSubfooter, FooterWithSubfooterProps, FormInput, FormInputProps, FormSelect, FormSelectOption, FormSelectProps, GuidedCheckoutImage, HistoryIconSmall, InternalLink, InternalLinkProps, KioskImage, Loading, LoadingProps, NavFooter, NavFooterProps, NavHeader, NavHeaderProps, NavTabs, NavTabsProps, Paragraph, ParagraphProps, PointOfSaleImage, Popover, PopoverProps, ProfileImage, RadioGroup, RadioGroupProps, ReduxAction, RefundIconMedium, RefundIconMediumProps, RefundIconSmall, RefundIconSmallProps, RemoveValidatorAction, RevenueManagementImage, SearchableSelect, SearchableSelectOption, SearchableSelectProps, SetAction, 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, ValidatorFn, XCircleIconMedium, XCircleIconMediumProps, XCircleIconSmall, XCircleIconSmallProps, index_d as constants };
1040
1062
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "8.4.7-beta.0",
3
+ "version": "8.4.7-beta.2",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -12,6 +12,7 @@ export * from "./nav-footer";
12
12
  export * from "./nav-header";
13
13
  export * from "./nav-tabs";
14
14
  export * from "./paragraph";
15
+ export * from "./searchable-select";
15
16
  export * from "./spinner";
16
17
  export * from "./table";
17
18
  export * from "./text";
@@ -1,17 +1,13 @@
1
1
  import React from "react";
2
2
  import Expand from "../../../util/expand";
3
- import { Field, FieldActions } from "../../../types/common";
3
+ import { Field, FieldActions, SearchableSelectOption } from "../../../types/common";
4
4
 
5
- interface Item {
6
- name: string;
7
- value: string;
8
- }
9
5
  export interface SearchableSelectProps {
10
- items: Item[];
11
- selectedItems: Item[];
6
+ items: SearchableSelectOption[];
7
+ selectedItems: SearchableSelectOption[];
12
8
  allSelected: boolean;
13
9
  toggleSelectAllItems: (bool: boolean) => void;
14
- selectItem: (item: Item) => void;
10
+ selectItem: (item: SearchableSelectOption) => void;
15
11
  fields: {
16
12
  searchTerm: Field;
17
13
  };
@@ -5,7 +5,7 @@ import { Field, FieldActions } from "../../../types/common";
5
5
  interface RadioOption {
6
6
  id: string;
7
7
  labelText: string;
8
- value: string;
8
+ value: string | boolean;
9
9
  }
10
10
 
11
11
  export interface RadioGroupProps {
@@ -0,0 +1,4 @@
1
+ export default interface SearchableSelectOption {
2
+ name?: string;
3
+ value?: string;
4
+ }
@@ -2,5 +2,6 @@ export { default as Field } from "./Field";
2
2
  export { default as ReduxAction } from "./ReduxAction";
3
3
  export { default as FieldActions } from "./FieldActions";
4
4
  export { default as FormSelectOption } from "./FormSelectOption";
5
+ export { default as SearchableSelectOption } from "./SearchableSelectOption";
5
6
  export { default as ErrorMessageDictionary } from "./ErrorMessageDictionary";
6
7
  export * from "./FieldActions";