@aristobyte-ui/dropdown 2.4.0 → 2.5.0
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.
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@use '@aristobyte-ui/utils/styles' as *;
|
|
2
|
+
|
|
3
|
+
.dropdown {
|
|
4
|
+
width: max-content;
|
|
5
|
+
|
|
6
|
+
&__button {
|
|
7
|
+
width: max-content;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&__box {
|
|
11
|
+
&-variant--default &-options {
|
|
12
|
+
background-color: $color-default;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&-variant--primary &-options {
|
|
16
|
+
background-color: $color-primary;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-variant--secondary &-options {
|
|
20
|
+
background-color: $color-secondary;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-variant--warning &-options {
|
|
24
|
+
background-color: $color-warning;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-variant--error &-options {
|
|
28
|
+
background-color: $color-error;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&-variant--success &-options {
|
|
32
|
+
background-color: $color-success;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-overlay {
|
|
36
|
+
backdrop-filter: blur(12px);
|
|
37
|
+
height: 100%;
|
|
38
|
+
left: 0;
|
|
39
|
+
position: fixed;
|
|
40
|
+
top: 0;
|
|
41
|
+
width: 100%;
|
|
42
|
+
z-index: 99999999999;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&-options {
|
|
46
|
+
align-items: flex-start;
|
|
47
|
+
border-radius: 8px; //TODO: change to dynamic
|
|
48
|
+
box-shadow:
|
|
49
|
+
0 4px 6px rgba(0, 0, 0, 0.04),
|
|
50
|
+
0 12px 24px rgba(0, 0, 0, 0.1);
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
opacity: 1;
|
|
54
|
+
min-width: 300px;
|
|
55
|
+
padding: 4px;
|
|
56
|
+
position: absolute;
|
|
57
|
+
transition:
|
|
58
|
+
transform 200ms $cubic-bezier-secondary,
|
|
59
|
+
opacity 150ms ease;
|
|
60
|
+
width: 100%;
|
|
61
|
+
z-index: 99999999999;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use '@aristobyte-ui/utils/styles' as *;
|
|
2
|
+
|
|
3
|
+
.dropdown-option {
|
|
4
|
+
align-items: center;
|
|
5
|
+
border-radius: 8px; //TODO: change to dynamic
|
|
6
|
+
color: $white;
|
|
7
|
+
display: flex;
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
gap: 10px;
|
|
11
|
+
padding: 10px 16px;
|
|
12
|
+
text-align: left;
|
|
13
|
+
transition: all 120ms ease-out;
|
|
14
|
+
width: 100%;
|
|
15
|
+
|
|
16
|
+
&-variant {
|
|
17
|
+
&--default:hover {
|
|
18
|
+
background-color: $color-default-hover;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&--primary:hover {
|
|
22
|
+
background-color: $color-primary-hover;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--secondary:hover {
|
|
26
|
+
background-color: $color-secondary-hover;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&--warning:hover {
|
|
30
|
+
background-color: $color-warning-hover;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--error:hover {
|
|
34
|
+
background-color: $color-error-hover;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--success:hover {
|
|
38
|
+
background-color: $color-success-hover;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--disabled,
|
|
43
|
+
&--disabled:hover {
|
|
44
|
+
background-color: $color-default-disabled;
|
|
45
|
+
cursor: auto;
|
|
46
|
+
opacity: 0.5;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__title {
|
|
50
|
+
color: $white;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__description {
|
|
54
|
+
color: rgba($white, 0.6);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__tick {
|
|
58
|
+
color: rgba($white, 0.6);
|
|
59
|
+
opacity: 0;
|
|
60
|
+
transform: scale(0, 0.7) translate(0, 10px);
|
|
61
|
+
transition: all 120ms ease-out;
|
|
62
|
+
|
|
63
|
+
&--active {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
transform: scale(1) translate(0);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@use '@aristobyte-ui/utils/styles' as *;
|
|
2
|
+
|
|
3
|
+
.dropdown {
|
|
4
|
+
width: max-content;
|
|
5
|
+
|
|
6
|
+
&__button {
|
|
7
|
+
width: max-content;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&__box {
|
|
11
|
+
&-variant--default &-options {
|
|
12
|
+
background-color: $color-default;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&-variant--primary &-options {
|
|
16
|
+
background-color: $color-primary;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-variant--secondary &-options {
|
|
20
|
+
background-color: $color-secondary;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-variant--warning &-options {
|
|
24
|
+
background-color: $color-warning;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-variant--error &-options {
|
|
28
|
+
background-color: $color-error;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&-variant--success &-options {
|
|
32
|
+
background-color: $color-success;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-overlay {
|
|
36
|
+
backdrop-filter: blur(12px);
|
|
37
|
+
height: 100%;
|
|
38
|
+
left: 0;
|
|
39
|
+
position: fixed;
|
|
40
|
+
top: 0;
|
|
41
|
+
width: 100%;
|
|
42
|
+
z-index: 99999999999;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&-options {
|
|
46
|
+
align-items: flex-start;
|
|
47
|
+
border-radius: 8px; //TODO: change to dynamic
|
|
48
|
+
box-shadow:
|
|
49
|
+
0 4px 6px rgba(0, 0, 0, 0.04),
|
|
50
|
+
0 12px 24px rgba(0, 0, 0, 0.1);
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
opacity: 1;
|
|
54
|
+
min-width: 300px;
|
|
55
|
+
padding: 4px;
|
|
56
|
+
position: absolute;
|
|
57
|
+
transition:
|
|
58
|
+
transform 200ms $cubic-bezier-secondary,
|
|
59
|
+
opacity 150ms ease;
|
|
60
|
+
width: 100%;
|
|
61
|
+
z-index: 99999999999;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use '@aristobyte-ui/utils/styles' as *;
|
|
2
|
+
|
|
3
|
+
.dropdown-option {
|
|
4
|
+
align-items: center;
|
|
5
|
+
border-radius: 8px; //TODO: change to dynamic
|
|
6
|
+
color: $white;
|
|
7
|
+
display: flex;
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
gap: 10px;
|
|
11
|
+
padding: 10px 16px;
|
|
12
|
+
text-align: left;
|
|
13
|
+
transition: all 120ms ease-out;
|
|
14
|
+
width: 100%;
|
|
15
|
+
|
|
16
|
+
&-variant {
|
|
17
|
+
&--default:hover {
|
|
18
|
+
background-color: $color-default-hover;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&--primary:hover {
|
|
22
|
+
background-color: $color-primary-hover;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--secondary:hover {
|
|
26
|
+
background-color: $color-secondary-hover;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&--warning:hover {
|
|
30
|
+
background-color: $color-warning-hover;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--error:hover {
|
|
34
|
+
background-color: $color-error-hover;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--success:hover {
|
|
38
|
+
background-color: $color-success-hover;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--disabled,
|
|
43
|
+
&--disabled:hover {
|
|
44
|
+
background-color: $color-default-disabled;
|
|
45
|
+
cursor: auto;
|
|
46
|
+
opacity: 0.5;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__title {
|
|
50
|
+
color: $white;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__description {
|
|
54
|
+
color: rgba($white, 0.6);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__tick {
|
|
58
|
+
color: rgba($white, 0.6);
|
|
59
|
+
opacity: 0;
|
|
60
|
+
transform: scale(0, 0.7) translate(0, 10px);
|
|
61
|
+
transition: all 120ms ease-out;
|
|
62
|
+
|
|
63
|
+
&--active {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
transform: scale(1) translate(0);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aristobyte-ui/dropdown",
|
|
3
3
|
"description": "react dropdown component with trigger button, dropdownoptions, placement variants, fully typed typescript support, and composable integration with aristobyte ui button",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"author": "AristoByte <info@aristobyte.com>",
|
|
@@ -47,10 +47,11 @@
|
|
|
47
47
|
"module": "es/src/main/index.js",
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": "^19.1.0",
|
|
50
|
-
"react-dom": "^19.1.0"
|
|
50
|
+
"react-dom": "^19.1.0",
|
|
51
|
+
"sass": "^1.97.3"
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
|
-
"@aristobyte-ui/button": "2.
|
|
54
|
-
"@aristobyte-ui/utils": "2.
|
|
54
|
+
"@aristobyte-ui/button": "2.5.0",
|
|
55
|
+
"@aristobyte-ui/utils": "2.5.0"
|
|
55
56
|
}
|
|
56
57
|
}
|