lm-web-controls 1.0.24 → 1.1.2

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.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import t,{useRef as l,useEffect as e}from"react";import"../../styles/style.css";function o(o){var n=o.className,c=l(null);return e((function(){var t=function(){var t,l;0===window.scrollY?null===(t=null==c?void 0:c.current)||void 0===t||t.classList.add("lm-hide-scroll-btn"):null===(l=null==c?void 0:c.current)||void 0===l||l.classList.remove("lm-hide-scroll-btn")};return window.addEventListener("scroll",t),function(){window.removeEventListener("scroll",t)}}),[]),t.createElement("button",{onClick:function(){window.scroll({top:0,behavior:"smooth"})},ref:c,tabIndex:-1,className:"lm-back-to-top lm-hide ".concat(n)},t.createElement("svg",{className:"lm-back-to-top-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},t.createElement("path",{d:"M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3 .4z"})))}export{o as BackToTop};
2
+ import l,{useRef as t,useEffect as e}from"react";import"../../styles/style.css";function o(o){var n=o.className,c=t(null);return e((function(){var l=function(){var l,t;0===window.scrollY?null===(l=null==c?void 0:c.current)||void 0===l||l.classList.add("lm-hide-scroll-btn"):null===(t=null==c?void 0:c.current)||void 0===t||t.classList.remove("lm-hide-scroll-btn")};return window.addEventListener("scroll",l),function(){window.removeEventListener("scroll",l)}}),[]),l.createElement("button",{onClick:function(){window.scroll({top:0,behavior:"smooth"})},ref:c,tabIndex:-1,className:"lm-back-to-top lm-hide-scroll-btn ".concat(n)},l.createElement("svg",{className:"lm-back-to-top-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},l.createElement("path",{d:"M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3 .4z"})))}export{o as BackToTop};
@@ -1 +1 @@
1
- .lm-slider{width:100%}.lm-back-to-top{align-items:center;background-color:#f97316;border:none;border-radius:50%;bottom:1rem;display:flex;height:3.5rem;justify-content:center;position:fixed;right:1rem;transition-duration:.2s;width:3.5rem}.lm-back-to-top-svg{width:50%}.lm-hide-scroll-btn{transform:translateY(6rem)}
1
+ .lm-slider{width:100%}.lm-back-to-top{align-items:center;display:flex;justify-content:center;position:fixed;transition-duration:.2s}.lm-back-to-top-svg{width:50%}.lm-hide-scroll-btn{transform:translateY(6rem)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lm-web-controls",
3
- "version": "1.0.24",
3
+ "version": "1.1.2",
4
4
  "description": "leadmetrics-lm-web-controls",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
package/rollup.config.mjs CHANGED
@@ -11,15 +11,8 @@ export default [
11
11
  input: "./src/index.ts",
12
12
  external: ["./../../styles/style.css"],
13
13
  output: [
14
- // {
15
- // preserveModules: true,
16
- // file: "dist/index.js",
17
- // dir: "dist/index",
18
- // format: "cjs",
19
- // },
20
14
  {
21
15
  preserveModules: true,
22
- //file: "dist/index.es.js",
23
16
  dir: "dist",
24
17
  format: "es",
25
18
  exports: "named",
@@ -37,11 +30,6 @@ export default [
37
30
  terser(),
38
31
  typescript({ useTsconfigDeclarationDir: true }),
39
32
  preserveDirectives(),
40
- // postcss({
41
- // include: "src/styles/style.css",
42
- // extract: "styles/style.css",
43
- // minimize: true,
44
- // }),
45
33
  ],
46
34
  },
47
35
  {
@@ -52,7 +40,6 @@ export default [
52
40
  },
53
41
  plugins: [
54
42
  postcss({
55
- //modules: true,
56
43
  extract: true,
57
44
  minimize: true,
58
45
  }),
@@ -36,7 +36,7 @@ export function BackToTop({ className }: BackToTopProps) {
36
36
  onClick={scrollToTopClick}
37
37
  ref={buttonRef}
38
38
  tabIndex={-1}
39
- className={`lm-back-to-top lm-hide ${className}`}
39
+ className={`lm-back-to-top lm-hide-scroll-btn ${className}`}
40
40
  >
41
41
  <svg
42
42
  className="lm-back-to-top-svg"
@@ -6,16 +6,16 @@
6
6
  /* Scroll to top */
7
7
  .lm-back-to-top {
8
8
  position: fixed;
9
- bottom: 1rem;
9
+ /* bottom: 1rem;
10
10
  right: 1rem;
11
11
  background-color: #f97316;
12
12
  width: 3.5rem;
13
- height: 3.5rem;
13
+ height: 3.5rem; */
14
14
  display: flex;
15
15
  align-items: center;
16
16
  justify-content: center;
17
- border: none;
18
- border-radius: 50%;
17
+ /* border: none;
18
+ border-radius: 50%; */
19
19
  transition-duration: 200ms;
20
20
  }
21
21