@brickclay-org/ui 0.1.80 → 0.1.82
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/fesm2022/brickclay-org-ui.mjs +104 -11
- package/fesm2022/brickclay-org-ui.mjs.map +1 -1
- package/index.d.ts +48 -7
- package/package.json +1 -1
- package/src/lib/select/select.css +144 -0
package/index.d.ts
CHANGED
|
@@ -1028,6 +1028,22 @@ declare function parseColor(input: string | null | undefined): Rgb | null;
|
|
|
1028
1028
|
*/
|
|
1029
1029
|
declare function deriveAppearance(color: string | null | undefined, fill?: ColorFill): ColorAppearance;
|
|
1030
1030
|
|
|
1031
|
+
interface BkSelectGridColumn {
|
|
1032
|
+
/** Property read from each item. Dot-separated paths are supported. */
|
|
1033
|
+
key: string;
|
|
1034
|
+
/** Column heading. */
|
|
1035
|
+
label: string;
|
|
1036
|
+
/** CSS width/min-width values, e.g. `120px` or `25%`. */
|
|
1037
|
+
width?: string;
|
|
1038
|
+
minWidth?: string;
|
|
1039
|
+
align?: 'left' | 'center' | 'right';
|
|
1040
|
+
type?: 'text' | 'badge';
|
|
1041
|
+
/** Optional display transform; the original item is supplied as well. */
|
|
1042
|
+
formatter?: (value: any, item: any) => string;
|
|
1043
|
+
/** Badge colour by cell value, e.g. `{ Active: '#16a34a' }`. */
|
|
1044
|
+
badgeColors?: Record<string, BadgeColor>;
|
|
1045
|
+
badgeVariant?: BadgeVariant;
|
|
1046
|
+
}
|
|
1031
1047
|
declare class BkSelect implements ControlValueAccessor, AfterViewInit, OnDestroy {
|
|
1032
1048
|
items: _angular_core.InputSignal<any[]>;
|
|
1033
1049
|
bindLabel: _angular_core.InputSignal<string>;
|
|
@@ -1040,6 +1056,18 @@ declare class BkSelect implements ControlValueAccessor, AfterViewInit, OnDestroy
|
|
|
1040
1056
|
clearAllText: _angular_core.InputSignal<string>;
|
|
1041
1057
|
groupBy: _angular_core.InputSignal<string>;
|
|
1042
1058
|
colorKey: _angular_core.InputSignal<string>;
|
|
1059
|
+
/** Opt-in table-like dropdown. The existing list is the unchanged default. */
|
|
1060
|
+
dropdownView: _angular_core.InputSignal<"list" | "grid">;
|
|
1061
|
+
gridColumns: _angular_core.InputSignal<BkSelectGridColumn[]>;
|
|
1062
|
+
/** Stage multi-grid changes until Apply is clicked. */
|
|
1063
|
+
gridSelectionActions: _angular_core.InputSignal<boolean>;
|
|
1064
|
+
gridMinWidth: _angular_core.InputSignal<string>;
|
|
1065
|
+
gridMaxHeight: _angular_core.InputSignal<string>;
|
|
1066
|
+
/** One or two item keys used for the selected grid value/chip label. */
|
|
1067
|
+
gridSelectedLabelKeys: _angular_core.InputSignal<string[]>;
|
|
1068
|
+
gridSelectedLabelSeparator: _angular_core.InputSignal<string>;
|
|
1069
|
+
gridApplyText: _angular_core.InputSignal<string>;
|
|
1070
|
+
gridClearText: _angular_core.InputSignal<string>;
|
|
1043
1071
|
/**
|
|
1044
1072
|
* Show an accent dot beside each option, driven by `colorKey`.
|
|
1045
1073
|
*
|
|
@@ -1080,7 +1108,7 @@ declare class BkSelect implements ControlValueAccessor, AfterViewInit, OnDestroy
|
|
|
1080
1108
|
disabled: _angular_core.ModelSignal<boolean>;
|
|
1081
1109
|
loading: _angular_core.InputSignal<boolean>;
|
|
1082
1110
|
closeOnSelect: _angular_core.InputSignal<boolean>;
|
|
1083
|
-
dropdownPosition: _angular_core.InputSignal<"
|
|
1111
|
+
dropdownPosition: _angular_core.InputSignal<"bottom" | "top">;
|
|
1084
1112
|
hasError: boolean;
|
|
1085
1113
|
errorMessage: string;
|
|
1086
1114
|
appendToBody: _angular_core.InputSignal<boolean>;
|
|
@@ -1107,9 +1135,10 @@ declare class BkSelect implements ControlValueAccessor, AfterViewInit, OnDestroy
|
|
|
1107
1135
|
private static activeInstance;
|
|
1108
1136
|
isOpen: _angular_core.WritableSignal<boolean>;
|
|
1109
1137
|
selectedOptions: _angular_core.WritableSignal<any[]>;
|
|
1138
|
+
private gridDraftOptions;
|
|
1110
1139
|
searchTerm: _angular_core.WritableSignal<string>;
|
|
1111
1140
|
markedIndex: _angular_core.WritableSignal<number>;
|
|
1112
|
-
placement: _angular_core.WritableSignal<"
|
|
1141
|
+
placement: _angular_core.WritableSignal<"bottom" | "top">;
|
|
1113
1142
|
private originalPanelParent;
|
|
1114
1143
|
private originalPanelAnchor;
|
|
1115
1144
|
private panelInBody;
|
|
@@ -1160,6 +1189,13 @@ declare class BkSelect implements ControlValueAccessor, AfterViewInit, OnDestroy
|
|
|
1160
1189
|
private recomputeVisibleChips;
|
|
1161
1190
|
resolveLabel(item: any): string;
|
|
1162
1191
|
resolveValue(item: any): any;
|
|
1192
|
+
resolveGridCell(item: any, column: BkSelectGridColumn): string;
|
|
1193
|
+
private readItemValue;
|
|
1194
|
+
gridColumnStyle(column: BkSelectGridColumn): Record<string, string>;
|
|
1195
|
+
gridBadgeColor(item: any, column: BkSelectGridColumn): BadgeColor;
|
|
1196
|
+
isGridItemSelected(item: any): boolean;
|
|
1197
|
+
gridSelectedCount(): number;
|
|
1198
|
+
private usesGridDraft;
|
|
1163
1199
|
isItemSelected(item: any): boolean;
|
|
1164
1200
|
isItemDisabled(item: any): boolean;
|
|
1165
1201
|
compareWith: _angular_core.InputSignal<(a: any, b: any) => boolean>;
|
|
@@ -1177,6 +1213,9 @@ declare class BkSelect implements ControlValueAccessor, AfterViewInit, OnDestroy
|
|
|
1177
1213
|
applyPlacement(): void;
|
|
1178
1214
|
toggleSelectAll(event: Event): void;
|
|
1179
1215
|
handleSelection(item: any, event?: Event): void;
|
|
1216
|
+
handleGridSelection(item: any, event?: Event): void;
|
|
1217
|
+
clearGridDraft(): void;
|
|
1218
|
+
applyGridDraft(): void;
|
|
1180
1219
|
removeOption(item: any, event: Event): void;
|
|
1181
1220
|
handleClear(event: Event): void;
|
|
1182
1221
|
private updateModel;
|
|
@@ -1241,7 +1280,7 @@ declare class BkSelect implements ControlValueAccessor, AfterViewInit, OnDestroy
|
|
|
1241
1280
|
getTooltipIfEllipsed(el: HTMLElement, text: string): string;
|
|
1242
1281
|
onOptionHover(index: number): void;
|
|
1243
1282
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BkSelect, never>;
|
|
1244
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BkSelect, "bk-select", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "bindLabel": { "alias": "bindLabel"; "required": false; "isSignal": true; }; "bindValue": { "alias": "bindValue"; "required": false; "isSignal": true; }; "bindIcon": { "alias": "bindIcon"; "required": false; "isSignal": true; }; "isResponsive": { "alias": "isResponsive"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "notFoundText": { "alias": "notFoundText"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "clearAllText": { "alias": "clearAllText"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "colorKey": { "alias": "colorKey"; "required": false; "isSignal": true; }; "showDots": { "alias": "showDots"; "required": false; "isSignal": true; }; "showAvatar": { "alias": "showAvatar"; "required": false; "isSignal": true; }; "avatarKey": { "alias": "avatarKey"; "required": false; "isSignal": true; }; "iconAlt": { "alias": "iconAlt"; "required": false; }; "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "variation": { "alias": "variation"; "required": false; }; "iconSrc": { "alias": "iconSrc"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "maxLabels": { "alias": "maxLabels"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "allSelect": { "alias": "allSelect"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; "dropdownPosition": { "alias": "dropdownPosition"; "required": false; "isSignal": true; }; "hasError": { "alias": "hasError"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "appendToBody": { "alias": "appendToBody"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "open": "open"; "close": "close"; "focus": "focus"; "blur": "blur"; "search": "search"; "clear": "clear"; "change": "change"; "scrollToEnd": "scrollToEnd"; }, never, never, true, never>;
|
|
1283
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BkSelect, "bk-select", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "bindLabel": { "alias": "bindLabel"; "required": false; "isSignal": true; }; "bindValue": { "alias": "bindValue"; "required": false; "isSignal": true; }; "bindIcon": { "alias": "bindIcon"; "required": false; "isSignal": true; }; "isResponsive": { "alias": "isResponsive"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "notFoundText": { "alias": "notFoundText"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "clearAllText": { "alias": "clearAllText"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "colorKey": { "alias": "colorKey"; "required": false; "isSignal": true; }; "dropdownView": { "alias": "dropdownView"; "required": false; "isSignal": true; }; "gridColumns": { "alias": "gridColumns"; "required": false; "isSignal": true; }; "gridSelectionActions": { "alias": "gridSelectionActions"; "required": false; "isSignal": true; }; "gridMinWidth": { "alias": "gridMinWidth"; "required": false; "isSignal": true; }; "gridMaxHeight": { "alias": "gridMaxHeight"; "required": false; "isSignal": true; }; "gridSelectedLabelKeys": { "alias": "gridSelectedLabelKeys"; "required": false; "isSignal": true; }; "gridSelectedLabelSeparator": { "alias": "gridSelectedLabelSeparator"; "required": false; "isSignal": true; }; "gridApplyText": { "alias": "gridApplyText"; "required": false; "isSignal": true; }; "gridClearText": { "alias": "gridClearText"; "required": false; "isSignal": true; }; "showDots": { "alias": "showDots"; "required": false; "isSignal": true; }; "showAvatar": { "alias": "showAvatar"; "required": false; "isSignal": true; }; "avatarKey": { "alias": "avatarKey"; "required": false; "isSignal": true; }; "iconAlt": { "alias": "iconAlt"; "required": false; }; "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "variation": { "alias": "variation"; "required": false; }; "iconSrc": { "alias": "iconSrc"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "maxLabels": { "alias": "maxLabels"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "allSelect": { "alias": "allSelect"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; "dropdownPosition": { "alias": "dropdownPosition"; "required": false; "isSignal": true; }; "hasError": { "alias": "hasError"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "appendToBody": { "alias": "appendToBody"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "open": "open"; "close": "close"; "focus": "focus"; "blur": "blur"; "search": "search"; "clear": "clear"; "change": "change"; "scrollToEnd": "scrollToEnd"; }, never, never, true, never>;
|
|
1245
1284
|
}
|
|
1246
1285
|
|
|
1247
1286
|
type BkInputType = 'text' | 'email' | 'password' | 'number' | 'url' | 'tel';
|
|
@@ -2285,7 +2324,7 @@ declare class BkHierarchicalSelect implements ControlValueAccessor, AfterViewIni
|
|
|
2285
2324
|
/** When true, dropdown is positioned fixed and sized to the trigger (use inside modals/popups). */
|
|
2286
2325
|
appendToBody: _angular_core.InputSignal<boolean>;
|
|
2287
2326
|
/** Open above or below the trigger (also used when appendToBody is true for fixed coordinates). */
|
|
2288
|
-
dropdownPosition: _angular_core.InputSignal<"
|
|
2327
|
+
dropdownPosition: _angular_core.InputSignal<"bottom" | "top">;
|
|
2289
2328
|
/** Key for option color (e.g. "color"). When set, option label and selected value use this color. */
|
|
2290
2329
|
colorKey: _angular_core.InputSignal<string>;
|
|
2291
2330
|
/**
|
|
@@ -2314,7 +2353,7 @@ declare class BkHierarchicalSelect implements ControlValueAccessor, AfterViewIni
|
|
|
2314
2353
|
controlWrapper: ElementRef<HTMLDivElement>;
|
|
2315
2354
|
dropdownPanel?: ElementRef<HTMLDivElement>;
|
|
2316
2355
|
private el;
|
|
2317
|
-
placement: _angular_core.WritableSignal<"
|
|
2356
|
+
placement: _angular_core.WritableSignal<"bottom" | "top">;
|
|
2318
2357
|
private originalPanelParent;
|
|
2319
2358
|
private originalPanelAnchor;
|
|
2320
2359
|
private panelInBody;
|
|
@@ -2337,6 +2376,8 @@ declare class BkHierarchicalSelect implements ControlValueAccessor, AfterViewIni
|
|
|
2337
2376
|
/** Runs after the panel has rendered: relocate (append mode) + position + focus. */
|
|
2338
2377
|
private afterOpenInit;
|
|
2339
2378
|
isOpen: _angular_core.WritableSignal<boolean>;
|
|
2379
|
+
/** Hidden until its real height has been measured and final placement applied. */
|
|
2380
|
+
panelReady: _angular_core.WritableSignal<boolean>;
|
|
2340
2381
|
dropdownStyle: _angular_core.WritableSignal<{
|
|
2341
2382
|
top?: string;
|
|
2342
2383
|
bottom?: string;
|
|
@@ -3854,7 +3895,7 @@ declare class BkTd extends BkCellBase implements AfterViewInit, OnDestroy {
|
|
|
3854
3895
|
*/
|
|
3855
3896
|
protected readonly truncatedTooltip: _angular_core.WritableSignal<string>;
|
|
3856
3897
|
/** Forwarded to the content wrapper's `bkTooltip`. Override on a column whose default 'right' would run into its neighbour. */
|
|
3857
|
-
tooltipPosition: _angular_core.InputSignal<"
|
|
3898
|
+
tooltipPosition: _angular_core.InputSignal<"bottom" | "top" | "left" | "right">;
|
|
3858
3899
|
/** Only present when `ellipsis()` is true — see the `@else` branch in the template. */
|
|
3859
3900
|
private ellipsisTextRef?;
|
|
3860
3901
|
checkbox: _angular_core.InputSignal<boolean>;
|
|
@@ -4172,4 +4213,4 @@ declare class BkTreeDrag<T = any> extends BkTableDrag implements OnDestroy {
|
|
|
4172
4213
|
declare const BK_TABLE: readonly [typeof BkTable, typeof BkTableTitle, typeof BkTableFooter, typeof BkVirtualScroll, typeof BkTh, typeof BkTd, typeof BkTrExpand, typeof BkTableSummary, typeof BkTableDrag, typeof BkDragHandle, typeof BkTreeDrag];
|
|
4173
4214
|
|
|
4174
4215
|
export { BKTooltipDirective, BK_DEFAULT_DIALOG_CONFIG, BK_DIALOG_DATA, BK_DIALOG_GLOBAL_CONFIG, BK_TABLE, BkAvatar, BkAvatarGroup, BkAvatarUploader, BkBadge, BkBreadcrumb, BkButton, BkButtonGroup, BkCalendarManagerService, BkCheckbox, BkColumnFilterService, BkColumnSelect, BkCustomCalendar, BkDialogActions, BkDialogClose, BkDialogContent, BkDialogModule, BkDialogRef, BkDialogService, BkDialogTitle, BkDragHandle, BkDropdown, BkFileCard, BkFilePicker, BkGrid, BkHierarchicalSelect, BkIconButton, BkInput, BkInputChips, BkLoader, BkMenu, BkPagination, BkPill, BkPopover, BkRadioButton, BkScheduledDatePicker, BkSelect, BkSpinner, BkTable, BkTableDrag, BkTableFooter, BkTableSummary, BkTableTitle, BkTabs, BkTd, BkTextarea, BkTh, BkTimePicker, BkToastr, BkToastrService, BkToggle, BkTrExpand, BkTreeDrag, BkValidator, BkVirtualScroll, BrickclayIcons, BrickclayLib, CalendarModule, CalendarSelection, ColumnFilterOption, NEUTRAL_APPEARANCE, POPOVER_PLACEMENTS, computePopoverPosition, containsBkTreeNode, deriveAppearance, flattenBkTreeData, getDialogBackdropAnimation, getDialogPanelAnimation, joinPlacement, moveBkTreeNode, normalizeBkTableSize, parseColor, splitPlacement };
|
|
4175
|
-
export type { AvatarFallback, AvatarGroupItem, AvatarSize, AvatarVariant, BadgeColor, BadgeSize, BadgeVariant, BkAnimationKeyframes, BkAvatarFallback, BkAvatarSize, BkCellAlign, BkColumnRef, BkColumnSelectPosition, BkDialogAnimation, BkDialogConfig, BkDialogPosition, BkFilterFn, BkFilterOption, BkInputAutoCapitalize, BkInputAutoComplete, BkInputMode, BkInputSize, BkInputType, BkLoaderVariant, BkPageSize, BkPageSizeVisibility, BkSortDirection, BkSortFn, BkSortOrder, BkTableNoResult, BkTableQueryParams, BkTableScroll, BkTableSelection, BkTableSize, BkTableSizeToken, BkTextAreaAutoCapitalize, BkTextAreaAutoComplete, BkTextAreaInputMode, BkTreeDragScope, BkTreeDropEvent, BkTreeDropPosition, BkTreeRow, BreadcrumbItem, ButtonSize, ButtonVariant, CalendarRange, ColorAppearance, ColorFill, CountryOption, CustomRangesConfig, DotPosition, DotStatus, DropdownItem, DropdownPlacement, DropdownSize, DropdownTrigger, DropdownVariant, FileState, GroupItem, GroupMode, HierarchicalNode, IconButtonSize, IconButtonVariant, IconOrientation, MenuItem, MenuOrientation, MenuPopupSide, MenuSize, MenuSubmenuMode, MenuTrigger, PillColor, PillSize, PillVariant, PopoverAlign, PopoverPlacement, PopoverPosition, PopoverPositionOptions, PopoverSide, Rect, ScheduledDateSelection, Size, SortDirection, SpinnerSize, TabIconDirection, TabItem, TableAction, TableBadge, TableColumn, TableIcon, TableRows, TabsColors, TabsOrientation, TabsVariant, TimeConfiguration, ToastConfig, ToastMessage, ToastMethodOptions, ToastPosition, ToastSeverity };
|
|
4216
|
+
export type { AvatarFallback, AvatarGroupItem, AvatarSize, AvatarVariant, BadgeColor, BadgeSize, BadgeVariant, BkAnimationKeyframes, BkAvatarFallback, BkAvatarSize, BkCellAlign, BkColumnRef, BkColumnSelectPosition, BkDialogAnimation, BkDialogConfig, BkDialogPosition, BkFilterFn, BkFilterOption, BkInputAutoCapitalize, BkInputAutoComplete, BkInputMode, BkInputSize, BkInputType, BkLoaderVariant, BkPageSize, BkPageSizeVisibility, BkSelectGridColumn, BkSortDirection, BkSortFn, BkSortOrder, BkTableNoResult, BkTableQueryParams, BkTableScroll, BkTableSelection, BkTableSize, BkTableSizeToken, BkTextAreaAutoCapitalize, BkTextAreaAutoComplete, BkTextAreaInputMode, BkTreeDragScope, BkTreeDropEvent, BkTreeDropPosition, BkTreeRow, BreadcrumbItem, ButtonSize, ButtonVariant, CalendarRange, ColorAppearance, ColorFill, CountryOption, CustomRangesConfig, DotPosition, DotStatus, DropdownItem, DropdownPlacement, DropdownSize, DropdownTrigger, DropdownVariant, FileState, GroupItem, GroupMode, HierarchicalNode, IconButtonSize, IconButtonVariant, IconOrientation, MenuItem, MenuOrientation, MenuPopupSide, MenuSize, MenuSubmenuMode, MenuTrigger, PillColor, PillSize, PillVariant, PopoverAlign, PopoverPlacement, PopoverPosition, PopoverPositionOptions, PopoverSide, Rect, ScheduledDateSelection, Size, SortDirection, SpinnerSize, TabIconDirection, TabItem, TableAction, TableBadge, TableColumn, TableIcon, TableRows, TabsColors, TabsOrientation, TabsVariant, TimeConfiguration, ToastConfig, ToastMessage, ToastMethodOptions, ToastPosition, ToastSeverity };
|
package/package.json
CHANGED
|
@@ -130,6 +130,12 @@
|
|
|
130
130
|
max-width: 140px;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
/* Grid selections may combine two column values, so allow wider chips without
|
|
134
|
+
changing the established list-mode multi-select sizing. */
|
|
135
|
+
.bk-select-container.bk-grid-view .bk-multi-badge-item {
|
|
136
|
+
max-width: 175px;
|
|
137
|
+
}
|
|
138
|
+
|
|
133
139
|
.bk-multi-badge-item-text {
|
|
134
140
|
@apply text-[10px] leading-[12px] font-normal text-[#6B7080];
|
|
135
141
|
white-space: nowrap;
|
|
@@ -164,6 +170,144 @@
|
|
|
164
170
|
@apply absolute left-0 w-full bg-white border border-[#E3E3E7] rounded-xl shadow-lg z-[100] overflow-hidden cursor-default p-2.5;
|
|
165
171
|
}
|
|
166
172
|
|
|
173
|
+
/* Opt-in grid dropdown. List-mode selectors above and below remain unchanged. */
|
|
174
|
+
.bk-grid-scroll {
|
|
175
|
+
@apply overflow-auto -mx-2.5;
|
|
176
|
+
scrollbar-width: thin;
|
|
177
|
+
scrollbar-color: #D6D7DC transparent;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.bk-grid-scroll::-webkit-scrollbar {
|
|
181
|
+
width: 6px;
|
|
182
|
+
height: 6px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.bk-grid-scroll::-webkit-scrollbar-track {
|
|
186
|
+
background: transparent;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.bk-grid-scroll::-webkit-scrollbar-thumb {
|
|
190
|
+
background: #D6D7DC;
|
|
191
|
+
border-radius: 999px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.bk-grid-scroll::-webkit-scrollbar-thumb:hover {
|
|
195
|
+
background: #909090;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.bk-grid-scroll::-webkit-scrollbar-button {
|
|
199
|
+
display: none;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Unlike list options, the grid header should meet the panel's top edge. */
|
|
203
|
+
.bk-dropdown-panel.bk-grid-panel {
|
|
204
|
+
padding-top: 0;
|
|
205
|
+
padding-bottom: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.bk-select-grid {
|
|
209
|
+
@apply w-full border-collapse text-sm text-[#141414];
|
|
210
|
+
table-layout: fixed;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.bk-select-grid th {
|
|
214
|
+
@apply sticky top-0 z-10 bg-[#F1F1F3] px-4 py-2.5 font-semibold whitespace-nowrap border-b border-[#E3E3E7];
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.bk-select-grid td {
|
|
218
|
+
@apply px-4 py-2.5 border-b border-[#E3E3E7] align-middle;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.bk-select-grid tbody tr {
|
|
222
|
+
@apply cursor-pointer transition-colors;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.bk-select-grid tbody tr:hover,
|
|
226
|
+
.bk-select-grid tbody tr.bk-marked {
|
|
227
|
+
@apply bg-[#F8F8F8];
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.bk-select-grid tbody tr.bk-selected {
|
|
231
|
+
background-color: #F8F8F8;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.bk-select-grid tbody tr.bk-option-disabled {
|
|
235
|
+
@apply opacity-50 cursor-not-allowed;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.bk-grid-checkbox-column {
|
|
239
|
+
width: 48px;
|
|
240
|
+
min-width: 48px;
|
|
241
|
+
@apply !px-4;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.bk-grid-cell-text {
|
|
245
|
+
@apply block truncate;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.bk-grid-message {
|
|
249
|
+
@apply !px-4 !py-4 text-center text-gray-400;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.bk-grid-footer {
|
|
253
|
+
@apply flex items-center justify-between gap-4 px-1 py-2.5 text-xs text-[#6B7080];
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.bk-grid-footer-actions {
|
|
257
|
+
@apply flex items-center gap-2;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* Grid density follows the select's existing `variation="sm"` contract. The
|
|
261
|
+
class lives on the panel so it keeps working when appendToBody relocates it. */
|
|
262
|
+
.bk-dropdown-panel.bk-grid-compact {
|
|
263
|
+
padding: 0 0.5rem;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.bk-dropdown-panel.bk-grid-compact .bk-dropdown-search {
|
|
267
|
+
@apply px-1 pt-1;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.bk-dropdown-panel.bk-grid-compact .bk-search-wrapper {
|
|
271
|
+
@apply px-2 py-1;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.bk-dropdown-panel.bk-grid-compact .bk-search-input {
|
|
275
|
+
@apply text-xs;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.bk-dropdown-panel.bk-grid-compact .bk-grid-scroll {
|
|
279
|
+
@apply -mx-2;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.bk-dropdown-panel.bk-grid-compact .bk-select-grid {
|
|
283
|
+
@apply text-xs;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.bk-dropdown-panel.bk-grid-compact .bk-select-grid th,
|
|
287
|
+
.bk-dropdown-panel.bk-grid-compact .bk-select-grid td {
|
|
288
|
+
@apply px-3 py-1.5;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.bk-dropdown-panel.bk-grid-compact .bk-grid-checkbox-column {
|
|
292
|
+
width: 40px;
|
|
293
|
+
min-width: 40px;
|
|
294
|
+
@apply !px-3;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.bk-dropdown-panel.bk-grid-compact .bk-grid-footer {
|
|
298
|
+
@apply gap-3 px-0 py-1.5 text-[11px];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.bk-dropdown-panel.bk-grid-compact .bk-grid-footer-actions {
|
|
302
|
+
@apply gap-1.5;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
@media (max-width: 640px) {
|
|
306
|
+
.bk-grid-scroll {
|
|
307
|
+
max-width: calc(100vw - 32px);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
167
311
|
.bk-dropdown-search {
|
|
168
312
|
@apply px-2 pt-2;
|
|
169
313
|
}
|