@jirawatpyk/aura-react 5.51.0 → 5.53.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/README.md +26 -0
- package/dist/aura.bundle.js +408 -198
- package/dist/cjs/index.cjs +407 -197
- package/dist/esm/Table.js +52 -7
- package/dist/esm/TableSkeleton.js +170 -0
- package/dist/esm/display.js +3 -1
- package/dist/esm/index.js +2 -0
- package/dist/index.d.cts +62 -5
- package/dist/index.d.ts +62 -5
- package/dist/server/index.cjs +213 -49
- package/dist/server/index.d.cts +45 -3
- package/dist/server/index.d.ts +45 -3
- package/dist/server/index.js +213 -49
- package/dist/styles.css +21 -0
- package/dist/styles.layer.css +21 -0
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -576,14 +576,14 @@ var STRINGS = {
|
|
|
576
576
|
|
|
577
577
|
// src/theme.ts
|
|
578
578
|
function hexToRgb(hex) {
|
|
579
|
-
let
|
|
580
|
-
if (
|
|
581
|
-
|
|
579
|
+
let h7 = String(hex).trim().replace("#", "");
|
|
580
|
+
if (h7.length === 3)
|
|
581
|
+
h7 = h7.split("").map(function(c) {
|
|
582
582
|
return c + c;
|
|
583
583
|
}).join("");
|
|
584
|
-
if (!/^[0-9a-f]{6}$/i.test(
|
|
584
|
+
if (!/^[0-9a-f]{6}$/i.test(h7)) throw new Error('createTheme: "' + hex + '" is not a #rgb or #rrggbb colour');
|
|
585
585
|
return [0, 2, 4].map(function(i) {
|
|
586
|
-
return parseInt(
|
|
586
|
+
return parseInt(h7.slice(i, i + 2), 16) / 255;
|
|
587
587
|
});
|
|
588
588
|
}
|
|
589
589
|
function rgbToHex(rgb) {
|
|
@@ -1322,7 +1322,9 @@ function buttonClass(opts = {}) {
|
|
|
1322
1322
|
"aura-btn",
|
|
1323
1323
|
"aura-btn--" + (opts.variant || "primary"),
|
|
1324
1324
|
opts.size === "sm" && "aura-btn--sm",
|
|
1325
|
-
opts.fullWidth && "aura-btn--full",
|
|
1325
|
+
opts.fullWidth && opts.fullWidth !== "below-sm" && opts.fullWidth !== "below-md" && "aura-btn--full",
|
|
1326
|
+
/* 5.53 (Chamber-OS 165): full width on phones only. */
|
|
1327
|
+
(opts.fullWidth === "below-sm" || opts.fullWidth === "below-md") && "aura-btn--full-" + opts.fullWidth,
|
|
1326
1328
|
opts.touchHeight && "aura-btn--touch",
|
|
1327
1329
|
opts.loading && "is-loading",
|
|
1328
1330
|
opts.className
|
|
@@ -1375,10 +1377,171 @@ var Container = React4.forwardRef(function Container2(props, ref) {
|
|
|
1375
1377
|
);
|
|
1376
1378
|
});
|
|
1377
1379
|
|
|
1378
|
-
// src/
|
|
1380
|
+
// src/TableSkeleton.tsx
|
|
1379
1381
|
import * as React5 from "react";
|
|
1380
1382
|
var h4 = React5.createElement;
|
|
1381
|
-
|
|
1383
|
+
function inertProps() {
|
|
1384
|
+
return { inert: parseInt(React5.version, 10) >= 19 ? true : "", "aria-hidden": true };
|
|
1385
|
+
}
|
|
1386
|
+
function widthOf(w) {
|
|
1387
|
+
return w == null || w === "" ? void 0 : typeof w === "number" ? w + "px" : w;
|
|
1388
|
+
}
|
|
1389
|
+
function skeletonColgroup(cols) {
|
|
1390
|
+
return h4(
|
|
1391
|
+
"colgroup",
|
|
1392
|
+
null,
|
|
1393
|
+
cols.map(function(c, i) {
|
|
1394
|
+
const w = widthOf(c.width);
|
|
1395
|
+
return h4("col", { key: i, style: w ? { width: w } : void 0 });
|
|
1396
|
+
})
|
|
1397
|
+
);
|
|
1398
|
+
}
|
|
1399
|
+
function placeholder(c) {
|
|
1400
|
+
const s = c.skeleton || {};
|
|
1401
|
+
if (s.kind === "pill") return h4("span", { className: "aura-skel aura-skel--pill" });
|
|
1402
|
+
if (s.kind === "action") return h4("span", { className: cx("aura-skel aura-skel--action", s.touch && "is-touch") });
|
|
1403
|
+
if (s.lines === 2)
|
|
1404
|
+
return h4(
|
|
1405
|
+
"span",
|
|
1406
|
+
{ className: "aura-skel-lines" },
|
|
1407
|
+
h4("span", { className: "aura-skel aura-skel--text", style: { width: "100%" } }),
|
|
1408
|
+
h4("span", { className: "aura-skel aura-skel--text", style: { width: "60%" } })
|
|
1409
|
+
);
|
|
1410
|
+
return h4("span", { className: "aura-skel aura-skel--text", style: { width: "80%" } });
|
|
1411
|
+
}
|
|
1412
|
+
function cellCls(base, c) {
|
|
1413
|
+
const align = c.align || (c.numeric ? "end" : void 0);
|
|
1414
|
+
return cx(base, align === "end" && "is-end", align === "center" && "is-center", c.numeric && "is-numeric");
|
|
1415
|
+
}
|
|
1416
|
+
function skeletonBody(cols, n3, stacked) {
|
|
1417
|
+
const rows = [];
|
|
1418
|
+
for (let r2 = 0; r2 < n3; r2++)
|
|
1419
|
+
rows.push(
|
|
1420
|
+
h4(
|
|
1421
|
+
"tr",
|
|
1422
|
+
{ key: r2, className: "aura-tbl__row aura-tbl__row--skeleton", role: stacked ? "row" : void 0 },
|
|
1423
|
+
cols.map(function(c, i) {
|
|
1424
|
+
const slot = stacked && (c.card === "title" || c.card === "action") ? c.card : void 0;
|
|
1425
|
+
return h4(
|
|
1426
|
+
"td",
|
|
1427
|
+
{
|
|
1428
|
+
key: i,
|
|
1429
|
+
className: cellCls("aura-tbl__td", c),
|
|
1430
|
+
role: stacked ? "cell" : void 0,
|
|
1431
|
+
"data-label": stacked && !slot && c.label ? c.label : void 0,
|
|
1432
|
+
"data-card": slot
|
|
1433
|
+
},
|
|
1434
|
+
placeholder(c)
|
|
1435
|
+
);
|
|
1436
|
+
})
|
|
1437
|
+
)
|
|
1438
|
+
);
|
|
1439
|
+
return h4(
|
|
1440
|
+
"tbody",
|
|
1441
|
+
{ key: "aura-skeleton", className: "aura-tbl__body", role: stacked ? "rowgroup" : void 0 },
|
|
1442
|
+
rows
|
|
1443
|
+
);
|
|
1444
|
+
}
|
|
1445
|
+
function tableWrapClass(p) {
|
|
1446
|
+
return cx(
|
|
1447
|
+
"aura-tbl-wrap",
|
|
1448
|
+
p.stackBelow && "is-stackable",
|
|
1449
|
+
p.bordered === false && "is-flush",
|
|
1450
|
+
p.bleed && "aura-bleed-frame",
|
|
1451
|
+
p.bleed && !p.cards && "aura-bleed",
|
|
1452
|
+
p.bleed && p.bleedEnd && !p.cards && "aura-bleed-end"
|
|
1453
|
+
);
|
|
1454
|
+
}
|
|
1455
|
+
function tableClass(p) {
|
|
1456
|
+
return cx(
|
|
1457
|
+
"aura-tbl",
|
|
1458
|
+
p.stackBelow && "aura-tbl--stack-" + p.stackBelow,
|
|
1459
|
+
(p.align === "middle" || p.rowHeight === "density" && p.align !== "top") && "aura-tbl--middle",
|
|
1460
|
+
p.rowHeight === "density" && "aura-tbl--row-density",
|
|
1461
|
+
p.cards && "aura-tbl--cards",
|
|
1462
|
+
p.className
|
|
1463
|
+
);
|
|
1464
|
+
}
|
|
1465
|
+
function cardsFrame(el, p) {
|
|
1466
|
+
return p.cards ? h4(
|
|
1467
|
+
"div",
|
|
1468
|
+
{
|
|
1469
|
+
className: cx(
|
|
1470
|
+
"aura-tbl-cards aura-tbl-cards--" + p.stackBelow,
|
|
1471
|
+
p.bleed && "aura-bleed",
|
|
1472
|
+
p.bleed && p.bleedEnd && "aura-bleed-end"
|
|
1473
|
+
)
|
|
1474
|
+
},
|
|
1475
|
+
el
|
|
1476
|
+
) : el;
|
|
1477
|
+
}
|
|
1478
|
+
function TableSkeleton(props) {
|
|
1479
|
+
const cols = props.columns || [];
|
|
1480
|
+
const n3 = props.rows != null ? Math.max(0, props.rows) : 5;
|
|
1481
|
+
const stacked = !!props.stackBelow;
|
|
1482
|
+
const cards = stacked && props.stackStyle === "cards";
|
|
1483
|
+
const head = h4(
|
|
1484
|
+
"thead",
|
|
1485
|
+
{ className: "aura-tbl__head", role: stacked ? "rowgroup" : void 0 },
|
|
1486
|
+
h4(
|
|
1487
|
+
"tr",
|
|
1488
|
+
{ className: "aura-tbl__row", role: stacked ? "row" : void 0 },
|
|
1489
|
+
cols.map(function(c, i) {
|
|
1490
|
+
return h4(
|
|
1491
|
+
"th",
|
|
1492
|
+
{ key: i, scope: "col", className: cellCls("aura-tbl__th", c), role: stacked ? "columnheader" : void 0 },
|
|
1493
|
+
c.label
|
|
1494
|
+
);
|
|
1495
|
+
})
|
|
1496
|
+
)
|
|
1497
|
+
);
|
|
1498
|
+
const table = h4(
|
|
1499
|
+
"div",
|
|
1500
|
+
Object.assign(
|
|
1501
|
+
{
|
|
1502
|
+
className: tableWrapClass({
|
|
1503
|
+
stackBelow: props.stackBelow,
|
|
1504
|
+
bordered: props.bordered,
|
|
1505
|
+
bleed: props.bleed,
|
|
1506
|
+
bleedEnd: props.bleedEnd,
|
|
1507
|
+
cards
|
|
1508
|
+
}),
|
|
1509
|
+
"data-density": props.density || "comfortable"
|
|
1510
|
+
},
|
|
1511
|
+
inertProps()
|
|
1512
|
+
),
|
|
1513
|
+
h4(
|
|
1514
|
+
"table",
|
|
1515
|
+
{
|
|
1516
|
+
className: cx(
|
|
1517
|
+
tableClass({
|
|
1518
|
+
stackBelow: props.stackBelow,
|
|
1519
|
+
align: props.align,
|
|
1520
|
+
rowHeight: props.rowHeight,
|
|
1521
|
+
cards,
|
|
1522
|
+
className: props.className
|
|
1523
|
+
}),
|
|
1524
|
+
"aura-tbl--skeleton"
|
|
1525
|
+
),
|
|
1526
|
+
role: stacked ? "table" : void 0
|
|
1527
|
+
},
|
|
1528
|
+
skeletonColgroup(cols),
|
|
1529
|
+
head,
|
|
1530
|
+
skeletonBody(cols, n3, stacked)
|
|
1531
|
+
)
|
|
1532
|
+
);
|
|
1533
|
+
return cardsFrame(table, {
|
|
1534
|
+
stackBelow: props.stackBelow,
|
|
1535
|
+
bleed: props.bleed,
|
|
1536
|
+
bleedEnd: props.bleedEnd,
|
|
1537
|
+
cards
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
// src/PageHeader.tsx
|
|
1542
|
+
import * as React6 from "react";
|
|
1543
|
+
var h5 = React6.createElement;
|
|
1544
|
+
var PageHeader = React6.forwardRef(function PageHeader2(props, ref) {
|
|
1382
1545
|
const attrs2 = {};
|
|
1383
1546
|
Object.keys(props).forEach(function(k) {
|
|
1384
1547
|
if (k === "id" || k === "lang" || k === "dir" || k === "role" || /^(aria|data)-/.test(k))
|
|
@@ -1394,7 +1557,7 @@ var PageHeader = React5.forwardRef(function PageHeader2(props, ref) {
|
|
|
1394
1557
|
const size = props.size === "compact" || props.size === "hero" || props.size === "hero-lg" ? props.size : null;
|
|
1395
1558
|
const eyebrow = props.eyebrow;
|
|
1396
1559
|
const plainEyebrow = typeof eyebrow === "string" || typeof eyebrow === "number";
|
|
1397
|
-
const heading =
|
|
1560
|
+
const heading = h5(
|
|
1398
1561
|
"h" + level,
|
|
1399
1562
|
{
|
|
1400
1563
|
className: "aura-page-header__title",
|
|
@@ -1406,7 +1569,7 @@ var PageHeader = React5.forwardRef(function PageHeader2(props, ref) {
|
|
|
1406
1569
|
);
|
|
1407
1570
|
const hasActions = props.actions != null && props.actions !== false;
|
|
1408
1571
|
const bar = hasActions && (props.actionsBarBelow === "sm" || props.actionsBarBelow === "md") ? props.actionsBarBelow : null;
|
|
1409
|
-
return
|
|
1572
|
+
return h5(
|
|
1410
1573
|
"div",
|
|
1411
1574
|
Object.assign(attrs2, {
|
|
1412
1575
|
ref,
|
|
@@ -1423,32 +1586,32 @@ var PageHeader = React5.forwardRef(function PageHeader2(props, ref) {
|
|
|
1423
1586
|
),
|
|
1424
1587
|
style: props.style
|
|
1425
1588
|
}),
|
|
1426
|
-
|
|
1589
|
+
h5(
|
|
1427
1590
|
"div",
|
|
1428
1591
|
{ className: "aura-page-header__text" },
|
|
1429
|
-
props.breadcrumb != null && props.breadcrumb !== false ?
|
|
1430
|
-
shown(eyebrow) ? plainEyebrow ?
|
|
1431
|
-
shown(props.titleAddon) ?
|
|
1592
|
+
props.breadcrumb != null && props.breadcrumb !== false ? h5("div", { className: "aura-page-header__breadcrumb" }, props.breadcrumb) : null,
|
|
1593
|
+
shown(eyebrow) ? plainEyebrow ? h5("p", { className: "aura-page-header__eyebrow" }, eyebrow) : h5("div", { className: "aura-page-header__eyebrow aura-page-header__eyebrow--rich" }, eyebrow) : null,
|
|
1594
|
+
shown(props.titleAddon) ? h5(
|
|
1432
1595
|
"div",
|
|
1433
1596
|
{ className: "aura-page-header__title-row" },
|
|
1434
1597
|
heading,
|
|
1435
|
-
|
|
1598
|
+
h5("div", { className: "aura-page-header__title-addon" }, props.titleAddon)
|
|
1436
1599
|
) : heading,
|
|
1437
|
-
shown(props.subtitle) ?
|
|
1438
|
-
props.meta != null && props.meta !== false ?
|
|
1600
|
+
shown(props.subtitle) ? h5("div", { className: "aura-page-header__subtitle" }, props.subtitle) : null,
|
|
1601
|
+
props.meta != null && props.meta !== false ? h5("div", { className: "aura-page-header__meta" }, props.meta) : null
|
|
1439
1602
|
),
|
|
1440
|
-
props.actions != null && props.actions !== false ?
|
|
1603
|
+
props.actions != null && props.actions !== false ? h5(
|
|
1441
1604
|
"div",
|
|
1442
1605
|
{ className: "aura-page-header__actions" },
|
|
1443
|
-
bar && props.actionsStatus != null && props.actionsStatus !== false ?
|
|
1606
|
+
bar && props.actionsStatus != null && props.actionsStatus !== false ? h5("div", { className: "aura-page-header__status", role: "status" }, props.actionsStatus) : null,
|
|
1444
1607
|
props.actions
|
|
1445
1608
|
) : null
|
|
1446
1609
|
);
|
|
1447
1610
|
});
|
|
1448
1611
|
|
|
1449
1612
|
// src/tiles.tsx
|
|
1450
|
-
import * as
|
|
1451
|
-
var
|
|
1613
|
+
import * as React7 from "react";
|
|
1614
|
+
var h6 = React7.createElement;
|
|
1452
1615
|
var STATUS_ICON = {
|
|
1453
1616
|
down: IconCircleAlert,
|
|
1454
1617
|
problem: IconTriangleAlert,
|
|
@@ -1481,7 +1644,7 @@ function attrs(props) {
|
|
|
1481
1644
|
});
|
|
1482
1645
|
return out;
|
|
1483
1646
|
}
|
|
1484
|
-
var comma =
|
|
1647
|
+
var comma = h6("span", { className: "aura-status-tile__sep" }, ",");
|
|
1485
1648
|
function statusTileElement(props, ref, Link, t, titleRef) {
|
|
1486
1649
|
const status = STATUS_ICON[props.status] ? props.status : "unknown";
|
|
1487
1650
|
if (status !== props.status)
|
|
@@ -1497,43 +1660,43 @@ function statusTileElement(props, ref, Link, t, titleRef) {
|
|
|
1497
1660
|
};
|
|
1498
1661
|
const hasValue = has(props.value), hasMeta = has(props.meta);
|
|
1499
1662
|
const Tag = props.href ? Link : "div";
|
|
1500
|
-
return
|
|
1663
|
+
return h6(
|
|
1501
1664
|
Tag,
|
|
1502
1665
|
Object.assign(attrs(props), {
|
|
1503
1666
|
ref,
|
|
1504
1667
|
href: props.href,
|
|
1505
1668
|
className: cx("aura-status-tile", "aura-status-tile--" + status, props.href && "is-interactive", props.className)
|
|
1506
1669
|
}),
|
|
1507
|
-
|
|
1670
|
+
h6(
|
|
1508
1671
|
"span",
|
|
1509
1672
|
{ className: "aura-status-tile__head" },
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
hasValue ?
|
|
1673
|
+
h6(Icon, { name: h6(STATUS_ICON[status]), size: 16, className: "aura-status-tile__icon" }),
|
|
1674
|
+
h6("span", { className: "aura-status-tile__title", ref: titleRef }, props.title, comma),
|
|
1675
|
+
h6("span", { className: "aura-sr-only" }, word + (hasValue || hasMeta || markers.length ? "," : "")),
|
|
1676
|
+
hasValue ? h6(
|
|
1514
1677
|
"span",
|
|
1515
1678
|
{ className: cx("aura-status-tile__value", "is-" + valueTone) },
|
|
1516
1679
|
props.value,
|
|
1517
1680
|
hasMeta || markers.length ? comma : null
|
|
1518
1681
|
) : null
|
|
1519
1682
|
),
|
|
1520
|
-
hasMeta || markers.length ?
|
|
1683
|
+
hasMeta || markers.length ? h6(
|
|
1521
1684
|
"span",
|
|
1522
1685
|
{ className: "aura-status-tile__foot" },
|
|
1523
|
-
hasMeta ?
|
|
1524
|
-
markers.length ?
|
|
1686
|
+
hasMeta ? h6("span", { className: "aura-status-tile__meta" }, props.meta, markers.length ? comma : null) : null,
|
|
1687
|
+
markers.length ? h6(
|
|
1525
1688
|
"span",
|
|
1526
1689
|
{ className: "aura-status-tile__markers" },
|
|
1527
1690
|
markers.map(function(m, i) {
|
|
1528
|
-
return
|
|
1691
|
+
return h6(
|
|
1529
1692
|
"span",
|
|
1530
1693
|
{
|
|
1531
1694
|
key: i,
|
|
1532
1695
|
className: cx("aura-status-tile__marker", "is-" + (m.tone || "neutral")),
|
|
1533
1696
|
"data-aura-tip": m.label
|
|
1534
1697
|
},
|
|
1535
|
-
|
|
1536
|
-
|
|
1698
|
+
h6(Icon, { name: m.icon, size: 14 }),
|
|
1699
|
+
h6("span", { className: "aura-sr-only" }, m.label + (i < markers.length - 1 ? "," : ""))
|
|
1537
1700
|
);
|
|
1538
1701
|
})
|
|
1539
1702
|
) : null
|
|
@@ -1543,13 +1706,13 @@ function statusTileElement(props, ref, Link, t, titleRef) {
|
|
|
1543
1706
|
function ServerStatusTile(props) {
|
|
1544
1707
|
return statusTileElement(props, void 0, props.linkComponent || "a", STRINGS.en);
|
|
1545
1708
|
}
|
|
1546
|
-
var TileGrid =
|
|
1709
|
+
var TileGrid = React7.forwardRef(function TileGrid2(props, ref) {
|
|
1547
1710
|
const style = Object.assign(
|
|
1548
1711
|
{},
|
|
1549
1712
|
respVars("aura-grid-cols", props.columns == null ? { base: 2, md: 3 } : props.columns),
|
|
1550
1713
|
props.style
|
|
1551
1714
|
);
|
|
1552
|
-
return
|
|
1715
|
+
return h6(
|
|
1553
1716
|
"ul",
|
|
1554
1717
|
Object.assign(attrs(props), {
|
|
1555
1718
|
ref,
|
|
@@ -1559,16 +1722,16 @@ var TileGrid = React6.forwardRef(function TileGrid2(props, ref) {
|
|
|
1559
1722
|
}),
|
|
1560
1723
|
/* toArray drops null and booleans and keys each element; a Fragment's children are items too. */
|
|
1561
1724
|
flat(props.children).map(function(c, i) {
|
|
1562
|
-
return
|
|
1725
|
+
return h6("li", { key: React7.isValidElement(c) && c.key != null ? c.key : i }, c);
|
|
1563
1726
|
})
|
|
1564
1727
|
);
|
|
1565
1728
|
});
|
|
1566
1729
|
function flat(children) {
|
|
1567
1730
|
const out = [];
|
|
1568
|
-
|
|
1569
|
-
if (
|
|
1731
|
+
React7.Children.toArray(children).forEach(function(c) {
|
|
1732
|
+
if (React7.isValidElement(c) && c.type === React7.Fragment)
|
|
1570
1733
|
flat(c.props.children).forEach(function(x) {
|
|
1571
|
-
out.push(
|
|
1734
|
+
out.push(React7.isValidElement(x) ? React7.cloneElement(x, { key: String(c.key) + "/" + String(x.key) }) : x);
|
|
1572
1735
|
});
|
|
1573
1736
|
else if (c !== "") out.push(c);
|
|
1574
1737
|
});
|
|
@@ -1582,7 +1745,7 @@ function r(n3) {
|
|
|
1582
1745
|
function num(v) {
|
|
1583
1746
|
return typeof v === "number" && isFinite(v) ? v : null;
|
|
1584
1747
|
}
|
|
1585
|
-
var Sparkline =
|
|
1748
|
+
var Sparkline = React7.forwardRef(function Sparkline2(props, ref) {
|
|
1586
1749
|
const wh = SIZES2[props.size || "sm"] || SIZES2.sm;
|
|
1587
1750
|
const W = wh[0], H = wh[1];
|
|
1588
1751
|
const data = (props.data || []).map(num);
|
|
@@ -1612,7 +1775,7 @@ var Sparkline = React6.forwardRef(function Sparkline2(props, ref) {
|
|
|
1612
1775
|
data.forEach(function(v, i) {
|
|
1613
1776
|
if (v == null) return;
|
|
1614
1777
|
const prev = i > 0 && data[i - 1] != null, next = i < n3 - 1 && data[i + 1] != null;
|
|
1615
|
-
if (!prev && !next) dots.push(
|
|
1778
|
+
if (!prev && !next) dots.push(h6("circle", { key: "d" + i, cx: r(x(i)), cy: r(y(v)), r: 1.5 }));
|
|
1616
1779
|
else d += (prev ? "L" : "M") + r(x(i)) + " " + r(y(v));
|
|
1617
1780
|
});
|
|
1618
1781
|
const mode = props.failures || "none";
|
|
@@ -1622,10 +1785,10 @@ var Sparkline = React6.forwardRef(function Sparkline2(props, ref) {
|
|
|
1622
1785
|
if (!props.failed[i]) return;
|
|
1623
1786
|
if (mode === "band") {
|
|
1624
1787
|
const w = Math.max(2, step || W), left = Math.max(0, x(i) - w / 2), right = Math.min(W, x(i) + w / 2);
|
|
1625
|
-
fails.push(
|
|
1788
|
+
fails.push(h6("rect", { key: "f" + i, x: r(left), y: 0, width: r(right - left), height: H }));
|
|
1626
1789
|
} else
|
|
1627
1790
|
fails.push(
|
|
1628
|
-
|
|
1791
|
+
h6("rect", {
|
|
1629
1792
|
key: "f" + i,
|
|
1630
1793
|
x: r(Math.max(0, Math.min(W - 1.5, x(i) - 0.75))),
|
|
1631
1794
|
y: H - 6,
|
|
@@ -1635,7 +1798,7 @@ var Sparkline = React6.forwardRef(function Sparkline2(props, ref) {
|
|
|
1635
1798
|
);
|
|
1636
1799
|
});
|
|
1637
1800
|
const named = !!props.label;
|
|
1638
|
-
return
|
|
1801
|
+
return h6(
|
|
1639
1802
|
"svg",
|
|
1640
1803
|
Object.assign(attrs(props), {
|
|
1641
1804
|
ref,
|
|
@@ -1648,10 +1811,10 @@ var Sparkline = React6.forwardRef(function Sparkline2(props, ref) {
|
|
|
1648
1811
|
"aria-hidden": named ? void 0 : true,
|
|
1649
1812
|
focusable: "false"
|
|
1650
1813
|
}),
|
|
1651
|
-
fails.length && mode === "band" ?
|
|
1652
|
-
d ?
|
|
1653
|
-
dots.length ?
|
|
1654
|
-
fails.length && mode === "ticks" ?
|
|
1814
|
+
fails.length && mode === "band" ? h6("g", { className: "aura-sparkline__band" }, fails) : null,
|
|
1815
|
+
d ? h6("path", { className: "aura-sparkline__line", d }) : null,
|
|
1816
|
+
dots.length ? h6("g", { className: "aura-sparkline__dots" }, dots) : null,
|
|
1817
|
+
fails.length && mode === "ticks" ? h6("g", { className: "aura-sparkline__ticks" }, fails) : null
|
|
1655
1818
|
);
|
|
1656
1819
|
});
|
|
1657
1820
|
export {
|
|
@@ -1668,6 +1831,7 @@ export {
|
|
|
1668
1831
|
ServerStat as Stat,
|
|
1669
1832
|
ServerStatusPill as StatusPill,
|
|
1670
1833
|
ServerStatusTile as StatusTile,
|
|
1834
|
+
TableSkeleton,
|
|
1671
1835
|
TileGrid,
|
|
1672
1836
|
scale as brandScale,
|
|
1673
1837
|
breakpoints,
|
package/dist/styles.css
CHANGED
|
@@ -33,6 +33,12 @@ a.aura-btn { text-decoration: none; }
|
|
|
33
33
|
width: 100%; height: auto; min-height: var(--aura-button-height); white-space: normal; flex-shrink: 1;
|
|
34
34
|
padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere;
|
|
35
35
|
}
|
|
36
|
+
/* 5.53 (Chamber-OS 165): fullWidth="below-md" — the same, only below 768px, and at least 44px tall there, touchHeight
|
|
37
|
+
* or not (hence the doubled class); its natural width above. "below-sm" is with the phone rules (max-width 639.98px). */
|
|
38
|
+
@media (max-width: 767.98px) {
|
|
39
|
+
.aura-btn.aura-btn.aura-btn--full-below-md { width: 100%; height: auto; min-height: var(--aura-touch-target); white-space: normal; flex-shrink: 1;
|
|
40
|
+
padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
|
|
41
|
+
}
|
|
36
42
|
.aura-btn.is-loading { cursor: progress; }
|
|
37
43
|
/* 5.14: a button gated with aria-disabled looks unavailable but stays focusable (no pointer-events: none, so the
|
|
38
44
|
* not-allowed cursor and a tooltip still work). */
|
|
@@ -1756,6 +1762,15 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1756
1762
|
padding-bottom: calc(var(--aura-space-6) + env(safe-area-inset-bottom)); animation-name: aura-sheet-in; }
|
|
1757
1763
|
.aura-dialog__foot { flex-direction: column-reverse; }
|
|
1758
1764
|
.aura-dialog__foot > * { width: 100%; }
|
|
1765
|
+
/* 5.53 (Chamber-OS 165): a phone sheet's or drawer's footer button (or one a Tooltip or menu wraps) behaves as
|
|
1766
|
+
* fullWidth — a long label wraps instead of running out, at least 44px tall whatever the density or pointer; so does
|
|
1767
|
+
* fullWidth="below-sm" (the doubled class beats touchHeight's height). Drawer footers stay in their row. */
|
|
1768
|
+
.aura-dialog__foot > .aura-btn, .aura-dialog__foot > * > .aura-btn:only-child,
|
|
1769
|
+
.aura-drawer__foot > .aura-btn, .aura-drawer__foot > * > .aura-btn:only-child, .aura-btn.aura-btn.aura-btn--full-below-sm {
|
|
1770
|
+
height: auto; min-height: var(--aura-touch-target); white-space: normal; flex-shrink: 1;
|
|
1771
|
+
padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
|
|
1772
|
+
.aura-dialog__foot > * > .aura-btn:only-child, .aura-btn.aura-btn.aura-btn--full-below-sm { width: 100%; }
|
|
1773
|
+
.aura-drawer__foot > * { max-width: 100%; }
|
|
1759
1774
|
.aura-drawer:not(.aura-drawer--nav) { max-width: none; }
|
|
1760
1775
|
.aura-toaster { left: var(--aura-space-4); right: var(--aura-space-4); bottom: var(--aura-space-4); width: auto; }
|
|
1761
1776
|
.aura-toaster.is-center { left: var(--aura-space-4); right: var(--aura-space-4); transform: none; }
|
|
@@ -2168,6 +2183,12 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
2168
2183
|
var(--aura-tbl-bg, var(--aura-bg-surface));
|
|
2169
2184
|
}
|
|
2170
2185
|
.aura-tbl { width: 100%; border-collapse: collapse; border-spacing: 0; font-size: max(13px, .8125rem); line-height: max(20px, 1.25rem); }
|
|
2186
|
+
/* 5.52 (Chamber-OS 164): a loading Table has no content to size its columns from, so they take the head's widths
|
|
2187
|
+
* (or even shares); each placeholder bar sits on the row's 20px line, so a skeleton row is as tall as a text row. */
|
|
2188
|
+
.aura-tbl--skeleton { table-layout: fixed; }
|
|
2189
|
+
.aura-tbl__row--skeleton .aura-skel--text { display: block; margin: 5px 0; margin: calc((1lh - 10px) / 2) 0; }
|
|
2190
|
+
.aura-tbl__row--skeleton .aura-tbl__td.is-end > .aura-skel--text { margin-inline-start: auto; }
|
|
2191
|
+
.aura-tbl__row--skeleton .aura-tbl__td.is-end > .aura-skel-lines { align-items: flex-end; }
|
|
2171
2192
|
.aura-tbl__caption { caption-side: top; padding: var(--aura-space-4) var(--aura-space-6) var(--aura-space-3); text-align: left; font-size: max(14px, .875rem); font-weight: 600; }
|
|
2172
2193
|
/* 5.30: from 640px a cell is at least 10ch wide, so the table never squeezes a column to one letter; a longer word (an
|
|
2173
2194
|
* email, a URL) still breaks to fit instead of widening the table. Phones keep fitting the box: use stackBelow there. */
|
package/dist/styles.layer.css
CHANGED
|
@@ -35,6 +35,12 @@ a.aura-btn { text-decoration: none; }
|
|
|
35
35
|
width: 100%; height: auto; min-height: var(--aura-button-height); white-space: normal; flex-shrink: 1;
|
|
36
36
|
padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere;
|
|
37
37
|
}
|
|
38
|
+
/* 5.53 (Chamber-OS 165): fullWidth="below-md" — the same, only below 768px, and at least 44px tall there, touchHeight
|
|
39
|
+
* or not (hence the doubled class); its natural width above. "below-sm" is with the phone rules (max-width 639.98px). */
|
|
40
|
+
@media (max-width: 767.98px) {
|
|
41
|
+
.aura-btn.aura-btn.aura-btn--full-below-md { width: 100%; height: auto; min-height: var(--aura-touch-target); white-space: normal; flex-shrink: 1;
|
|
42
|
+
padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
|
|
43
|
+
}
|
|
38
44
|
.aura-btn.is-loading { cursor: progress; }
|
|
39
45
|
/* 5.14: a button gated with aria-disabled looks unavailable but stays focusable (no pointer-events: none, so the
|
|
40
46
|
* not-allowed cursor and a tooltip still work). */
|
|
@@ -1758,6 +1764,15 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1758
1764
|
padding-bottom: calc(var(--aura-space-6) + env(safe-area-inset-bottom)); animation-name: aura-sheet-in; }
|
|
1759
1765
|
.aura-dialog__foot { flex-direction: column-reverse; }
|
|
1760
1766
|
.aura-dialog__foot > * { width: 100%; }
|
|
1767
|
+
/* 5.53 (Chamber-OS 165): a phone sheet's or drawer's footer button (or one a Tooltip or menu wraps) behaves as
|
|
1768
|
+
* fullWidth — a long label wraps instead of running out, at least 44px tall whatever the density or pointer; so does
|
|
1769
|
+
* fullWidth="below-sm" (the doubled class beats touchHeight's height). Drawer footers stay in their row. */
|
|
1770
|
+
.aura-dialog__foot > .aura-btn, .aura-dialog__foot > * > .aura-btn:only-child,
|
|
1771
|
+
.aura-drawer__foot > .aura-btn, .aura-drawer__foot > * > .aura-btn:only-child, .aura-btn.aura-btn.aura-btn--full-below-sm {
|
|
1772
|
+
height: auto; min-height: var(--aura-touch-target); white-space: normal; flex-shrink: 1;
|
|
1773
|
+
padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
|
|
1774
|
+
.aura-dialog__foot > * > .aura-btn:only-child, .aura-btn.aura-btn.aura-btn--full-below-sm { width: 100%; }
|
|
1775
|
+
.aura-drawer__foot > * { max-width: 100%; }
|
|
1761
1776
|
.aura-drawer:not(.aura-drawer--nav) { max-width: none; }
|
|
1762
1777
|
.aura-toaster { left: var(--aura-space-4); right: var(--aura-space-4); bottom: var(--aura-space-4); width: auto; }
|
|
1763
1778
|
.aura-toaster.is-center { left: var(--aura-space-4); right: var(--aura-space-4); transform: none; }
|
|
@@ -2170,6 +2185,12 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
2170
2185
|
var(--aura-tbl-bg, var(--aura-bg-surface));
|
|
2171
2186
|
}
|
|
2172
2187
|
.aura-tbl { width: 100%; border-collapse: collapse; border-spacing: 0; font-size: max(13px, .8125rem); line-height: max(20px, 1.25rem); }
|
|
2188
|
+
/* 5.52 (Chamber-OS 164): a loading Table has no content to size its columns from, so they take the head's widths
|
|
2189
|
+
* (or even shares); each placeholder bar sits on the row's 20px line, so a skeleton row is as tall as a text row. */
|
|
2190
|
+
.aura-tbl--skeleton { table-layout: fixed; }
|
|
2191
|
+
.aura-tbl__row--skeleton .aura-skel--text { display: block; margin: 5px 0; margin: calc((1lh - 10px) / 2) 0; }
|
|
2192
|
+
.aura-tbl__row--skeleton .aura-tbl__td.is-end > .aura-skel--text { margin-inline-start: auto; }
|
|
2193
|
+
.aura-tbl__row--skeleton .aura-tbl__td.is-end > .aura-skel-lines { align-items: flex-end; }
|
|
2173
2194
|
.aura-tbl__caption { caption-side: top; padding: var(--aura-space-4) var(--aura-space-6) var(--aura-space-3); text-align: left; font-size: max(14px, .875rem); font-weight: 600; }
|
|
2174
2195
|
/* 5.30: from 640px a cell is at least 10ch wide, so the table never squeezes a column to one letter; a longer word (an
|
|
2175
2196
|
* email, a URL) still breaks to fit instead of widening the table. Phones keep fitting the box: use stackBelow there. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jirawatpyk/aura-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.53.0",
|
|
4
4
|
"description": "AURA Design System — React components (Enterprise Standard, Human Creative). Thai-first: Buddhist-era dates, Thai collation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|