@thecb/components 11.6.3 → 11.6.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
@@ -681,6 +681,60 @@ interface CardProps {
681
681
  declare const Card: React.FC<Expand<CardProps> &
682
682
  React.HTMLAttributes<HTMLElement>>;
683
683
 
684
+ interface DropdownThemeValues {
685
+ selectedColor?: string;
686
+ hoverColor?: string;
687
+ focusColor?: string;
688
+ }
689
+
690
+ interface DropdownProps {
691
+ /** Placeholder text displayed when no value is selected */
692
+ placeholder?: string;
693
+ /** Array of options to display in the dropdown */
694
+ options: FormSelectOption[];
695
+ /** Currently selected value */
696
+ value?: string;
697
+ /** Whether the dropdown is currently open */
698
+ isOpen?: boolean;
699
+ /** Whether the dropdown is in an error state */
700
+ isError?: boolean;
701
+ /** Callback fired when an option is selected */
702
+ onSelect: (value: string) => void;
703
+ /** Array of values that should be disabled */
704
+ disabledValues?: string[];
705
+ /** Callback fired when the dropdown is clicked */
706
+ onClick?: () => void;
707
+ /** Theme values for styling the dropdown */
708
+ themeValues?: DropdownThemeValues;
709
+ /** Maximum height of the dropdown content */
710
+ maxHeight?: string;
711
+ /** Whether the dropdown width should fit its content */
712
+ widthFitOptions?: boolean;
713
+ /** Whether the dropdown is disabled */
714
+ disabled?: boolean;
715
+ /** Whether to show title attributes on options */
716
+ hasTitles?: boolean;
717
+ /** Whether to auto-erase type-ahead input after timeout */
718
+ autoEraseTypeAhead?: boolean;
719
+ /** ID of the element that labels this dropdown */
720
+ ariaLabelledby?: string;
721
+ /** ID of the element that describes this dropdown */
722
+ ariaDescribedby?: string;
723
+ /** Autocomplete attribute value for browser autofill */
724
+ autocompleteValue?: string;
725
+ /** Whether to use smooth scrolling when scrolling to selected item */
726
+ smoothScroll?: boolean;
727
+ /** Whether the dropdown has an invalid value */
728
+ ariaInvalid?: boolean;
729
+ /** Whether the dropdown is required */
730
+ isRequired?: boolean;
731
+ /** Custom CSS styles */
732
+ extraStyles?: string;
733
+ }
734
+
735
+ declare const Dropdown: React.FC<Expand<DropdownProps> &
736
+ Omit<React.HTMLAttributes<HTMLElement>, "onSelect">>;
737
+
684
738
  type SortOrder = "asc" | "desc" | null;
685
739
  interface SortableTableHeadingProps {
686
740
  ariaControlsId: string;
@@ -1488,5 +1542,5 @@ interface DefaultPageTemplateProps {
1488
1542
  declare const DefaultPageTemplate: React.FC<Expand<DefaultPageTemplateProps> &
1489
1543
  React.HTMLAttributes<HTMLElement>>;
1490
1544
 
1491
- export { AddValidatorAction, Alert, AlertProps, ArrowDownCircleIconSmall, ArrowDownCircleIconSmallProps, ArrowLeftCircleIconMedium, ArrowLeftCircleIconMediumProps, ArrowLeftCircleIconSmall, ArrowLeftCircleIconSmallProps, ArrowRightCircleIconSmall, ArrowRightCircleIconSmallProps, ArrowUpCircleIconSmall, ArrowUpCircleIconSmallProps, Badge, BadgeProps, BankIconLarge, BankIconLargeProps, Box, BoxProps, ButtonWithAction, ButtonWithActionProps, ButtonWithLink, ButtonWithLinkProps, Card, CardProps, CaretArrowDown, CaretArrowDownProps, CaretArrowUp, CaretArrowUpProps, CashieringImage, Center, CenterProps, ChargebackIconMedium, ChargebackIconMediumProps, ChargebackIconSmall, ChargebackIconSmallProps, ChargebackReversalIconMedium, ChargebackReversalIconMediumProps, ChargebackReversalIconSmall, ChargebackReversalIconSmallProps, ClearAction, CloseIcon, 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, FormTextarea, FormTextareaProps, GuidedCheckoutImage, HistoryIconSmall, InternalLink, InternalLinkProps, KebabMenuIcon, KioskImage, Loading, LoadingProps, MultiCartIcon, MultipleSelectFilter, MultipleSelectFilterProps, NavFooter, NavFooterProps, NavHeader, NavHeaderProps, NavTabs, NavTabsProps, Paragraph, ParagraphProps, PaydotImage, Popover, PopoverProps, PopupMenu, PopupMenuProps, ProfileImage, RadioGroup, RadioGroupProps, ReduxAction, RefundIconMedium, RefundIconMediumProps, RefundIconSmall, RefundIconSmallProps, RemoveValidatorAction, RevenueManagementImage, Search, SearchProps, SearchableSelect, SearchableSelectOption, SearchableSelectProps, SetAction, SortOrder, SortableTableHeading, SortableTableHeadingProps, 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, ToastNotification, ToastNotificationProps, ToastVariants, TrashIconV2, ValidatorFn, XCircleIconMedium, XCircleIconMediumProps, XCircleIconSmall, XCircleIconSmallProps, index_d as constants, index as hooks };
1545
+ export { AddValidatorAction, Alert, AlertProps, ArrowDownCircleIconSmall, ArrowDownCircleIconSmallProps, ArrowLeftCircleIconMedium, ArrowLeftCircleIconMediumProps, ArrowLeftCircleIconSmall, ArrowLeftCircleIconSmallProps, ArrowRightCircleIconSmall, ArrowRightCircleIconSmallProps, ArrowUpCircleIconSmall, ArrowUpCircleIconSmallProps, Badge, BadgeProps, BankIconLarge, BankIconLargeProps, Box, BoxProps, ButtonWithAction, ButtonWithActionProps, ButtonWithLink, ButtonWithLinkProps, Card, CardProps, CaretArrowDown, CaretArrowDownProps, CaretArrowUp, CaretArrowUpProps, CashieringImage, Center, CenterProps, ChargebackIconMedium, ChargebackIconMediumProps, ChargebackIconSmall, ChargebackIconSmallProps, ChargebackReversalIconMedium, ChargebackReversalIconMediumProps, ChargebackReversalIconSmall, ChargebackReversalIconSmallProps, ClearAction, CloseIcon, Cluster, ClusterProps, CollapsibleSection, CollapsibleSectionProps, Copyable, CopyableProps, Cover, CoverProps, DefaultPageTemplate, DefaultPageTemplateProps, Dropdown, DropdownProps, DropdownThemeValues, EditableTable, EditableTableProps, ErrorMessageDictionary, ExternalLink, ExternalLinkProps, Field, FieldActionPayload, FieldActions, FooterWithSubfooter, FooterWithSubfooterProps, FormInput, FormInputProps, FormSelect, FormSelectOption, FormSelectProps, FormTextarea, FormTextareaProps, GuidedCheckoutImage, HistoryIconSmall, InternalLink, InternalLinkProps, KebabMenuIcon, KioskImage, Loading, LoadingProps, MultiCartIcon, MultipleSelectFilter, MultipleSelectFilterProps, NavFooter, NavFooterProps, NavHeader, NavHeaderProps, NavTabs, NavTabsProps, Paragraph, ParagraphProps, PaydotImage, Popover, PopoverProps, PopupMenu, PopupMenuProps, ProfileImage, RadioGroup, RadioGroupProps, ReduxAction, RefundIconMedium, RefundIconMediumProps, RefundIconSmall, RefundIconSmallProps, RemoveValidatorAction, RevenueManagementImage, Search, SearchProps, SearchableSelect, SearchableSelectOption, SearchableSelectProps, SetAction, SortOrder, SortableTableHeading, SortableTableHeadingProps, 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, ToastNotification, ToastNotificationProps, ToastVariants, TrashIconV2, ValidatorFn, XCircleIconMedium, XCircleIconMediumProps, XCircleIconSmall, XCircleIconSmallProps, index_d as constants, index as hooks };
1492
1546
  //# sourceMappingURL=index.d.ts.map
package/dist/index.esm.js CHANGED
@@ -23795,7 +23795,8 @@ var Dropdown = function Dropdown(_ref13) {
23795
23795
  _ref13$ariaInvalid = _ref13.ariaInvalid,
23796
23796
  ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid,
23797
23797
  _ref13$isRequired = _ref13.isRequired,
23798
- isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
23798
+ isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired,
23799
+ extraStyles = _ref13.extraStyles;
23799
23800
  var _useState = useState(""),
23800
23801
  _useState2 = _slicedToArray(_useState, 2),
23801
23802
  inputValue = _useState2[0],
@@ -23992,7 +23993,7 @@ var Dropdown = function Dropdown(_ref13) {
23992
23993
  return /*#__PURE__*/React__default.createElement(Box, {
23993
23994
  padding: "0",
23994
23995
  background: isOpen ? themeValues.hoverColor : WHITE,
23995
- extraStyles: "position: relative;",
23996
+ extraStyles: "position: relative;".concat(extraStyles ? " ".concat(extraStyles) : ""),
23996
23997
  minWidth: "100%",
23997
23998
  onClick: function onClick() {
23998
23999
  if (!isOpen) {