yt-uikit 0.10.99 → 0.10.100-dropdown-ui-refact.0

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.
@@ -15,9 +15,6 @@ export declare const ProductImage: import("styled-components/dist/types").IStyle
15
15
  aspectRatio: string;
16
16
  borderRadius: string;
17
17
  }>> & string;
18
- export declare const VariantSelector: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, {
19
- isCoralHaze: boolean;
20
- }>> & string;
21
18
  export declare const ProductTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
22
19
  isMobile: boolean;
23
20
  showBorder: boolean;
@@ -7,4 +7,3 @@ export declare const ModalContent: import("styled-components/dist/types").IStyle
7
7
  export declare const BundlProductDetailsModalContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
8
8
  $isDev?: boolean | undefined;
9
9
  }>> & string;
10
- export declare const StyledSelect: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never>> & string;
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ export interface VariantDropdownOption {
3
+ value: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ /** extra class on the option, e.g. the variant-out-of-stock hook */
7
+ className?: string;
8
+ }
9
+ interface VariantDropdownProps {
10
+ options: VariantDropdownOption[];
11
+ value: string;
12
+ onChange: (value: string) => void;
13
+ className?: string;
14
+ /** styles for the clickable trigger */
15
+ style?: React.CSSProperties;
16
+ /** styles for the portaled option list */
17
+ menuStyle?: React.CSSProperties;
18
+ /** trigger content, defaults to the selected label + chevron */
19
+ children?: React.ReactNode;
20
+ ariaLabel?: string;
21
+ }
22
+ /**
23
+ * Variant picker rendered as a custom dropdown instead of a native <select>.
24
+ *
25
+ * The option list is portaled to document.body with position: fixed so it is
26
+ * never clipped by a Shopify theme app block (sections routinely set
27
+ * overflow: hidden, transforms or their own stacking contexts around our
28
+ * embedded bundle markup).
29
+ */
30
+ declare const VariantDropdown: React.FC<VariantDropdownProps>;
31
+ export default VariantDropdown;