@daniel-szulc/react-weather-widget
Version:
A simple weather widget created using React.js ☀. This Component loading forecast data from various weather providers ⛈.
235 lines (234 loc) • 10.6 kB
JavaScript
;
require("core-js/modules/es.weak-map.js");
require("core-js/modules/web.dom-collections.iterator.js");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.weatherIcon = void 0;
var _react = _interopRequireDefault(require("react"));
var WeatherIcon = _interopRequireWildcard(require("./icon-objects"));
var _jsxRuntime = require("react/jsx-runtime");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const Clouds = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "clouds",
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {})
});
};
const LightRain = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall rain",
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "cloudy",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Sun, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {})]
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "drops",
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
})
})]
});
};
const ModerateRain = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall rain",
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "cloudy",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Sun, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {})]
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "drops",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
})]
})]
});
};
const Rain = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall rain",
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "cloudy",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Sun, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {})]
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "drops",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
})]
})]
});
};
const LightShowerRain = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall rain",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "drops",
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
})
})]
});
};
const ShowerRain = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall rain",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "drops",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
})]
})]
});
};
const Cloudy = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "cloudy",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Sun, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {})]
});
};
const Clear = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "clear",
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Sun, {})
});
};
const Thunderstorm = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "thunderstorm",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "thunder",
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Flash, {})
})]
});
};
const ThunderstormRain = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "thunderstorm",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "drops",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Flash, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
})]
})]
});
};
const LightSnow = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall snow",
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "cloudy",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Sun, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {})]
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "drops",
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {})
})]
});
};
const HeavySnow = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall snow",
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "cloudy",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Sun, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {})]
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "drops",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {})]
})]
});
};
const Snow = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall snow",
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "cloudy",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Sun, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {})]
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "drops",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {})]
})]
});
};
const LightShowerSnow = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall snow",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "drops",
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {})
})]
});
};
const ShowerSnow = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall snow",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "drops",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {})]
})]
});
};
const FreezingRain = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall rain snow",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "drops",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
})]
})]
});
};
const SnowAndRain = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fall snow rain",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "drops",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "shape drop-shape"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Snowflake, {})]
})]
});
};
const Fog = () => {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "fog",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
className: "cloud-foggy",
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Cloud, {})
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(WeatherIcon.Mist, {})]
});
};
const weatherIcon = exports.weatherIcon = {
'Clear': /*#__PURE__*/(0, _jsxRuntime.jsx)(Clear, {}),
'Clouds': /*#__PURE__*/(0, _jsxRuntime.jsx)(Clouds, {}),
'Cloudy': /*#__PURE__*/(0, _jsxRuntime.jsx)(Cloudy, {}),
'Rain': /*#__PURE__*/(0, _jsxRuntime.jsx)(Rain, {}),
'LightRain': /*#__PURE__*/(0, _jsxRuntime.jsx)(LightRain, {}),
'ModerateRain': /*#__PURE__*/(0, _jsxRuntime.jsx)(ModerateRain, {}),
'ShowerRain': /*#__PURE__*/(0, _jsxRuntime.jsx)(ShowerRain, {}),
'LightShowerRain': /*#__PURE__*/(0, _jsxRuntime.jsx)(LightShowerRain, {}),
'Snow': /*#__PURE__*/(0, _jsxRuntime.jsx)(Snow, {}),
'LightSnow': /*#__PURE__*/(0, _jsxRuntime.jsx)(LightSnow, {}),
'HeavySnow': /*#__PURE__*/(0, _jsxRuntime.jsx)(HeavySnow, {}),
'ShowerSnow': /*#__PURE__*/(0, _jsxRuntime.jsx)(ShowerSnow, {}),
'LightShowerSnow': /*#__PURE__*/(0, _jsxRuntime.jsx)(LightShowerSnow, {}),
'Thunderstorm': /*#__PURE__*/(0, _jsxRuntime.jsx)(Thunderstorm, {}),
'ThunderstormRain': /*#__PURE__*/(0, _jsxRuntime.jsx)(ThunderstormRain, {}),
'FreezingRain': /*#__PURE__*/(0, _jsxRuntime.jsx)(FreezingRain, {}),
'SnowAndRain': /*#__PURE__*/(0, _jsxRuntime.jsx)(SnowAndRain, {}),
'Fog': /*#__PURE__*/(0, _jsxRuntime.jsx)(Fog, {})
};