@jirawatpyk/aura-react 4.19.0 → 5.0.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.
@@ -84,16 +84,17 @@ a.aura-btn { text-decoration: none; }
84
84
  background: var(--aura-bg-surface);
85
85
  color: var(--aura-fg-primary);
86
86
  }
87
- .aura-table__scroll { position: relative; overflow: auto; overscroll-behavior: contain; }
87
+ .aura-table__scroll { position: relative; overflow: auto; overscroll-behavior: contain; height: var(--aura-table-h, auto); }
88
88
  .aura-table__head {
89
89
  position: sticky; top: 0; z-index: 3; box-sizing: border-box; /* the hairline is inside the row height */
90
- display: flex; height: var(--aura-table-row-height);
90
+ display: flex; height: var(--aura-table-row-height); min-width: var(--aura-row-min, 0);
91
91
  background: var(--aura-bg-canvas);
92
92
  border-bottom: 1px solid var(--aura-border-default);
93
93
  font-family: var(--font-mono); font-size: 12px; color: var(--aura-fg-secondary);
94
94
  }
95
95
  .aura-table__row {
96
96
  box-sizing: border-box; display: flex; height: var(--aura-table-row-height); /* exactly the virtual row height */
97
+ min-width: var(--aura-row-min, 0);
97
98
  background: var(--aura-bg-surface);
98
99
  border-bottom: 1px solid var(--aura-border-default);
99
100
  font-size: 13px;
@@ -112,15 +113,14 @@ a.aura-btn { text-decoration: none; }
112
113
  .aura-table__row--skeleton .aura-table__td.is-end { justify-content: flex-end; }
113
114
  /* Row links (getRowHref): the first cell's text is the link; the whole row is the click target */
114
115
  .aura-table__row-link { color: inherit; text-decoration: none; }
115
- .aura-table__row-link:hover, .aura-table__row:hover .aura-table__row-link, .aura-table__card:hover .aura-table__row-link { text-decoration: underline; text-underline-offset: 2px; }
116
+ .aura-table__row-link:hover, .aura-table__row:hover .aura-table__row-link { text-decoration: underline; text-underline-offset: 2px; }
116
117
  .aura-table__row-link:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: 2px; border-radius: var(--aura-radius-xs); }
117
118
  /* Server mode refresh: the previous page stays, inactive, under a progress bar until the next one arrives */
118
- .aura-table.is-refreshing .aura-table__row, .aura-table.is-refreshing .aura-table__card { opacity: 0.6; pointer-events: none; }
119
+ .aura-table.is-refreshing .aura-table__row { opacity: 0.6; pointer-events: none; }
119
120
  .aura-table__busy-bar {
120
121
  position: absolute; z-index: 6; top: calc(var(--aura-table-row-height) - 2px); left: 0; right: 0; height: 2px; overflow: hidden;
121
122
  border-radius: var(--aura-radius-full); pointer-events: none;
122
123
  }
123
- .aura-table--stacked .aura-table__busy-bar { top: 0; }
124
124
  .aura-table__busy-bar::after {
125
125
  content: ''; position: absolute; top: 0; bottom: 0; width: 35%; background: var(--aura-fg-accent);
126
126
  animation: aura-progress-slide var(--aura-duration-pulse) var(--aura-ease) infinite;
@@ -134,6 +134,9 @@ a.aura-btn { text-decoration: none; }
134
134
  }
135
135
  .aura-table__td .aura-pill, .aura-table__td .aura-dropdown, .aura-table__td > .aura-icon-btn, .aura-table__td > .aura-btn { vertical-align: middle; }
136
136
  .aura-table__th { position: relative; box-sizing: border-box; display: flex; align-items: center; padding-right: var(--aura-space-2); }
137
+ /* Column sizes come from custom properties set per cell (4.20), so the card layout can override them. */
138
+ .aura-table__th, .aura-table__td { flex: var(--aura-cell-flex, none); width: var(--aura-cell-w, auto); min-width: var(--aura-cell-min, 0); }
139
+ .aura-table__break, .aura-table__sel-text { display: none; }
137
140
  .aura-table__th-inner { display: flex; align-items: center; gap: var(--aura-space-1); min-width: 0; width: 100%; }
138
141
  .aura-table__th-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
139
142
  .aura-table__pin-icon { color: var(--aura-fg-secondary); }
@@ -155,7 +158,7 @@ a.aura-btn { text-decoration: none; }
155
158
  .aura-table__sel.is-pinned { position: sticky; left: var(--aura-space-6); z-index: 2; }
156
159
 
157
160
  /* Pinned columns */
158
- .aura-table__th.is-pinned, .aura-table__td.is-pinned { position: sticky; z-index: 2; background: inherit; }
161
+ .aura-table__th.is-pinned, .aura-table__td.is-pinned { position: sticky; left: var(--aura-cell-left, auto); z-index: 2; background: inherit; }
159
162
  .aura-table.is-scrolled-x .is-pin-edge { box-shadow: inset -1px 0 0 var(--aura-border-default); }
160
163
 
161
164
  /* Cell focus — the grid's single tab stop moves cell by cell */
@@ -852,32 +855,11 @@ a.aura-tab { text-decoration: none; }
852
855
  /* The shell already pads its content: a Container directly inside only caps the width. */
853
856
  .aura-shell__content > .aura-container { padding-left: 0; padding-right: 0; }
854
857
 
855
- /* ---------- DataTable: stacked cards ---------- */
856
- .aura-table--stacked { background: transparent; border: 0; border-radius: 0; overflow: visible; }
857
- .aura-table__stack-bar { display: flex; align-items: center; gap: var(--aura-space-3); padding: 0 var(--aura-space-4) var(--aura-space-3); font-size: 13px; color: var(--aura-fg-secondary); }
858
- .aura-table__cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--aura-space-2); }
859
- .aura-table__card {
860
- display: flex; flex-direction: column; gap: var(--aura-space-3); padding: var(--aura-space-4);
861
- background: var(--aura-bg-surface); border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-lg); font-size: 13px;
862
- }
863
- .aura-table__card.is-selected { background: var(--aura-bg-selected); }
864
- .aura-table__card.is-actionable { cursor: pointer; }
865
- .aura-table__card:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: var(--aura-focus-ring-offset); }
866
- .aura-table__card-head { display: flex; align-items: center; gap: var(--aura-space-3); }
867
- .aura-table__card-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
868
- .aura-table__card-actions { display: inline-flex; margin: calc(-1 * var(--aura-space-1)) calc(-1 * var(--aura-space-2)) calc(-1 * var(--aura-space-1)) 0; }
869
- .aura-table__card-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--aura-space-2) var(--aura-space-4); margin: 0; }
870
- .aura-table__card-fields dt { font-family: var(--font-mono); font-size: 11px; color: var(--aura-fg-secondary); }
871
- .aura-table__card-fields dd { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
872
- .aura-table__card-fields dd.is-end { text-align: right; font-variant-numeric: tabular-nums; }
873
- .aura-table__card--total { background: var(--aura-bg-canvas); font-weight: 600; }
874
858
  /* Totals row (4.19): under the body, a strong top edge; sticky at the bottom of a `height` table with stickyFooter. */
875
859
  .aura-table__total { background: var(--aura-bg-canvas); border-top: 1px solid var(--aura-border-strong); font-weight: 600; }
876
860
  .aura-table__total.is-sticky { position: sticky; bottom: 0; z-index: 3; }
877
861
  .aura-table__total .aura-table__td.is-end { font-variant-numeric: tabular-nums; }
878
862
  .aura-tooltip--above { transform: translateY(-100%); max-width: min(var(--aura-tooltip-max), 90vw); white-space: normal; }
879
- .aura-table--stacked .aura-table__foot { border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-lg); margin-top: var(--aura-space-2); }
880
- .aura-table--stacked .aura-table__empty { background: var(--aura-bg-surface); border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-lg); }
881
863
 
882
864
  /* ---------- Stat ---------- */
883
865
  .aura-stat {
@@ -1340,36 +1322,6 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
1340
1322
  .aura-density { display: contents; }
1341
1323
 
1342
1324
 
1343
- /* DataTable: cards before hydration (4.16). While a stackBelow table hasn't measured itself yet (server HTML, first
1344
- * client render) it holds both layouts; these container queries show one, so a phone never sees the grid first. */
1345
- .aura-table-dual { container-type: inline-size; }
1346
- @container (min-width: 360px) { .aura-table-dual[data-stack-below='360'] > .aura-table--stacked { display: none; } }
1347
- @container (max-width: 359.98px) { .aura-table-dual[data-stack-below='360'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1348
- @container (min-width: 400px) { .aura-table-dual[data-stack-below='400'] > .aura-table--stacked { display: none; } }
1349
- @container (max-width: 399.98px) { .aura-table-dual[data-stack-below='400'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1350
- @container (min-width: 480px) { .aura-table-dual[data-stack-below='480'] > .aura-table--stacked { display: none; } }
1351
- @container (max-width: 479.98px) { .aura-table-dual[data-stack-below='480'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1352
- @container (min-width: 520px) { .aura-table-dual[data-stack-below='520'] > .aura-table--stacked { display: none; } }
1353
- @container (max-width: 519.98px) { .aura-table-dual[data-stack-below='520'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1354
- @container (min-width: 560px) { .aura-table-dual[data-stack-below='560'] > .aura-table--stacked { display: none; } }
1355
- @container (max-width: 559.98px) { .aura-table-dual[data-stack-below='560'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1356
- @container (min-width: 600px) { .aura-table-dual[data-stack-below='600'] > .aura-table--stacked { display: none; } }
1357
- @container (max-width: 599.98px) { .aura-table-dual[data-stack-below='600'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1358
- @container (min-width: 640px) { .aura-table-dual[data-stack-below='640'] > .aura-table--stacked { display: none; } }
1359
- @container (max-width: 639.98px) { .aura-table-dual[data-stack-below='640'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1360
- @container (min-width: 720px) { .aura-table-dual[data-stack-below='720'] > .aura-table--stacked { display: none; } }
1361
- @container (max-width: 719.98px) { .aura-table-dual[data-stack-below='720'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1362
- @container (min-width: 768px) { .aura-table-dual[data-stack-below='768'] > .aura-table--stacked { display: none; } }
1363
- @container (max-width: 767.98px) { .aura-table-dual[data-stack-below='768'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1364
- @container (min-width: 800px) { .aura-table-dual[data-stack-below='800'] > .aura-table--stacked { display: none; } }
1365
- @container (max-width: 799.98px) { .aura-table-dual[data-stack-below='800'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1366
- @container (min-width: 900px) { .aura-table-dual[data-stack-below='900'] > .aura-table--stacked { display: none; } }
1367
- @container (max-width: 899.98px) { .aura-table-dual[data-stack-below='900'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1368
- @container (min-width: 960px) { .aura-table-dual[data-stack-below='960'] > .aura-table--stacked { display: none; } }
1369
- @container (max-width: 959.98px) { .aura-table-dual[data-stack-below='960'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1370
- @container (min-width: 1024px) { .aura-table-dual[data-stack-below='1024'] > .aura-table--stacked { display: none; } }
1371
- @container (max-width: 1023.98px) { .aura-table-dual[data-stack-below='1024'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1372
-
1373
1325
  /* ---------- 4.19: BottomNav ---------- */
1374
1326
  /* Fixed to the bottom and padded for the home indicator; the spacer before it holds the same height in the flow.
1375
1327
  * Shown below its breakpoint in CSS, so the server's HTML is right before hydration. */
@@ -1434,4 +1386,99 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
1434
1386
  .aura-actionbar.is-idle { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; box-shadow: none; }
1435
1387
  .aura-actionbar--container > .aura-actionbar__inner { padding-left: 0; padding-right: 0; }
1436
1388
 
1389
+ /* ---------- 4.20: Separator ---------- */
1390
+ .aura-separator { flex: none; align-self: stretch; height: 1px; margin: var(--aura-separator-space, 0) 0; background: var(--aura-border-default); border: 0; }
1391
+ .aura-separator--vertical { width: 1px; height: auto; min-height: 1em; margin: 0 var(--aura-separator-space, 0); }
1392
+
1393
+ /* ---------- 4.20: Table (static) ---------- */
1394
+ /* DataTable's grid look — mono header band, hairlines, 20px outer radius — on plain <table> markup, with wrapping text. */
1395
+ .aura-tbl-wrap {
1396
+ overflow-x: auto; border: 1px solid var(--aura-border-default); border-radius: var(--aura-card-radius);
1397
+ background: var(--aura-bg-surface); color: var(--aura-fg-primary); font-family: var(--font-sans);
1398
+ }
1399
+ .aura-tbl { width: 100%; border-collapse: collapse; border-spacing: 0; font-size: 13px; line-height: 20px; }
1400
+ .aura-tbl__caption { caption-side: top; padding: var(--aura-space-4) var(--aura-space-6) 0; text-align: left; font-size: 14px; font-weight: 600; }
1401
+ .aura-tbl__th, .aura-tbl__td { padding: var(--aura-space-3) var(--aura-space-4); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
1402
+ .aura-tbl__th:first-child, .aura-tbl__td:first-child { padding-left: var(--aura-space-6); }
1403
+ .aura-tbl__th:last-child, .aura-tbl__td:last-child { padding-right: var(--aura-space-6); }
1404
+ .aura-tbl__head .aura-tbl__th {
1405
+ background: var(--aura-bg-canvas); border-bottom: 1px solid var(--aura-border-default);
1406
+ font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--aura-fg-secondary); white-space: nowrap;
1407
+ }
1408
+ .aura-tbl__body .aura-tbl__row + .aura-tbl__row > * { border-top: 1px solid var(--aura-border-default); }
1409
+ .aura-tbl__body .aura-tbl__th { font-weight: 500; }
1410
+ .aura-tbl__foot > .aura-tbl__row > * { background: var(--aura-bg-canvas); font-weight: 600; }
1411
+ .aura-tbl__foot > .aura-tbl__row:first-child > * { border-top: 1px solid var(--aura-border-strong); }
1412
+ .aura-tbl__foot > .aura-tbl__row + .aura-tbl__row > * { border-top: 1px solid var(--aura-border-default); }
1413
+ .aura-tbl .is-end { text-align: right; }
1414
+ .aura-tbl .is-center { text-align: center; }
1415
+ .aura-tbl .is-numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
1416
+ .aura-tbl-wrap[data-density='compact'] .aura-tbl__th, .aura-tbl-wrap[data-density='compact'] .aura-tbl__td { padding-top: var(--aura-space-2); padding-bottom: var(--aura-space-2); }
1417
+ .aura-tbl-wrap:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: 2px; }
1418
+
1419
+ /* ---------- 4.20: DataTable width queries and cards, one markup ---------- */
1420
+ /* Each .aura-table-q is the table's width × 10000 / its threshold (DataTable.tsx, Q), so `(width < 9999.5px)` is true
1421
+ * exactly when the table is narrower than stackBelow or a hideBelow width — before hydration, at any width. */
1422
+ .aura-table-box { overflow-x: clip; }
1423
+ .aura-table-q { width: calc(100% * var(--aura-q-scale)); container-type: inline-size; }
1424
+ .aura-table-q--stack { container-name: aura-stack; }
1425
+ .aura-table-q--h1 { container-name: aura-h1; }
1426
+ .aura-table-q--h2 { container-name: aura-h2; }
1427
+ .aura-table-q--h3 { container-name: aura-h3; }
1428
+ .aura-table-q .aura-table { width: calc(100% * var(--aura-q-back)); box-sizing: border-box; }
1429
+ @container aura-h1 (width < 9999.5px) { .aura-table { --aura-h1-on: 0; } .aura-table [data-hide='1'] { display: none; } }
1430
+ @container aura-h2 (width < 9999.5px) { .aura-table { --aura-h2-on: 0; } .aura-table [data-hide='2'] { display: none; } }
1431
+ @container aura-h3 (width < 9999.5px) { .aura-table { --aura-h3-on: 0; } .aura-table [data-hide='3'] { display: none; } }
1432
+
1433
+ /* Below stackBelow the same grid lays out as cards: the first column is the title, the first other pill column sits
1434
+ * beside it, `actions` columns go top-right, the rest are label/value fields two to a line. Column headers stay for
1435
+ * screen readers; the labels are generated content with empty alt text, so they aren't read twice. */
1436
+ @container aura-stack (width < 9999.5px) {
1437
+ .aura-table { background: transparent; border: 0; border-radius: 0; overflow: visible; }
1438
+ .aura-table__scroll { overflow: visible; height: auto; }
1439
+ .aura-table__busy-bar { top: 0; }
1440
+ .aura-table__picker { display: none; }
1441
+ .aura-table__head {
1442
+ position: static; height: auto; min-width: 0; padding: 0 0 var(--aura-space-3); border: 0; background: none;
1443
+ font-family: var(--font-sans); font-size: 13px;
1444
+ }
1445
+ .aura-table__head > .aura-table__th {
1446
+ position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
1447
+ }
1448
+ .aura-table__head:not(.has-select-all) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); }
1449
+ .aura-table__head > .aura-table__sel { position: static; width: auto; gap: var(--aura-space-3); padding: 0 var(--aura-space-4); }
1450
+ .aura-table__sel-text { display: inline; color: var(--aura-fg-secondary); }
1451
+ .aura-table__gutter { display: none; }
1452
+ .aura-table__row, .aura-table__row:last-child {
1453
+ height: auto; min-width: 0; flex-wrap: wrap; align-items: center; gap: var(--aura-space-1) var(--aura-space-4);
1454
+ margin-bottom: var(--aura-space-2); padding: var(--aura-space-4);
1455
+ border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-lg);
1456
+ }
1457
+ .aura-table__sel, .aura-table__th.is-pinned, .aura-table__td.is-pinned, .aura-table__total.is-sticky { position: static; box-shadow: none; }
1458
+ .aura-table__row > .aura-table__sel { order: 0; width: auto; margin-right: calc(-1 * var(--aura-space-1)); }
1459
+ .aura-table__td {
1460
+ order: 5; flex: 0 0 calc(50% - var(--aura-space-4) / 2); align-self: flex-start; width: auto; min-width: 0; height: auto;
1461
+ margin-bottom: var(--aura-space-1);
1462
+ padding: 0; line-height: normal;
1463
+ }
1464
+ .aura-table__td[data-hide] { display: block; }
1465
+ .aura-table__td[data-label]::before {
1466
+ content: attr(data-label); content: attr(data-label) / '';
1467
+ display: block; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start;
1468
+ font-family: var(--font-mono); font-size: 11px; line-height: normal; font-weight: 400; color: var(--aura-fg-secondary);
1469
+ }
1470
+ .aura-table__td[data-card='title'], .aura-table__td[data-card='pill'], .aura-table__td[data-card='actions'] { align-self: center; margin-bottom: 0; }
1471
+ .aura-table__td[data-card='title'] { order: 1; flex: 1 1 0; font-size: 14px; font-weight: 600; }
1472
+ .aura-table__td[data-card='pill'] { order: 2; flex: none; }
1473
+ .aura-table__td[data-card='actions'] { order: 3; flex: none; margin: calc(-1 * var(--aura-space-1)) calc(-1 * var(--aura-space-2)) calc(-1 * var(--aura-space-1)) 0; }
1474
+ /* Spacing: 12px under the title line, 8px between field lines (row gap 4 + the break's 4 + each field's 4 below). */
1475
+ .aura-table__break { display: block; order: 4; flex: 0 0 100%; height: var(--aura-space-1); }
1476
+ .aura-table__row:has(> .aura-table__break) { padding-bottom: calc(var(--aura-space-4) - var(--aura-space-1)); }
1477
+ .aura-table__row--skeleton .aura-table__td { display: flex; }
1478
+ .aura-table__total { background: var(--aura-bg-canvas); }
1479
+ .aura-table__total > .is-blank { display: none; }
1480
+ .aura-table__foot { border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-lg); margin-top: var(--aura-space-2); background: var(--aura-bg-surface); }
1481
+ .aura-table__empty { background: var(--aura-bg-surface); border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-lg); }
1482
+ }
1483
+
1437
1484
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jirawatpyk/aura-react",
3
- "version": "4.19.0",
3
+ "version": "5.0.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",