@mobielnl/elements 0.0.1

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.
@@ -0,0 +1,99 @@
1
+ import { CardProps } from '@heroui/card';
2
+ import { default as default_2 } from 'react';
3
+ import { JSX } from 'react/jsx-runtime';
4
+ import { ReactNode } from 'react';
5
+
6
+ export declare function ElementsRoot({ children }: ElementsRootProps): JSX.Element;
7
+
8
+ export declare type ElementsRootProps = {
9
+ children: ReactNode;
10
+ };
11
+
12
+ declare type FilterOption = {
13
+ id: string;
14
+ label: string;
15
+ type: 'range' | 'select';
16
+ options?: string[];
17
+ min?: number;
18
+ max?: number;
19
+ step?: number;
20
+ unit?: string;
21
+ };
22
+
23
+ export declare function FilterSidebar({ filters, activeFilters, onFilterChange, onClearAll, className, }: FilterSidebarProps): JSX.Element;
24
+
25
+ export declare type FilterSidebarProps = {
26
+ filters: FilterOption[];
27
+ activeFilters: FilterValue[];
28
+ onFilterChange: (filter: FilterValue) => void;
29
+ onClearAll: () => void;
30
+ className?: string;
31
+ };
32
+
33
+ declare type FilterValue = {
34
+ id: string;
35
+ value: string | number | [number, number] | string[];
36
+ };
37
+
38
+ export declare function ProductResults({ filterOptions, limit }: ProductResultsProps): JSX.Element;
39
+
40
+ declare type ProductResultsProps = {
41
+ filterOptions?: FilterOption[];
42
+ limit?: number;
43
+ };
44
+
45
+ export declare function PropositionCard({ href, productTitle, productSubtitle, productImageUrl, productImageAlt, propositionTitle, propositionSubtitle, propositionImageUrl, propositionImageAlt, propositionSpecifications, monthlyFee, tcoPerMonth, specialPromotions, modificationPromotions, monthlyFeePromotionText, deliveryText, urgentText, productSpecifications, productStockStatus, productReviewCount, productReviewScore, productPrice, deviceDiscount, className, ...props }: PropositionCardProps): JSX.Element;
46
+
47
+ export declare type PropositionCardProps = {
48
+ href: string;
49
+ productTitle?: string;
50
+ productSubtitle?: string;
51
+ productImageUrl?: string;
52
+ productImageAlt?: string;
53
+ productSpecifications?: {
54
+ title: string;
55
+ }[];
56
+ productStockStatus?: string;
57
+ productReviewCount?: number;
58
+ productReviewScore?: number;
59
+ productPrice?: number;
60
+ propositionTitle: string;
61
+ propositionSubtitle: string;
62
+ propositionImageUrl: string;
63
+ propositionImageAlt: string;
64
+ propositionSpecifications?: {
65
+ title: string;
66
+ icon: default_2.ReactNode;
67
+ }[];
68
+ monthlyFee: string;
69
+ tcoPerMonth: string;
70
+ specialPromotions: string[];
71
+ modificationPromotions: string[];
72
+ monthlyFeePromotionText?: string;
73
+ deviceDiscount?: number;
74
+ deliveryText?: string;
75
+ urgentText?: string;
76
+ } & CardProps;
77
+
78
+ export declare function RangeFilter({ min, max, step, unit, value, onChange, }: RangeFilterProps): JSX.Element;
79
+
80
+ export declare type RangeFilterProps = {
81
+ id: string;
82
+ min: number;
83
+ max: number;
84
+ step?: number;
85
+ unit?: string;
86
+ value?: [number, number];
87
+ onChange: (value: [number, number]) => void;
88
+ };
89
+
90
+ export declare function SelectFilter({ options, values, onChange }: SelectFilterProps): JSX.Element;
91
+
92
+ export declare type SelectFilterProps = {
93
+ id: string;
94
+ options: string[];
95
+ values?: string[];
96
+ onChange: (values: string[]) => void;
97
+ };
98
+
99
+ export { }
package/package.json ADDED
@@ -0,0 +1,91 @@
1
+ {
2
+ "name": "@mobielnl/elements",
3
+ "private": false,
4
+ "version": "0.0.1",
5
+ "type": "module",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "main": "./dist/elements.umd.cjs",
10
+ "module": "./dist/elements.js",
11
+ "types": "./dist/index.d.ts",
12
+ "publishConfig": {
13
+ "access": "public",
14
+ "registry": "https://registry.npmjs.org/"
15
+ },
16
+ "exports": {
17
+ ".": {
18
+ "import": "./dist/elements.js",
19
+ "require": "./dist/elements.umd.cjs",
20
+ "default": "./dist/elements.js"
21
+ },
22
+ "./style.css": "./dist/elements.css"
23
+ },
24
+ "sideEffects": [
25
+ "**/*.css"
26
+ ],
27
+ "peerDependencies": {
28
+ "react": ">=18",
29
+ "react-dom": ">=18"
30
+ },
31
+ "devDependencies": {
32
+ "@biomejs/biome": "2.1.4",
33
+ "@graphql-codegen/cli": "^5.0.7",
34
+ "@graphql-codegen/introspection": "^4.0.3",
35
+ "@graphql-codegen/typescript": "^4.1.2",
36
+ "@graphql-codegen/typescript-graphql-request": "^6.2.0",
37
+ "@graphql-codegen/typescript-operations": "^4.4.0",
38
+ "@heroui/button": "^2.2.24",
39
+ "@heroui/card": "^2.2.23",
40
+ "@heroui/checkbox": "^2.3.24",
41
+ "@heroui/chip": "^2.2.20",
42
+ "@heroui/divider": "^2.2.17",
43
+ "@heroui/image": "^2.2.15",
44
+ "@heroui/input": "^2.4.25",
45
+ "@heroui/link": "^2.2.22",
46
+ "@heroui/slider": "^2.4.21",
47
+ "@heroui/system": "^2.4.20",
48
+ "@heroui/theme": "^2.4.20",
49
+ "@storybook/addon-a11y": "^9.1.2",
50
+ "@storybook/addon-docs": "^9.1.2",
51
+ "@storybook/react-vite": "^9.1.2",
52
+ "@tailwindcss/vite": "^4.1.11",
53
+ "@types/jest": "^30.0.0",
54
+ "@types/node": "^22.13.1",
55
+ "@types/postcss-prefix-selector": "^1.16.3",
56
+ "@types/react": "^19.1.10",
57
+ "@types/react-dom": "^19.1.7",
58
+ "@vitejs/plugin-react-swc": "^4.0.0",
59
+ "cross-env": "^7.0.3",
60
+ "globals": "^16.3.0",
61
+ "graphql": "^16.11.0",
62
+ "graphql-request": "^7.2.0",
63
+ "postcss-prefix-selector": "^2.1.1",
64
+ "react": "^18.3.1",
65
+ "react-dom": "^18.3.1",
66
+ "storybook": "^9.1.2",
67
+ "swr": "^2.3.2",
68
+ "tailwindcss": "^4.1.11",
69
+ "typescript": "~5.8.3",
70
+ "vite": "^7.1.2",
71
+ "vite-plugin-dts": "^4.5.0",
72
+ "vitest": "^3.2.4"
73
+ },
74
+ "scripts": {
75
+ "predev": "pnpm install && pnpm generate:graph",
76
+ "dev": "storybook dev -p 6006",
77
+ "test": "vitest",
78
+ "test:once": "vitest run",
79
+ "typecheck": "tsc --noEmit -p tsconfig.json --diagnostics --extendedDiagnostics",
80
+ "storybook:build": "storybook build --quiet -c .storybook -o storybook.dist",
81
+ "storybook:start": "http-server -d false -p 3000 storybook.dist",
82
+ "storybook:clean": "rm -rf storybook.dist",
83
+ "build:es": "cross-env BUILD_FORMAT=es vite build",
84
+ "build:umd": "cross-env BUILD_FORMAT=umd vite build",
85
+ "build": "tsc -b && pnpm run build:es && pnpm run build:umd",
86
+ "generate:graph": "DOTENV_CONFIG_PATH=\".env\" graphql-codegen --require dotenv/config --config codegen.yml",
87
+ "format": "biome format --write",
88
+ "lint": "biome lint --write",
89
+ "check": "biome check --write"
90
+ }
91
+ }