@basis-ng/styles 0.0.1-alpha.194 → 0.0.1-alpha.196

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-ng/styles",
3
- "version": "0.0.1-alpha.194",
3
+ "version": "0.0.1-alpha.196",
4
4
  "description": "CSS foundation for @basis-ng/primitives components",
5
5
  "main": "src/index.css",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  b-card {
2
- @apply flex flex-col gap-4 p-6 bg-background inset-ring-1 inset-ring-ring rounded-size-lg;
3
- @apply dark:bg-background-dark dark:inset-ring-ring-dark;
2
+ @apply flex flex-col gap-4 p-6 bg-surface inset-ring-1 inset-ring-ring rounded-size-lg;
3
+ @apply dark:bg-surface-dark dark:inset-ring-ring-dark;
4
4
 
5
5
  b-card-header {
6
6
  @apply flex flex-col gap-1;
@@ -1,46 +1,28 @@
1
1
  b-drawer {
2
- @apply fixed z-999 flex box-border overflow-hidden rounded-2xl bg-background text-font shadow-lg inset-ring-1 inset-ring-ring will-change-transform opacity-0 pointer-events-none dark:bg-background-dark dark:text-font-dark dark:inset-ring-ring-dark;
3
- transition:
4
- transform 0.5s cubic-bezier(0.32, 0.72, 0, 1),
5
- opacity 0.2s ease;
2
+ @apply fixed inset-0 z-999 pointer-events-none;
6
3
 
7
4
  &.open,
8
5
  &.dragging {
9
- @apply opacity-100 pointer-events-auto;
6
+ @apply pointer-events-auto;
10
7
  }
11
8
 
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%);
9
+ .drawer-backdrop {
10
+ @apply absolute inset-0 bg-black;
11
+ transition: opacity 0.5s cubic-bezier(0.32, 0.72, 0, 1);
25
12
  }
26
13
 
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%);
14
+ .drawer-panel {
15
+ @apply absolute flex box-border overflow-hidden rounded-2xl bg-surface text-font shadow-lg inset-ring-1 inset-ring-ring will-change-transform opacity-0 dark:bg-surface-dark dark:text-font-dark dark:inset-ring-ring-dark;
16
+ transition:
17
+ transform 0.5s cubic-bezier(0.32, 0.72, 0, 1),
18
+ opacity 0.2s ease;
40
19
  }
41
20
 
21
+ &.open,
42
22
  &.dragging {
43
- transition: none;
23
+ .drawer-panel {
24
+ @apply opacity-100;
25
+ }
44
26
  }
45
27
 
46
28
  .drag-section {
@@ -56,6 +38,10 @@ b-drawer {
56
38
  }
57
39
 
58
40
  &.bottom {
41
+ .drawer-panel {
42
+ @apply left-2 right-2 bottom-2 mx-auto max-h-[calc(100dvh-1rem)] min-h-0 h-1/2;
43
+ }
44
+
59
45
  .drag-section {
60
46
  @apply top-0 left-0 right-0 h-10 cursor-ns-resize;
61
47
  }
@@ -70,6 +56,10 @@ b-drawer {
70
56
  }
71
57
 
72
58
  &.top {
59
+ .drawer-panel {
60
+ @apply left-2 right-2 top-2 mx-auto max-h-[calc(100dvh-1rem)] min-h-0 h-1/2;
61
+ }
62
+
73
63
  .drag-section {
74
64
  @apply bottom-0 left-0 right-0 h-10 cursor-ns-resize;
75
65
  }
@@ -84,6 +74,10 @@ b-drawer {
84
74
  }
85
75
 
86
76
  &.left {
77
+ .drawer-panel {
78
+ @apply top-2 bottom-2 left-2 max-w-[calc(100vw-1rem)] w-[320px];
79
+ }
80
+
87
81
  .drag-section {
88
82
  @apply top-0 right-0 bottom-0 w-5 cursor-ew-resize;
89
83
  }
@@ -98,6 +92,10 @@ b-drawer {
98
92
  }
99
93
 
100
94
  &.right {
95
+ .drawer-panel {
96
+ @apply top-2 bottom-2 right-2 max-w-[calc(100vw-1rem)] w-[320px];
97
+ }
98
+
101
99
  .drag-section {
102
100
  @apply top-0 bottom-0 left-0 w-5 cursor-ew-resize;
103
101
  }
@@ -110,8 +108,16 @@ b-drawer {
110
108
  @apply pl-5;
111
109
  }
112
110
  }
111
+
112
+ &.dragging {
113
+ .drawer-backdrop,
114
+ .drawer-panel {
115
+ transition: none;
116
+ }
117
+ }
113
118
  }
114
119
 
115
- html:has(b-drawer.open) {
120
+ html:has(b-drawer.open),
121
+ html:has(b-drawer.dragging) {
116
122
  overflow: hidden;
117
123
  }
@@ -149,6 +149,6 @@ b-menu {
149
149
 
150
150
  /* Overlay Styles (Popups) */
151
151
  .cdk-overlay-container b-menu {
152
- @apply inset-ring-1 inset-ring-ring bg-background shadow-xs;
153
- @apply dark:inset-ring-ring-dark/60 dark:bg-background-dark;
152
+ @apply inset-ring-1 inset-ring-ring bg-surface shadow-xs;
153
+ @apply dark:inset-ring-ring-dark/60 dark:bg-surface-dark;
154
154
  }
@@ -1,5 +1,5 @@
1
1
  ul[b-select-options] {
2
- @apply list-none p-1 box-border m-0 relative bg-background shadow-xs rounded-lg inset-ring-1 inset-ring-ring flex flex-col gap-1 w-full overflow-y-auto;
2
+ @apply list-none p-1 box-border m-0 relative bg-surface shadow-xs rounded-lg inset-ring-1 inset-ring-ring flex flex-col gap-1 w-full overflow-y-auto dark:bg-surface-dark dark:inset-ring-ring-dark;
3
3
 
4
4
  .no-options-message {
5
5
  @apply py-1 px-2 text-sm;
@@ -81,8 +81,8 @@ b-select {
81
81
 
82
82
  ul[b-select-content] {
83
83
  @apply list-none box-border m-0 relative flex flex-col w-full overflow-y-auto;
84
- @apply bg-background text-secondary-foreground inset-ring-1 inset-ring-ring shadow-xs;
85
- @apply dark:bg-background-dark dark:text-secondary-foreground-dark dark:inset-ring-ring-dark shadow-xs;
84
+ @apply bg-surface text-secondary-foreground inset-ring-1 inset-ring-ring shadow-xs;
85
+ @apply dark:bg-surface-dark dark:text-secondary-foreground-dark dark:inset-ring-ring-dark shadow-xs;
86
86
 
87
87
  @apply outline-none;
88
88
  max-height: 320px;
@@ -94,8 +94,8 @@ ul[b-select-content] {
94
94
  }
95
95
 
96
96
  input[b-input] {
97
- @apply outline-none sticky top-0 z-10 bg-background min-h-8;
98
- @apply dark:bg-background-dark;
97
+ @apply outline-none sticky top-0 z-10 bg-surface min-h-8;
98
+ @apply dark:bg-surface-dark;
99
99
  }
100
100
 
101
101
  &.b-size-sm {
package/src/index.css CHANGED
@@ -14,6 +14,7 @@
14
14
 
15
15
  /* Light theme colors */
16
16
  --color-background: #fff;
17
+ --color-surface: #fff;
17
18
  --color-font: #0a0a0a;
18
19
  --color-primary: #0a0a0a;
19
20
  --color-primary-foreground: #fff;
@@ -31,6 +32,7 @@
31
32
 
32
33
  /* Dark theme colors */
33
34
  --color-background-dark: #0a0a0a;
35
+ --color-surface-dark: #171717;
34
36
  --color-font-dark: #fff;
35
37
  --color-bg-dark: #0a0a0a;
36
38
  --color-primary-dark: #fff;