@mdbase-dev/ui 0.2.7 → 0.2.9
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/README.md +6 -0
- package/css/controls.css +50 -2
- package/dist/CollectionModeControl.d.ts +18 -1
- package/dist/CollectionModeControl.js +612 -107
- package/dist/DatePicker.js +24 -16
- package/dist/filter-builder/labels.js +189 -124
- package/dist/locales/de/messages.json +1 -1
- package/dist/locales/en/messages.json +1 -1
- package/dist/locales/es/messages.json +1 -1
- package/dist/locales/fr/messages.json +1 -1
- package/dist/locales/it/messages.json +1 -1
- package/dist/locales/ja/messages.json +1 -1
- package/dist/locales/ko/messages.json +1 -1
- package/dist/locales/pt/messages.json +1 -1
- package/dist/locales/ru/messages.json +1 -1
- package/dist/locales/zh/messages.json +1 -1
- package/dist/properties/labels.js +52 -31
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -197,6 +197,12 @@ not prove a language is complete.
|
|
|
197
197
|
Reviewed identical terms are Esc/ID, the literal example email, and French
|
|
198
198
|
Collection/Collections (allowlisted per generated ID).
|
|
199
199
|
|
|
200
|
+
Give every new message a `context` (for example `t({ message: "Clear", context: "Date picker" })`).
|
|
201
|
+
Apps compose this catalogue with their own, and a message without a context gets the same
|
|
202
|
+
generated ID as an app's message with the same English text, so one would replace the other's
|
|
203
|
+
translations. `i18n-context-baseline.json` freezes the older messages that have none; the
|
|
204
|
+
catalogue test rejects any other.
|
|
205
|
+
|
|
200
206
|
## Command palette
|
|
201
207
|
|
|
202
208
|
`CommandPalette` from `@mdbase-dev/ui/command-palette` accepts an optional
|
package/css/controls.css
CHANGED
|
@@ -1362,8 +1362,10 @@ textarea.mdbase-field {
|
|
|
1362
1362
|
/* Mode changes stay inline; progress is text, never an optimistic toggle. */
|
|
1363
1363
|
.mdbase-collection-mode {
|
|
1364
1364
|
display: grid;
|
|
1365
|
-
gap: var(--space-
|
|
1365
|
+
gap: var(--space-2);
|
|
1366
1366
|
min-inline-size: 0;
|
|
1367
|
+
font-size: var(--font-size-ui);
|
|
1368
|
+
line-height: 1.5;
|
|
1367
1369
|
}
|
|
1368
1370
|
|
|
1369
1371
|
.mdbase-collection-mode :is(h3, p, ul) {
|
|
@@ -1371,14 +1373,60 @@ textarea.mdbase-field {
|
|
|
1371
1373
|
}
|
|
1372
1374
|
|
|
1373
1375
|
.mdbase-collection-mode h3 {
|
|
1376
|
+
color: var(--muted, var(--color-text-muted));
|
|
1374
1377
|
font-size: var(--font-size-section);
|
|
1375
1378
|
font-weight: var(--font-weight-medium);
|
|
1376
1379
|
}
|
|
1377
1380
|
|
|
1378
|
-
.mdbase-collection-mode
|
|
1381
|
+
.mdbase-collection-mode p {
|
|
1382
|
+
font-size: var(--font-size-ui);
|
|
1383
|
+
line-height: 1.5;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
.mdbase-collection-mode-current {
|
|
1387
|
+
color: var(--muted, var(--color-text-muted));
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
.mdbase-collection-mode-current strong {
|
|
1391
|
+
color: var(--color-text);
|
|
1392
|
+
font-weight: var(--font-weight-semibold);
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
.mdbase-collection-mode p.mdbase-collection-mode-note {
|
|
1396
|
+
color: var(--muted, var(--color-text-muted));
|
|
1397
|
+
font-size: var(--font-size-caption);
|
|
1398
|
+
line-height: 1.5;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
.mdbase-collection-mode-status {
|
|
1402
|
+
display: grid;
|
|
1403
|
+
gap: var(--space-1);
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
.mdbase-collection-mode-blocked {
|
|
1407
|
+
display: grid;
|
|
1408
|
+
gap: var(--space-1);
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
.mdbase-collection-mode-blocked ul {
|
|
1412
|
+
display: grid;
|
|
1413
|
+
gap: 2px;
|
|
1414
|
+
padding-inline-start: var(--space-4);
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
.mdbase-collection-mode [role="alert"] {
|
|
1418
|
+
color: var(--color-danger);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
.mdbase-collection-mode-actions {
|
|
1379
1422
|
display: flex;
|
|
1380
1423
|
flex-wrap: wrap;
|
|
1381
1424
|
gap: var(--space-2);
|
|
1425
|
+
margin-block-start: var(--space-1);
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
.mdbase-collection-mode-actions > .mdbase-button.is-tertiary:first-child {
|
|
1429
|
+
margin-inline-start: -10px;
|
|
1382
1430
|
}
|
|
1383
1431
|
|
|
1384
1432
|
.mdbase-collection-mode code {
|
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
type Mode = "private" | "cloud_copy";
|
|
2
|
+
type ModeChange = {
|
|
3
|
+
request_id?: string;
|
|
4
|
+
source_mode?: Mode;
|
|
5
|
+
target_mode: Mode;
|
|
6
|
+
phase: string;
|
|
7
|
+
retry_at?: string;
|
|
8
|
+
};
|
|
9
|
+
export type CollectionModeStatus = {
|
|
10
|
+
current_mode: Mode;
|
|
11
|
+
execution_available: true;
|
|
12
|
+
change: null | ModeChange;
|
|
13
|
+
};
|
|
2
14
|
/** Owner controls only. Visibility follows actual executor registration, not a
|
|
3
15
|
* mode flag. Browser intent cannot produce native key/source consent. */
|
|
4
|
-
export declare function CollectionModeControl({ collectionId, load, change, cancel, native }: {
|
|
16
|
+
export declare function CollectionModeControl({ collectionId, load, change, cancel, abandon, native, deviceNames, initialStatus, onModeChange, onStatusChange }: {
|
|
5
17
|
collectionId: string;
|
|
6
18
|
load(): Promise<unknown>;
|
|
7
19
|
change(target: Mode, requestId: string): Promise<unknown>;
|
|
8
20
|
native?: boolean;
|
|
9
21
|
cancel?(target: Mode, requestId: string): Promise<unknown>;
|
|
22
|
+
abandon?(requestId: string): Promise<unknown>;
|
|
23
|
+
deviceNames?: Readonly<Record<string, string>>;
|
|
24
|
+
initialStatus?: unknown;
|
|
25
|
+
onModeChange?(mode: Mode): void;
|
|
26
|
+
onStatusChange?(status: CollectionModeStatus | null): void;
|
|
10
27
|
}): import("react").JSX.Element | null;
|
|
11
28
|
export {};
|