@basis-ng/styles 0.0.1-alpha.195 → 0.0.1-alpha.197
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/package.json +3 -1
- package/src/components/backdrop.css +17 -0
- package/src/components/drawer.css +22 -35
- package/src/components/skeleton.css +37 -0
- package/src/index.css +2 -0
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basis-ng/styles",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.197",
|
|
4
4
|
"description": "CSS foundation for @basis-ng/primitives components",
|
|
5
5
|
"main": "src/index.css",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./src/index.css",
|
|
8
8
|
"./alert": "./src/components/alert.css",
|
|
9
|
+
"./backdrop": "./src/components/backdrop.css",
|
|
9
10
|
"./badge": "./src/components/badge.css",
|
|
10
11
|
"./drawer": "./src/components/drawer.css",
|
|
11
12
|
"./button-group": "./src/components/button-group.css",
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
"./search": "./src/components/search.component.css",
|
|
24
25
|
"./select": "./src/components/select.css",
|
|
25
26
|
"./select-option": "./src/components/select-option.css",
|
|
27
|
+
"./skeleton": "./src/components/skeleton.css",
|
|
26
28
|
"./spinner": "./src/components/spinner.css",
|
|
27
29
|
"./switch": "./src/components/switch.css",
|
|
28
30
|
"./tabs": "./src/components/tabs.css",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
b-backdrop {
|
|
2
|
+
@apply fixed inset-0 pointer-events-none z-50;
|
|
3
|
+
|
|
4
|
+
&.b-open {
|
|
5
|
+
@apply pointer-events-auto;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.b-backdrop-layer {
|
|
9
|
+
@apply absolute inset-0 bg-black;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&.b-animated {
|
|
13
|
+
.b-backdrop-layer {
|
|
14
|
+
transition: opacity 0.5s cubic-bezier(0.32, 0.72, 0, 1);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -9,40 +9,6 @@ b-drawer {
|
|
|
9
9
|
@apply opacity-100 pointer-events-auto;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
&.bottom,
|
|
13
|
-
&.top {
|
|
14
|
-
@apply left-2 right-2 mx-auto max-h-[calc(100dvh-1rem)] min-h-0 h-1/2;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&.bottom {
|
|
18
|
-
@apply bottom-2;
|
|
19
|
-
transform: translateY(100%);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&.top {
|
|
23
|
-
@apply top-2;
|
|
24
|
-
transform: translateY(-100%);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&.left,
|
|
28
|
-
&.right {
|
|
29
|
-
@apply top-2 bottom-2 max-w-[calc(100vw-1rem)] w-[320px];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&.left {
|
|
33
|
-
@apply left-2;
|
|
34
|
-
transform: translateX(-100%);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&.right {
|
|
38
|
-
@apply right-2;
|
|
39
|
-
transform: translateX(100%);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&.dragging {
|
|
43
|
-
transition: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
12
|
.drag-section {
|
|
47
13
|
@apply absolute z-10 flex items-center justify-center touch-none;
|
|
48
14
|
|
|
@@ -56,6 +22,10 @@ b-drawer {
|
|
|
56
22
|
}
|
|
57
23
|
|
|
58
24
|
&.bottom {
|
|
25
|
+
@apply left-2 right-2 bottom-2 mx-auto min-h-0;
|
|
26
|
+
max-height: var(--b-drawer-max-height, calc(100dvh - 1rem));
|
|
27
|
+
height: var(--b-drawer-height, 50%);
|
|
28
|
+
|
|
59
29
|
.drag-section {
|
|
60
30
|
@apply top-0 left-0 right-0 h-10 cursor-ns-resize;
|
|
61
31
|
}
|
|
@@ -70,6 +40,10 @@ b-drawer {
|
|
|
70
40
|
}
|
|
71
41
|
|
|
72
42
|
&.top {
|
|
43
|
+
@apply left-2 right-2 top-2 mx-auto min-h-0;
|
|
44
|
+
max-height: var(--b-drawer-max-height, calc(100dvh - 1rem));
|
|
45
|
+
height: var(--b-drawer-height, 50%);
|
|
46
|
+
|
|
73
47
|
.drag-section {
|
|
74
48
|
@apply bottom-0 left-0 right-0 h-10 cursor-ns-resize;
|
|
75
49
|
}
|
|
@@ -84,6 +58,10 @@ b-drawer {
|
|
|
84
58
|
}
|
|
85
59
|
|
|
86
60
|
&.left {
|
|
61
|
+
@apply top-2 bottom-2 left-2;
|
|
62
|
+
max-width: var(--b-drawer-max-width, calc(100vw - 1rem));
|
|
63
|
+
width: var(--b-drawer-width, 320px);
|
|
64
|
+
|
|
87
65
|
.drag-section {
|
|
88
66
|
@apply top-0 right-0 bottom-0 w-5 cursor-ew-resize;
|
|
89
67
|
}
|
|
@@ -98,6 +76,10 @@ b-drawer {
|
|
|
98
76
|
}
|
|
99
77
|
|
|
100
78
|
&.right {
|
|
79
|
+
@apply top-2 bottom-2 right-2;
|
|
80
|
+
max-width: var(--b-drawer-max-width, calc(100vw - 1rem));
|
|
81
|
+
width: var(--b-drawer-width, 320px);
|
|
82
|
+
|
|
101
83
|
.drag-section {
|
|
102
84
|
@apply top-0 bottom-0 left-0 w-5 cursor-ew-resize;
|
|
103
85
|
}
|
|
@@ -110,8 +92,13 @@ b-drawer {
|
|
|
110
92
|
@apply pl-5;
|
|
111
93
|
}
|
|
112
94
|
}
|
|
95
|
+
|
|
96
|
+
&.dragging {
|
|
97
|
+
transition: none;
|
|
98
|
+
}
|
|
113
99
|
}
|
|
114
100
|
|
|
115
|
-
html:has(b-drawer.open)
|
|
101
|
+
html:has(b-drawer.open),
|
|
102
|
+
html:has(b-drawer.dragging) {
|
|
116
103
|
overflow: hidden;
|
|
117
104
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.b-skeleton {
|
|
2
|
+
@apply relative overflow-hidden rounded-[inherit];
|
|
3
|
+
|
|
4
|
+
&::after {
|
|
5
|
+
content: '';
|
|
6
|
+
@apply pointer-events-none absolute inset-0 rounded-[inherit] opacity-0 transition-opacity duration-200;
|
|
7
|
+
background: color-mix(in srgb, var(--color-ring, #e0e0e0) 22%, transparent);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.b-loading {
|
|
11
|
+
@apply pointer-events-none select-none;
|
|
12
|
+
color: transparent !important;
|
|
13
|
+
|
|
14
|
+
* {
|
|
15
|
+
visibility: hidden !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&::after {
|
|
19
|
+
@apply opacity-100;
|
|
20
|
+
animation: b-skeleton-pulse 1.4s ease-in-out infinite;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@keyframes b-skeleton-pulse {
|
|
26
|
+
0% {
|
|
27
|
+
opacity: 0.42;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
50% {
|
|
31
|
+
opacity: 0.78;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
100% {
|
|
35
|
+
opacity: 0.42;
|
|
36
|
+
}
|
|
37
|
+
}
|
package/src/index.css
CHANGED
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
@import './components/alert.css';
|
|
54
|
+
@import './components/backdrop.css';
|
|
54
55
|
@import './components/badge.css';
|
|
55
56
|
@import './components/drawer.css';
|
|
56
57
|
@import './components/button-group.css';
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
@import './components/row-item.css';
|
|
65
66
|
@import './components/row.css';
|
|
66
67
|
@import './components/select.css';
|
|
68
|
+
@import './components/skeleton.css';
|
|
67
69
|
@import './components/command.css';
|
|
68
70
|
@import './components/command-options.css';
|
|
69
71
|
@import './components/option.css';
|