@basis-ng/styles 0.0.1-alpha.20 → 0.0.1-alpha.200

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.
Files changed (71) hide show
  1. package/package.json +28 -36
  2. package/src/components/alert.css +58 -0
  3. package/src/components/backdrop.css +17 -0
  4. package/src/components/badge.css +43 -0
  5. package/src/components/button-group.css +16 -0
  6. package/src/components/button.css +88 -0
  7. package/src/components/calendar.css +56 -0
  8. package/src/components/card.css +24 -0
  9. package/src/components/checkbox.css +66 -0
  10. package/src/components/command-options.css +17 -0
  11. package/src/components/command.css +20 -0
  12. package/src/components/dialog.css +41 -0
  13. package/src/components/drawer.css +112 -0
  14. package/src/components/input-group.css +138 -0
  15. package/src/components/input.css +56 -0
  16. package/src/components/{label.component.css → label.css} +70 -74
  17. package/src/components/menu.css +154 -0
  18. package/src/components/option.css +37 -0
  19. package/src/components/otp.css +64 -0
  20. package/src/components/range.css +29 -0
  21. package/src/components/{row-item.component.css → row-item.css} +14 -14
  22. package/src/components/{row.component.css → row.css} +48 -56
  23. package/src/components/select-options.css +56 -0
  24. package/src/components/select.css +230 -0
  25. package/src/components/skeleton.css +37 -0
  26. package/src/components/spinner.css +3 -0
  27. package/src/components/switch.css +48 -0
  28. package/src/components/tabs.css +84 -0
  29. package/src/components/textarea-group.css +63 -0
  30. package/src/components/textarea.css +35 -0
  31. package/src/components/tooltip.css +37 -0
  32. package/src/components/tree.css +64 -0
  33. package/src/index.css +82 -39
  34. package/src/utilities/general.css +7 -0
  35. package/src/utilities/index.css +2 -0
  36. package/src/utilities/sizes.css +7 -0
  37. package/src/components/alert.component.css +0 -71
  38. package/src/components/attached-box.component.css +0 -84
  39. package/src/components/badge.component.css +0 -58
  40. package/src/components/bottom-sheet.component.css +0 -49
  41. package/src/components/button-group.component.css +0 -20
  42. package/src/components/button.component.css +0 -164
  43. package/src/components/checkbox.component.css +0 -41
  44. package/src/components/color-picker.component.css +0 -34
  45. package/src/components/combobox-options.component.css +0 -41
  46. package/src/components/combobox.component.css +0 -8
  47. package/src/components/command-options.component.css +0 -33
  48. package/src/components/command.component.css +0 -45
  49. package/src/components/icon.component.css +0 -5
  50. package/src/components/input-group.component.css +0 -110
  51. package/src/components/input.component.css +0 -70
  52. package/src/components/menu-group.component.css +0 -18
  53. package/src/components/menu-item-checkbox.component.css +0 -32
  54. package/src/components/menu-item-radio.component.css +0 -32
  55. package/src/components/menu-item.component.css +0 -32
  56. package/src/components/menu-label.component.css +0 -4
  57. package/src/components/menu.component.css +0 -32
  58. package/src/components/option.component.css +0 -26
  59. package/src/components/range.component.css +0 -39
  60. package/src/components/select-options.component.css +0 -41
  61. package/src/components/select.component.css +0 -8
  62. package/src/components/side-sheet.component.css +0 -59
  63. package/src/components/spinner.component.css +0 -13
  64. package/src/components/switch.component.css +0 -68
  65. package/src/components/tab.component.css +0 -41
  66. package/src/components/table.component.css +0 -34
  67. package/src/components/tabs.component.css +0 -18
  68. package/src/components/textarea.component.css +0 -40
  69. package/src/components/tooltip.component.css +0 -45
  70. package/src/components/tree-node.component.css +0 -77
  71. package/src/components/tree.component.css +0 -7
package/package.json CHANGED
@@ -1,46 +1,38 @@
1
1
  {
2
2
  "name": "@basis-ng/styles",
3
- "version": "0.0.1-alpha.20",
3
+ "version": "0.0.1-alpha.200",
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
- "./alert": "./src/components/alert.component.css",
9
- "./attached-box": "./src/components/attached-box.component.css",
10
- "./badge": "./src/components/badge.component.css",
11
- "./bottom-sheet": "./src/components/bottom-sheet.component.css",
12
- "./button-group": "./src/components/button-group.component.css",
13
- "./button": "./src/components/button.component.css",
14
- "./checkbox": "./src/components/checkbox.component.css",
15
- "./color-picker": "./src/components/color-picker.component.css",
16
- "./icon": "./src/components/icon.component.css",
17
- "./input-group": "./src/components/input-group.component.css",
18
- "./input": "./src/components/input.component.css",
19
- "./label": "./src/components/label.component.css",
20
- "./menu-group": "./src/components/menu-group.component.css",
21
- "./menu-item-checkbox": "./src/components/menu-item-checkbox.component.css",
22
- "./menu-item-radio": "./src/components/menu-item-radio.component.css",
23
- "./menu-item": "./src/components/menu-item.component.css",
24
- "./menu-label": "./src/components/menu-label.component.css",
25
- "./menu": "./src/components/menu.component.css",
26
- "./option": "./src/components/option.component.css",
27
- "./range": "./src/components/range.component.css",
28
- "./row-item": "./src/components/row-item.component.css",
29
- "./row": "./src/components/row.component.css",
8
+ "./alert": "./src/components/alert.css",
9
+ "./backdrop": "./src/components/backdrop.css",
10
+ "./badge": "./src/components/badge.css",
11
+ "./drawer": "./src/components/drawer.css",
12
+ "./button-group": "./src/components/button-group.css",
13
+ "./button": "./src/components/button.css",
14
+ "./checkbox": "./src/components/checkbox.css",
15
+ "./input-group": "./src/components/input-group.css",
16
+ "./textarea-group": "./src/components/textarea-group.css",
17
+ "./input": "./src/components/input.css",
18
+ "./label": "./src/components/label.css",
19
+ "./menu": "./src/components/menu.css",
20
+ "./option": "./src/components/option.css",
21
+ "./range": "./src/components/range.css",
22
+ "./row-item": "./src/components/row-item.css",
23
+ "./row": "./src/components/row.css",
30
24
  "./search": "./src/components/search.component.css",
31
- "./select": "./src/components/select.component.css",
32
- "./select-content": "./src/components/select-content.component.css",
33
- "./select-option": "./src/components/select-option.component.css",
34
- "./side-sheet": "./src/components/side-sheet.component.css",
35
- "./spinner": "./src/components/spinner.component.css",
36
- "./switch": "./src/components/switch.component.css",
37
- "./tab": "./src/components/tab.component.css",
38
- "./table": "./src/components/table.component.css",
39
- "./tabs": "./src/components/tabs.component.css",
40
- "./textarea": "./src/components/textarea.component.css",
41
- "./tooltip": "./src/components/tooltip.component.css",
42
- "./tree-node": "./src/components/tree-node.component.css",
43
- "./tree": "./src/components/tree.component.css"
25
+ "./select": "./src/components/select.css",
26
+ "./select-option": "./src/components/select-option.css",
27
+ "./skeleton": "./src/components/skeleton.css",
28
+ "./spinner": "./src/components/spinner.css",
29
+ "./switch": "./src/components/switch.css",
30
+ "./tabs": "./src/components/tabs.css",
31
+ "./textarea": "./src/components/textarea.css",
32
+ "./tooltip": "./src/components/tooltip.css",
33
+ "./tree": "./src/components/tree.css",
34
+ "./dialog": "./src/components/dialog.css",
35
+ "./calendar": "./src/components/calendar.css"
44
36
  },
45
37
  "files": [
46
38
  "src/**/*.css"
@@ -0,0 +1,58 @@
1
+ /* Alert styles — Base / Types / Sizes / Close */
2
+
3
+ /* Use the same selector the primitive exposes: `b-alert` */
4
+
5
+ b-alert {
6
+ @apply flex items-start gap-4 p-4 rounded-size-md w-full box-border max-w-full font-sans;
7
+
8
+ .icon {
9
+ @apply flex-shrink-0 self-start;
10
+ }
11
+
12
+ .content {
13
+ @apply flex-1 flex flex-col gap-1;
14
+
15
+ .title {
16
+ @apply font-semibold;
17
+ }
18
+
19
+ .body {
20
+ @apply text-sm;
21
+ }
22
+ }
23
+
24
+ /* Default: info */
25
+ @apply bg-info/20 text-info-foreground dark:bg-info-dark/20 dark:text-info-foreground-dark;
26
+
27
+ /* Types (match primitive's `type` input): use `b-type-` prefix to avoid classname collisions */
28
+ &.b-type-success {
29
+ @apply bg-success/20 inset-ring-1 text-success-foreground dark:bg-success-dark/20 dark:text-success-foreground-dark inset-ring-success/90 dark:inset-ring-success-dark/30;
30
+ }
31
+
32
+ &.b-type-error {
33
+ @apply bg-destructive/20 inset-ring-1 text-destructive dark:bg-destructive-dark/20 dark:text-destructive-dark inset-ring-destructive/30 dark:inset-ring-destructive-dark/30;
34
+ }
35
+
36
+ &.b-type-warning {
37
+ @apply bg-warning/20 inset-ring-1 text-warning-foreground dark:bg-warning-dark/20 dark:text-warning-foreground-dark inset-ring-warning/90 dark:inset-ring-warning-dark/30;
38
+ }
39
+
40
+ &.b-type-info {
41
+ @apply bg-info/20 inset-ring-1 text-info-foreground dark:bg-info-dark/20 dark:text-info-foreground-dark inset-ring-info/90 dark:inset-ring-info-dark/30;
42
+ }
43
+
44
+ /* Sizes */
45
+ &.b-size-sm {
46
+ @apply p-2 text-sm;
47
+ }
48
+ &.b-size-md {
49
+ @apply p-4 text-base;
50
+ }
51
+ &.b-size-lg {
52
+ @apply p-6 text-lg;
53
+ }
54
+
55
+ .close-btn {
56
+ @apply ml-auto bg-transparent border-0 cursor-pointer p-1 rounded;
57
+ }
58
+ }
@@ -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
+ }
@@ -0,0 +1,43 @@
1
+ span[b-badge] {
2
+ /* Base */
3
+ @apply inline-flex items-center gap-2 px-2 py-1 font-medium text-sm rounded-size-md;
4
+ @apply bg-primary text-primary-foreground;
5
+ @apply dark:bg-primary-dark dark:text-primary-foreground-dark;
6
+
7
+ /* Variants */
8
+ &.b-variant-primary {
9
+ @apply bg-primary text-primary-foreground;
10
+ @apply dark:bg-primary-dark dark:text-primary-foreground-dark;
11
+ }
12
+
13
+ &.b-variant-secondary {
14
+ @apply bg-secondary text-secondary-foreground;
15
+ @apply dark:bg-secondary-dark dark:text-secondary-foreground-dark;
16
+ }
17
+
18
+ &.b-variant-ghost {
19
+ @apply bg-transparent text-secondary-dark;
20
+ @apply dark:text-secondary;
21
+ }
22
+
23
+ &.b-variant-outlined {
24
+ @apply bg-secondary/10 text-secondary-foreground inset-ring-1 inset-ring-ring shadow-xs;
25
+ @apply dark:bg-secondary-dark/40 dark:text-secondary-foreground-dark dark:inset-ring-ring-dark shadow-xs;
26
+ }
27
+
28
+ &.b-variant-destructive {
29
+ @apply bg-destructive text-destructive-foreground inset-ring-1 inset-ring-destructive;
30
+ @apply dark:bg-destructive-dark dark:text-destructive-foreground-dark dark:inset-ring-destructive-dark;
31
+ }
32
+
33
+ /* Sizes */
34
+ &.b-size-sm {
35
+ @apply px-1.5 py-0.5 text-xs rounded-size-sm;
36
+ }
37
+ &.b-size-md {
38
+ @apply px-2 py-1 text-sm rounded-size-md;
39
+ }
40
+ &.b-size-lg {
41
+ @apply px-2.5 py-1 text-base rounded-size-lg;
42
+ }
43
+ }
@@ -0,0 +1,16 @@
1
+ b-button-group {
2
+ @apply flex;
3
+
4
+ &:not(.spaced) {
5
+ button:not(:last-child) {
6
+ @apply rounded-tr-none rounded-br-none -mr-[1px];
7
+ }
8
+ button:not(:first-child) {
9
+ @apply rounded-tl-none rounded-bl-none;
10
+ }
11
+ }
12
+
13
+ &.spaced {
14
+ @apply gap-2;
15
+ }
16
+ }
@@ -0,0 +1,88 @@
1
+ /* Button styles — grouped sections: Base / Variants / Sizes / States / Squared */
2
+ button[b-button] {
3
+ /* Base */
4
+ @apply transition-colors duration-150 flex items-center justify-center gap-x-1.5 disabled:opacity-60 disabled:pointer-events-none;
5
+
6
+ /* Default spacing/typography applied when no explicit size is present */
7
+ @apply px-3 py-0 text-sm h-8 rounded-size-md;
8
+
9
+ /* Default visual (primary) applied when no explicit variant is present */
10
+ @apply bg-primary text-primary-foreground hover:bg-primary/80;
11
+ @apply dark:bg-primary-dark dark:text-primary-foreground-dark dark:hover:bg-primary-dark/80;
12
+
13
+ /* Variants */
14
+ &.b-variant-primary {
15
+ @apply bg-primary text-primary-foreground hover:bg-primary/80;
16
+ @apply dark:bg-primary-dark dark:text-primary-foreground-dark dark:hover:bg-primary-dark/80;
17
+ }
18
+ &.b-variant-secondary {
19
+ @apply bg-secondary text-secondary-foreground hover:bg-secondary/50;
20
+ @apply dark:bg-secondary-dark dark:text-secondary-foreground-dark dark:hover:bg-secondary-dark/50;
21
+ }
22
+ &.b-variant-ghost {
23
+ @apply bg-transparent text-secondary-dark hover:bg-secondary;
24
+ @apply dark:text-secondary dark:hover:bg-secondary-dark;
25
+ }
26
+ &.b-variant-outlined {
27
+ @apply bg-secondary/10 text-secondary-foreground inset-ring-1 inset-ring-ring shadow-xs;
28
+ @apply dark:bg-secondary-dark/40 dark:text-secondary-foreground-dark dark:inset-ring-ring-dark shadow-xs;
29
+ }
30
+ &.b-variant-destructive {
31
+ @apply bg-destructive/10 text-destructive hover:bg-destructive/20;
32
+ @apply dark:bg-destructive-dark/10 dark:text-destructive-dark dark:hover:bg-destructive-dark/20;
33
+ }
34
+
35
+ /* Sizes */
36
+ &.b-size-sm {
37
+ @apply px-2 py-0 text-xs h-6 rounded-size-sm gap-1;
38
+ }
39
+ &.b-size-md {
40
+ @apply px-3 py-0 text-sm h-8 rounded-size-md gap-1.5;
41
+ }
42
+ &.b-size-lg {
43
+ @apply px-4 py-0 text-base h-10 rounded-size-lg gap-2;
44
+ }
45
+
46
+ /* States */
47
+ &.b-active {
48
+ @apply outline-2 outline-offset-4 outline-primary;
49
+ @apply dark:outline-primary-dark;
50
+ }
51
+
52
+ /* Focus-visible should show the outline instantly (no transition), matching input behavior */
53
+ &:focus-visible {
54
+ @apply outline-2 outline-offset-4 outline-primary;
55
+ @apply dark:outline-primary-dark;
56
+ @apply transition-none;
57
+ }
58
+ &.b-variant-destructive.b-active,
59
+ &.b-variant-destructive:focus-visible {
60
+ @apply outline-2 outline-offset-4 outline-destructive;
61
+ @apply dark:outline-destructive-dark;
62
+ }
63
+
64
+ /* Squared */
65
+ &.b-squared {
66
+ @apply aspect-square p-0 flex items-center justify-center;
67
+ }
68
+ &.b-squared.b-size-sm {
69
+ @apply size-6;
70
+ }
71
+ &.b-squared.b-size-md {
72
+ @apply size-8;
73
+ }
74
+ &.b-squared.b-size-lg {
75
+ @apply size-10;
76
+ }
77
+
78
+ /* Rounded full - extra horizontal padding */
79
+ &.b-rounded-full:not(.b-squared) {
80
+ @apply px-4;
81
+ }
82
+ &.b-size-sm.b-rounded-full:not(.b-squared) {
83
+ @apply px-3;
84
+ }
85
+ &.b-size-lg.b-rounded-full:not(.b-squared) {
86
+ @apply px-5;
87
+ }
88
+ }
@@ -0,0 +1,56 @@
1
+ /* Calendar component styles - simple, utility-first classes matching project conventions */
2
+ b-calendar {
3
+ @apply w-full min-w-60 flex flex-col gap-1;
4
+
5
+ header.b-calendar-header {
6
+ @apply flex gap-0.5 w-full justify-between;
7
+
8
+ .b-calendar-header {
9
+ @apply flex items-center justify-between mb-2;
10
+ }
11
+
12
+ .b-calendar-title {
13
+ @apply font-medium text-sm;
14
+ @apply px-3 py-1 rounded-size-sm text-sm font-medium cursor-pointer bg-transparent hover:bg-secondary/10 dark:hover:bg-secondary-dark/10;
15
+ }
16
+
17
+ .b-calendar-nav {
18
+ @apply inline-flex items-center justify-center w-8 h-8 rounded-size-sm cursor-pointer bg-transparent hover:bg-secondary/10 dark:hover:bg-secondary-dark/10;
19
+ }
20
+
21
+ .b-calendar-title:focus {
22
+ @apply outline-none ring-2 ring-primary/10;
23
+ }
24
+ }
25
+
26
+ table.b-calendar-table {
27
+ @apply w-full table table-fixed border-collapse;
28
+
29
+ .b-calendar-weekday {
30
+ @apply text-xs text-center h-6;
31
+ }
32
+
33
+ .b-calendar-cell {
34
+ @apply text-center rounded-size-sm w-full h-8 place-content-center;
35
+
36
+ &.b-active {
37
+ @apply bg-primary text-primary-foreground;
38
+ @apply dark:bg-primary-dark dark:text-primary-foreground-dark;
39
+
40
+ &[data-outside] {
41
+ @apply text-primary-foreground;
42
+ @apply dark:text-primary-foreground-dark;
43
+ }
44
+ }
45
+
46
+ &[data-outside] {
47
+ @apply opacity-50;
48
+ }
49
+
50
+ &:not(.b-active):hover,
51
+ &:not(.b-active):focus {
52
+ @apply bg-secondary/10 dark:bg-secondary-dark/10 cursor-pointer;
53
+ }
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,24 @@
1
+ b-card {
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
+
5
+ b-card-header {
6
+ @apply flex flex-col gap-1;
7
+
8
+ b-card-title {
9
+ @apply text-base font-semibold opacity-100;
10
+ }
11
+
12
+ b-card-description {
13
+ @apply text-sm opacity-70;
14
+ }
15
+ }
16
+
17
+ b-card-content {
18
+ @apply flex flex-col gap-2;
19
+ }
20
+
21
+ b-card-footer {
22
+ @apply flex justify-end gap-2;
23
+ }
24
+ }
@@ -0,0 +1,66 @@
1
+ button[b-checkbox] {
2
+ /* Base */
3
+ @apply inline-flex items-center justify-center align-middle select-none text-secondary-foreground bg-background inset-ring-1 inset-ring-ring shadow-xs;
4
+ @apply dark:bg-background-dark dark:text-secondary-foreground-dark dark:inset-ring-ring-dark;
5
+ @apply size-5 rounded-size-sm;
6
+
7
+ &:not([data-disabled]) {
8
+ @apply cursor-pointer hover:bg-secondary/20;
9
+ @apply dark:hover:bg-secondary-dark/30;
10
+ }
11
+
12
+ &[data-disabled] {
13
+ @apply opacity-60 pointer-events-none;
14
+ }
15
+
16
+ &[data-state='checked'] {
17
+ @apply bg-primary text-primary-foreground inset-ring-primary;
18
+ @apply dark:bg-primary-dark dark:text-primary-foreground-dark dark:inset-ring-primary-dark;
19
+ }
20
+
21
+ &[data-state='checked']:not([data-disabled]) {
22
+ @apply hover:bg-primary/80;
23
+ @apply dark:hover:bg-primary-dark/80;
24
+ }
25
+
26
+ &:focus-visible {
27
+ @apply outline-2 outline-offset-4 outline-primary;
28
+ @apply dark:outline-primary-dark;
29
+ }
30
+
31
+ /* Sizes */
32
+ &.b-size-sm {
33
+ @apply size-4 rounded-size-xs;
34
+ }
35
+ &.b-size-lg {
36
+ @apply size-6 rounded-size-md;
37
+ }
38
+
39
+ .b-checkbox-indicator {
40
+ @apply pointer-events-none flex items-center justify-center text-current;
41
+ }
42
+
43
+ &.b-size-sm .b-checkbox-indicator svg {
44
+ @apply h-2.5 w-2.5;
45
+ }
46
+
47
+ &.b-size-md .b-checkbox-indicator svg {
48
+ @apply h-3 w-3;
49
+ }
50
+
51
+ &.b-size-lg .b-checkbox-indicator svg {
52
+ @apply h-3.5 w-3.5;
53
+ }
54
+
55
+ &[data-state='unchecked'] .b-checkbox-indicator {
56
+ @apply opacity-0 scale-75;
57
+ }
58
+
59
+ &[data-state='checked'] .b-checkbox-indicator {
60
+ @apply opacity-100 scale-100;
61
+ }
62
+
63
+ svg {
64
+ @apply block;
65
+ }
66
+ }
@@ -0,0 +1,17 @@
1
+ ul[b-command-options] {
2
+ list-style: none;
3
+ box-sizing: border-box;
4
+ margin: 0;
5
+ position: relative;
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 0.25rem;
9
+ width: 100%;
10
+ overflow-y: auto;
11
+ padding: 0;
12
+ scrollbar-width: thin;
13
+
14
+ .no-options-message {
15
+ padding: 0.5rem 0.75rem;
16
+ }
17
+ }
@@ -0,0 +1,20 @@
1
+ b-command {
2
+ padding: 0.25rem;
3
+ box-sizing: border-box;
4
+ margin: 0;
5
+ position: relative;
6
+ background: var(--background, #ffffff);
7
+ box-shadow: 0 0 0.25rem 0.125rem rgba(1, 1, 1, 0.01);
8
+ border-radius: clamp(0rem, var(--radius, 0.5rem), 0.5rem);
9
+ border: 1px solid color-mix(in srgb, var(--foreground, #798194) 10%, var(--background, #ffffff));
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 0.25rem;
13
+ width: 100%;
14
+
15
+ input {
16
+ &:focus-visible {
17
+ outline: none !important;
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,41 @@
1
+ b-dialog-content {
2
+ animation: b-dialog-enter 150ms ease-in-out;
3
+
4
+ &.leaving {
5
+ transform: scale(0.9);
6
+ opacity: 0;
7
+ transition:
8
+ transform 150ms ease-in-out,
9
+ opacity 150ms ease-in-out;
10
+ }
11
+ }
12
+
13
+ .b-dialog-backdrop {
14
+ background-color: rgba(0, 0, 0, 0.08);
15
+ animation: b-dialog-backdrop-enter 150ms ease-in-out;
16
+ }
17
+
18
+ :has(b-dialog-content.leaving) .b-dialog-backdrop {
19
+ opacity: 0;
20
+ transition: opacity 150ms ease-in-out;
21
+ }
22
+
23
+ @keyframes b-dialog-enter {
24
+ 0% {
25
+ opacity: 0;
26
+ transform: scale(0.9);
27
+ }
28
+ 100% {
29
+ opacity: 1;
30
+ transform: scale(1);
31
+ }
32
+ }
33
+
34
+ @keyframes b-dialog-backdrop-enter {
35
+ 0% {
36
+ opacity: 0;
37
+ }
38
+ 100% {
39
+ opacity: 1;
40
+ }
41
+ }
@@ -0,0 +1,112 @@
1
+ b-drawer {
2
+ @apply fixed z-999 flex box-border overflow-hidden rounded-2xl border border-ring bg-surface text-font shadow-lg will-change-transform opacity-0 pointer-events-none dark:border-ring-dark dark:bg-surface-dark dark:text-font-dark;
3
+ transition:
4
+ transform 0.5s cubic-bezier(0.32, 0.72, 0, 1),
5
+ opacity 0.2s ease;
6
+
7
+ &.open,
8
+ &.dragging {
9
+ @apply opacity-100 pointer-events-auto;
10
+ }
11
+
12
+ .drag-section {
13
+ @apply absolute z-10 flex items-center justify-center touch-none bg-surface dark:bg-surface-dark;
14
+
15
+ .drag-indicator {
16
+ @apply rounded-full bg-ring dark:bg-ring-dark;
17
+ }
18
+ }
19
+
20
+ .drawer-content {
21
+ @apply flex-1 overflow-auto min-h-0;
22
+ }
23
+
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
+
29
+ .drag-section {
30
+ @apply top-0 left-0 right-0 h-10 cursor-ns-resize;
31
+ }
32
+
33
+ .drag-indicator {
34
+ @apply h-1 w-1/5;
35
+ }
36
+
37
+ &.draggable {
38
+ .drawer-content {
39
+ @apply pt-10;
40
+ }
41
+ }
42
+ }
43
+
44
+ &.top {
45
+ @apply left-2 right-2 top-2 mx-auto min-h-0;
46
+ max-height: var(--b-drawer-max-height, calc(100dvh - 1rem));
47
+ height: var(--b-drawer-height, 50%);
48
+
49
+ .drag-section {
50
+ @apply bottom-0 left-0 right-0 h-10 cursor-ns-resize;
51
+ }
52
+
53
+ .drag-indicator {
54
+ @apply h-1 w-1/5;
55
+ }
56
+
57
+ &.draggable {
58
+ .drawer-content {
59
+ @apply pb-10;
60
+ }
61
+ }
62
+ }
63
+
64
+ &.left {
65
+ @apply top-2 bottom-2 left-2;
66
+ max-width: var(--b-drawer-max-width, calc(100vw - 1rem));
67
+ width: var(--b-drawer-width, 320px);
68
+
69
+ .drag-section {
70
+ @apply top-0 right-0 bottom-0 w-5 cursor-ew-resize;
71
+ }
72
+
73
+ .drag-indicator {
74
+ @apply h-1/5 w-1;
75
+ }
76
+
77
+ &.draggable {
78
+ .drawer-content {
79
+ @apply pr-5;
80
+ }
81
+ }
82
+ }
83
+
84
+ &.right {
85
+ @apply top-2 bottom-2 right-2;
86
+ max-width: var(--b-drawer-max-width, calc(100vw - 1rem));
87
+ width: var(--b-drawer-width, 320px);
88
+
89
+ .drag-section {
90
+ @apply top-0 bottom-0 left-0 w-5 cursor-ew-resize;
91
+ }
92
+
93
+ .drag-indicator {
94
+ @apply h-1/5 w-1;
95
+ }
96
+
97
+ &.draggable {
98
+ .drawer-content {
99
+ @apply pl-5;
100
+ }
101
+ }
102
+ }
103
+
104
+ &.dragging {
105
+ transition: none;
106
+ }
107
+ }
108
+
109
+ html:has(b-drawer.open),
110
+ html:has(b-drawer.dragging) {
111
+ overflow: hidden;
112
+ }