@peers-app/peers-ui 0.33.18 → 0.33.19
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/dist/apps-home/app-tile.js +2 -1
- package/dist/apps-home/get-apps-sheet.js +2 -1
- package/dist/apps-home/remove-app-dialog.js +2 -1
- package/dist/command-palette/command-palette-ui.js +3 -2
- package/dist/components/color-picker.d.ts +28 -0
- package/dist/components/color-picker.js +97 -0
- package/dist/components/group-switcher.js +59 -99
- package/dist/components/icon-picker.d.ts +20 -0
- package/dist/components/icon-picker.js +98 -0
- package/dist/components/icon-search.d.ts +60 -0
- package/dist/components/icon-search.js +227 -0
- package/dist/components/icon.d.ts +35 -0
- package/dist/components/icon.js +34 -0
- package/dist/components/markdown-editor/mention-preview-card.js +2 -1
- package/dist/components/markdown-editor/mentions-plugin.js +2 -1
- package/dist/groups/group-appearance-dialog.d.ts +25 -0
- package/dist/groups/group-appearance-dialog.js +206 -0
- package/dist/groups/group-look.d.ts +45 -0
- package/dist/groups/group-look.js +47 -0
- package/dist/groups/groups-client.d.ts +29 -0
- package/dist/groups/groups-client.js +81 -0
- package/dist/groups/index.d.ts +3 -0
- package/dist/groups/index.js +15 -0
- package/dist/icon-index/bootstrap-icons.json +1 -0
- package/dist/icon-index/emoji.json +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +8 -1
- package/dist/mentions/mention-chip.js +2 -1
- package/dist/mentions/mention-chooser.js +2 -1
- package/dist/root-layout/layouts/full-screen-layout.js +2 -1
- package/dist/screens/groups/group-details.js +16 -2
- package/dist/screens/groups/group-list.js +37 -43
- package/dist/screens/groups/groups-ipc.d.ts +15 -0
- package/dist/screens/groups/groups-ipc.js +28 -0
- package/dist/screens/packages/package-waiting.js +4 -3
- package/dist/screens/peer-types/peer-type-details.d.ts +9 -1
- package/dist/screens/peer-types/peer-type-details.js +16 -13
- package/dist/screens/peer-types/peer-type-list.d.ts +1 -0
- package/dist/screens/peer-types/peer-type-list.js +3 -1
- package/dist/screens/search/global-search.js +2 -1
- package/dist/tabs-layout/tabs-layout.js +4 -3
- package/dist/theme.css +221 -0
- package/dist/ui-defaults/list-screen.d.ts +1 -0
- package/dist/ui-defaults/list-screen.js +3 -1
- package/package.json +4 -4
package/dist/theme.css
CHANGED
|
@@ -488,6 +488,11 @@
|
|
|
488
488
|
-webkit-text-stroke: 0.35px currentColor;
|
|
489
489
|
}
|
|
490
490
|
|
|
491
|
+
/* An emoji tab icon, the same size as a glyph. */
|
|
492
|
+
.peers-tab > .peers-icon-emoji {
|
|
493
|
+
font-size: 15px;
|
|
494
|
+
}
|
|
495
|
+
|
|
491
496
|
/* Dark mode: the tile shades are made for white glyphs and sink on the dark strip, so tab icons
|
|
492
497
|
use brighter, saturated shades of each hue, with at least 3:1 contrast on the strip and the
|
|
493
498
|
selected tab. */
|
|
@@ -1400,3 +1405,219 @@
|
|
|
1400
1405
|
padding: 12px 12px 2px;
|
|
1401
1406
|
}
|
|
1402
1407
|
}
|
|
1408
|
+
|
|
1409
|
+
/* ─── Group colors and icons ────────────────────────────────────────────
|
|
1410
|
+
Icons from data (Icon), a group's icon and color (GroupIcon, ColorDot), and the color and icon
|
|
1411
|
+
pickers in GroupAppearanceDialog. */
|
|
1412
|
+
|
|
1413
|
+
/* An emoji drawn as an icon: the size of the text around it, like a Bootstrap glyph. */
|
|
1414
|
+
.peers-icon-emoji {
|
|
1415
|
+
display: inline-block;
|
|
1416
|
+
font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
|
|
1417
|
+
font-size: 1em;
|
|
1418
|
+
font-style: normal;
|
|
1419
|
+
line-height: 1;
|
|
1420
|
+
text-align: center;
|
|
1421
|
+
vertical-align: -0.125em;
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
/* A group's icon on a rounded square of its color. */
|
|
1425
|
+
.peers-group-tile {
|
|
1426
|
+
align-items: center;
|
|
1427
|
+
border-radius: 28%;
|
|
1428
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
|
|
1429
|
+
display: inline-flex;
|
|
1430
|
+
flex-shrink: 0;
|
|
1431
|
+
justify-content: center;
|
|
1432
|
+
line-height: 1;
|
|
1433
|
+
vertical-align: middle;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
/* A color dot, ringed so dark colors show on a dark page and pale ones on a light page. */
|
|
1437
|
+
.peers-color-dot {
|
|
1438
|
+
border-radius: 50%;
|
|
1439
|
+
box-shadow: 0 0 0 1px var(--bs-border-color);
|
|
1440
|
+
display: inline-block;
|
|
1441
|
+
flex-shrink: 0;
|
|
1442
|
+
vertical-align: middle;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
/* The group switcher's dot beside an emoji icon, which keeps its own colors. */
|
|
1446
|
+
.peers-switcher-dot {
|
|
1447
|
+
width: 0.5em;
|
|
1448
|
+
height: 0.5em;
|
|
1449
|
+
margin-left: 0.2em;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
/* Bounded by the screen (the backdrop pads 12vh above and 16px below), so on a short screen the
|
|
1453
|
+
dialog scrolls and Done stays reachable. */
|
|
1454
|
+
.peers-look-dialog {
|
|
1455
|
+
max-height: calc(88vh - 16px);
|
|
1456
|
+
max-height: calc(100dvh - 12vh - 16px);
|
|
1457
|
+
max-width: 520px;
|
|
1458
|
+
overflow-y: auto;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
/* The group switcher's create form, with the color and icon pickers: bounded by the screen (its
|
|
1462
|
+
backdrop pads 10vh above), so on a short screen it scrolls and Create stays reachable. */
|
|
1463
|
+
.peers-create-group-panel {
|
|
1464
|
+
max-height: calc(90vh - 16px);
|
|
1465
|
+
max-height: calc(100dvh - 10vh - 16px);
|
|
1466
|
+
overflow-y: auto;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
.peers-look-dialog .peers-look-layers {
|
|
1470
|
+
display: flex;
|
|
1471
|
+
gap: 6px;
|
|
1472
|
+
margin-bottom: 14px;
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
.peers-look-preview {
|
|
1476
|
+
align-items: center;
|
|
1477
|
+
display: flex;
|
|
1478
|
+
gap: 12px;
|
|
1479
|
+
margin-bottom: 14px;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
.peers-look-chip {
|
|
1483
|
+
align-items: center;
|
|
1484
|
+
border: 1px solid var(--bs-border-color);
|
|
1485
|
+
border-radius: 999px;
|
|
1486
|
+
display: inline-flex;
|
|
1487
|
+
font-size: 13px;
|
|
1488
|
+
gap: 6px;
|
|
1489
|
+
padding: 2px 10px;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
.peers-look-section-title {
|
|
1493
|
+
color: var(--bs-secondary-color);
|
|
1494
|
+
font-size: 12px;
|
|
1495
|
+
font-weight: 600;
|
|
1496
|
+
letter-spacing: 0.02em;
|
|
1497
|
+
margin: 12px 0 6px;
|
|
1498
|
+
text-transform: uppercase;
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
/* ColorPicker: named swatches, then a custom color. */
|
|
1502
|
+
.peers-color-swatches {
|
|
1503
|
+
display: flex;
|
|
1504
|
+
flex-wrap: wrap;
|
|
1505
|
+
gap: 8px;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
.peers-color-swatch {
|
|
1509
|
+
align-items: center;
|
|
1510
|
+
background: none;
|
|
1511
|
+
border: 2px solid transparent;
|
|
1512
|
+
border-radius: 50%;
|
|
1513
|
+
color: #ffffff;
|
|
1514
|
+
display: inline-flex;
|
|
1515
|
+
height: 32px;
|
|
1516
|
+
justify-content: center;
|
|
1517
|
+
padding: 0;
|
|
1518
|
+
width: 32px;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
.peers-color-swatch > span {
|
|
1522
|
+
align-items: center;
|
|
1523
|
+
border-radius: 50%;
|
|
1524
|
+
box-shadow: 0 0 0 1px var(--bs-border-color);
|
|
1525
|
+
display: inline-flex;
|
|
1526
|
+
height: 24px;
|
|
1527
|
+
justify-content: center;
|
|
1528
|
+
width: 24px;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
.peers-color-swatch[aria-checked="true"] {
|
|
1532
|
+
border-color: var(--bs-emphasis-color);
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
.peers-color-swatch:focus-visible {
|
|
1536
|
+
outline: 2px solid var(--bs-primary);
|
|
1537
|
+
outline-offset: 2px;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
.peers-color-swatch-none > span {
|
|
1541
|
+
background: repeating-linear-gradient(45deg, transparent 0 4px, var(--bs-border-color) 4px 5px);
|
|
1542
|
+
color: var(--bs-body-color);
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
.peers-color-custom {
|
|
1546
|
+
align-items: center;
|
|
1547
|
+
display: flex;
|
|
1548
|
+
gap: 8px;
|
|
1549
|
+
margin-top: 10px;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
.peers-color-custom input[type="color"] {
|
|
1553
|
+
border: 1px solid var(--bs-border-color);
|
|
1554
|
+
border-radius: 6px;
|
|
1555
|
+
height: 32px;
|
|
1556
|
+
padding: 2px;
|
|
1557
|
+
width: 44px;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
.peers-color-custom input[type="text"] {
|
|
1561
|
+
font-family: var(--bs-font-monospace);
|
|
1562
|
+
max-width: 120px;
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
/* IconPicker: a search box, then sections of results. */
|
|
1566
|
+
.peers-icon-results {
|
|
1567
|
+
max-height: 260px;
|
|
1568
|
+
overflow-y: auto;
|
|
1569
|
+
padding: 2px;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
.peers-icon-grid {
|
|
1573
|
+
display: grid;
|
|
1574
|
+
gap: 4px;
|
|
1575
|
+
grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
.peers-icon-choice {
|
|
1579
|
+
align-items: center;
|
|
1580
|
+
background: none;
|
|
1581
|
+
border: 1px solid transparent;
|
|
1582
|
+
border-radius: 8px;
|
|
1583
|
+
color: var(--bs-body-color);
|
|
1584
|
+
display: inline-flex;
|
|
1585
|
+
font-size: 20px;
|
|
1586
|
+
height: 38px;
|
|
1587
|
+
justify-content: center;
|
|
1588
|
+
padding: 0;
|
|
1589
|
+
position: relative;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
.peers-icon-choice:hover {
|
|
1593
|
+
background-color: var(--bs-tertiary-bg);
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
.peers-icon-choice:focus-visible {
|
|
1597
|
+
outline: 2px solid var(--bs-primary);
|
|
1598
|
+
outline-offset: 1px;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
.peers-icon-choice[aria-selected="true"] {
|
|
1602
|
+
background-color: var(--bs-secondary-bg);
|
|
1603
|
+
border-color: var(--bs-emphasis-color);
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
.peers-icon-choice-check {
|
|
1607
|
+
background-color: var(--bs-emphasis-color);
|
|
1608
|
+
border-radius: 50%;
|
|
1609
|
+
color: var(--bs-body-bg);
|
|
1610
|
+
font-size: 9px;
|
|
1611
|
+
height: 14px;
|
|
1612
|
+
line-height: 14px;
|
|
1613
|
+
position: absolute;
|
|
1614
|
+
right: -3px;
|
|
1615
|
+
top: -3px;
|
|
1616
|
+
width: 14px;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
.peers-icon-empty {
|
|
1620
|
+
color: var(--bs-secondary-color);
|
|
1621
|
+
font-size: 13px;
|
|
1622
|
+
padding: 8px 2px;
|
|
1623
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "@peers-app/peers-sdk";
|
|
2
2
|
declare const propsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
3
3
|
type IProps = z.infer<typeof propsSchema>;
|
|
4
|
+
/** Browse records when a table has no more specific list screen. */
|
|
4
5
|
export declare const DefaultListScreen: (_props: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|
|
@@ -3,12 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DefaultListScreen = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const peers_sdk_1 = require("@peers-app/peers-sdk");
|
|
6
|
+
const icon_1 = require("../components/icon");
|
|
6
7
|
const list_screen_1 = require("../components/list-screen");
|
|
7
8
|
const globals_1 = require("../globals");
|
|
8
9
|
const ui_loader_1 = require("../ui-router/ui-loader");
|
|
9
10
|
const propsSchema = peers_sdk_1.z.object({
|
|
10
11
|
// items: zodAnyObject.array().describe('Items to display in the list'),
|
|
11
12
|
});
|
|
13
|
+
/** Browse records when a table has no more specific list screen. */
|
|
12
14
|
const DefaultListScreen = (_props) => {
|
|
13
15
|
const path = (0, globals_1.mainContentPath)().toLowerCase().trim().split("?")[0].split("#").pop()?.split("/")[0] || "";
|
|
14
16
|
const fuzzyTableName = ({
|
|
@@ -48,7 +50,7 @@ const DefaultListScreen = (_props) => {
|
|
|
48
50
|
const row = item;
|
|
49
51
|
const rowId = row[idField.name];
|
|
50
52
|
const displayName = row.name;
|
|
51
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "container-fluid pb-4", children: [(0, jsx_runtime_1.jsx)(
|
|
53
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "container-fluid pb-4", children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { icon: (0, peers_sdk_1.getIconClassName)(table), fallback: "bi:question" }), "\u00A0", (0, jsx_runtime_1.jsx)("a", { href: `#${path}/${String(rowId)}`, children: typeof displayName === "string" ? displayName : "<empty-name>" }), (0, jsx_runtime_1.jsx)("div", { style: { paddingLeft: "20px" } })] }, String(rowId)));
|
|
52
54
|
} }, path));
|
|
53
55
|
};
|
|
54
56
|
exports.DefaultListScreen = DefaultListScreen;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peers-app/peers-ui",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.19",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/peers-app/peers-ui.git"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"clean": "rm -rf dist",
|
|
23
|
-
"build": "npm run clean && tsc && cp src/theme.css dist/theme.css",
|
|
23
|
+
"build": "npm run clean && tsc && cp src/theme.css dist/theme.css && cp -R src/icon-index dist/icon-index",
|
|
24
24
|
"dev": "tsc -w",
|
|
25
25
|
"clean:build": "npm run clean && npm run build",
|
|
26
26
|
"release:guard": "node release-guard.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"lint:fix": "biome check --write ."
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@peers-app/peers-sdk": "^0.33.
|
|
39
|
+
"@peers-app/peers-sdk": "^0.33.19",
|
|
40
40
|
"bootstrap": "^5.3.3",
|
|
41
41
|
"react": "^18.0.0",
|
|
42
42
|
"react-dom": "^18.0.0"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@babel/preset-react": "^7.24.1",
|
|
48
48
|
"@babel/preset-typescript": "^7.27.1",
|
|
49
49
|
"@biomejs/biome": "2.3.11",
|
|
50
|
-
"@peers-app/peers-sdk": "0.33.
|
|
50
|
+
"@peers-app/peers-sdk": "0.33.19",
|
|
51
51
|
"@testing-library/dom": "^10.4.0",
|
|
52
52
|
"@testing-library/jest-dom": "^6.6.3",
|
|
53
53
|
"@testing-library/react": "^16.3.0",
|