@prijsvrijtechsupport/ui 0.0.39 → 0.0.40

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.
@@ -34,6 +34,7 @@ interface ResultPageFilterBoxProps {
34
34
  "data-testid"?: string;
35
35
  className?: string;
36
36
  filters: Filter[];
37
+ clickFunction: (val: string) => void;
37
38
  }
38
- export declare const ResultPageFilterBox: ({ className, filters, ...props }: ResultPageFilterBoxProps) => import("react/jsx-runtime").JSX.Element;
39
+ export declare const ResultPageFilterBox: ({ className, filters, clickFunction, ...props }: ResultPageFilterBoxProps) => import("react/jsx-runtime").JSX.Element;
39
40
  export {};
@@ -7,10 +7,12 @@ export declare const Default: import("@storybook/react").ReactStory<import("@sto
7
7
  } & {
8
8
  args: {
9
9
  className: unknown;
10
+ loading: unknown;
10
11
  };
11
12
  }, {
12
13
  args: {
13
14
  className: string;
14
15
  searchBlockTitle: string;
16
+ loading: boolean;
15
17
  };
16
18
  }>;
@@ -3,6 +3,7 @@ interface SearchBlockProps {
3
3
  className?: string;
4
4
  searchBlockTitle?: string;
5
5
  searchBlockForm?: React.ReactNode;
6
+ loading: boolean;
6
7
  onClickFn?: () => void;
7
8
  }
8
9
  interface SearchBlockButtonProps {
@@ -16,5 +17,5 @@ interface SearchBlockButtonProps {
16
17
  secondarySelectedValue?: string;
17
18
  }
18
19
  export declare const SearchBlockButton: ({ className, label, labelOutside, icon, downIcon, onClick, selectedValue, secondarySelectedValue, ...props }: SearchBlockButtonProps) => import("react/jsx-runtime").JSX.Element;
19
- export declare const SearchBlock: ({ className, searchBlockTitle, searchBlockForm, onClickFn, "data-testid": dataTestId, ...props }: SearchBlockProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const SearchBlock: ({ className, searchBlockTitle, searchBlockForm, loading, onClickFn, "data-testid": dataTestId, ...props }: SearchBlockProps) => import("react/jsx-runtime").JSX.Element;
20
21
  export {};
@@ -1,2 +1,22 @@
1
- export declare const TransportToggle: any;
2
- export declare const Toggle: any;
1
+ import React from "react";
2
+ interface TransportOption {
3
+ id: string;
4
+ label: string;
5
+ icon: "FL" | "HO";
6
+ disabled?: boolean;
7
+ }
8
+ interface TransportToggleProps {
9
+ options: TransportOption[];
10
+ selectedValue: string;
11
+ onSelect: (value: string) => void;
12
+ disabled?: boolean;
13
+ disabledSingle?: "FL" | "HO";
14
+ disabledSingleText?: string;
15
+ className?: string;
16
+ loading?: boolean;
17
+ orientation?: "vertical" | "horizontal";
18
+ }
19
+ export declare const TransportToggle: React.FC<TransportToggleProps>;
20
+ export declare const Toggle: React.FC<TransportToggleProps>;
21
+ export type { TransportOption, TransportToggleProps };
22
+ export type ToggleProps = TransportToggleProps;
@@ -3,4 +3,4 @@ import React from "react";
3
3
  * Higher-Order Component that adds data-pv-ui attribute to any component
4
4
  * This prevents global style conflicts when the UI package is imported.
5
5
  */
6
- export declare function withPvUi<P extends React.HTMLAttributes<HTMLElement>>(Component: React.ComponentType<P>): any;
6
+ export declare function withPvUi<T extends React.ComponentType<any>>(Component: T): React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<T> & React.RefAttributes<React.ElementRef<T>>>;
@@ -14,7 +14,8 @@ export { PriceCheck } from "./components/priceCheck";
14
14
  export { Rating } from "./components/rating";
15
15
  export { SearchBox } from "./components/searchBox";
16
16
  export { SearchBoxResults } from "./components/searchBoxResults";
17
- export { Toggle } from "./components/toggle";
17
+ export { TransportToggle, Toggle } from "./components/toggle";
18
+ export type { TransportOption, TransportToggleProps, ToggleProps } from "./components/toggle";
18
19
  export { TopHeaderMenu } from "./components/topHeaderMenu";
19
20
  export { TopMenu, BrandTopMenu } from "./components/topMenu";
20
21
  export { Usp } from "./components/usp";
package/package.json CHANGED
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "@prijsvrijtechsupport/ui",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "description": "A UI component library",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",
8
- "types": "dist/index.d.ts",
8
+ "types": "dist/src/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
11
  "import": "./dist/index.js",
12
12
  "require": "./dist/index.cjs",
13
- "default": "./dist/index.js"
13
+ "default": "./dist/index.js",
14
+ "types": "./dist/src/index.d.ts"
14
15
  },
15
16
  "./styles": {
16
17
  "import": "./dist/styles/index.js",