@prosistemas/sca-web-kit 3.1.0 → 3.2.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.
|
@@ -3,5 +3,5 @@ import styles from './accordion.module.scss';
|
|
|
3
3
|
import * as Accordion from '@radix-ui/react-accordion';
|
|
4
4
|
import { MinusIcon, PlusIcon } from '@phosphor-icons/react/dist/ssr';
|
|
5
5
|
export default function StyledAccordion({ question, answer, }) {
|
|
6
|
-
return (_jsx(Accordion.Root, { type: "single", collapsible: true, className: styles['accordion'], children: _jsxs(Accordion.Item, { value: "item-1", children: [
|
|
6
|
+
return (_jsx(Accordion.Root, { type: "single", collapsible: true, className: styles['accordion'], children: _jsxs(Accordion.Item, { value: "item-1", children: [_jsx(Accordion.Trigger, { className: styles['open-button'], "aria-label": 'Bot\u00E3o para encolher ou expandir a pergunta frequente', children: _jsxs(Accordion.Header, { className: styles['accordion-header'], children: [question, _jsxs("div", { className: styles['trigger'], children: [_jsx(PlusIcon, { size: 20, color: 'white', weight: 'bold', className: styles['plus'] }), _jsx(MinusIcon, { size: 20, color: 'white', weight: 'bold', className: styles['minus'] })] })] }) }), _jsx(Accordion.Content, { className: styles['answer'], children: answer })] }) }));
|
|
7
7
|
}
|
|
@@ -14,64 +14,76 @@
|
|
|
14
14
|
padding: 24px;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
gap: 32px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@media (max-width: 375px) {
|
|
30
|
-
gap: 24px;
|
|
31
|
-
font-size: 16px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.trigger {
|
|
35
|
-
min-width: 32px;
|
|
36
|
-
min-height: 32px;
|
|
37
|
-
background: var(--auxiliary-orange);
|
|
38
|
-
border: none;
|
|
39
|
-
border-radius: 50%;
|
|
40
|
-
|
|
17
|
+
.open-button {
|
|
18
|
+
background: none;
|
|
19
|
+
border: none;
|
|
20
|
+
outline: none;
|
|
21
|
+
color: var(--neutral600);
|
|
22
|
+
width: 100%;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
|
|
25
|
+
.accordion-header {
|
|
41
26
|
display: flex;
|
|
42
|
-
justify-content:
|
|
27
|
+
justify-content: space-between;
|
|
43
28
|
align-items: center;
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
gap: 64px;
|
|
30
|
+
|
|
31
|
+
text-align: start;
|
|
32
|
+
font-size: 18px;
|
|
46
33
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
position: absolute;
|
|
50
|
-
transition: opacity 0.3s;
|
|
34
|
+
@media (max-width: 425px) {
|
|
35
|
+
gap: 32px;
|
|
51
36
|
}
|
|
52
|
-
}
|
|
53
37
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
38
|
+
@media (max-width: 375px) {
|
|
39
|
+
gap: 24px;
|
|
40
|
+
font-size: 16px;
|
|
57
41
|
}
|
|
58
42
|
|
|
59
|
-
.
|
|
60
|
-
|
|
43
|
+
.trigger {
|
|
44
|
+
min-width: 32px;
|
|
45
|
+
min-height: 32px;
|
|
46
|
+
background: var(--auxiliary-orange);
|
|
47
|
+
border: none;
|
|
48
|
+
border-radius: 50%;
|
|
49
|
+
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
position: relative;
|
|
55
|
+
|
|
56
|
+
.plus,
|
|
57
|
+
.minus {
|
|
58
|
+
position: absolute;
|
|
59
|
+
transition: opacity 0.3s;
|
|
60
|
+
}
|
|
61
61
|
}
|
|
62
|
+
|
|
62
63
|
}
|
|
64
|
+
}
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
.open-button[data-state="open"] {
|
|
67
|
+
.plus {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
.minus {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.open-button[data-state="closed"] {
|
|
77
|
+
.plus {
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.minus {
|
|
82
|
+
opacity: 0;
|
|
72
83
|
}
|
|
73
84
|
}
|
|
74
85
|
|
|
86
|
+
|
|
75
87
|
.answer {
|
|
76
88
|
font-size: 16px;
|
|
77
89
|
color: var(--neutral400);
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosistemas/sca-web-kit",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
8
8
|
"assets"
|
|
9
9
|
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc && cpy \"src/**/*.scss\" dist/ --parents",
|
|
12
|
+
"prepare": "pnpm run build",
|
|
13
|
+
"prepack": "pnpm run build"
|
|
14
|
+
},
|
|
10
15
|
"peerDependencies": {
|
|
11
16
|
"@phosphor-icons/react": "^2.1.10",
|
|
12
17
|
"next": "^15.0.0",
|
|
@@ -32,8 +37,5 @@
|
|
|
32
37
|
"eslint": "^9",
|
|
33
38
|
"eslint-config-next": "15.2.2",
|
|
34
39
|
"typescript": "^5"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"build": "tsc && cpy \"src/**/*.scss\" dist/ --parents"
|
|
38
40
|
}
|
|
39
|
-
}
|
|
41
|
+
}
|