@greghowe79/the-lib 0.0.9 → 0.1.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.
@@ -2,16 +2,17 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
4
4
  const qwik = require("@builder.io/qwik");
5
- const styles_css = require("./styles.css.qwik.cjs");
5
+ const styles = require("./styles.css.qwik.cjs");
6
6
  const Button = qwik.component$(({ id, label, variant = "primary", icon, disabled = false, ariaLabel, type = "button", size = "md", onClick$ }) => {
7
+ qwik.useStylesScoped$(styles);
7
8
  return /* @__PURE__ */ jsxRuntime.jsxs("button", {
8
9
  id,
9
10
  type,
10
11
  class: [
11
- styles_css.buttonVariants[variant],
12
- styles_css.buttonSizeVariants[size],
13
- disabled && styles_css.disabledStyle
14
- ],
12
+ `button-${variant}`,
13
+ `button-${size}`,
14
+ disabled && "button-disabled"
15
+ ].filter(Boolean).join(" "),
15
16
  disabled,
16
17
  "aria-disabled": disabled,
17
18
  "aria-label": ariaLabel || (icon ? label : void 0),
@@ -1,15 +1,16 @@
1
1
  import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
2
- import { component$ } from "@builder.io/qwik";
3
- import { buttonVariants, buttonSizeVariants, disabledStyle } from "./styles.css.qwik.mjs";
2
+ import { component$, useStylesScoped$ } from "@builder.io/qwik";
3
+ import styles from "./styles.css.qwik.mjs";
4
4
  const Button = component$(({ id, label, variant = "primary", icon, disabled = false, ariaLabel, type = "button", size = "md", onClick$ }) => {
5
+ useStylesScoped$(styles);
5
6
  return /* @__PURE__ */ jsxs("button", {
6
7
  id,
7
8
  type,
8
9
  class: [
9
- buttonVariants[variant],
10
- buttonSizeVariants[size],
11
- disabled && disabledStyle
12
- ],
10
+ `button-${variant}`,
11
+ `button-${size}`,
12
+ disabled && "button-disabled"
13
+ ].filter(Boolean).join(" "),
13
14
  disabled,
14
15
  "aria-disabled": disabled,
15
16
  "aria-label": ariaLabel || (icon ? label : void 0),
@@ -1,9 +1,3 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- ;/* empty css */
4
- var buttonVariants = { primary: "styles_buttonVariants_primary__1j35qve0", secondary: "styles_buttonVariants_secondary__1j35qve1", danger: "styles_buttonVariants_danger__1j35qve2" };
5
- var buttonSizeVariants = { sm: "styles_buttonSizeVariants_sm__1j35qve3", md: "styles_buttonSizeVariants_md__1j35qve4", lg: "styles_buttonSizeVariants_lg__1j35qve5" };
6
- var disabledStyle = "styles__1j35qve6";
7
- exports.buttonSizeVariants = buttonSizeVariants;
8
- exports.buttonVariants = buttonVariants;
9
- exports.disabledStyle = disabledStyle;
2
+ const styles = "/* Button variants */\r\n.button-primary {\r\n display: inline-block;\r\n outline: none;\r\n border-width: 0px;\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: rgb(0, 82, 204);\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.button-primary:hover {\r\n background: rgb(0, 101, 255);\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: rgb(255, 255, 255);\r\n}\r\n\r\n.button-secondary {\r\n display: inline-block;\r\n outline: none;\r\n border-width: 0px;\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, #6c757d, #5a6268);\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.button-secondary:hover {\r\n background: linear-gradient(to right, #5a6268, #4e555b);\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: white;\r\n}\r\n\r\n.button-danger {\r\n display: inline-block;\r\n outline: none;\r\n border-width: 0px;\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, #dc3545, #c82333);\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.button-danger: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/* Button sizes */\r\n.button-sm {\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 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-lg {\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/* Disabled state */\r\n.button-disabled {\r\n opacity: 0.6;\r\n cursor: not-allowed;\r\n}\r\n";
3
+ module.exports = styles;
@@ -1,9 +1,4 @@
1
- /* empty css */
2
- var buttonVariants = { primary: "styles_buttonVariants_primary__1j35qve0", secondary: "styles_buttonVariants_secondary__1j35qve1", danger: "styles_buttonVariants_danger__1j35qve2" };
3
- var buttonSizeVariants = { sm: "styles_buttonSizeVariants_sm__1j35qve3", md: "styles_buttonSizeVariants_md__1j35qve4", lg: "styles_buttonSizeVariants_lg__1j35qve5" };
4
- var disabledStyle = "styles__1j35qve6";
1
+ const styles = "/* Button variants */\r\n.button-primary {\r\n display: inline-block;\r\n outline: none;\r\n border-width: 0px;\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: rgb(0, 82, 204);\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.button-primary:hover {\r\n background: rgb(0, 101, 255);\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: rgb(255, 255, 255);\r\n}\r\n\r\n.button-secondary {\r\n display: inline-block;\r\n outline: none;\r\n border-width: 0px;\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, #6c757d, #5a6268);\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.button-secondary:hover {\r\n background: linear-gradient(to right, #5a6268, #4e555b);\r\n text-decoration: inherit;\r\n transition-duration: 0s, 0.15s;\r\n color: white;\r\n}\r\n\r\n.button-danger {\r\n display: inline-block;\r\n outline: none;\r\n border-width: 0px;\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, #dc3545, #c82333);\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.button-danger: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/* Button sizes */\r\n.button-sm {\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 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-lg {\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/* Disabled state */\r\n.button-disabled {\r\n opacity: 0.6;\r\n cursor: not-allowed;\r\n}\r\n";
5
2
  export {
6
- buttonSizeVariants,
7
- buttonVariants,
8
- disabledStyle
3
+ styles as default
9
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "0.0.9",
3
+ "version": "0.1.1",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",
@@ -10,9 +10,6 @@
10
10
  "import": "./lib/index.qwik.mjs",
11
11
  "require": "./lib/index.qwik.cjs",
12
12
  "types": "./lib-types/index.d.ts"
13
- },
14
- "./assets/BefodwuD-style.css": {
15
- "import": "./lib/assets/BefodwuD-style.css"
16
13
  }
17
14
  },
18
15
  "files": [
@@ -1,107 +0,0 @@
1
- .styles_buttonVariants_primary__1j35qve0 {
2
- display: inline-block;
3
- outline: none;
4
- border-width: 0px;
5
- border-radius: 3px;
6
- box-sizing: border-box;
7
- font-weight: 500;
8
- max-width: 100%;
9
- text-align: center;
10
- text-decoration: none;
11
- transition: background 0.1s ease-out 0s, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;
12
- background: rgb(0, 82, 204);
13
- cursor: pointer;
14
- height: 32px;
15
- line-height: 32px;
16
- padding: 0px 12px;
17
- vertical-align: middle;
18
- width: auto;
19
- font-size: 14px;
20
- color: rgb(255, 255, 255);
21
- }
22
- .styles_buttonVariants_primary__1j35qve0:hover {
23
- background: rgb(0, 101, 255);
24
- text-decoration: inherit;
25
- transition-duration: 0s, 0.15s;
26
- color: rgb(255, 255, 255);
27
- }
28
- .styles_buttonVariants_secondary__1j35qve1 {
29
- display: inline-block;
30
- outline: none;
31
- border-width: 0px;
32
- border-radius: 3px;
33
- box-sizing: border-box;
34
- font-weight: 500;
35
- max-width: 100%;
36
- text-align: center;
37
- text-decoration: none;
38
- transition: background 0.1s ease-out 0s, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;
39
- background: linear-gradient(to right, #6c757d, #5a6268);
40
- cursor: pointer;
41
- height: 32px;
42
- line-height: 32px;
43
- padding: 0px 12px;
44
- vertical-align: middle;
45
- width: auto;
46
- font-size: 14px;
47
- color: white;
48
- }
49
- .styles_buttonVariants_secondary__1j35qve1:hover {
50
- background: linear-gradient(to right, #5a6268, #4e555b);
51
- text-decoration: inherit;
52
- transition-duration: 0s, 0.15s;
53
- color: white;
54
- }
55
- .styles_buttonVariants_danger__1j35qve2 {
56
- display: inline-block;
57
- outline: none;
58
- border-width: 0px;
59
- border-radius: 3px;
60
- box-sizing: border-box;
61
- font-weight: 500;
62
- max-width: 100%;
63
- text-align: center;
64
- text-decoration: none;
65
- transition: background 0.1s ease-out 0s, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;
66
- background: linear-gradient(to right, #dc3545, #c82333);
67
- cursor: pointer;
68
- height: 32px;
69
- line-height: 32px;
70
- padding: 0px 12px;
71
- vertical-align: middle;
72
- width: auto;
73
- font-size: 14px;
74
- color: white;
75
- }
76
- .styles_buttonVariants_danger__1j35qve2:hover {
77
- background: linear-gradient(to right, #c82333, #bd2130);
78
- text-decoration: inherit;
79
- transition-duration: 0s, 0.15s;
80
- color: white;
81
- }
82
- .styles_buttonSizeVariants_sm__1j35qve3 {
83
- font-size: 1rem;
84
- height: 100%;
85
- line-height: 1.25rem;
86
- padding: 0.875rem 1.5rem;
87
- border-radius: 0.5rem;
88
- width: 100%;
89
- }
90
- .styles_buttonSizeVariants_md__1j35qve4 {
91
- font-size: 14px;
92
- height: 32px;
93
- line-height: 32px;
94
- padding: 0 12px;
95
- width: auto;
96
- }
97
- .styles_buttonSizeVariants_lg__1j35qve5 {
98
- font-size: 16px;
99
- height: 40px;
100
- line-height: 40px;
101
- padding: 0 16px;
102
- width: auto;
103
- }
104
- .styles__1j35qve6 {
105
- opacity: 0.6;
106
- cursor: not-allowed;
107
- }