@prijsvrijtechsupport/ui 0.0.29 → 0.0.30
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/components/weather/Weather.stories.d.ts +1 -0
- package/dist/components/weather/icons/cloud_01.d.ts +2 -0
- package/dist/components/weather/icons/cloud_02.d.ts +2 -0
- package/dist/components/weather/icons/cloud_03.d.ts +2 -0
- package/dist/components/weather/icons/cloud_lightning.d.ts +2 -0
- package/dist/components/weather/icons/cloud_moon.d.ts +2 -0
- package/dist/components/weather/icons/cloud_off.d.ts +2 -0
- package/dist/components/weather/icons/cloud_raining_01.d.ts +2 -0
- package/dist/components/weather/icons/cloud_raining_02.d.ts +2 -0
- package/dist/components/weather/icons/cloud_raining_03.d.ts +2 -0
- package/dist/components/weather/icons/cloud_raining_04.d.ts +2 -0
- package/dist/components/weather/icons/cloud_raining_05.d.ts +2 -0
- package/dist/components/weather/icons/cloud_raining_06.d.ts +2 -0
- package/dist/components/weather/icons/cloud_snowing_01.d.ts +2 -0
- package/dist/components/weather/icons/cloud_snowing_02.d.ts +2 -0
- package/dist/components/weather/icons/cloud_sun_01.d.ts +2 -0
- package/dist/components/weather/icons/cloud_sun_02.d.ts +2 -0
- package/dist/components/weather/icons/cloud_sun_03.d.ts +2 -0
- package/dist/components/weather/icons/droplets_01.d.ts +2 -0
- package/dist/components/weather/icons/droplets_02.d.ts +2 -0
- package/dist/components/weather/icons/droplets_03.d.ts +2 -0
- package/dist/components/weather/icons/hurricane_01.d.ts +2 -0
- package/dist/components/weather/icons/hurricane_02.d.ts +2 -0
- package/dist/components/weather/icons/hurricane_03.d.ts +2 -0
- package/dist/components/weather/icons/lightning_01.d.ts +2 -0
- package/dist/components/weather/icons/lightning_02.d.ts +2 -0
- package/dist/components/weather/icons/moon_01.d.ts +2 -0
- package/dist/components/weather/icons/moon_02.d.ts +2 -0
- package/dist/components/weather/icons/moon_eclipse.d.ts +2 -0
- package/dist/components/weather/icons/moon_star.d.ts +2 -0
- package/dist/components/weather/icons/snowflake_01.d.ts +2 -0
- package/dist/components/weather/icons/snowflake_02.d.ts +2 -0
- package/dist/components/weather/icons/stars_01.d.ts +2 -0
- package/dist/components/weather/icons/stars_02.d.ts +2 -0
- package/dist/components/weather/icons/stars_03.d.ts +2 -0
- package/dist/components/weather/icons/sun.d.ts +2 -0
- package/dist/components/weather/icons/sun_setting_01.d.ts +2 -0
- package/dist/components/weather/icons/sun_setting_02.d.ts +2 -0
- package/dist/components/weather/icons/sun_setting_03.d.ts +2 -0
- package/dist/components/weather/icons/sunrise.d.ts +2 -0
- package/dist/components/weather/icons/sunset.d.ts +2 -0
- package/dist/components/weather/icons/thermometer_01.d.ts +2 -0
- package/dist/components/weather/icons/thermometer_02.d.ts +2 -0
- package/dist/components/weather/icons/thermometer_03.d.ts +2 -0
- package/dist/components/weather/icons/thermometer_cold.d.ts +2 -0
- package/dist/components/weather/icons/thermometer_warm.d.ts +2 -0
- package/dist/components/weather/icons/umbrella_01.d.ts +2 -0
- package/dist/components/weather/icons/umbrella_02.d.ts +2 -0
- package/dist/components/weather/icons/umbrella_03.d.ts +2 -0
- package/dist/components/weather/icons/waves.d.ts +2 -0
- package/dist/components/weather/icons/wind_01.d.ts +2 -0
- package/dist/components/weather/icons/wind_02.d.ts +2 -0
- package/dist/components/weather/icons/wind_03.d.ts +2 -0
- package/dist/components/weather/index.d.ts +10 -1
- package/dist/components/weather/weather.test.d.ts +1 -0
- package/dist/index.cjs +65 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +65 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
interface WeatherItem {
|
|
2
|
+
icon: React.ReactNode;
|
|
3
|
+
temperature: string;
|
|
4
|
+
temperature_percent: number;
|
|
5
|
+
month: number;
|
|
6
|
+
}
|
|
1
7
|
interface WeatherProps {
|
|
2
8
|
"data-testid"?: string;
|
|
3
9
|
className?: string;
|
|
10
|
+
weatherItems: WeatherItem[];
|
|
11
|
+
title: string;
|
|
12
|
+
direction?: 'horizontal' | 'vertical';
|
|
4
13
|
}
|
|
5
|
-
export declare const Weather: ({ className, ...props }: WeatherProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const Weather: ({ className, weatherItems, title, direction, ...props }: WeatherProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
15
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.cjs
CHANGED
|
@@ -10885,12 +10885,71 @@ const Coupon = ({ className, title, description, code, validUntil, image, backgr
|
|
|
10885
10885
|
|
|
10886
10886
|
//#endregion
|
|
10887
10887
|
//#region src/components/weather/index.tsx
|
|
10888
|
-
const
|
|
10889
|
-
"
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10888
|
+
const monthLabels = [
|
|
10889
|
+
"jan",
|
|
10890
|
+
"feb",
|
|
10891
|
+
"mar",
|
|
10892
|
+
"apr",
|
|
10893
|
+
"mei",
|
|
10894
|
+
"jun",
|
|
10895
|
+
"jul",
|
|
10896
|
+
"aug",
|
|
10897
|
+
"sep",
|
|
10898
|
+
"okt",
|
|
10899
|
+
"nov",
|
|
10900
|
+
"dec"
|
|
10901
|
+
];
|
|
10902
|
+
const Weather = ({ className, weatherItems, title, direction = "horizontal",...props }) => {
|
|
10903
|
+
const isVertical = direction === "vertical";
|
|
10904
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10905
|
+
"data-component": "weather",
|
|
10906
|
+
className: (0, clsx.default)(className, "flex flex-col gap-2"),
|
|
10907
|
+
...props,
|
|
10908
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10909
|
+
className: "p-4 rounded-lg overflow-scroll w-fit",
|
|
10910
|
+
style: { background: "linear-gradient(180deg, #0092F2 0%, #0092F2 56.18%, #7EC3F0 101.61%)" },
|
|
10911
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10912
|
+
className: "text-white text-lg font-bold mb-5",
|
|
10913
|
+
children: title
|
|
10914
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10915
|
+
className: (0, clsx.default)("gap-2 flex flex-col", isVertical && "h-[310px] flex flex-row gap-2 w-fit"),
|
|
10916
|
+
children: weatherItems.map((weatherItem, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10917
|
+
className: (0, clsx.default)("flex gap-2 text-white", isVertical ? "flex-col h-full w-8 items-center justify-center" : "flex-row"),
|
|
10918
|
+
children: [
|
|
10919
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10920
|
+
className: (0, clsx.default)(isVertical ? "w-full order-5 justify-center items-center text-center" : "w-10"),
|
|
10921
|
+
children: monthLabels[weatherItem.month]
|
|
10922
|
+
}),
|
|
10923
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10924
|
+
className: (0, clsx.default)("flex items-center justify-center", isVertical ? "w-full order-1" : "w-10"),
|
|
10925
|
+
children: weatherItem.icon
|
|
10926
|
+
}),
|
|
10927
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10928
|
+
className: (0, clsx.default)("flex items-center justify-center", isVertical ? "h-full order-3" : "w-full"),
|
|
10929
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10930
|
+
className: (0, clsx.default)("bg-white/50 rounded-xl flex", isVertical ? "w-2 h-full items-end" : "w-full h-2"),
|
|
10931
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10932
|
+
className: "bg-amber-200 rounded-xl",
|
|
10933
|
+
style: isVertical ? {
|
|
10934
|
+
height: `${weatherItem.temperature_percent}%`,
|
|
10935
|
+
width: "100%"
|
|
10936
|
+
} : {
|
|
10937
|
+
width: `${weatherItem.temperature_percent}%`,
|
|
10938
|
+
height: "100%"
|
|
10939
|
+
}
|
|
10940
|
+
})
|
|
10941
|
+
})
|
|
10942
|
+
}),
|
|
10943
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
10944
|
+
className: (0, clsx.default)(isVertical ? "w-full text-center order-2" : "w-14 text-right"),
|
|
10945
|
+
children: [weatherItem.temperature, isVertical ? "°" : "°C"]
|
|
10946
|
+
})
|
|
10947
|
+
]
|
|
10948
|
+
}, index))
|
|
10949
|
+
})]
|
|
10950
|
+
})
|
|
10951
|
+
});
|
|
10952
|
+
};
|
|
10894
10953
|
|
|
10895
10954
|
//#endregion
|
|
10896
10955
|
//#region src/components/collection/index.tsx
|