@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.
- package/lib/components/hero/hero.qwik.cjs +21 -0
- package/lib/components/hero/hero.qwik.mjs +21 -0
- package/lib/components/hero/styles.css.qwik.cjs +3 -0
- package/lib/components/hero/styles.css.qwik.mjs +4 -0
- package/lib/components/modal/modal.qwik.cjs +3 -2
- package/lib/components/modal/modal.qwik.mjs +3 -2
- package/lib/components/modal/styles.css.qwik.cjs +1 -1
- package/lib/components/modal/styles.css.qwik.mjs +1 -1
- package/lib/index.qwik.cjs +2 -0
- package/lib/index.qwik.mjs +2 -0
- package/lib-types/components/hero/hero.d.ts +6 -0
- package/lib-types/components/modal/modal.d.ts +1 -0
- package/lib-types/index.d.ts +1 -0
- package/lib-types/stories/hero.stories.d.ts +6 -0
- package/lib-types/stories/modal.stories.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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:
|
|
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:
|
|
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
|
|
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
|
|
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
|
};
|
package/lib/index.qwik.cjs
CHANGED
|
@@ -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;
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -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,
|
|
@@ -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>;
|
package/lib-types/index.d.ts
CHANGED
|
@@ -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';
|