@greghowe79/the-lib 0.5.6 → 0.5.8

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,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
4
+ const qwik = require("@builder.io/qwik");
5
+ const styles = require("./styles.css.qwik.cjs");
6
+ require("@fontsource/roboto-condensed/500.css");
7
+ const Hero = qwik.component$(({ title, content }) => {
8
+ qwik.useStylesScoped$(styles);
9
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", {
10
+ class: "hero",
11
+ children: [
12
+ /* @__PURE__ */ jsxRuntime.jsx("h1", {
13
+ children: title
14
+ }),
15
+ /* @__PURE__ */ jsxRuntime.jsx("p", {
16
+ children: content
17
+ })
18
+ ]
19
+ });
20
+ });
21
+ exports.Hero = Hero;
@@ -0,0 +1,21 @@
1
+ import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$, useStylesScoped$ } from "@builder.io/qwik";
3
+ import styles from "./styles.css.qwik.mjs";
4
+ import "@fontsource/roboto-condensed/500.css";
5
+ const Hero = component$(({ title, content }) => {
6
+ useStylesScoped$(styles);
7
+ return /* @__PURE__ */ jsxs("section", {
8
+ class: "hero",
9
+ children: [
10
+ /* @__PURE__ */ jsx("h1", {
11
+ children: title
12
+ }),
13
+ /* @__PURE__ */ jsx("p", {
14
+ children: content
15
+ })
16
+ ]
17
+ });
18
+ });
19
+ export {
20
+ Hero
21
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ const styles = ".hero {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n background-color: #f4f4f9;\r\n text-align: center;\r\n padding: 6.25rem 1.25rem;\r\n}\r\n\r\n.hero h1 {\r\n font-size: 3rem;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n.hero p {\r\n font-size: 1.5rem;\r\n font-weight: 500;\r\n margin-bottom: 1.875rem;\r\n color: #333;\r\n}\r\n";
3
+ module.exports = styles;
@@ -0,0 +1,4 @@
1
+ const styles = ".hero {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n background-color: #f4f4f9;\r\n text-align: center;\r\n padding: 6.25rem 1.25rem;\r\n}\r\n\r\n.hero h1 {\r\n font-size: 3rem;\r\n margin-bottom: 1.25rem;\r\n color: #333;\r\n}\r\n\r\n.hero p {\r\n font-size: 1.5rem;\r\n font-weight: 500;\r\n margin-bottom: 1.875rem;\r\n color: #333;\r\n}\r\n";
2
+ export {
3
+ styles as default
4
+ };
@@ -6,9 +6,10 @@ const styles = require("./styles.css.qwik.cjs");
6
6
  const button = require("../button/button.qwik.cjs");
7
7
  const closeIcon = require("../icons/closeIcon.qwik.cjs");
8
8
  require("@fontsource/roboto-condensed");
9
- const Modal = qwik.component$(({ title, open, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction, closeButtonVisible = true, isLoading, primaryButtonDisabled }) => {
9
+ const Modal = qwik.component$(({ title, open, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction, closeButtonVisible = true, isLoading, primaryButtonDisabled, type = "default" }) => {
10
10
  qwik.useStylesScoped$(styles);
11
11
  const isDisabled = typeof primaryButtonDisabled === "object" ? primaryButtonDisabled.value : primaryButtonDisabled ?? false;
12
+ const modalClass = type === "small" ? "modal small" : "modal";
12
13
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
13
14
  id: "modal",
14
15
  class: "modal-overlay",
@@ -17,7 +18,7 @@ const Modal = qwik.component$(({ title, open, primaryButtonLabel, secondaryButto
17
18
  "aria-modal": "true",
18
19
  "aria-labelledby": "modal-title",
19
20
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
20
- class: "modal",
21
+ class: modalClass,
21
22
  tabIndex: -1,
22
23
  children: [
23
24
  /* @__PURE__ */ jsxRuntime.jsxs("div", {
@@ -4,9 +4,10 @@ import styles from "./styles.css.qwik.mjs";
4
4
  import { Button } from "../button/button.qwik.mjs";
5
5
  import { CloseIcon } from "../icons/closeIcon.qwik.mjs";
6
6
  import "@fontsource/roboto-condensed";
7
- const Modal = component$(({ title, open, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction, closeButtonVisible = true, isLoading, primaryButtonDisabled }) => {
7
+ const Modal = component$(({ title, open, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction, closeButtonVisible = true, isLoading, primaryButtonDisabled, type = "default" }) => {
8
8
  useStylesScoped$(styles);
9
9
  const isDisabled = typeof primaryButtonDisabled === "object" ? primaryButtonDisabled.value : primaryButtonDisabled ?? false;
10
+ const modalClass = type === "small" ? "modal small" : "modal";
10
11
  return /* @__PURE__ */ jsx("div", {
11
12
  id: "modal",
12
13
  class: "modal-overlay",
@@ -15,7 +16,7 @@ const Modal = component$(({ title, open, primaryButtonLabel, secondaryButtonLabe
15
16
  "aria-modal": "true",
16
17
  "aria-labelledby": "modal-title",
17
18
  children: /* @__PURE__ */ jsxs("div", {
18
- class: "modal",
19
+ class: modalClass,
19
20
  tabIndex: -1,
20
21
  children: [
21
22
  /* @__PURE__ */ jsxs("div", {
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const styles = ".modal-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 1000;\r\n}\r\n\r\n.modal {\r\n background: white;\r\n border-radius: 8px;\r\n width: 90%;\r\n max-width: 800px;\r\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\r\n outline: none;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n color: #333;\r\n}\r\n\r\n.modal-header {\r\n padding: 16px 24px;\r\n border-bottom: 1px solid #e0e0e0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.modal-header h2 {\r\n margin: 0;\r\n font-size: 1.25rem;\r\n}\r\n\r\n.modal-body {\r\n padding: 24px;\r\n max-height: 60vh;\r\n overflow-y: auto;\r\n font-weight: 400;\r\n}\r\n\r\n.modal-footer {\r\n padding: 16px 24px;\r\n border-top: 1px solid #e0e0e0;\r\n display: flex;\r\n justify-content: flex-end;\r\n gap: 12px;\r\n}\r\n\r\n.close-button {\r\n background: none;\r\n border: none;\r\n font-size: 1.5rem;\r\n cursor: pointer;\r\n padding: 4px;\r\n}\r\n\r\n[aria-hidden='true'] {\r\n display: none;\r\n}\r\n\r\n/* button:focus,\r\n[tabindex='0']:focus {\r\n outline: 2px solid #005fcc;\r\n outline-offset: 2px;\r\n} */\r\n\r\nbutton:focus-visible,\r\n[tabindex='0']:focus-visible {\r\n outline: 2px solid #005fcc;\r\n outline-offset: 2px;\r\n}\r\n";
2
+ const styles = "/* .modal-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 1000;\r\n}\r\n\r\n.modal {\r\n background: white;\r\n border-radius: 8px;\r\n width: 90%;\r\n max-width: 800px;\r\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\r\n outline: none;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n color: #333;\r\n}\r\n\r\n.modal-header {\r\n padding: 16px 24px;\r\n border-bottom: 1px solid #e0e0e0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.modal-header h2 {\r\n margin: 0;\r\n font-size: 1.25rem;\r\n}\r\n\r\n.modal-body {\r\n padding: 24px;\r\n max-height: 60vh;\r\n overflow-y: auto;\r\n font-weight: 400;\r\n}\r\n\r\n.modal-footer {\r\n padding: 16px 24px;\r\n border-top: 1px solid #e0e0e0;\r\n display: flex;\r\n justify-content: flex-end;\r\n gap: 12px;\r\n}\r\n\r\n.close-button {\r\n background: none;\r\n border: none;\r\n font-size: 1.5rem;\r\n cursor: pointer;\r\n padding: 4px;\r\n}\r\n\r\n[aria-hidden='true'] {\r\n display: none;\r\n}\r\n\r\n\r\n\r\nbutton:focus-visible,\r\n[tabindex='0']:focus-visible {\r\n outline: 2px solid #005fcc;\r\n outline-offset: 2px;\r\n} */\r\n/* Stili base (default) */\r\n.modal-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 1000;\r\n}\r\n\r\n.modal {\r\n background: white;\r\n border-radius: 8px;\r\n width: 90%;\r\n max-width: 800px;\r\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\r\n outline: none;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n color: #333;\r\n}\r\n\r\n.modal-header {\r\n padding: 16px 24px;\r\n border-bottom: 1px solid #e0e0e0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.modal-header h2 {\r\n margin: 0;\r\n font-size: 1.25rem;\r\n}\r\n\r\n.modal-body {\r\n padding: 24px;\r\n max-height: 60vh;\r\n overflow-y: auto;\r\n font-weight: 400;\r\n}\r\n\r\n.modal-footer {\r\n padding: 16px 24px;\r\n /* border-top: 1px solid #e0e0e0; */\r\n display: flex;\r\n justify-content: flex-end;\r\n gap: 12px;\r\n}\r\n\r\n/* Stili per la versione small */\r\n.modal.small {\r\n max-width: 500px;\r\n}\r\n\r\n.modal.small .modal-header {\r\n justify-content: center;\r\n position: relative; /* Per posizionare eventuale bottone chiusura */\r\n}\r\n\r\n.modal.small .modal-header h2 {\r\n text-align: center;\r\n}\r\n\r\n/* Se vuoi mantenere il bottone chiusura a destra */\r\n.modal.small .modal-header .close-button {\r\n position: absolute;\r\n right: 16px;\r\n}\r\n\r\n.modal.small .modal-body {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n flex-direction: column;\r\n padding: 20px; /* Riduci il padding se necessario */\r\n}\r\n\r\n.modal.small .modal-footer {\r\n justify-content: center;\r\n}\r\n\r\n/* Stili comuni */\r\n.close-button {\r\n background: none;\r\n border: none;\r\n font-size: 1.5rem;\r\n cursor: pointer;\r\n padding: 4px;\r\n}\r\n\r\n[aria-hidden='true'] {\r\n display: none;\r\n}\r\n\r\nbutton:focus-visible,\r\n[tabindex='0']:focus-visible {\r\n outline: 2px solid #005fcc;\r\n outline-offset: 2px;\r\n}\r\n";
3
3
  module.exports = styles;
@@ -1,4 +1,4 @@
1
- const styles = ".modal-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 1000;\r\n}\r\n\r\n.modal {\r\n background: white;\r\n border-radius: 8px;\r\n width: 90%;\r\n max-width: 800px;\r\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\r\n outline: none;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n color: #333;\r\n}\r\n\r\n.modal-header {\r\n padding: 16px 24px;\r\n border-bottom: 1px solid #e0e0e0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.modal-header h2 {\r\n margin: 0;\r\n font-size: 1.25rem;\r\n}\r\n\r\n.modal-body {\r\n padding: 24px;\r\n max-height: 60vh;\r\n overflow-y: auto;\r\n font-weight: 400;\r\n}\r\n\r\n.modal-footer {\r\n padding: 16px 24px;\r\n border-top: 1px solid #e0e0e0;\r\n display: flex;\r\n justify-content: flex-end;\r\n gap: 12px;\r\n}\r\n\r\n.close-button {\r\n background: none;\r\n border: none;\r\n font-size: 1.5rem;\r\n cursor: pointer;\r\n padding: 4px;\r\n}\r\n\r\n[aria-hidden='true'] {\r\n display: none;\r\n}\r\n\r\n/* button:focus,\r\n[tabindex='0']:focus {\r\n outline: 2px solid #005fcc;\r\n outline-offset: 2px;\r\n} */\r\n\r\nbutton:focus-visible,\r\n[tabindex='0']:focus-visible {\r\n outline: 2px solid #005fcc;\r\n outline-offset: 2px;\r\n}\r\n";
1
+ const styles = "/* .modal-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 1000;\r\n}\r\n\r\n.modal {\r\n background: white;\r\n border-radius: 8px;\r\n width: 90%;\r\n max-width: 800px;\r\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\r\n outline: none;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n color: #333;\r\n}\r\n\r\n.modal-header {\r\n padding: 16px 24px;\r\n border-bottom: 1px solid #e0e0e0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.modal-header h2 {\r\n margin: 0;\r\n font-size: 1.25rem;\r\n}\r\n\r\n.modal-body {\r\n padding: 24px;\r\n max-height: 60vh;\r\n overflow-y: auto;\r\n font-weight: 400;\r\n}\r\n\r\n.modal-footer {\r\n padding: 16px 24px;\r\n border-top: 1px solid #e0e0e0;\r\n display: flex;\r\n justify-content: flex-end;\r\n gap: 12px;\r\n}\r\n\r\n.close-button {\r\n background: none;\r\n border: none;\r\n font-size: 1.5rem;\r\n cursor: pointer;\r\n padding: 4px;\r\n}\r\n\r\n[aria-hidden='true'] {\r\n display: none;\r\n}\r\n\r\n\r\n\r\nbutton:focus-visible,\r\n[tabindex='0']:focus-visible {\r\n outline: 2px solid #005fcc;\r\n outline-offset: 2px;\r\n} */\r\n/* Stili base (default) */\r\n.modal-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 1000;\r\n}\r\n\r\n.modal {\r\n background: white;\r\n border-radius: 8px;\r\n width: 90%;\r\n max-width: 800px;\r\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\r\n outline: none;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n color: #333;\r\n}\r\n\r\n.modal-header {\r\n padding: 16px 24px;\r\n border-bottom: 1px solid #e0e0e0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n\r\n.modal-header h2 {\r\n margin: 0;\r\n font-size: 1.25rem;\r\n}\r\n\r\n.modal-body {\r\n padding: 24px;\r\n max-height: 60vh;\r\n overflow-y: auto;\r\n font-weight: 400;\r\n}\r\n\r\n.modal-footer {\r\n padding: 16px 24px;\r\n /* border-top: 1px solid #e0e0e0; */\r\n display: flex;\r\n justify-content: flex-end;\r\n gap: 12px;\r\n}\r\n\r\n/* Stili per la versione small */\r\n.modal.small {\r\n max-width: 500px;\r\n}\r\n\r\n.modal.small .modal-header {\r\n justify-content: center;\r\n position: relative; /* Per posizionare eventuale bottone chiusura */\r\n}\r\n\r\n.modal.small .modal-header h2 {\r\n text-align: center;\r\n}\r\n\r\n/* Se vuoi mantenere il bottone chiusura a destra */\r\n.modal.small .modal-header .close-button {\r\n position: absolute;\r\n right: 16px;\r\n}\r\n\r\n.modal.small .modal-body {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n flex-direction: column;\r\n padding: 20px; /* Riduci il padding se necessario */\r\n}\r\n\r\n.modal.small .modal-footer {\r\n justify-content: center;\r\n}\r\n\r\n/* Stili comuni */\r\n.close-button {\r\n background: none;\r\n border: none;\r\n font-size: 1.5rem;\r\n cursor: pointer;\r\n padding: 4px;\r\n}\r\n\r\n[aria-hidden='true'] {\r\n display: none;\r\n}\r\n\r\nbutton:focus-visible,\r\n[tabindex='0']:focus-visible {\r\n outline: 2px solid #005fcc;\r\n outline-offset: 2px;\r\n}\r\n";
2
2
  export {
3
3
  styles as default
4
4
  };
@@ -7,6 +7,7 @@ const NavigationMenu = require("./components/navigationmenu/NavigationMenu.qwik.
7
7
  const modal = require("./components/modal/modal.qwik.cjs");
8
8
  const loader = require("./components/loader/loader.qwik.cjs");
9
9
  const input = require("./components/input/input.qwik.cjs");
10
+ const hero = require("./components/hero/hero.qwik.cjs");
10
11
  exports.Logo = logo.Logo;
11
12
  exports.Counter = counter.Counter;
12
13
  exports.Button = button.Button;
@@ -14,3 +15,4 @@ exports.NavigationMenu = NavigationMenu.NavigationMenu;
14
15
  exports.Modal = modal.Modal;
15
16
  exports.Loader = loader.Loader;
16
17
  exports.Input = input.Input;
18
+ exports.Hero = hero.Hero;
@@ -5,9 +5,11 @@ import { NavigationMenu } from "./components/navigationmenu/NavigationMenu.qwik.
5
5
  import { Modal } from "./components/modal/modal.qwik.mjs";
6
6
  import { Loader } from "./components/loader/loader.qwik.mjs";
7
7
  import { Input } from "./components/input/input.qwik.mjs";
8
+ import { Hero } from "./components/hero/hero.qwik.mjs";
8
9
  export {
9
10
  Button,
10
11
  Counter,
12
+ Hero,
11
13
  Input,
12
14
  Loader,
13
15
  Logo,
@@ -0,0 +1,6 @@
1
+ import '@fontsource/roboto-condensed/500.css';
2
+ export interface HeroProps {
3
+ title?: string;
4
+ content?: string;
5
+ }
6
+ export declare const Hero: import("@builder.io/qwik").Component<HeroProps>;
@@ -10,5 +10,6 @@ export interface ModalProps {
10
10
  secondaryAction?: QRL<() => void> | QRL<() => boolean> | QRL<() => Promise<void>>;
11
11
  isLoading?: Signal<boolean>;
12
12
  primaryButtonDisabled?: Signal<boolean>;
13
+ type?: 'small' | 'default';
13
14
  }
14
15
  export declare const Modal: import("@builder.io/qwik").Component<ModalProps>;
@@ -5,3 +5,4 @@ export { NavigationMenu } from './components/navigationmenu/NavigationMenu';
5
5
  export { Modal } from './components/modal/modal';
6
6
  export { Loader } from './components/loader/loader';
7
7
  export { Input } from './components/input/input';
8
+ export { Hero } from './components/hero/hero';
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from 'storybook-framework-qwik';
2
+ import { type HeroProps } from '../components/hero/hero';
3
+ declare const meta: Meta<HeroProps>;
4
+ export default meta;
5
+ type Story = StoryObj<HeroProps>;
6
+ export declare const HeroWithText: Story;
@@ -8,3 +8,4 @@ export declare const WithoutTitle: Story;
8
8
  export declare const LongContent: Story;
9
9
  export declare const WithoutCloseButton: Story;
10
10
  export declare const WithLoadingBtn: Story;
11
+ export declare const ModalSmall: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",