@brickclay-org/ui 0.1.65 → 0.1.67

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/index.d.ts CHANGED
@@ -840,7 +840,7 @@ declare class BkGrid<T = any> {
840
840
  static ɵcmp: i0.ɵɵComponentDeclaration<BkGrid<any>, "bk-grid", never, { "draggable": { "alias": "draggable"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "result": { "alias": "result"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "actionIconClass": { "alias": "actionIconClass"; "required": false; }; "actionClass": { "alias": "actionClass"; "required": false; }; "showNoRecords": { "alias": "showNoRecords"; "required": false; }; "noRecordFoundHeight": { "alias": "noRecordFoundHeight"; "required": false; }; }, { "change": "change"; "actionClick": "actionClick"; "sortChange": "sortChange"; "dragDropChange": "dragDropChange"; }, never, never, true, never>;
841
841
  }
842
842
 
843
- declare class BkSelect implements ControlValueAccessor {
843
+ declare class BkSelect implements ControlValueAccessor, AfterViewInit, OnDestroy {
844
844
  items: i0.InputSignal<any[]>;
845
845
  bindLabel: i0.InputSignal<string>;
846
846
  bindValue: i0.InputSignal<string>;
@@ -885,12 +885,17 @@ declare class BkSelect implements ControlValueAccessor {
885
885
  optionsListContainer: ElementRef<HTMLDivElement>;
886
886
  optionsRef: QueryList<ElementRef>;
887
887
  controlWrapper: ElementRef<HTMLDivElement>;
888
+ chipsViewport?: ElementRef<HTMLDivElement>;
889
+ measureChips?: QueryList<ElementRef<HTMLElement>>;
890
+ measurePlus?: ElementRef<HTMLElement>;
888
891
  private _value;
889
892
  private static activeInstance;
890
893
  isOpen: i0.WritableSignal<boolean>;
891
894
  selectedOptions: i0.WritableSignal<any[]>;
892
895
  searchTerm: i0.WritableSignal<string>;
893
896
  markedIndex: i0.WritableSignal<number>;
897
+ visibleCount: i0.WritableSignal<number>;
898
+ private resizeObserver?;
894
899
  dropdownStyle: i0.WritableSignal<{
895
900
  top?: string;
896
901
  bottom?: string;
@@ -900,6 +905,16 @@ declare class BkSelect implements ControlValueAccessor {
900
905
  filteredItems: i0.Signal<any[]>;
901
906
  isAllSelected: i0.Signal<boolean>;
902
907
  constructor();
908
+ ngAfterViewInit(): void;
909
+ ngOnDestroy(): void;
910
+ private scheduleRecompute;
911
+ /**
912
+ * Measures the off-screen chip row and works out how many chips fit on a
913
+ * single line. If every chip fits, all of them are shown and no "+N" badge
914
+ * is rendered. Otherwise it keeps as many chips as fit while reserving space
915
+ * for the "+N" overflow badge.
916
+ */
917
+ private recomputeVisibleChips;
903
918
  resolveLabel(item: any): string;
904
919
  resolveValue(item: any): any;
905
920
  isItemSelected(item: any): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brickclay-org/ui",
3
- "version": "0.1.65",
3
+ "version": "0.1.67",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "ng-add": {
6
6
  "save": "dependencies"
@@ -70,6 +70,30 @@
70
70
 
71
71
  /* --- NEW: Multi Select Chips --- */
72
72
 
73
+ /* Visible single-line chip row; overflow collapses into the "+N" badge.
74
+ flex: 1 forces the row to span the full available width so that the width
75
+ we measure (clientWidth) is the real space available — not the shrink-to-fit
76
+ width of however many chips happen to be rendered right now. Without this the
77
+ measurement collapses with the content and the row can never grow to fill
78
+ the space. */
79
+ .bk-chips-viewport {
80
+ flex: 1 1 0%;
81
+ min-width: 0;
82
+ max-width: 100%;
83
+ }
84
+
85
+ /* Off-screen measurement row: renders all chips so each one's natural width
86
+ can be read, without affecting the visible layout. */
87
+ .bk-chips-measure {
88
+ position: absolute;
89
+ top: 0;
90
+ left: 0;
91
+ visibility: hidden;
92
+ pointer-events: none;
93
+ white-space: nowrap;
94
+ z-index: -1;
95
+ }
96
+
73
97
  /* Badge Item */
74
98
  .bk-multi-badge-item {
75
99
  @apply inline-flex items-center gap-1.5 px-1.5 py-0.5 bg-white border border-[#E3E3E7] rounded-[4px];
@@ -2,7 +2,7 @@
2
2
  .toggle-base {
3
3
  @apply relative inline-flex items-center rounded-full transition-colors duration-200 ease-in-out border-2 border-transparent;
4
4
  /* Focus State (Blue Ring as seen in image) */
5
- @apply focus:outline-none focus-visible:ring-2 focus-visible:ring-[#1336EF] focus-visible:ring-offset-2;
5
+ @apply focus:outline-none focus-visible:ring-1 focus-visible:ring-black focus-visible:ring-offset-1;
6
6
  }
7
7
 
8
8
  /* --- Colors --- */
@@ -11,7 +11,7 @@
11
11
  }
12
12
 
13
13
  .toggle-on {
14
- @apply bg-[#22973F] hover:bg-[#1E7735]; /* Green when on */
14
+ @apply bg-gray-800 hover:bg-black; /* Green when on */
15
15
  }
16
16
 
17
17
  /* --- Disabled State (Bottom row of image) --- */
@@ -82,10 +82,10 @@
82
82
  }
83
83
 
84
84
  .simulate-hover.toggle-on {
85
- @apply bg-[#1E7735]; /* Matches the hover color defined in .toggle-on */
85
+ @apply bg-black; /* Matches the hover color defined in .toggle-on */
86
86
  }
87
87
 
88
88
  /* Force Focus Appearance (Blue Ring) */
89
89
  .simulate-focus {
90
- @apply ring-2 ring-[#1336EF] ring-offset-2;
90
+ @apply ring-2 ring-black ring-offset-1;
91
91
  }