@greghowe79/the-lib 2.2.9 → 2.3.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.
@@ -8,7 +8,7 @@ const button_utils = require("./button.utils.qwik.cjs");
8
8
  const Button = qwik.component$(({ id, label, variant = "primary", icon, disabled = false, ariaLabel, type = "button", size = "md", onClick$, isLoading, active = false, customColors }) => {
9
9
  qwik.useStylesScoped$(styles);
10
10
  const loading = typeof isLoading === "object" && isLoading !== null && "value" in isLoading ? isLoading.value : isLoading;
11
- const hasCustomStyles = customColors && (customColors.bg || customColors.text || customColors.border);
11
+ const hasCustomStyles = customColors && (customColors.bg || customColors.text || customColors.border || customColors.padding || customColors.width);
12
12
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
13
13
  children: [
14
14
  hasCustomStyles && /* @__PURE__ */ jsxRuntime.jsx("style", {
@@ -6,7 +6,7 @@ import { generateCustomCSS } from "./button.utils.qwik.mjs";
6
6
  const Button = component$(({ id, label, variant = "primary", icon, disabled = false, ariaLabel, type = "button", size = "md", onClick$, isLoading, active = false, customColors }) => {
7
7
  useStylesScoped$(styles);
8
8
  const loading = typeof isLoading === "object" && isLoading !== null && "value" in isLoading ? isLoading.value : isLoading;
9
- const hasCustomStyles = customColors && (customColors.bg || customColors.text || customColors.border);
9
+ const hasCustomStyles = customColors && (customColors.bg || customColors.text || customColors.border || customColors.padding || customColors.width);
10
10
  return /* @__PURE__ */ jsxs(Fragment, {
11
11
  children: [
12
12
  hasCustomStyles && /* @__PURE__ */ jsx("style", {
@@ -10,7 +10,9 @@ function generateCustomCSS(id, colors) {
10
10
  colors.bg && `background: ${colors.bg} !important;`,
11
11
  colors.bg && isGradient(colors.bg) && gradientFix,
12
12
  colors.text && `color: ${colors.text} !important;`,
13
- colors.border && `border: 2px solid ${colors.border} !important;`
13
+ colors.border && `border: 2px solid ${colors.border} !important;`,
14
+ colors.padding && `padding: ${colors.padding} !important;`,
15
+ colors.width && `width: ${colors.width} !important;`
14
16
  ].filter(Boolean).join("\n");
15
17
  const hoverBg = colors.hoverBg || colors.bg;
16
18
  const hoverText = colors.hoverText || colors.text;
@@ -8,7 +8,9 @@ function generateCustomCSS(id, colors) {
8
8
  colors.bg && `background: ${colors.bg} !important;`,
9
9
  colors.bg && isGradient(colors.bg) && gradientFix,
10
10
  colors.text && `color: ${colors.text} !important;`,
11
- colors.border && `border: 2px solid ${colors.border} !important;`
11
+ colors.border && `border: 2px solid ${colors.border} !important;`,
12
+ colors.padding && `padding: ${colors.padding} !important;`,
13
+ colors.width && `width: ${colors.width} !important;`
12
14
  ].filter(Boolean).join("\n");
13
15
  const hoverBg = colors.hoverBg || colors.bg;
14
16
  const hoverText = colors.hoverText || colors.text;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const styles = ".button-primary {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;\r\n background: #333;\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: rgb(255, 255, 255);\r\n}\r\n\r\n/* Stile hover del pulsante */\r\n.button-primary:not(:disabled):hover {\r\n background: #0095ae;\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: rgb(255, 255, 255);\r\n border: 2px solid #0095ae;\r\n}\r\n\r\n/* Stile del pulsante secondario */\r\n.button-secondary {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;\r\n background: linear-gradient(to right, rgb(59, 65, 71), rgb(48, 54, 59));\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: white;\r\n}\r\n\r\n/* Stile hover del pulsante secondario */\r\n.button-secondary:not(:disabled):hover {\r\n /* background: linear-gradient(to right, #5a6268, #4e555b); */\r\n background: #000;\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: white;\r\n}\r\n\r\n/* Stile del pulsante di pericolo */\r\n.button-danger {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;\r\n background: linear-gradient(to right, rgb(153, 31, 43), rgb(130, 27, 37));\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: white;\r\n}\r\n\r\n/* Stile hover del pulsante di pericolo */\r\n.button-danger:not(:disabled):hover {\r\n background: linear-gradient(to right, #c82333, #bd2130);\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: white;\r\n}\r\n\r\n/* Stile del pulsante disabilitato */\r\n.button-primary:disabled,\r\n.button-secondary:disabled,\r\n.button-danger:disabled,\r\n.button-disabled {\r\n background-color: #cccccc;\r\n color: #000000;\r\n cursor: default; /* Usa il cursore a freccia */\r\n opacity: 0.6;\r\n}\r\n\r\n/* Assicurati che l'hover non funzioni quando il pulsante è disabilitato */\r\n.button-primary:disabled:hover,\r\n.button-secondary:disabled:hover,\r\n.button-danger:disabled:hover,\r\n.button-disabled:hover {\r\n background-color: #cccccc;\r\n border: 2px solid transparent;\r\n}\r\n\r\n/* Button sizes */\r\n.button-sm {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n width: 100%;\r\n}\r\n\r\n.button-md {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n /* width: 100%; */\r\n max-width: 8rem;\r\n}\r\n\r\n.button-primary.button-md,\r\n.button-secondary.button-md {\r\n width: 100%;\r\n}\r\n\r\n.button-lg {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n width: 100%;\r\n max-width: 12rem;\r\n}\r\n\r\n.button__icon {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.button__text {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n white-space: nowrap;\r\n}\r\n\r\nbutton.button-icon {\r\n gap: 0;\r\n background: none;\r\n border: none;\r\n outline: none;\r\n cursor: pointer;\r\n}\r\n\r\nbutton.button-icon:not(:disabled):hover {\r\n background: #f0f0f0;\r\n}\r\n\r\nbutton.button-tertiary {\r\n background: transparent;\r\n font-weight: 500;\r\n border: 2px solid #333;\r\n outline: none;\r\n cursor: pointer;\r\n color: #333;\r\n}\r\n\r\nbutton.button-tertiary:not(:disabled):hover {\r\n background: #f0f0f0;\r\n}\r\n\r\n/* NUOVO CODICE DA TESTARE */\r\n\r\n/* Variante Tab */\r\nbutton.button-tab {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n padding: 1rem 1.5rem;\r\n background: none;\r\n border: none;\r\n border-bottom: 3px solid transparent;\r\n color: #6b7280;\r\n font-size: 1rem;\r\n font-weight: 500;\r\n cursor: pointer;\r\n transition: all 0.2s ease;\r\n margin-bottom: -2px;\r\n border-radius: 0;\r\n height: auto;\r\n max-width: none;\r\n}\r\n\r\nbutton.button-tab:not(:disabled):not(.button-active):hover {\r\n color: #111827;\r\n border-bottom-color: #d1d5db;\r\n background: none;\r\n border-left: none;\r\n border-right: none;\r\n border-top: none;\r\n}\r\n\r\nbutton.button-tab.button-active {\r\n color: #06c;\r\n border-bottom-color: #06c;\r\n}\r\n\r\nbutton.button-tab .button__icon {\r\n width: 20px;\r\n height: 20px;\r\n}\r\n";
2
+ const styles = ".button-primary {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n /* transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s; */\r\n transition: background 0.1s ease-out 0s;\r\n background: #333;\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: rgb(255, 255, 255);\r\n}\r\n\r\n/* Stile hover del pulsante */\r\n.button-primary:not(:disabled):hover {\r\n background: #0095ae;\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: rgb(255, 255, 255);\r\n border: 2px solid #0095ae;\r\n}\r\n\r\n/* Stile del pulsante secondario */\r\n.button-secondary {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n /* transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s; */\r\n transition: background 0.1s ease-out 0s;\r\n background: linear-gradient(to right, rgb(59, 65, 71), rgb(48, 54, 59));\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: white;\r\n}\r\n\r\n/* Stile hover del pulsante secondario */\r\n.button-secondary:not(:disabled):hover {\r\n /* background: linear-gradient(to right, #5a6268, #4e555b); */\r\n background: #000;\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: white;\r\n}\r\n\r\n/* Stile del pulsante di pericolo */\r\n.button-danger {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n /* transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s; */\r\n transition: background 0.1s ease-out 0s;\r\n background: linear-gradient(to right, rgb(153, 31, 43), rgb(130, 27, 37));\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: white;\r\n}\r\n\r\n/* Stile hover del pulsante di pericolo */\r\n.button-danger:not(:disabled):hover {\r\n background: linear-gradient(to right, #c82333, #bd2130);\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: white;\r\n}\r\n\r\n/* Stile del pulsante disabilitato */\r\n.button-primary:disabled,\r\n.button-secondary:disabled,\r\n.button-danger:disabled,\r\n.button-disabled {\r\n background-color: #cccccc;\r\n color: #000000;\r\n cursor: default; /* Usa il cursore a freccia */\r\n opacity: 0.6;\r\n}\r\n\r\n/* Assicurati che l'hover non funzioni quando il pulsante è disabilitato */\r\n.button-primary:disabled:hover,\r\n.button-secondary:disabled:hover,\r\n.button-danger:disabled:hover,\r\n.button-disabled:hover {\r\n background-color: #cccccc;\r\n border: 2px solid transparent;\r\n}\r\n\r\n/* Button sizes */\r\n.button-sm {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n width: 100%;\r\n}\r\n\r\n.button-md {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n /* width: 100%; */\r\n max-width: 8rem;\r\n}\r\n\r\n.button-primary.button-md,\r\n.button-secondary.button-md {\r\n width: 100%;\r\n}\r\n\r\n.button-lg {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n width: 100%;\r\n max-width: 12rem;\r\n}\r\n\r\n.button__icon {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.button__text {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n white-space: nowrap;\r\n}\r\n\r\nbutton.button-icon {\r\n gap: 0;\r\n background: none;\r\n border: none;\r\n outline: none;\r\n cursor: pointer;\r\n}\r\n\r\nbutton.button-icon:not(:disabled):hover {\r\n background: #f0f0f0;\r\n}\r\n\r\nbutton.button-tertiary {\r\n background: transparent;\r\n font-weight: 500;\r\n border: 2px solid #333;\r\n outline: none;\r\n cursor: pointer;\r\n color: #333;\r\n}\r\n\r\nbutton.button-tertiary:not(:disabled):hover {\r\n background: #f0f0f0;\r\n}\r\n\r\n/* NUOVO CODICE DA TESTARE */\r\n\r\n/* Variante Tab */\r\nbutton.button-tab {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n padding: 1rem 1.5rem;\r\n background: none;\r\n border: none;\r\n border-bottom: 3px solid transparent;\r\n color: #6b7280;\r\n font-size: 1rem;\r\n font-weight: 500;\r\n cursor: pointer;\r\n transition: all 0.2s ease;\r\n margin-bottom: -2px;\r\n border-radius: 0;\r\n height: auto;\r\n max-width: none;\r\n}\r\n\r\nbutton.button-tab:not(:disabled):not(.button-active):hover {\r\n color: #111827;\r\n border-bottom-color: #d1d5db;\r\n background: none;\r\n border-left: none;\r\n border-right: none;\r\n border-top: none;\r\n}\r\n\r\nbutton.button-tab.button-active {\r\n color: #06c;\r\n border-bottom-color: #06c;\r\n}\r\n\r\nbutton.button-tab .button__icon {\r\n width: 20px;\r\n height: 20px;\r\n}\r\n";
3
3
  module.exports = styles;
@@ -1,4 +1,4 @@
1
- const styles = ".button-primary {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;\r\n background: #333;\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: rgb(255, 255, 255);\r\n}\r\n\r\n/* Stile hover del pulsante */\r\n.button-primary:not(:disabled):hover {\r\n background: #0095ae;\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: rgb(255, 255, 255);\r\n border: 2px solid #0095ae;\r\n}\r\n\r\n/* Stile del pulsante secondario */\r\n.button-secondary {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;\r\n background: linear-gradient(to right, rgb(59, 65, 71), rgb(48, 54, 59));\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: white;\r\n}\r\n\r\n/* Stile hover del pulsante secondario */\r\n.button-secondary:not(:disabled):hover {\r\n /* background: linear-gradient(to right, #5a6268, #4e555b); */\r\n background: #000;\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: white;\r\n}\r\n\r\n/* Stile del pulsante di pericolo */\r\n.button-danger {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;\r\n background: linear-gradient(to right, rgb(153, 31, 43), rgb(130, 27, 37));\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: white;\r\n}\r\n\r\n/* Stile hover del pulsante di pericolo */\r\n.button-danger:not(:disabled):hover {\r\n background: linear-gradient(to right, #c82333, #bd2130);\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: white;\r\n}\r\n\r\n/* Stile del pulsante disabilitato */\r\n.button-primary:disabled,\r\n.button-secondary:disabled,\r\n.button-danger:disabled,\r\n.button-disabled {\r\n background-color: #cccccc;\r\n color: #000000;\r\n cursor: default; /* Usa il cursore a freccia */\r\n opacity: 0.6;\r\n}\r\n\r\n/* Assicurati che l'hover non funzioni quando il pulsante è disabilitato */\r\n.button-primary:disabled:hover,\r\n.button-secondary:disabled:hover,\r\n.button-danger:disabled:hover,\r\n.button-disabled:hover {\r\n background-color: #cccccc;\r\n border: 2px solid transparent;\r\n}\r\n\r\n/* Button sizes */\r\n.button-sm {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n width: 100%;\r\n}\r\n\r\n.button-md {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n /* width: 100%; */\r\n max-width: 8rem;\r\n}\r\n\r\n.button-primary.button-md,\r\n.button-secondary.button-md {\r\n width: 100%;\r\n}\r\n\r\n.button-lg {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n width: 100%;\r\n max-width: 12rem;\r\n}\r\n\r\n.button__icon {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.button__text {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n white-space: nowrap;\r\n}\r\n\r\nbutton.button-icon {\r\n gap: 0;\r\n background: none;\r\n border: none;\r\n outline: none;\r\n cursor: pointer;\r\n}\r\n\r\nbutton.button-icon:not(:disabled):hover {\r\n background: #f0f0f0;\r\n}\r\n\r\nbutton.button-tertiary {\r\n background: transparent;\r\n font-weight: 500;\r\n border: 2px solid #333;\r\n outline: none;\r\n cursor: pointer;\r\n color: #333;\r\n}\r\n\r\nbutton.button-tertiary:not(:disabled):hover {\r\n background: #f0f0f0;\r\n}\r\n\r\n/* NUOVO CODICE DA TESTARE */\r\n\r\n/* Variante Tab */\r\nbutton.button-tab {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n padding: 1rem 1.5rem;\r\n background: none;\r\n border: none;\r\n border-bottom: 3px solid transparent;\r\n color: #6b7280;\r\n font-size: 1rem;\r\n font-weight: 500;\r\n cursor: pointer;\r\n transition: all 0.2s ease;\r\n margin-bottom: -2px;\r\n border-radius: 0;\r\n height: auto;\r\n max-width: none;\r\n}\r\n\r\nbutton.button-tab:not(:disabled):not(.button-active):hover {\r\n color: #111827;\r\n border-bottom-color: #d1d5db;\r\n background: none;\r\n border-left: none;\r\n border-right: none;\r\n border-top: none;\r\n}\r\n\r\nbutton.button-tab.button-active {\r\n color: #06c;\r\n border-bottom-color: #06c;\r\n}\r\n\r\nbutton.button-tab .button__icon {\r\n width: 20px;\r\n height: 20px;\r\n}\r\n";
1
+ const styles = ".button-primary {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n /* transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s; */\r\n transition: background 0.1s ease-out 0s;\r\n background: #333;\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: rgb(255, 255, 255);\r\n}\r\n\r\n/* Stile hover del pulsante */\r\n.button-primary:not(:disabled):hover {\r\n background: #0095ae;\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: rgb(255, 255, 255);\r\n border: 2px solid #0095ae;\r\n}\r\n\r\n/* Stile del pulsante secondario */\r\n.button-secondary {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n /* transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s; */\r\n transition: background 0.1s ease-out 0s;\r\n background: linear-gradient(to right, rgb(59, 65, 71), rgb(48, 54, 59));\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: white;\r\n}\r\n\r\n/* Stile hover del pulsante secondario */\r\n.button-secondary:not(:disabled):hover {\r\n /* background: linear-gradient(to right, #5a6268, #4e555b); */\r\n background: #000;\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: white;\r\n}\r\n\r\n/* Stile del pulsante di pericolo */\r\n.button-danger {\r\n display: inline-block;\r\n outline: none;\r\n border: 2px solid transparent;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n font-weight: 500;\r\n max-width: 100%;\r\n text-align: center;\r\n text-decoration: none;\r\n /* transition:\r\n background 0.1s ease-out 0s,\r\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s; */\r\n transition: background 0.1s ease-out 0s;\r\n background: linear-gradient(to right, rgb(153, 31, 43), rgb(130, 27, 37));\r\n cursor: pointer;\r\n height: 32px;\r\n line-height: 32px;\r\n padding: 0px 12px;\r\n vertical-align: middle;\r\n width: auto;\r\n font-size: 14px;\r\n color: white;\r\n}\r\n\r\n/* Stile hover del pulsante di pericolo */\r\n.button-danger:not(:disabled):hover {\r\n background: linear-gradient(to right, #c82333, #bd2130);\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: white;\r\n}\r\n\r\n/* Stile del pulsante disabilitato */\r\n.button-primary:disabled,\r\n.button-secondary:disabled,\r\n.button-danger:disabled,\r\n.button-disabled {\r\n background-color: #cccccc;\r\n color: #000000;\r\n cursor: default; /* Usa il cursore a freccia */\r\n opacity: 0.6;\r\n}\r\n\r\n/* Assicurati che l'hover non funzioni quando il pulsante è disabilitato */\r\n.button-primary:disabled:hover,\r\n.button-secondary:disabled:hover,\r\n.button-danger:disabled:hover,\r\n.button-disabled:hover {\r\n background-color: #cccccc;\r\n border: 2px solid transparent;\r\n}\r\n\r\n/* Button sizes */\r\n.button-sm {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n width: 100%;\r\n}\r\n\r\n.button-md {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n /* width: 100%; */\r\n max-width: 8rem;\r\n}\r\n\r\n.button-primary.button-md,\r\n.button-secondary.button-md {\r\n width: 100%;\r\n}\r\n\r\n.button-lg {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n gap: 0.313rem;\r\n font-size: 1rem;\r\n height: 100%;\r\n line-height: 1.25rem;\r\n padding: 0.75rem 1.5rem;\r\n border-radius: 2rem;\r\n width: 100%;\r\n max-width: 12rem;\r\n}\r\n\r\n.button__icon {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.button__text {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n white-space: nowrap;\r\n}\r\n\r\nbutton.button-icon {\r\n gap: 0;\r\n background: none;\r\n border: none;\r\n outline: none;\r\n cursor: pointer;\r\n}\r\n\r\nbutton.button-icon:not(:disabled):hover {\r\n background: #f0f0f0;\r\n}\r\n\r\nbutton.button-tertiary {\r\n background: transparent;\r\n font-weight: 500;\r\n border: 2px solid #333;\r\n outline: none;\r\n cursor: pointer;\r\n color: #333;\r\n}\r\n\r\nbutton.button-tertiary:not(:disabled):hover {\r\n background: #f0f0f0;\r\n}\r\n\r\n/* NUOVO CODICE DA TESTARE */\r\n\r\n/* Variante Tab */\r\nbutton.button-tab {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n padding: 1rem 1.5rem;\r\n background: none;\r\n border: none;\r\n border-bottom: 3px solid transparent;\r\n color: #6b7280;\r\n font-size: 1rem;\r\n font-weight: 500;\r\n cursor: pointer;\r\n transition: all 0.2s ease;\r\n margin-bottom: -2px;\r\n border-radius: 0;\r\n height: auto;\r\n max-width: none;\r\n}\r\n\r\nbutton.button-tab:not(:disabled):not(.button-active):hover {\r\n color: #111827;\r\n border-bottom-color: #d1d5db;\r\n background: none;\r\n border-left: none;\r\n border-right: none;\r\n border-top: none;\r\n}\r\n\r\nbutton.button-tab.button-active {\r\n color: #06c;\r\n border-bottom-color: #06c;\r\n}\r\n\r\nbutton.button-tab .button__icon {\r\n width: 20px;\r\n height: 20px;\r\n}\r\n";
2
2
  export {
3
3
  styles as default
4
4
  };
@@ -9,6 +9,8 @@ export interface CustomColors {
9
9
  hoverText?: string;
10
10
  border?: string;
11
11
  hoverBorder?: string;
12
+ padding?: string;
13
+ width?: string;
12
14
  }
13
15
  export interface ButtonProps {
14
16
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "2.2.9",
3
+ "version": "2.3.1",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",