lm-web-controls 1.2.4 → 1.2.6
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/dist/_virtual/_tslib.js +1 -1
- package/dist/blocks/faq/index.js +1 -1
- package/dist/index.css +1 -0
- package/dist/styles/style.css +103 -1
- package/package.json +1 -1
- package/types/lm-web-controls.d.ts +1 -7
package/dist/_virtual/_tslib.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var r=function(){return r=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},r.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;export{r as __assign};
|
package/dist/blocks/faq/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import e,{useState as a}from"react";var n=function(n){var t=n.question,c=n.answer,r=n.icon,s=a(!1),i=s[0],l=s[1];return e.createElement("div",{className:"faq-item",onClick:function(){return l(!i)}},e.createElement("div",{className:"faq-question-container"},e.createElement("h3",{className:"faq-question"},t),e.createElement("img",{src:r,alt:"Toggle icon",className:"faq-icon ".concat(i?"rotate":"")})),e.createElement("div",{className:"faq-answer ".concat(i?"open":"closed")},e.createElement("p",null,c)))};function t(a){var t=a.faq,c=a.title,r=void 0===c?"Frequently Asked Questions":c,s=a.icon,i=void 0===s?"../../images/accordion.png":s,l=Array.isArray(t)?t:t.items;return e.createElement("div",{className:"faq-main-container"},e.createElement("h2",{className:"faq-title"},r),e.createElement("div",{className:"faq-inner-container"},l.length?l.map((function(a,t){return e.createElement(n,{key:t,question:a.question,answer:a.answer,icon:i})})):e.createElement("div",{className:"skeleton-container"},e.createElement("div",{className:"skeleton"}),e.createElement("div",{className:"skeleton"}))))}export{t as Faq};
|
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
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)}.left-margin-xs{margin-left:5px}.reading-progress-bar-container{background-color:transparent;height:5px;left:0;position:fixed;top:0;width:100%;z-index:1000}.reading-progress-bar{height:100%;transform-origin:left;transition:width .2s ease-out}.faq-items{margin-top:1.5rem;width:100%}.faq-item{cursor:pointer;display:flex;flex-direction:column;transition:all .3s ease}.faq-question-container{align-items:center;display:flex;justify-content:space-between}.faq-icon{height:24px;transition:transform .3s ease;width:24px}.rotate{transform:rotate(45deg)}.faq-answer{max-height:0;opacity:0;overflow:hidden;transition:max-height .5s ease,opacity .5s ease}.faq-answer.open{max-height:360px;opacity:1}.skeleton-container{display:flex;flex-direction:column;gap:.5rem;width:100%}.skeleton{background-color:#e1e2e6;border-radius:.375rem;min-height:80px;overflow:hidden;position:relative;width:100%;&:after{animation:wave 1.5s linear infinite;background:linear-gradient(90deg,transparent,hsla(0,0%,100%,.4),transparent);content:"";height:100%;left:0;position:absolute;top:0;width:100%}}@keyframes wave{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}
|
package/dist/styles/style.css
CHANGED
|
@@ -1 +1,103 @@
|
|
|
1
|
-
.lm-slider
|
|
1
|
+
.lm-slider {
|
|
2
|
+
width: 100%;
|
|
3
|
+
}
|
|
4
|
+
.lm-back-to-top {
|
|
5
|
+
align-items: center;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
position: fixed;
|
|
9
|
+
transition-duration: 0.2s;
|
|
10
|
+
}
|
|
11
|
+
.lm-back-to-top-svg {
|
|
12
|
+
width: 50%;
|
|
13
|
+
}
|
|
14
|
+
.lm-hide-scroll-btn {
|
|
15
|
+
transform: translateY(6rem);
|
|
16
|
+
}
|
|
17
|
+
.left-margin-xs {
|
|
18
|
+
margin-left: 5px;
|
|
19
|
+
}
|
|
20
|
+
.reading-progress-bar-container {
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
height: 5px;
|
|
23
|
+
left: 0;
|
|
24
|
+
position: fixed;
|
|
25
|
+
top: 0;
|
|
26
|
+
width: 100%;
|
|
27
|
+
z-index: 1000;
|
|
28
|
+
}
|
|
29
|
+
.reading-progress-bar {
|
|
30
|
+
height: 100%;
|
|
31
|
+
transform-origin: left;
|
|
32
|
+
transition: width 0.2s ease-out;
|
|
33
|
+
}
|
|
34
|
+
.faq-items {
|
|
35
|
+
margin-top: 1.5rem;
|
|
36
|
+
width: 100%;
|
|
37
|
+
}
|
|
38
|
+
.faq-item {
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
transition: all 0.3s ease;
|
|
43
|
+
}
|
|
44
|
+
.faq-question-container {
|
|
45
|
+
align-items: center;
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
}
|
|
49
|
+
.faq-icon {
|
|
50
|
+
height: 24px;
|
|
51
|
+
transition: transform 0.3s ease;
|
|
52
|
+
width: 24px;
|
|
53
|
+
}
|
|
54
|
+
.rotate {
|
|
55
|
+
transform: rotate(45deg);
|
|
56
|
+
}
|
|
57
|
+
.faq-answer {
|
|
58
|
+
max-height: 0;
|
|
59
|
+
opacity: 0;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
transition: max-height 0.5s ease, opacity 0.5s ease;
|
|
62
|
+
}
|
|
63
|
+
.faq-answer.open {
|
|
64
|
+
max-height: 360px;
|
|
65
|
+
opacity: 1;
|
|
66
|
+
}
|
|
67
|
+
.skeleton-container {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
gap: 0.5rem;
|
|
71
|
+
width: 100%;
|
|
72
|
+
}
|
|
73
|
+
.skeleton {
|
|
74
|
+
background-color: #e1e2e6;
|
|
75
|
+
border-radius: 0.375rem;
|
|
76
|
+
min-height: 80px;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
position: relative;
|
|
79
|
+
width: 100%;
|
|
80
|
+
&:after {
|
|
81
|
+
animation: wave 1.5s linear infinite;
|
|
82
|
+
background: linear-gradient(
|
|
83
|
+
90deg,
|
|
84
|
+
transparent,
|
|
85
|
+
hsla(0, 0%, 100%, 0.4),
|
|
86
|
+
transparent
|
|
87
|
+
);
|
|
88
|
+
content: "";
|
|
89
|
+
height: 100%;
|
|
90
|
+
left: 0;
|
|
91
|
+
position: absolute;
|
|
92
|
+
top: 0;
|
|
93
|
+
width: 100%;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
@keyframes wave {
|
|
97
|
+
0% {
|
|
98
|
+
transform: translateX(-100%);
|
|
99
|
+
}
|
|
100
|
+
to {
|
|
101
|
+
transform: translateX(100%);
|
|
102
|
+
}
|
|
103
|
+
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component, ChangeEvent } from "react";
|
|
2
|
-
|
|
2
|
+
import { FaqProps } from "../src";
|
|
3
3
|
declare module "lm-web-controls" {
|
|
4
4
|
type EmailProps = {
|
|
5
5
|
value: string;
|
|
@@ -57,12 +57,6 @@ declare module "lm-web-controls" {
|
|
|
57
57
|
contentSelector?: string;
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
type FaqProps = {
|
|
61
|
-
faqSlug: string;
|
|
62
|
-
title?: string;
|
|
63
|
-
icon?: string;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
60
|
export const Email: React.FC<EmailProps>;
|
|
67
61
|
export const Copyright: React.FC<CopyrightProps>;
|
|
68
62
|
export const Phone: React.FC<PhoneProps>;
|