@greghowe79/the-lib 2.2.8 → 2.3.0
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/button/button.qwik.cjs +1 -1
- package/lib/components/button/button.qwik.mjs +1 -1
- package/lib/components/button/button.utils.qwik.cjs +3 -1
- package/lib/components/button/button.utils.qwik.mjs +3 -1
- package/lib/components/card/styles.css.qwik.cjs +1 -1
- package/lib/components/card/styles.css.qwik.mjs +1 -1
- package/lib-types/components/button/button.d.ts +2 -0
- package/package.json +1 -1
|
@@ -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 = ".card {\r\n max-width: 340px;\r\n width: 100%;\r\n overflow-y: auto;\r\n overflow-x: hidden;\r\n position: relative;\r\n z-index: 1;\r\n background-color: #fff;\r\n display: flex;\r\n flex-direction: column;\r\n border-radius: 10px;\r\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);\r\n font-family: 'Roboto Condensed', sans-serif;\r\n transition: 0.3s;\r\n}\r\n\r\n.card-header {\r\n position: relative;\r\n display: flex;\r\n justify-content: flex-end;\r\n flex-direction: column;\r\n align-items: center;\r\n height: 250px;\r\n flex-shrink: 0;\r\n width: 100%;\r\n transition: 0.3s;\r\n}\r\n\r\n.card-cover {\r\n width: 100%;\r\n height: 160px;\r\n position: absolute;\r\n top: -28%;\r\n left: 0;\r\n will-change: top;\r\n background: #
|
|
2
|
+
const styles = ".card {\r\n max-width: 340px;\r\n width: 100%;\r\n overflow-y: auto;\r\n overflow-x: hidden;\r\n position: relative;\r\n z-index: 1;\r\n background-color: #fff;\r\n display: flex;\r\n flex-direction: column;\r\n border-radius: 10px;\r\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);\r\n font-family: 'Roboto Condensed', sans-serif;\r\n transition: 0.3s;\r\n}\r\n\r\n.card-header {\r\n position: relative;\r\n display: flex;\r\n justify-content: flex-end;\r\n flex-direction: column;\r\n align-items: center;\r\n height: 250px;\r\n flex-shrink: 0;\r\n width: 100%;\r\n transition: 0.3s;\r\n}\r\n\r\n.card-cover {\r\n width: 100%;\r\n height: 160px;\r\n position: absolute;\r\n top: -28%;\r\n left: 0;\r\n will-change: top;\r\n background: #00758a;\r\n background-size: cover;\r\n background-position: center;\r\n transform: scale(1.2);\r\n transition: 0.5s;\r\n}\r\n\r\n.card-avatar-container {\r\n width: 120px;\r\n height: 120px;\r\n border-radius: 50%;\r\n overflow: hidden;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 1;\r\n}\r\n\r\n.card-avatar {\r\n object-fit: cover;\r\n display: block;\r\n}\r\n\r\n.card-wrap-details {\r\n width: 100%;\r\n max-width: 200px;\r\n height: 100px;\r\n}\r\n\r\n.card-fullname {\r\n /* position: absolute;\r\n bottom: 0; */\r\n font-size: 22px;\r\n font-weight: 700;\r\n text-align: center;\r\n word-wrap: break-word;\r\n word-break: break-word;\r\n /* white-space: nowrap;\r\n transform: translateY(-10px) translateX(-50%);\r\n left: 50%; */\r\n letter-spacing: 0.5px;\r\n}\r\n\r\n.card-jobtitle {\r\n /* position: absolute;\r\n bottom: 0; */\r\n font-size: 11px;\r\n /* white-space: nowrap; */\r\n font-weight: 500;\r\n text-align: center;\r\n opacity: 0.7;\r\n text-transform: uppercase;\r\n letter-spacing: 1.5px;\r\n word-wrap: break-word;\r\n word-break: break-word;\r\n /* left: 50%;\r\n transform: translateX(-50%) translateY(-7px); */\r\n margin: 0;\r\n}\r\n\r\n.card-main {\r\n position: relative;\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n padding-top: 10px;\r\n}\r\n\r\n.card-section {\r\n display: block;\r\n}\r\n\r\n.card-content {\r\n padding: 20px;\r\n}\r\n\r\n.card-subtitle {\r\n font-weight: 700;\r\n font-size: 13px;\r\n margin-bottom: 8px;\r\n color: #333;\r\n letter-spacing: 0.5px;\r\n}\r\n\r\n.card-desc {\r\n line-height: 1.6;\r\n color: rgb(110, 110, 115);\r\n font-size: 14px;\r\n margin: 0;\r\n font-weight: 400;\r\n min-height: 10ch;\r\n}\r\n\r\n.card-container-url {\r\n display: flex;\r\n align-items: center;\r\n padding: 0 20px;\r\n margin-bottom: 30px;\r\n}\r\n\r\n.card-icon {\r\n color: #8797a1;\r\n height: 32px;\r\n width: 32px;\r\n border-radius: 50%;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: 0.3s;\r\n background-color: rgba(93, 133, 193, 0.05);\r\n margin-right: 10px;\r\n}\r\n\r\n.go-to-profile {\r\n align-self: center;\r\n color: #06c;\r\n text-decoration: none;\r\n}\r\n\r\n.go-to-profile:hover {\r\n text-decoration: underline;\r\n}\r\n\r\n.link_disabled {\r\n color: #cccccc;\r\n cursor: not-allowed;\r\n text-decoration: none;\r\n}\r\n";
|
|
3
3
|
module.exports = styles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const styles = ".card {\r\n max-width: 340px;\r\n width: 100%;\r\n overflow-y: auto;\r\n overflow-x: hidden;\r\n position: relative;\r\n z-index: 1;\r\n background-color: #fff;\r\n display: flex;\r\n flex-direction: column;\r\n border-radius: 10px;\r\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);\r\n font-family: 'Roboto Condensed', sans-serif;\r\n transition: 0.3s;\r\n}\r\n\r\n.card-header {\r\n position: relative;\r\n display: flex;\r\n justify-content: flex-end;\r\n flex-direction: column;\r\n align-items: center;\r\n height: 250px;\r\n flex-shrink: 0;\r\n width: 100%;\r\n transition: 0.3s;\r\n}\r\n\r\n.card-cover {\r\n width: 100%;\r\n height: 160px;\r\n position: absolute;\r\n top: -28%;\r\n left: 0;\r\n will-change: top;\r\n background: #
|
|
1
|
+
const styles = ".card {\r\n max-width: 340px;\r\n width: 100%;\r\n overflow-y: auto;\r\n overflow-x: hidden;\r\n position: relative;\r\n z-index: 1;\r\n background-color: #fff;\r\n display: flex;\r\n flex-direction: column;\r\n border-radius: 10px;\r\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);\r\n font-family: 'Roboto Condensed', sans-serif;\r\n transition: 0.3s;\r\n}\r\n\r\n.card-header {\r\n position: relative;\r\n display: flex;\r\n justify-content: flex-end;\r\n flex-direction: column;\r\n align-items: center;\r\n height: 250px;\r\n flex-shrink: 0;\r\n width: 100%;\r\n transition: 0.3s;\r\n}\r\n\r\n.card-cover {\r\n width: 100%;\r\n height: 160px;\r\n position: absolute;\r\n top: -28%;\r\n left: 0;\r\n will-change: top;\r\n background: #00758a;\r\n background-size: cover;\r\n background-position: center;\r\n transform: scale(1.2);\r\n transition: 0.5s;\r\n}\r\n\r\n.card-avatar-container {\r\n width: 120px;\r\n height: 120px;\r\n border-radius: 50%;\r\n overflow: hidden;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n z-index: 1;\r\n}\r\n\r\n.card-avatar {\r\n object-fit: cover;\r\n display: block;\r\n}\r\n\r\n.card-wrap-details {\r\n width: 100%;\r\n max-width: 200px;\r\n height: 100px;\r\n}\r\n\r\n.card-fullname {\r\n /* position: absolute;\r\n bottom: 0; */\r\n font-size: 22px;\r\n font-weight: 700;\r\n text-align: center;\r\n word-wrap: break-word;\r\n word-break: break-word;\r\n /* white-space: nowrap;\r\n transform: translateY(-10px) translateX(-50%);\r\n left: 50%; */\r\n letter-spacing: 0.5px;\r\n}\r\n\r\n.card-jobtitle {\r\n /* position: absolute;\r\n bottom: 0; */\r\n font-size: 11px;\r\n /* white-space: nowrap; */\r\n font-weight: 500;\r\n text-align: center;\r\n opacity: 0.7;\r\n text-transform: uppercase;\r\n letter-spacing: 1.5px;\r\n word-wrap: break-word;\r\n word-break: break-word;\r\n /* left: 50%;\r\n transform: translateX(-50%) translateY(-7px); */\r\n margin: 0;\r\n}\r\n\r\n.card-main {\r\n position: relative;\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n padding-top: 10px;\r\n}\r\n\r\n.card-section {\r\n display: block;\r\n}\r\n\r\n.card-content {\r\n padding: 20px;\r\n}\r\n\r\n.card-subtitle {\r\n font-weight: 700;\r\n font-size: 13px;\r\n margin-bottom: 8px;\r\n color: #333;\r\n letter-spacing: 0.5px;\r\n}\r\n\r\n.card-desc {\r\n line-height: 1.6;\r\n color: rgb(110, 110, 115);\r\n font-size: 14px;\r\n margin: 0;\r\n font-weight: 400;\r\n min-height: 10ch;\r\n}\r\n\r\n.card-container-url {\r\n display: flex;\r\n align-items: center;\r\n padding: 0 20px;\r\n margin-bottom: 30px;\r\n}\r\n\r\n.card-icon {\r\n color: #8797a1;\r\n height: 32px;\r\n width: 32px;\r\n border-radius: 50%;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: 0.3s;\r\n background-color: rgba(93, 133, 193, 0.05);\r\n margin-right: 10px;\r\n}\r\n\r\n.go-to-profile {\r\n align-self: center;\r\n color: #06c;\r\n text-decoration: none;\r\n}\r\n\r\n.go-to-profile:hover {\r\n text-decoration: underline;\r\n}\r\n\r\n.link_disabled {\r\n color: #cccccc;\r\n cursor: not-allowed;\r\n text-decoration: none;\r\n}\r\n";
|
|
2
2
|
export {
|
|
3
3
|
styles as default
|
|
4
4
|
};
|