@bitforgehq/ui 0.3.2 → 0.4.0
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 +132 -0
- package/README.md +4 -4
- package/ai/MANIFEST.index.json +36 -0
- package/ai/MANIFEST.json +436 -24
- package/ai/REFERENCE.index.json +35 -0
- package/ai/REFERENCE.json +202 -10
- package/ai/UI_GUIDE.md +25 -4
- package/ai/components/app-frame.md +14 -7
- package/ai/components/badge.md +39 -2
- package/ai/components/header.md +9 -0
- package/ai/components/list-item.md +105 -9
- package/ai/components/step.md +112 -0
- package/ai/components/steps.md +124 -0
- package/ai/components/table.md +119 -5
- package/ai/components/timeline-event.md +144 -0
- package/ai/components/timeline.md +201 -0
- package/ai/components/toggle.md +11 -1
- package/ai/reference/bf-action-directive.md +3 -1
- package/ai/reference/bf-badge-emphasis.md +27 -0
- package/ai/reference/bf-labels.md +2 -0
- package/ai/reference/bf-select-harness.md +4 -0
- package/ai/reference/bf-step-heading-level.md +28 -0
- package/ai/reference/bf-table-align.md +1 -1
- package/ai/reference/bf-table-column-align.md +33 -0
- package/ai/reference/bf-table-column.md +7 -7
- package/ai/reference/bf-table-harness.md +18 -0
- package/ai/reference/bf-timeline-tone.md +31 -0
- package/ai/reference/bf-toggle-harness.md +55 -0
- package/ai/reference/provide-bf-labels.md +2 -2
- package/dark-ink.css +124 -0
- package/fesm2022/bitforgehq-ui-mobile.mjs +13 -3
- package/fesm2022/bitforgehq-ui-mobile.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui-testing.mjs +55 -2
- package/fesm2022/bitforgehq-ui-testing.mjs.map +1 -1
- package/fesm2022/bitforgehq-ui.mjs +714 -46
- package/fesm2022/bitforgehq-ui.mjs.map +1 -1
- package/llms-full.txt +1128 -26
- package/llms.txt +9 -0
- package/package.json +2 -1
- package/theme.css +37 -0
- package/types/bitforgehq-ui-testing.d.ts +90 -1
- package/types/bitforgehq-ui.d.ts +306 -18
package/llms.txt
CHANGED
|
@@ -69,7 +69,11 @@
|
|
|
69
69
|
- [bf-progress](https://bitforge-ui.web.app/ai/components/progress.md): Progress bar in two sizes and four tones for completion, quotas and unknown waits ([docs](https://bitforge-ui.web.app/components/progress))
|
|
70
70
|
- [bf-sparkline](https://bitforge-ui.web.app/ai/components/sparkline.md): Tiny trend line with no axes or legend, for stats and table cells ([docs](https://bitforge-ui.web.app/components/sparkline))
|
|
71
71
|
- [bf-stat](https://bitforge-ui.web.app/ai/components/stat.md): One labelled figure with an optional icon tile and a supporting line ([docs](https://bitforge-ui.web.app/components/stat))
|
|
72
|
+
- [bf-step](https://bitforge-ui.web.app/ai/components/step.md): One numbered step of an instruction list, with a title and its details ([docs](https://bitforge-ui.web.app/components/step))
|
|
73
|
+
- [bf-steps](https://bitforge-ui.web.app/ai/components/steps.md): Numbered instruction steps a user follows in order, with joined markers ([docs](https://bitforge-ui.web.app/components/steps))
|
|
72
74
|
- [bf-table](https://bitforge-ui.web.app/ai/components/table.md): Desktop data table with sortable headers, row selection, custom cells and an empty slot ([docs](https://bitforge-ui.web.app/components/table))
|
|
75
|
+
- [bf-timeline](https://bitforge-ui.web.app/ai/components/timeline.md): Dated list of events with who did what and when, on a vertical line ([docs](https://bitforge-ui.web.app/components/timeline))
|
|
76
|
+
- [bf-timeline-event](https://bitforge-ui.web.app/ai/components/timeline-event.md): One timeline event with a coloured marker, its text, actor and time ([docs](https://bitforge-ui.web.app/components/timeline-event))
|
|
73
77
|
|
|
74
78
|
### Feedback
|
|
75
79
|
|
|
@@ -151,6 +155,7 @@
|
|
|
151
155
|
- [BfAvatarSize](https://bitforge-ui.web.app/ai/reference/bf-avatar-size.md): The three sizes of an avatar, from a list row to a profile header ([docs](https://bitforge-ui.web.app/api/bf-avatar-size))
|
|
152
156
|
- [BfAvatarVariant](https://bitforge-ui.web.app/ai/reference/bf-avatar-variant.md): The four colour schemes of an avatar behind its initials or icon ([docs](https://bitforge-ui.web.app/api/bf-avatar-variant))
|
|
153
157
|
- [BfBadgeAppearance](https://bitforge-ui.web.app/ai/reference/bf-badge-appearance.md): Every badge tone, the five variants plus the informational info tone ([docs](https://bitforge-ui.web.app/api/bf-badge-appearance))
|
|
158
|
+
- [BfBadgeEmphasis](https://bitforge-ui.web.app/ai/reference/bf-badge-emphasis.md): The two badge emphases, the soft tint or the solid strong fill ([docs](https://bitforge-ui.web.app/api/bf-badge-emphasis))
|
|
154
159
|
- [BfBadgeVariant](https://bitforge-ui.web.app/ai/reference/bf-badge-variant.md): The five tones of a badge, from neutral counts to danger states ([docs](https://bitforge-ui.web.app/api/bf-badge-variant))
|
|
155
160
|
- [BfButtonAppearance](https://bitforge-ui.web.app/ai/reference/bf-button-appearance.md): Every button style, the five variants plus the quiet neutral ghost ([docs](https://bitforge-ui.web.app/api/bf-button-appearance))
|
|
156
161
|
- [BfButtonSize](https://bitforge-ui.web.app/ai/reference/bf-button-size.md): Former name of the shared size scale for buttons, kept until 1.0.0 ([docs](https://bitforge-ui.web.app/api/bf-button-size))
|
|
@@ -198,17 +203,20 @@
|
|
|
198
203
|
- [BfStatTrend](https://bitforge-ui.web.app/ai/reference/bf-stat-trend.md): The three directions of a stat's delta pill, up, down or no change ([docs](https://bitforge-ui.web.app/api/bf-stat-trend))
|
|
199
204
|
- [BfStatTrendIntent](https://bitforge-ui.web.app/ai/reference/bf-stat-trend-intent.md): Whether a rising or a falling figure is the good news for a stat ([docs](https://bitforge-ui.web.app/api/bf-stat-trend-intent))
|
|
200
205
|
- [BfStatVariant](https://bitforge-ui.web.app/ai/reference/bf-stat-variant.md): The two stat surfaces, plain on its container or an outlined card tile ([docs](https://bitforge-ui.web.app/api/bf-stat-variant))
|
|
206
|
+
- [BfStepHeadingLevel](https://bitforge-ui.web.app/ai/reference/bf-step-heading-level.md): The heading level a step title can take, two, three or four ([docs](https://bitforge-ui.web.app/api/bf-step-heading-level))
|
|
201
207
|
- [BfTabBarController](https://bitforge-ui.web.app/ai/reference/bf-tab-bar-controller.md): The state a parent that drives a projected tab bar gives it to derive from ([docs](https://bitforge-ui.web.app/api/bf-tab-bar-controller))
|
|
202
208
|
- [BfTabBarHost](https://bitforge-ui.web.app/ai/reference/bf-tab-bar-host.md): What each tab reads from its tab bar: the selection, tab stop and link mode ([docs](https://bitforge-ui.web.app/api/bf-tab-bar-host))
|
|
203
209
|
- [BfTableAlign](https://bitforge-ui.web.app/ai/reference/bf-table-align.md): The inline alignment of a table column, start for text or end for numbers ([docs](https://bitforge-ui.web.app/api/bf-table-align))
|
|
204
210
|
- [BfTableCellContext](https://bitforge-ui.web.app/ai/reference/bf-table-cell-context.md): The row and its index that a custom table cell template receives ([docs](https://bitforge-ui.web.app/api/bf-table-cell-context))
|
|
205
211
|
- [BfTableCellDirective](https://bitforge-ui.web.app/ai/reference/bf-table-cell-directive.md): Custom template for the cells of one table column, with the row typed ([docs](https://bitforge-ui.web.app/api/bf-table-cell-directive))
|
|
206
212
|
- [BfTableColumn](https://bitforge-ui.web.app/ai/reference/bf-table-column.md): One table column with its row key, header label, sorting and alignment ([docs](https://bitforge-ui.web.app/api/bf-table-column))
|
|
213
|
+
- [BfTableColumnAlign](https://bitforge-ui.web.app/ai/reference/bf-table-column-align.md): The inline alignment of a table column: start, end, or centred for controls ([docs](https://bitforge-ui.web.app/api/bf-table-column-align))
|
|
207
214
|
- [BfTableRowKey](https://bitforge-ui.web.app/ai/reference/bf-table-row-key.md): Function that returns the unique string key of one table row ([docs](https://bitforge-ui.web.app/api/bf-table-row-key))
|
|
208
215
|
- [BfTableSort](https://bitforge-ui.web.app/ai/reference/bf-table-sort.md): The column key and direction a table is sorted by, set by its headers ([docs](https://bitforge-ui.web.app/api/bf-table-sort))
|
|
209
216
|
- [BfTableSortDirection](https://bitforge-ui.web.app/ai/reference/bf-table-sort-direction.md): The direction a sorted table column is in, ascending or descending ([docs](https://bitforge-ui.web.app/api/bf-table-sort-direction))
|
|
210
217
|
- [BfTableStack](https://bitforge-ui.web.app/ai/reference/bf-table-stack.md): When a table stacks its rows into cards: never, when narrow, or under touch ([docs](https://bitforge-ui.web.app/api/bf-table-stack))
|
|
211
218
|
- [BfTabLinks](https://bitforge-ui.web.app/ai/reference/bf-tab-links.md): The URLs a router-aware parent gives a tab bar to render its tabs as links ([docs](https://bitforge-ui.web.app/api/bf-tab-links))
|
|
219
|
+
- [BfTimelineTone](https://bitforge-ui.web.app/ai/reference/bf-timeline-tone.md): The marker colour of a timeline event, neutral, primary or a status ([docs](https://bitforge-ui.web.app/api/bf-timeline-tone))
|
|
212
220
|
- [BfToggleLabelPosition](https://bitforge-ui.web.app/ai/reference/bf-toggle-label-position.md): Whether a toggle's label sits after or before its switch ([docs](https://bitforge-ui.web.app/api/bf-toggle-label-position))
|
|
213
221
|
- [bfValidationMessage](https://bitforge-ui.web.app/ai/reference/bf-validation-message.md): Turns one validation error into the text a form field shows under it ([docs](https://bitforge-ui.web.app/api/bf-validation-message))
|
|
214
222
|
- [BfValidationMessages](https://bitforge-ui.web.app/ai/reference/bf-validation-messages.md): The default error text of each validator kind, shown under a form field ([docs](https://bitforge-ui.web.app/api/bf-validation-messages))
|
|
@@ -425,6 +433,7 @@
|
|
|
425
433
|
- [BfTableHarness](https://bitforge-ui.web.app/ai/reference/bf-table-harness.md): Test harness for the data table: reads rows and cells, sorts and selects rows ([docs](https://bitforge-ui.web.app/api/bf-table-harness))
|
|
426
434
|
- [BfTestingOptions](https://bitforge-ui.web.app/ai/reference/bf-testing-options.md): Options of the test providers: the size defaults and labels a spec runs with ([docs](https://bitforge-ui.web.app/api/bf-testing-options))
|
|
427
435
|
- [BfTimeInputHarness](https://bitforge-ui.web.app/ai/reference/bf-time-input-harness.md): Test harness for the time input: types a time or picks one from its list ([docs](https://bitforge-ui.web.app/api/bf-time-input-harness))
|
|
436
|
+
- [BfToggleHarness](https://bitforge-ui.web.app/ai/reference/bf-toggle-harness.md): Test harness for the toggle: reads its name and state and switches it ([docs](https://bitforge-ui.web.app/api/bf-toggle-harness))
|
|
428
437
|
- [BfTooltipHarness](https://bitforge-ui.web.app/ai/reference/bf-tooltip-harness.md): Test harness for a tooltip: shows it, reads its text and whether it shows ([docs](https://bitforge-ui.web.app/api/bf-tooltip-harness))
|
|
429
438
|
- [installBfJsdomShims](https://bitforge-ui.web.app/ai/reference/install-bf-jsdom-shims.md): Installs the browser APIs jsdom lacks and the library needs, only where missing ([docs](https://bitforge-ui.web.app/api/install-bf-jsdom-shims))
|
|
430
439
|
- [provideBfTesting](https://bitforge-ui.web.app/ai/reference/provide-bf-testing.md): Test providers for the widgets and overlays, with document cleanup after each test ([docs](https://bitforge-ui.web.app/api/provide-bf-testing))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitforgehq/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Bitforge UI: Angular 22 widgets (Meadow Sage palette with an indigo default primary to override, Tailwind v4, signals-first) and, from v0.2, a Capacitor app shell.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"sideEffects": false,
|
|
57
57
|
"exports": {
|
|
58
58
|
"./theme.css": "./theme.css",
|
|
59
|
+
"./dark-ink.css": "./dark-ink.css",
|
|
59
60
|
"./ai/*": "./ai/*",
|
|
60
61
|
"./llms.txt": "./llms.txt",
|
|
61
62
|
"./llms-full.txt": "./llms-full.txt",
|
package/theme.css
CHANGED
|
@@ -98,6 +98,18 @@
|
|
|
98
98
|
--color-neutral-soft: #efece3;
|
|
99
99
|
--color-info: #0f4c6b; /* informational badge: 7.7:1 on info-soft */
|
|
100
100
|
--color-info-soft: #dcecf5;
|
|
101
|
+
/* Strong status fills (badge emphasis="strong"): the family's deep tone, white text >= 6:1,
|
|
102
|
+
the fill >= 3:1 on bg, surface and surface-sunken. Primary's strong fill is primary itself. */
|
|
103
|
+
--color-neutral-strong: #4a5347;
|
|
104
|
+
--color-on-neutral-strong: #ffffff; /* 8.0:1 */
|
|
105
|
+
--color-success-strong: #1f6b43;
|
|
106
|
+
--color-on-success-strong: #ffffff; /* 6.5:1 */
|
|
107
|
+
--color-warning-strong: #8a520f;
|
|
108
|
+
--color-on-warning-strong: #ffffff; /* 6.4:1 */
|
|
109
|
+
--color-danger-strong: #b3261e;
|
|
110
|
+
--color-on-danger-strong: #ffffff; /* 6.5:1 */
|
|
111
|
+
--color-info-strong: #0f5a80;
|
|
112
|
+
--color-on-info-strong: #ffffff; /* 7.5:1 */
|
|
101
113
|
|
|
102
114
|
/* Tooltip: a dark pill in light mode, inverted (light) in dark mode */
|
|
103
115
|
--color-tooltip: #1f2a22;
|
|
@@ -301,6 +313,18 @@
|
|
|
301
313
|
--color-danger-border: #d3563f;
|
|
302
314
|
--color-info: #7cc4ea; /* 7.2:1 on info-soft */
|
|
303
315
|
--color-info-soft: #14303e;
|
|
316
|
+
/* Strong fills: a saturated mid tone (>= 3:1 on bg, surface and surface-sunken); white text on
|
|
317
|
+
the deep ones, dark text on the light neutral and amber ones. */
|
|
318
|
+
--color-neutral-strong: #9a9da5;
|
|
319
|
+
--color-on-neutral-strong: #111214; /* 6.9:1 */
|
|
320
|
+
--color-success-strong: #26804f;
|
|
321
|
+
--color-on-success-strong: #ffffff; /* 4.9:1 */
|
|
322
|
+
--color-warning-strong: #d99a3c;
|
|
323
|
+
--color-on-warning-strong: #1a1206; /* 7.6:1 */
|
|
324
|
+
--color-danger-strong: #c9372c;
|
|
325
|
+
--color-on-danger-strong: #ffffff; /* 5.2:1 */
|
|
326
|
+
--color-info-strong: #2a7aa8;
|
|
327
|
+
--color-on-info-strong: #ffffff; /* 4.7:1 */
|
|
304
328
|
--color-tooltip: #ececee;
|
|
305
329
|
--color-on-tooltip: #1e2024; /* 13.8:1 on tooltip */
|
|
306
330
|
|
|
@@ -352,3 +376,16 @@
|
|
|
352
376
|
.dark .bf-overlay-backdrop {
|
|
353
377
|
background: rgb(0 0 0 / 0.6);
|
|
354
378
|
}
|
|
379
|
+
|
|
380
|
+
/* ---------- Stacked table labels ---------- */
|
|
381
|
+
/*
|
|
382
|
+
* The column label a stacked `bf-table` cell shows before its value (`before:content-data-label`
|
|
383
|
+
* behind a stack variant): the cell's `data-label`, with empty alternative text, so assistive
|
|
384
|
+
* technology reads the header association and not the label twice. A named utility, not
|
|
385
|
+
* `content-[attr(data-label)_/_""]`: the library build escapes the quotes of a class written in a
|
|
386
|
+
* string (`\"\"`), and Tailwind then builds the rule for a class no element carries.
|
|
387
|
+
*/
|
|
388
|
+
@utility content-data-label {
|
|
389
|
+
--tw-content: attr(data-label) / '';
|
|
390
|
+
content: var(--tw-content);
|
|
391
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EnvironmentProviders } from "@angular/core";
|
|
2
2
|
import { BfTableSort, provideBfDefaults, provideBfLabels } from "@bitforgehq/ui";
|
|
3
|
-
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate, LocatorFactory } from "@angular/cdk/testing";
|
|
3
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate, HarnessQuery, LocatorFactory } from "@angular/cdk/testing";
|
|
4
4
|
/**
|
|
5
5
|
* Options of `installBfJsdomShims()`.
|
|
6
6
|
*
|
|
@@ -512,6 +512,7 @@ export declare class BfTableHarness extends ComponentHarness {
|
|
|
512
512
|
private readonly rows;
|
|
513
513
|
private readonly selectAllBox;
|
|
514
514
|
private readonly rowBoxes;
|
|
515
|
+
private readonly sortSelect;
|
|
515
516
|
/**
|
|
516
517
|
* A predicate for a table with the given label.
|
|
517
518
|
* @param filters The label (text or pattern) and the CDK's selector and ancestor filters.
|
|
@@ -540,6 +541,21 @@ export declare class BfTableHarness extends ComponentHarness {
|
|
|
540
541
|
* @returns The cell's text.
|
|
541
542
|
*/
|
|
542
543
|
getCellText(row: number, column: string): Promise<string>;
|
|
544
|
+
/**
|
|
545
|
+
* A harness for a control in one cell, such as a `bf-toggle` of a settings matrix or a
|
|
546
|
+
* `bf-select` in a custom cell. Throws for an unknown row or column, or when the cell holds no
|
|
547
|
+
* matching control.
|
|
548
|
+
*
|
|
549
|
+
* @example
|
|
550
|
+
* const push = await alerts.getCellHarness(0, 'Push', BfToggleHarness);
|
|
551
|
+
* await push.check();
|
|
552
|
+
* @param row The row's position, from 0.
|
|
553
|
+
* @param column The column's header text.
|
|
554
|
+
* @param query The harness type, or a predicate from its `with()`.
|
|
555
|
+
* @returns The first matching harness in the cell.
|
|
556
|
+
* @since 0.4.0
|
|
557
|
+
*/
|
|
558
|
+
getCellHarness<T extends ComponentHarness>(row: number, column: string, query: HarnessQuery<T>): Promise<T>;
|
|
543
559
|
/**
|
|
544
560
|
* Clicks a sortable column's header, as a user would: ascending first, then descending.
|
|
545
561
|
* Throws for an unknown or unsortable column.
|
|
@@ -551,6 +567,19 @@ export declare class BfTableHarness extends ComponentHarness {
|
|
|
551
567
|
* @returns The sort, `null` while no column is sorted.
|
|
552
568
|
*/
|
|
553
569
|
getSort(): Promise<BfTableSort | null>;
|
|
570
|
+
/**
|
|
571
|
+
* The Sort by select in a stacked table's bar: its first option, Not sorted (`tableSortNone`),
|
|
572
|
+
* sets `sort` to null and shows while it is; then each sortable column ascending and descending.
|
|
573
|
+
*
|
|
574
|
+
* @example
|
|
575
|
+
* const sortBy = await tasks.getSortSelect();
|
|
576
|
+
* await sortBy?.selectOption('Hours, descending');
|
|
577
|
+
* expect(await tasks.getSort()).toEqual({ column: 'hours', direction: 'descending' });
|
|
578
|
+
* @returns The select's harness; `null` when the table cannot stack (`stack="never"`) or has no
|
|
579
|
+
* sortable column.
|
|
580
|
+
* @since 0.3.3
|
|
581
|
+
*/
|
|
582
|
+
getSortSelect(): Promise<BfSelectHarness | null>;
|
|
554
583
|
/**
|
|
555
584
|
* Checks one row's checkbox, as a user would; a selected row stays selected. Throws when the
|
|
556
585
|
* table is not selectable or the row does not exist.
|
|
@@ -1273,4 +1302,64 @@ export declare class BfSidebarToggleHarness extends ComponentHarness {
|
|
|
1273
1302
|
/** Flips the sidebar with a click. */
|
|
1274
1303
|
toggle(): Promise<void>;
|
|
1275
1304
|
}
|
|
1305
|
+
/**
|
|
1306
|
+
* Harness for `bf-toggle`. Its `label` filter matches the switch's name: the text of the elements
|
|
1307
|
+
* `ariaLabelledby` names, else `ariaLabel`, else the visible label, so a label-less switch in a
|
|
1308
|
+
* table cell or a list row is found the same way.
|
|
1309
|
+
*
|
|
1310
|
+
* @example
|
|
1311
|
+
* const email = await loader.getHarness(BfToggleHarness.with({ label: 'E-Mail, Kritisch' }));
|
|
1312
|
+
* await email.check();
|
|
1313
|
+
* expect(await email.isChecked()).toBe(true);
|
|
1314
|
+
* @summary Test harness for the toggle: reads its name and state and switches it
|
|
1315
|
+
* @since 0.4.0
|
|
1316
|
+
*/
|
|
1317
|
+
export declare class BfToggleHarness extends ComponentHarness {
|
|
1318
|
+
/** The host element's selector. */
|
|
1319
|
+
static hostSelector: string;
|
|
1320
|
+
private readonly input;
|
|
1321
|
+
private readonly label;
|
|
1322
|
+
private readonly error;
|
|
1323
|
+
/**
|
|
1324
|
+
* A predicate for a toggle with the given name.
|
|
1325
|
+
* @param filters The name (text or pattern) and the CDK's selector and ancestor filters.
|
|
1326
|
+
* @returns The predicate for `getHarness()` and friends.
|
|
1327
|
+
*/
|
|
1328
|
+
static with(filters?: BfHarnessFilters): HarnessPredicate<BfToggleHarness>;
|
|
1329
|
+
/**
|
|
1330
|
+
* The switch's name, as the browser computes it: the text of the elements `ariaLabelledby`
|
|
1331
|
+
* names, else `ariaLabel`, else the visible label (the `label` text and the default slot).
|
|
1332
|
+
* @returns The name, `''` without one.
|
|
1333
|
+
*/
|
|
1334
|
+
getLabel(): Promise<string>;
|
|
1335
|
+
/**
|
|
1336
|
+
* Whether the switch is on.
|
|
1337
|
+
* @returns True when on.
|
|
1338
|
+
*/
|
|
1339
|
+
isChecked(): Promise<boolean>;
|
|
1340
|
+
/**
|
|
1341
|
+
* Whether the switch is disabled.
|
|
1342
|
+
* @returns True when disabled.
|
|
1343
|
+
*/
|
|
1344
|
+
isDisabled(): Promise<boolean>;
|
|
1345
|
+
/**
|
|
1346
|
+
* Whether the switch is read-only (`aria-readonly`): it shows its state but a click does nothing.
|
|
1347
|
+
* @returns True when read-only.
|
|
1348
|
+
*/
|
|
1349
|
+
isReadonly(): Promise<boolean>;
|
|
1350
|
+
/**
|
|
1351
|
+
* Clicks the switch, as a user would, so it turns on or off. Throws while it is disabled (a
|
|
1352
|
+
* user's click would do nothing); a read-only switch takes the click and stays as it is.
|
|
1353
|
+
*/
|
|
1354
|
+
toggle(): Promise<void>;
|
|
1355
|
+
/** Turns the switch on with a click; an on switch stays on. Throws while it is disabled. */
|
|
1356
|
+
check(): Promise<void>;
|
|
1357
|
+
/** Turns the switch off with a click; an off switch stays off. Throws while it is disabled. */
|
|
1358
|
+
uncheck(): Promise<void>;
|
|
1359
|
+
/**
|
|
1360
|
+
* The error text under the switch.
|
|
1361
|
+
* @returns The error text, `''` when there is none.
|
|
1362
|
+
*/
|
|
1363
|
+
getErrorText(): Promise<string>;
|
|
1364
|
+
}
|
|
1276
1365
|
export type { BfHarnessFilters, BfJsdomShimOptions, BfTestingOptions };
|