@brickclay-org/ui 0.1.68 → 0.1.70

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": "@brickclay-org/ui",
3
- "version": "0.1.68",
3
+ "version": "0.1.70",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "ng-add": {
6
6
  "save": "dependencies"
@@ -0,0 +1,156 @@
1
+ /* Root — anchor for the absolutely-positioned menu */
2
+ .bk-dd {
3
+ @apply relative inline-block;
4
+ }
5
+
6
+ /* =======================================================
7
+ Trigger button — mirrors app-button (rounded, medium,
8
+ bordered) with black / white variants and sizes.
9
+ ======================================================= */
10
+ .bk-dd-trigger {
11
+ @apply inline-flex items-center justify-center gap-1.5 border rounded-md font-medium cursor-pointer transition-colors duration-100 outline-none whitespace-nowrap tracking-[-0.28];
12
+ }
13
+
14
+ /* Sizes */
15
+ .bk-dd-trigger--sm {
16
+ @apply text-xs px-2.5 py-1.5 leading-3;
17
+ }
18
+
19
+ .bk-dd-trigger--md {
20
+ @apply text-sm px-3 py-2 leading-[14px];
21
+ }
22
+
23
+ .bk-dd-trigger--lg {
24
+ @apply text-base px-4 py-2.5 leading-4;
25
+ }
26
+
27
+ /* Black variant (like the active segment tab) */
28
+ .bk-dd-trigger--black {
29
+ @apply bg-[#141414] text-white border-transparent;
30
+ }
31
+
32
+ .bk-dd-trigger--black:hover:not(:disabled) {
33
+ @apply bg-[#2A2A2A];
34
+ }
35
+
36
+ /* White variant (light, bordered — like an inactive segment tab) */
37
+ .bk-dd-trigger--white {
38
+ @apply bg-white text-[#141414] border-[#E3E3E7];
39
+ }
40
+
41
+ .bk-dd-trigger--white:hover:not(:disabled) {
42
+ @apply bg-[#F9FAFA];
43
+ }
44
+
45
+ /* Disabled */
46
+ .bk-dd-trigger--disabled {
47
+ @apply opacity-50 cursor-not-allowed;
48
+ }
49
+
50
+ .bk-dd-label {
51
+ @apply whitespace-nowrap;
52
+ }
53
+
54
+ /* Caret rotates 180° when the menu is open */
55
+ .bk-dd-caret {
56
+ @apply transition-transform duration-200;
57
+ }
58
+
59
+ .bk-dd--open .bk-dd-caret {
60
+ @apply rotate-180;
61
+ }
62
+
63
+ /* =======================================================
64
+ Split button (Button with dropdown menu)
65
+ ======================================================= */
66
+ .bk-dd-split {
67
+ @apply inline-flex items-stretch;
68
+ }
69
+
70
+ /* main action: square off the right corners */
71
+ .bk-dd-split-main {
72
+ @apply rounded-r-none;
73
+ }
74
+
75
+ /* caret side: square off the left corners + a divider seam */
76
+ .bk-dd-split-caret {
77
+ @apply rounded-l-none border-l-0 px-2;
78
+ }
79
+
80
+ .bk-dd-split-caret.bk-dd-trigger--black {
81
+ @apply border-l border-l-[#2A2A2A];
82
+ }
83
+
84
+ .bk-dd-split-caret.bk-dd-trigger--white {
85
+ @apply border-l border-l-[#E3E3E7];
86
+ }
87
+
88
+ .bk-dd-split--disabled {
89
+ @apply opacity-50 pointer-events-none;
90
+ }
91
+
92
+ /* =======================================================
93
+ Menu panel — matches the bk-select dropdown panel look.
94
+ ======================================================= */
95
+ .bk-dd-menu {
96
+ @apply absolute z-[100] min-w-[10rem] max-w-[16rem] bg-white border border-[#E3E3E7] rounded-xl shadow-lg p-2.5;
97
+ }
98
+
99
+ .bk-dd-list {
100
+ @apply relative z-10 list-none m-0 p-0 flex flex-col gap-0.5;
101
+ }
102
+
103
+ /* Scroll only when there are no submenus (see hasSubmenus). */
104
+ .bk-dd-list--scroll {
105
+ @apply max-h-[16rem] overflow-y-auto;
106
+ }
107
+
108
+ /* Menu item */
109
+ .bk-dd-li {
110
+ @apply relative;
111
+ }
112
+
113
+ .bk-dd-item {
114
+ @apply flex items-center gap-2 w-full text-left p-2.5 rounded-md text-sm font-normal text-[#141414] bg-transparent cursor-pointer transition-colors;
115
+ }
116
+
117
+ .bk-dd-item:hover:not(:disabled) {
118
+ @apply bg-[#F8F8F8];
119
+ }
120
+
121
+ .bk-dd-item--disabled {
122
+ @apply opacity-50 cursor-not-allowed;
123
+ }
124
+
125
+ .bk-dd-item-label {
126
+ @apply flex-1 min-w-0 truncate;
127
+ }
128
+
129
+ .bk-dd-item-caret {
130
+ @apply text-[#6B7080];
131
+ }
132
+
133
+ .bk-dd-check {
134
+ @apply text-[#141414];
135
+ }
136
+
137
+ /* Divider — span the panel padding */
138
+ .bk-dd-divider {
139
+ @apply -mx-2.5 h-px bg-[#E3E3E7];
140
+ }
141
+
142
+ /* =======================================================
143
+ Cascading submenu — revealed on hover of a parent item
144
+ ======================================================= */
145
+ .bk-dd-submenu {
146
+ @apply absolute top-0 left-full ml-1 hidden min-w-[10rem] max-w-[16rem] list-none m-0 p-2.5 flex-col gap-0.5 bg-white border border-[#E3E3E7] rounded-xl shadow-lg;
147
+ }
148
+
149
+ .bk-dd-li--parent:hover>.bk-dd-submenu {
150
+ @apply flex;
151
+ }
152
+
153
+ /* Flip to the left when there isn't room on the right (class set via JS on hover). */
154
+ .bk-dd-submenu--flip>.bk-dd-submenu {
155
+ @apply left-auto right-full ml-0 mr-1;
156
+ }
@@ -7,7 +7,7 @@
7
7
  Grid layout: columns flow horizontally and size to content
8
8
  (auto-cols-max), matching the old flex row while giving grid control. */
9
9
  .tabs-list {
10
- @apply grid grid-flow-col auto-cols-max gap-0 list-none m-0 px-0 py-0.5;
10
+ @apply grid grid-flow-col auto-cols-max gap-[4px] list-none m-0 px-0 py-0.5;
11
11
  }
12
12
 
13
13
  /* Tab Item */
@@ -29,9 +29,14 @@
29
29
  }
30
30
 
31
31
  /* Tab Button - Hover State */
32
- /* .tabs-button:hover:not(:disabled):not(.tabs-button--active) {
33
- @apply text-[#141414] bg-[#F9FAFA];
34
- } */
32
+ .tabs-button:hover:not(:disabled):not(.tabs-button--active) {
33
+ @apply text-[#141414] bg-[#EDEEF0];
34
+ }
35
+
36
+ /* Vertical (default variant): 9px top/bottom padding on stacked tabs */
37
+ .tabs-list--vertical .tabs-button {
38
+ @apply py-[9px];
39
+ }
35
40
 
36
41
  /* Tab Button - Active State */
37
42
  .tabs-button--active {
@@ -71,22 +76,26 @@
71
76
  @apply whitespace-nowrap;
72
77
  }
73
78
 
74
-
75
79
  /* =========================================================
76
80
  Segmented variant (pill-in-a-track)
77
81
  Colors are driven by CSS vars set per-usage via [colors],
78
82
  falling back to the default design tokens.
79
83
  ========================================================= */
80
84
 
81
- /* Track / wrapper — default background; override via colors.wrapper (use ! classes). */
85
+ /* Track / wrapper — default background; override via colors.wrapper (use ! classes).
86
+ overflow-x-auto lets the pill row scroll horizontally when there are more
87
+ tabs than fit, instead of squishing them until the labels overlap. */
82
88
  .tabs-container--segmented {
83
- @apply p-[3px] rounded-md w-full md:w-auto;
89
+ @apply p-[3px] rounded-md w-full md:w-auto overflow-x-auto;
84
90
  background: #54578E12;
85
91
  }
86
92
 
87
- /* Pill row — equal-width columns (auto-cols-fr) replace the old flex-1. */
93
+ /* Pill row — columns are minmax(max-content, 1fr): they share the track
94
+ equally while they fit (like the old auto-cols-fr), but never shrink below
95
+ their content, so a long list overflows the track and scrolls. */
88
96
  .tabs-list--segmented {
89
- @apply grid grid-flow-col auto-cols-fr items-center gap-2 rounded-md font-medium text-sm leading-4 w-full sm:w-auto py-0;
97
+ @apply grid grid-flow-col items-center gap-2 rounded-md font-medium text-sm leading-4 w-full sm:w-auto py-0;
98
+ grid-auto-columns: minmax(max-content, 1fr);
90
99
  color: #6B7080;
91
100
  }
92
101
 
@@ -121,4 +130,6 @@
121
130
  /* Left-align pill content in the vertical segmented layout */
122
131
  .tabs-list--segmented-vertical .tabs-button--segmented {
123
132
  @apply justify-start text-left;
124
- }
133
+ }
134
+
135
+ /* Testing */