@bitforgehq/ui 0.3.2 → 0.3.3
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/CHANGELOG.md +41 -0
- package/ai/MANIFEST.json +23 -11
- package/ai/REFERENCE.json +20 -4
- package/ai/components/app-frame.md +14 -7
- package/ai/components/header.md +9 -0
- package/ai/components/table.md +21 -3
- package/ai/reference/bf-labels.md +1 -0
- package/ai/reference/bf-select-harness.md +4 -0
- package/ai/reference/bf-table-harness.md +6 -0
- package/ai/reference/provide-bf-labels.md +1 -1
- package/fesm2022/bitforgehq-ui-mobile.mjs +11 -2
- package/fesm2022/bitforgehq-ui-mobile.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui-testing.mjs +4 -0
- package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui.mjs +34 -16
- package/fesm2022/bitforgehq-ui.mjs.map +1 -1
- package/llms-full.txt +56 -11
- package/package.json +1 -1
- package/theme.css +13 -0
- package/types/bitforgehq-ui-testing.d.ts +14 -0
- package/types/bitforgehq-ui.d.ts +18 -10
|
@@ -44,6 +44,7 @@ const BF_DEFAULT_LABELS = {
|
|
|
44
44
|
notifications: "Notifications",
|
|
45
45
|
tableSelectAll: "Select all rows",
|
|
46
46
|
tableSortBy: "Sort by",
|
|
47
|
+
tableSortNone: "Not sorted",
|
|
47
48
|
tableSortAscending: (column) => `${column}, ascending`,
|
|
48
49
|
tableSortDescending: (column) => `${column}, descending`,
|
|
49
50
|
theme: "Theme",
|
|
@@ -145,6 +146,7 @@ function mergeLabels(parent, o) {
|
|
|
145
146
|
notifications: o.notifications ?? parent.notifications,
|
|
146
147
|
tableSelectAll: o.tableSelectAll ?? parent.tableSelectAll,
|
|
147
148
|
tableSortBy: o.tableSortBy ?? parent.tableSortBy,
|
|
149
|
+
tableSortNone: o.tableSortNone ?? parent.tableSortNone,
|
|
148
150
|
tableSortAscending: o.tableSortAscending ?? parent.tableSortAscending,
|
|
149
151
|
tableSortDescending: o.tableSortDescending ?? parent.tableSortDescending,
|
|
150
152
|
theme: o.theme ?? parent.theme,
|
|
@@ -9306,9 +9308,10 @@ const STACK_FIRST_CELL = {
|
|
|
9306
9308
|
};
|
|
9307
9309
|
const STACK_CELL = {
|
|
9308
9310
|
never: "",
|
|
9309
|
-
narrow: "@max-xl:col-span-full @max-xl:flex @max-xl:h-auto @max-xl:items-baseline @max-xl:justify-between @max-xl:gap-3 @max-xl:px-0 @max-xl:py-1 @max-xl:text-end @max-xl:before:shrink-0 @max-xl:before:text-start @max-xl:before:text-label-xs @max-xl:before:font-bold @max-xl:before:text-text-muted @max-xl:before:content-
|
|
9310
|
-
coarse: "pointer-coarse:col-span-full pointer-coarse:flex pointer-coarse:h-auto pointer-coarse:items-baseline pointer-coarse:justify-between pointer-coarse:gap-3 pointer-coarse:px-0 pointer-coarse:py-1 pointer-coarse:text-end pointer-coarse:before:shrink-0 pointer-coarse:before:text-start pointer-coarse:before:text-label-xs pointer-coarse:before:font-bold pointer-coarse:before:text-text-muted pointer-coarse:before:content-
|
|
9311
|
+
narrow: "@max-xl:col-span-full @max-xl:flex @max-xl:h-auto @max-xl:items-baseline @max-xl:justify-between @max-xl:gap-3 @max-xl:px-0 @max-xl:py-1 @max-xl:text-end @max-xl:before:shrink-0 @max-xl:before:text-start @max-xl:before:text-label-xs @max-xl:before:font-bold @max-xl:before:text-text-muted @max-xl:before:content-data-label",
|
|
9312
|
+
coarse: "pointer-coarse:col-span-full pointer-coarse:flex pointer-coarse:h-auto pointer-coarse:items-baseline pointer-coarse:justify-between pointer-coarse:gap-3 pointer-coarse:px-0 pointer-coarse:py-1 pointer-coarse:text-end pointer-coarse:before:shrink-0 pointer-coarse:before:text-start pointer-coarse:before:text-label-xs pointer-coarse:before:font-bold pointer-coarse:before:text-text-muted pointer-coarse:before:content-data-label"
|
|
9311
9313
|
};
|
|
9314
|
+
const SORT_NONE = "";
|
|
9312
9315
|
const STACK_EMPTY = {
|
|
9313
9316
|
never: "",
|
|
9314
9317
|
narrow: "@max-xl:block",
|
|
@@ -9357,16 +9360,23 @@ var BfTableComponent = class BfTableComponent {
|
|
|
9357
9360
|
}, ...ngDevMode ? [{ debugName: "someSelected" }] : /* istanbul ignore next */ []);
|
|
9358
9361
|
columnCount = computed(() => this.columns().length + (this.selectable() ? 1 : 0), ...ngDevMode ? [{ debugName: "columnCount" }] : /* istanbul ignore next */ []);
|
|
9359
9362
|
stacks = computed(() => this.stack() !== "never", ...ngDevMode ? [{ debugName: "stacks" }] : /* istanbul ignore next */ []);
|
|
9360
|
-
sortOptions = computed(() =>
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9363
|
+
sortOptions = computed(() => {
|
|
9364
|
+
const sortable = this.columns().filter((column) => column.sortable);
|
|
9365
|
+
if (sortable.length === 0) return [];
|
|
9366
|
+
return [{
|
|
9367
|
+
value: SORT_NONE,
|
|
9368
|
+
label: this.labels.tableSortNone
|
|
9369
|
+
}, ...sortable.flatMap((column) => [{
|
|
9370
|
+
value: `${column.key}:ascending`,
|
|
9371
|
+
label: this.labels.tableSortAscending(column.label)
|
|
9372
|
+
}, {
|
|
9373
|
+
value: `${column.key}:descending`,
|
|
9374
|
+
label: this.labels.tableSortDescending(column.label)
|
|
9375
|
+
}])];
|
|
9376
|
+
}, ...ngDevMode ? [{ debugName: "sortOptions" }] : /* istanbul ignore next */ []);
|
|
9367
9377
|
sortValue = computed(() => {
|
|
9368
9378
|
const sort = this.sort();
|
|
9369
|
-
return sort ? `${sort.column}:${sort.direction}` :
|
|
9379
|
+
return sort ? `${sort.column}:${sort.direction}` : SORT_NONE;
|
|
9370
9380
|
}, ...ngDevMode ? [{ debugName: "sortValue" }] : /* istanbul ignore next */ []);
|
|
9371
9381
|
hostClasses = computed(() => STACK_HOST[this.stack()], ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
|
|
9372
9382
|
stackBarClasses = computed(() => `${STACK_BAR[this.stack()]} flex-wrap items-end justify-between gap-x-4 gap-y-2 pb-3`, ...ngDevMode ? [{ debugName: "stackBarClasses" }] : /* istanbul ignore next */ []);
|
|
@@ -9425,6 +9435,10 @@ var BfTableComponent = class BfTableComponent {
|
|
|
9425
9435
|
});
|
|
9426
9436
|
}
|
|
9427
9437
|
sortFromOption(value) {
|
|
9438
|
+
if (value === SORT_NONE) {
|
|
9439
|
+
this.sort.set(null);
|
|
9440
|
+
return;
|
|
9441
|
+
}
|
|
9428
9442
|
const at = value.lastIndexOf(":");
|
|
9429
9443
|
const direction = value.slice(at + 1);
|
|
9430
9444
|
if (at > 0 && (direction === "ascending" || direction === "descending")) this.sort.set({
|
|
@@ -11277,12 +11291,14 @@ var BfAppFrameComponent = class BfAppFrameComponent {
|
|
|
11277
11291
|
headerClasses()
|
|
11278
11292
|
}}"
|
|
11279
11293
|
>
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
</div>
|
|
11294
|
+
<!-- The menu at the inline start, then the brand: the top app bar convention, and the
|
|
11295
|
+
menu comes first in the tab order too. -->
|
|
11283
11296
|
<div data-menu class="flex items-center empty:hidden">
|
|
11284
11297
|
<ng-content select="[bfSlot=menu]" />
|
|
11285
11298
|
</div>
|
|
11299
|
+
<div data-brand class="flex min-w-0 items-center empty:hidden">
|
|
11300
|
+
<ng-content select="[bfSlot=brand]" />
|
|
11301
|
+
</div>
|
|
11286
11302
|
<div data-actions class="ms-auto flex items-center gap-2 empty:hidden">
|
|
11287
11303
|
<ng-content select="[bfSlot=actions]" />
|
|
11288
11304
|
</div>
|
|
@@ -11340,12 +11356,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11340
11356
|
headerClasses()
|
|
11341
11357
|
}}"
|
|
11342
11358
|
>
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
</div>
|
|
11359
|
+
<!-- The menu at the inline start, then the brand: the top app bar convention, and the
|
|
11360
|
+
menu comes first in the tab order too. -->
|
|
11346
11361
|
<div data-menu class="flex items-center empty:hidden">
|
|
11347
11362
|
<ng-content select="[bfSlot=menu]" />
|
|
11348
11363
|
</div>
|
|
11364
|
+
<div data-brand class="flex min-w-0 items-center empty:hidden">
|
|
11365
|
+
<ng-content select="[bfSlot=brand]" />
|
|
11366
|
+
</div>
|
|
11349
11367
|
<div data-actions class="ms-auto flex items-center gap-2 empty:hidden">
|
|
11350
11368
|
<ng-content select="[bfSlot=actions]" />
|
|
11351
11369
|
</div>
|