@greghowe79/the-lib 0.8.6 → 0.8.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/input/styles.css.qwik.cjs +1 -1
- package/lib/components/input/styles.css.qwik.mjs +1 -1
- package/lib/components/select/select.qwik.cjs +60 -0
- package/lib/components/select/select.qwik.mjs +60 -0
- package/lib/components/select/styles.css.qwik.cjs +3 -0
- package/lib/components/select/styles.css.qwik.mjs +4 -0
- package/lib/index.qwik.cjs +2 -0
- package/lib/index.qwik.mjs +3 -1
- package/lib-types/components/select/select.d.ts +12 -0
- package/lib-types/index.d.ts +1 -0
- package/lib-types/stories/select.stories.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const styles = ".input-container {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.input-label:not([type='checkbox']) {\r\n border-radius: 0.5rem;\r\n font-size: 0.8125rem;\r\n line-height: 1.85;\r\n letter-spacing: 0.0625rem;\r\n color: #333;\r\n position: relative;\r\n height: 3.125rem;\r\n display: flex;\r\n min-width: 0;\r\n background: rgba(0, 0, 0, 0.04);\r\n transition:\r\n color 0.
|
|
2
|
+
const styles = ".input-container {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.input-label:not([type='checkbox']) {\r\n border-radius: 0.5rem;\r\n font-size: 0.8125rem;\r\n line-height: 1.85;\r\n letter-spacing: 0.0625rem;\r\n color: #333;\r\n position: relative;\r\n height: 3.125rem;\r\n display: flex;\r\n min-width: 0;\r\n background: rgba(0, 0, 0, 0.04);\r\n transition:\r\n color 0.15s ease,\r\n box-shadow 0.15s ease,\r\n background 0.15s ease;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']) {\r\n background: white;\r\n border: 2px solid transparent;\r\n box-shadow: inset 0 0 0 1px #86868b;\r\n border-radius: 0.5rem;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']):focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.input {\r\n background: transparent;\r\n padding: 0 0.9375rem;\r\n flex: 1;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 100;\r\n letter-spacing: inherit;\r\n color: inherit;\r\n height: 100%;\r\n border: none;\r\n -webkit-appearance: none;\r\n -moz-appearance: none;\r\n appearance: none;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n width: calc(100% - 0.9375rem * 2);\r\n}\r\n\r\n.input::placeholder {\r\n color: #6e6e73;\r\n}\r\n\r\n.input:focus {\r\n outline: none;\r\n opacity: 1;\r\n}\r\n\r\n.input-label {\r\n border-radius: 0.5rem;\r\n transition: box-shadow 0.15s ease;\r\n}\r\n\r\n.input-label:focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.error-message {\r\n color: #e74c3c;\r\n font-size: 0.875rem;\r\n margin-top: 0.25rem;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.flex_wrapper {\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n}\r\n\r\n.label_wrapper {\r\n display: inline-flex;\r\n align-items: center;\r\n border-radius: 0.5rem 0 0 0.5rem;\r\n height: 3.4375rem;\r\n background-color: #0095ae;\r\n}\r\n\r\n.preview_container {\r\n height: 3.4375rem;\r\n display: flex;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.04);\r\n border-radius: 0 0.5rem 0.5rem 0;\r\n color: #333;\r\n letter-spacing: 0.0625rem;\r\n font-size: 0.875rem;\r\n width: calc(100% - 3.4375rem);\r\n}\r\n\r\n.prev_wrap {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: calc(100% - 6.25rem);\r\n}\r\n\r\n.preview {\r\n margin: 0;\r\n border: none;\r\n}\r\n\r\n.input[type='file'] {\r\n position: absolute;\r\n width: 0.0625rem;\r\n height: 0.0625rem;\r\n padding: 0;\r\n margin: -0.0625rem;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n border: 0;\r\n}\r\n\r\n.input-label {\r\n cursor: pointer;\r\n}\r\n\r\n.input-label-upload {\r\n cursor: pointer;\r\n width: 6.25rem;\r\n color: #fff;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 3.4375rem;\r\n}\r\n\r\n.input-label:hover {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.input-wrapper {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n padding: 0 0.9375rem;\r\n}\r\n\r\n.input-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n pointer-events: none;\r\n}\r\n\r\n.input.with-icon {\r\n padding-left: 2.5rem;\r\n}\r\n.no_icon {\r\n width: 100%;\r\n}\r\n";
|
|
3
3
|
module.exports = styles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const styles = ".input-container {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.input-label:not([type='checkbox']) {\r\n border-radius: 0.5rem;\r\n font-size: 0.8125rem;\r\n line-height: 1.85;\r\n letter-spacing: 0.0625rem;\r\n color: #333;\r\n position: relative;\r\n height: 3.125rem;\r\n display: flex;\r\n min-width: 0;\r\n background: rgba(0, 0, 0, 0.04);\r\n transition:\r\n color 0.
|
|
1
|
+
const styles = ".input-container {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.input-label:not([type='checkbox']) {\r\n border-radius: 0.5rem;\r\n font-size: 0.8125rem;\r\n line-height: 1.85;\r\n letter-spacing: 0.0625rem;\r\n color: #333;\r\n position: relative;\r\n height: 3.125rem;\r\n display: flex;\r\n min-width: 0;\r\n background: rgba(0, 0, 0, 0.04);\r\n transition:\r\n color 0.15s ease,\r\n box-shadow 0.15s ease,\r\n background 0.15s ease;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']) {\r\n background: white;\r\n border: 2px solid transparent;\r\n box-shadow: inset 0 0 0 1px #86868b;\r\n border-radius: 0.5rem;\r\n}\r\n\r\n.input-label.bg_light:not([type='checkbox']):focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.input {\r\n background: transparent;\r\n padding: 0 0.9375rem;\r\n flex: 1;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n font-weight: 100;\r\n letter-spacing: inherit;\r\n color: inherit;\r\n height: 100%;\r\n border: none;\r\n -webkit-appearance: none;\r\n -moz-appearance: none;\r\n appearance: none;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n width: calc(100% - 0.9375rem * 2);\r\n}\r\n\r\n.input::placeholder {\r\n color: #6e6e73;\r\n}\r\n\r\n.input:focus {\r\n outline: none;\r\n opacity: 1;\r\n}\r\n\r\n.input-label {\r\n border-radius: 0.5rem;\r\n transition: box-shadow 0.15s ease;\r\n}\r\n\r\n.input-label:focus-within {\r\n box-shadow: inset 0 0 0 1.5px #007aff;\r\n}\r\n\r\n.error-message {\r\n color: #e74c3c;\r\n font-size: 0.875rem;\r\n margin-top: 0.25rem;\r\n font-size: 1rem;\r\n font-family: 'Roboto Condensed', sans-serif;\r\n}\r\n\r\n.flex_wrapper {\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n}\r\n\r\n.label_wrapper {\r\n display: inline-flex;\r\n align-items: center;\r\n border-radius: 0.5rem 0 0 0.5rem;\r\n height: 3.4375rem;\r\n background-color: #0095ae;\r\n}\r\n\r\n.preview_container {\r\n height: 3.4375rem;\r\n display: flex;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.04);\r\n border-radius: 0 0.5rem 0.5rem 0;\r\n color: #333;\r\n letter-spacing: 0.0625rem;\r\n font-size: 0.875rem;\r\n width: calc(100% - 3.4375rem);\r\n}\r\n\r\n.prev_wrap {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: calc(100% - 6.25rem);\r\n}\r\n\r\n.preview {\r\n margin: 0;\r\n border: none;\r\n}\r\n\r\n.input[type='file'] {\r\n position: absolute;\r\n width: 0.0625rem;\r\n height: 0.0625rem;\r\n padding: 0;\r\n margin: -0.0625rem;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n border: 0;\r\n}\r\n\r\n.input-label {\r\n cursor: pointer;\r\n}\r\n\r\n.input-label-upload {\r\n cursor: pointer;\r\n width: 6.25rem;\r\n color: #fff;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 3.4375rem;\r\n}\r\n\r\n.input-label:hover {\r\n background-color: rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.input-wrapper {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n padding: 0 0.9375rem;\r\n}\r\n\r\n.input-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n pointer-events: none;\r\n}\r\n\r\n.input.with-icon {\r\n padding-left: 2.5rem;\r\n}\r\n.no_icon {\r\n width: 100%;\r\n}\r\n";
|
|
2
2
|
export {
|
|
3
3
|
styles as default
|
|
4
4
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
require("@fontsource/roboto-condensed/500.css");
|
|
6
|
+
const styles = require("./styles.css.qwik.cjs");
|
|
7
|
+
const Select = qwik.component$(({ id, label, options, selected }) => {
|
|
8
|
+
qwik.useStylesScoped$(styles);
|
|
9
|
+
const handleChange$ = qwik.$((event) => {
|
|
10
|
+
const target = event.target;
|
|
11
|
+
selected.value = target.value;
|
|
12
|
+
});
|
|
13
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
14
|
+
class: "select-container",
|
|
15
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
16
|
+
class: `select-wrapper ${selected.value ? "has-value" : ""}`,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ jsxRuntime.jsxs("select", {
|
|
19
|
+
id,
|
|
20
|
+
name: id,
|
|
21
|
+
class: "select-element",
|
|
22
|
+
onChange$: handleChange$,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", {
|
|
25
|
+
value: "",
|
|
26
|
+
disabled: true,
|
|
27
|
+
selected: true,
|
|
28
|
+
hidden: true
|
|
29
|
+
}),
|
|
30
|
+
options.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", {
|
|
31
|
+
value: option.value,
|
|
32
|
+
children: option.label
|
|
33
|
+
}, option.value))
|
|
34
|
+
]
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", {
|
|
37
|
+
for: id,
|
|
38
|
+
class: "select-label",
|
|
39
|
+
children: label
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
42
|
+
class: "select-arrow",
|
|
43
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", {
|
|
44
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
+
viewBox: "0 0 32 32",
|
|
46
|
+
"aria-hidden": "true",
|
|
47
|
+
role: "presentation",
|
|
48
|
+
focusable: "false",
|
|
49
|
+
style: "display: block; fill: none; height: 16px; width: 16px; stroke: currentcolor; stroke-width: 4; overflow: visible;",
|
|
50
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
51
|
+
fill: "none",
|
|
52
|
+
d: "M28 12 16.7 23.3a1 1 0 0 1-1.4 0L4 12"
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
exports.Select = Select;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx, jsxs } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$, useStylesScoped$, $ } from "@builder.io/qwik";
|
|
3
|
+
import "@fontsource/roboto-condensed/500.css";
|
|
4
|
+
import styles from "./styles.css.qwik.mjs";
|
|
5
|
+
const Select = component$(({ id, label, options, selected }) => {
|
|
6
|
+
useStylesScoped$(styles);
|
|
7
|
+
const handleChange$ = $((event) => {
|
|
8
|
+
const target = event.target;
|
|
9
|
+
selected.value = target.value;
|
|
10
|
+
});
|
|
11
|
+
return /* @__PURE__ */ jsx("div", {
|
|
12
|
+
class: "select-container",
|
|
13
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
14
|
+
class: `select-wrapper ${selected.value ? "has-value" : ""}`,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsxs("select", {
|
|
17
|
+
id,
|
|
18
|
+
name: id,
|
|
19
|
+
class: "select-element",
|
|
20
|
+
onChange$: handleChange$,
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx("option", {
|
|
23
|
+
value: "",
|
|
24
|
+
disabled: true,
|
|
25
|
+
selected: true,
|
|
26
|
+
hidden: true
|
|
27
|
+
}),
|
|
28
|
+
options.map((option) => /* @__PURE__ */ jsx("option", {
|
|
29
|
+
value: option.value,
|
|
30
|
+
children: option.label
|
|
31
|
+
}, option.value))
|
|
32
|
+
]
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ jsx("label", {
|
|
35
|
+
for: id,
|
|
36
|
+
class: "select-label",
|
|
37
|
+
children: label
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ jsx("div", {
|
|
40
|
+
class: "select-arrow",
|
|
41
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
+
viewBox: "0 0 32 32",
|
|
44
|
+
"aria-hidden": "true",
|
|
45
|
+
role: "presentation",
|
|
46
|
+
focusable: "false",
|
|
47
|
+
style: "display: block; fill: none; height: 16px; width: 16px; stroke: currentcolor; stroke-width: 4; overflow: visible;",
|
|
48
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
49
|
+
fill: "none",
|
|
50
|
+
d: "M28 12 16.7 23.3a1 1 0 0 1-1.4 0L4 12"
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
Select
|
|
60
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const styles = ".select-container {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n position: relative;\r\n width: 100%;\r\n}\r\n\r\n.select-wrapper {\r\n position: relative;\r\n width: 100%;\r\n}\r\n\r\n.select-element {\r\n width: 100%;\r\n padding: 1.2rem 2.5rem 0.4rem 0.75rem;\r\n font-size: 1rem;\r\n border: 0.063rem solid #86868b;\r\n border-radius: 0.5rem;\r\n background-color: white;\r\n appearance: none;\r\n height: 3.4375rem;\r\n}\r\n\r\n.select-label {\r\n position: absolute;\r\n top: 1rem;\r\n left: 0.75rem;\r\n font-size: 1rem;\r\n color: #6e6e73;\r\n transition: all 0.2s ease;\r\n pointer-events: none;\r\n}\r\n\r\n.select-wrapper.has-value .select-label,\r\n.select-element:focus + .select-label {\r\n top: 0.3rem;\r\n left: 0.6rem;\r\n font-size: 0.75rem;\r\n color: #555;\r\n}\r\n\r\n.select-arrow {\r\n position: absolute;\r\n top: 50%;\r\n right: 0.75rem;\r\n transform: translateY(-50%);\r\n pointer-events: none;\r\n color: #666;\r\n}\r\n";
|
|
3
|
+
module.exports = styles;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const styles = ".select-container {\r\n font-family: 'Roboto Condensed', sans-serif;\r\n position: relative;\r\n width: 100%;\r\n}\r\n\r\n.select-wrapper {\r\n position: relative;\r\n width: 100%;\r\n}\r\n\r\n.select-element {\r\n width: 100%;\r\n padding: 1.2rem 2.5rem 0.4rem 0.75rem;\r\n font-size: 1rem;\r\n border: 0.063rem solid #86868b;\r\n border-radius: 0.5rem;\r\n background-color: white;\r\n appearance: none;\r\n height: 3.4375rem;\r\n}\r\n\r\n.select-label {\r\n position: absolute;\r\n top: 1rem;\r\n left: 0.75rem;\r\n font-size: 1rem;\r\n color: #6e6e73;\r\n transition: all 0.2s ease;\r\n pointer-events: none;\r\n}\r\n\r\n.select-wrapper.has-value .select-label,\r\n.select-element:focus + .select-label {\r\n top: 0.3rem;\r\n left: 0.6rem;\r\n font-size: 0.75rem;\r\n color: #555;\r\n}\r\n\r\n.select-arrow {\r\n position: absolute;\r\n top: 50%;\r\n right: 0.75rem;\r\n transform: translateY(-50%);\r\n pointer-events: none;\r\n color: #666;\r\n}\r\n";
|
|
2
|
+
export {
|
|
3
|
+
styles as default
|
|
4
|
+
};
|
package/lib/index.qwik.cjs
CHANGED
|
@@ -9,6 +9,7 @@ const loader = require("./components/loader/loader.qwik.cjs");
|
|
|
9
9
|
const input = require("./components/input/input.qwik.cjs");
|
|
10
10
|
const hero = require("./components/hero/hero.qwik.cjs");
|
|
11
11
|
const onboardingsteps = require("./components/onboarding/onboardingsteps.qwik.cjs");
|
|
12
|
+
const select = require("./components/select/select.qwik.cjs");
|
|
12
13
|
exports.Logo = logo.Logo;
|
|
13
14
|
exports.Counter = counter.Counter;
|
|
14
15
|
exports.Button = button.Button;
|
|
@@ -18,3 +19,4 @@ exports.Loader = loader.Loader;
|
|
|
18
19
|
exports.Input = input.Input;
|
|
19
20
|
exports.Hero = hero.Hero;
|
|
20
21
|
exports.OnboardingSteps = onboardingsteps.OnboardingSteps;
|
|
22
|
+
exports.Select = select.Select;
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { Loader } from "./components/loader/loader.qwik.mjs";
|
|
|
7
7
|
import { Input } from "./components/input/input.qwik.mjs";
|
|
8
8
|
import { Hero } from "./components/hero/hero.qwik.mjs";
|
|
9
9
|
import { OnboardingSteps } from "./components/onboarding/onboardingsteps.qwik.mjs";
|
|
10
|
+
import { Select } from "./components/select/select.qwik.mjs";
|
|
10
11
|
export {
|
|
11
12
|
Button,
|
|
12
13
|
Counter,
|
|
@@ -16,5 +17,6 @@ export {
|
|
|
16
17
|
Logo,
|
|
17
18
|
Modal,
|
|
18
19
|
NavigationMenu,
|
|
19
|
-
OnboardingSteps
|
|
20
|
+
OnboardingSteps,
|
|
21
|
+
Select
|
|
20
22
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Signal } from '@builder.io/qwik';
|
|
2
|
+
import '@fontsource/roboto-condensed/500.css';
|
|
3
|
+
export interface SelectProps {
|
|
4
|
+
id: string;
|
|
5
|
+
options: Array<{
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}>;
|
|
9
|
+
label: string;
|
|
10
|
+
selected: Signal<string>;
|
|
11
|
+
}
|
|
12
|
+
export declare const Select: import("@builder.io/qwik").Component<SelectProps>;
|
package/lib-types/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { Loader } from './components/loader/loader';
|
|
|
7
7
|
export { Input } from './components/input/input';
|
|
8
8
|
export { Hero } from './components/hero/hero';
|
|
9
9
|
export { OnboardingSteps } from './components/onboarding/onboardingsteps';
|
|
10
|
+
export { Select } from './components/select/select';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from 'storybook-framework-qwik';
|
|
2
|
+
import { type SelectProps } from '../components/select/select';
|
|
3
|
+
declare const meta: Meta<SelectProps>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<SelectProps>;
|
|
6
|
+
export declare const SelectWithOptions: Story;
|