@jirawatpyk/aura-tokens 5.0.0 → 5.0.1
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/aura-tailwind.css +1 -1
- package/aura-tailwind.prefixed.css +1 -1
- package/aura.css +1 -1
- package/components/aura.bundle.js +39 -15
- package/components/aura.components.css +4 -1
- package/components/index.d.ts +1 -1
- package/package.json +1 -1
- package/tokens.json +1 -1
package/aura-tailwind.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AURA v5.0.
|
|
1
|
+
/* AURA v5.0.1 — Tailwind v4 theme. GENERATED by scripts/build-tokens.js from tokens.json. Do not edit by hand.
|
|
2
2
|
* @import "tailwindcss";
|
|
3
3
|
* @import "@jirawatpyk/aura-tokens/tailwind.css";
|
|
4
4
|
* Gives bg-bg-surface, text-fg-primary, border-border-strong, p-aura-6, rounded-aura-xl, shadow-aura-overlay,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AURA v5.0.
|
|
1
|
+
/* AURA v5.0.1 — Tailwind v4 theme with aura- prefixed names. GENERATED by scripts/build-tokens.js. Do not edit by hand.
|
|
2
2
|
* For apps that already have a Tailwind theme (shadcn): nothing here redefines an existing name.
|
|
3
3
|
* @layer aura-tokens, theme, base, aura, components, utilities;
|
|
4
4
|
* @import "tailwindcss";
|
package/aura.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AURA v5.0.
|
|
1
|
+
/* AURA v5.0.1 — GENERATED by scripts/build-tokens.js from tokens.json. Do not edit by hand. */
|
|
2
2
|
/* Fonts: load aura-fonts.css (or the <link> tags in README) separately, so a blocked Google Fonts never breaks this file. */
|
|
3
3
|
|
|
4
4
|
:root, [data-theme="light"] {
|
|
@@ -1757,12 +1757,16 @@ window.Aura = (() => {
|
|
|
1757
1757
|
function todayIn(timeZone) {
|
|
1758
1758
|
const now = /* @__PURE__ */ new Date();
|
|
1759
1759
|
if (!timeZone) return toISO(now);
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1760
|
+
try {
|
|
1761
|
+
return new Intl.DateTimeFormat("en-CA", {
|
|
1762
|
+
timeZone,
|
|
1763
|
+
year: "numeric",
|
|
1764
|
+
month: "2-digit",
|
|
1765
|
+
day: "2-digit"
|
|
1766
|
+
}).format(now);
|
|
1767
|
+
} catch (e) {
|
|
1768
|
+
return toISO(now);
|
|
1769
|
+
}
|
|
1766
1770
|
}
|
|
1767
1771
|
|
|
1768
1772
|
// src/DatePicker.tsx
|
|
@@ -1785,7 +1789,7 @@ window.Aura = (() => {
|
|
|
1785
1789
|
var Calendar = React17.forwardRef(function Calendar2(props, ref) {
|
|
1786
1790
|
const ctx = useAuraLocale(), locale = props.locale || ctx.locale || "en", calendar = props.calendar || ctx.calendar || defaultCalendar(locale), tag = localeTag(locale, calendar);
|
|
1787
1791
|
const weekStart = props.weekStartsOn == null ? locale === "sv" ? 1 : 0 : props.weekStartsOn;
|
|
1788
|
-
const todayISO = props.today || todayIn(props.timeZone || ctx.timeZone);
|
|
1792
|
+
const todayISO = (props.today && fromISO(props.today) ? props.today : null) || todayIn(props.timeZone || ctx.timeZone);
|
|
1789
1793
|
const today = fromISO(todayISO);
|
|
1790
1794
|
const min = fromISO(props.min === "today" ? todayISO : props.min), max = fromISO(props.max === "today" ? todayISO : props.max);
|
|
1791
1795
|
const start = fromISO(props.start), end = fromISO(props.end);
|
|
@@ -3106,7 +3110,7 @@ window.Aura = (() => {
|
|
|
3106
3110
|
};
|
|
3107
3111
|
let top, left;
|
|
3108
3112
|
if (side === "top" || side === "bottom") {
|
|
3109
|
-
top = side === "top" ? r.top - t.height - gap : r.bottom + gap;
|
|
3113
|
+
top = clampY(side === "top" ? r.top - t.height - gap : r.bottom + gap);
|
|
3110
3114
|
left = clampX(r.left + r.width / 2 - t.width / 2);
|
|
3111
3115
|
} else {
|
|
3112
3116
|
left = side === "left" ? r.left - t.width - gap : r.right + gap;
|
|
@@ -3333,6 +3337,12 @@ window.Aura = (() => {
|
|
|
3333
3337
|
const measure = !!props.stackBelow || columns.some(function(c) {
|
|
3334
3338
|
return c.hideBelow != null;
|
|
3335
3339
|
});
|
|
3340
|
+
const levelShape = (props.stackBelow ? "s" : "") + Math.min(
|
|
3341
|
+
MAX_HIDE_LEVELS,
|
|
3342
|
+
columns.map(hidePx).filter(function(px, i, a) {
|
|
3343
|
+
return px != null && a.indexOf(px) === i;
|
|
3344
|
+
}).length
|
|
3345
|
+
);
|
|
3336
3346
|
React28.useEffect(
|
|
3337
3347
|
function() {
|
|
3338
3348
|
if (!measure || !wrapRef.current || typeof ResizeObserver === "undefined") return;
|
|
@@ -3345,14 +3355,14 @@ window.Aura = (() => {
|
|
|
3345
3355
|
ro.disconnect();
|
|
3346
3356
|
};
|
|
3347
3357
|
},
|
|
3348
|
-
[measure]
|
|
3358
|
+
[measure, levelShape]
|
|
3349
3359
|
);
|
|
3350
3360
|
const stacked = !!props.stackBelow && boxWidth[0] != null && below(boxWidth[0], props.stackBelow);
|
|
3351
3361
|
useIsoLayoutEffect(
|
|
3352
3362
|
function() {
|
|
3353
|
-
if (measure &&
|
|
3363
|
+
if (measure && wrapRef.current) boxWidth[1](wrapRef.current.getBoundingClientRect().width);
|
|
3354
3364
|
},
|
|
3355
|
-
[measure]
|
|
3365
|
+
[measure, levelShape]
|
|
3356
3366
|
);
|
|
3357
3367
|
const hideLevels = [];
|
|
3358
3368
|
columns.forEach(function(c) {
|
|
@@ -3613,6 +3623,7 @@ window.Aura = (() => {
|
|
|
3613
3623
|
function focusCell(r, c) {
|
|
3614
3624
|
r = Math.max(0, Math.min(r, nRows));
|
|
3615
3625
|
c = Math.max(0, Math.min(c, nCols - 1));
|
|
3626
|
+
if (stacked && r === 0 && nRows > 0 && !(selectable && c === 0)) r = 1;
|
|
3616
3627
|
activeState[1]({ r, c });
|
|
3617
3628
|
pending.current = { r, c };
|
|
3618
3629
|
if (virtual && r > 0) {
|
|
@@ -4172,7 +4183,9 @@ window.Aura = (() => {
|
|
|
4172
4183
|
} else {
|
|
4173
4184
|
const bodyRows = body = [];
|
|
4174
4185
|
if (virtual && start > 0)
|
|
4175
|
-
bodyRows.push(
|
|
4186
|
+
bodyRows.push(
|
|
4187
|
+
/* @__PURE__ */ React28.createElement("div", { key: "__top", className: "aura-table__spacer", style: { height: start * ROW_H + "px" }, "aria-hidden": true })
|
|
4188
|
+
);
|
|
4176
4189
|
for (let ri = start; ri < end; ri++) {
|
|
4177
4190
|
(function(r, i) {
|
|
4178
4191
|
const k = r[rowKey], isSel = !!selSet[k];
|
|
@@ -4203,7 +4216,17 @@ window.Aura = (() => {
|
|
|
4203
4216
|
})(pageRows[ri], ri);
|
|
4204
4217
|
}
|
|
4205
4218
|
if (virtual && end < pageRows.length)
|
|
4206
|
-
bodyRows.push(
|
|
4219
|
+
bodyRows.push(
|
|
4220
|
+
/* @__PURE__ */ React28.createElement(
|
|
4221
|
+
"div",
|
|
4222
|
+
{
|
|
4223
|
+
key: "__bot",
|
|
4224
|
+
className: "aura-table__spacer",
|
|
4225
|
+
style: { height: (pageRows.length - end) * ROW_H + "px" },
|
|
4226
|
+
"aria-hidden": true
|
|
4227
|
+
}
|
|
4228
|
+
)
|
|
4229
|
+
);
|
|
4207
4230
|
}
|
|
4208
4231
|
let foot = null;
|
|
4209
4232
|
function pagerButton(dir) {
|
|
@@ -4438,7 +4461,7 @@ window.Aura = (() => {
|
|
|
4438
4461
|
className: cx("aura-tabs aura-tabs--links", props.className)
|
|
4439
4462
|
},
|
|
4440
4463
|
/* @__PURE__ */ React30.createElement("div", { className: "aura-tabs__list" }, items2.map(function(t) {
|
|
4441
|
-
const on =
|
|
4464
|
+
const on = t.id === st[0];
|
|
4442
4465
|
const inner = [
|
|
4443
4466
|
t.icon ? /* @__PURE__ */ React30.createElement(Icon, { key: "i", name: t.icon }) : null,
|
|
4444
4467
|
t.label,
|
|
@@ -4451,7 +4474,8 @@ window.Aura = (() => {
|
|
|
4451
4474
|
href: t.href,
|
|
4452
4475
|
className: cx("aura-tab", on && "is-active"),
|
|
4453
4476
|
"aria-current": on ? "page" : void 0,
|
|
4454
|
-
onClick: function() {
|
|
4477
|
+
onClick: function(e) {
|
|
4478
|
+
if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
4455
4479
|
st[1](t.id);
|
|
4456
4480
|
}
|
|
4457
4481
|
},
|
|
@@ -1365,6 +1365,8 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1365
1365
|
@media (max-width: 767.98px) { :root:has(.aura-bottomnav--below-md) { --aura-bottomnav-offset: calc(var(--aura-bottomnav-height) + env(safe-area-inset-bottom, 0px)); } }
|
|
1366
1366
|
@media (max-width: 1023.98px) { :root:has(.aura-bottomnav--below-lg) { --aura-bottomnav-offset: calc(var(--aura-bottomnav-height) + env(safe-area-inset-bottom, 0px)); } }
|
|
1367
1367
|
@media (max-width: 1279.98px) { :root:has(.aura-bottomnav--below-xl) { --aura-bottomnav-offset: calc(var(--aura-bottomnav-height) + env(safe-area-inset-bottom, 0px)); } }
|
|
1368
|
+
/* Toasts clear a BottomNav wherever it shows (phones and tablets). */
|
|
1369
|
+
.aura-toaster:not(.is-top) { bottom: calc(var(--aura-space-6) + var(--aura-bottomnav-offset, 0px)); }
|
|
1368
1370
|
@media (max-width: 639.98px) { .aura-toaster:not(.is-top) { bottom: calc(var(--aura-space-4) + var(--aura-bottomnav-offset, 0px)); } }
|
|
1369
1371
|
|
|
1370
1372
|
/* ---------- 4.19: ActionBar ---------- */
|
|
@@ -1459,7 +1461,8 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1459
1461
|
margin-bottom: var(--aura-space-1);
|
|
1460
1462
|
padding: 0; line-height: normal;
|
|
1461
1463
|
}
|
|
1462
|
-
.aura-table__td[data-hide] { display: block; }
|
|
1464
|
+
.aura-table__td[data-hide], .aura-table__head > .aura-table__th[data-hide] { display: block; }
|
|
1465
|
+
.aura-table__spacer { display: none; }
|
|
1463
1466
|
.aura-table__td[data-label]::before {
|
|
1464
1467
|
content: attr(data-label); content: attr(data-label) / '';
|
|
1465
1468
|
display: block; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start;
|
package/components/index.d.ts
CHANGED
|
@@ -171,7 +171,7 @@ export interface DataTableProps {
|
|
|
171
171
|
onPinnedColumnsChange?: ((keys: string[]) => void) | undefined;
|
|
172
172
|
/** `compact` = 40px rows (48px on touch screens). Default: the surrounding density. */
|
|
173
173
|
density?: "comfortable" | "compact" | undefined;
|
|
174
|
-
/** Table width in px below which rows render as stacked cards (phones). Try 640. It follows the table's own width, not the window. Since 4.20 the cards are the same markup as the grid, laid out by a container query, so any width is right before hydration and each row is in the HTML once. */
|
|
174
|
+
/** Table width in px below which rows render as stacked cards (phones). Try 640. It follows the table's own width, not the window. Since 4.20 the cards are the same markup as the grid, laid out by a container query, so any width is right before hydration and each row is in the HTML once. With `height` (virtual rows) the server can only send the first screenful; the rest of the cards arrive on hydration. */
|
|
175
175
|
stackBelow?: number | undefined;
|
|
176
176
|
className?: string | undefined;
|
|
177
177
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jirawatpyk/aura-tokens",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "AURA Design System — tokens (CSS variables, Tailwind preset, Figma variables), theme contrast checks and token lint.",
|
|
5
5
|
"main": "tailwind.tokens.cjs",
|
|
6
6
|
"types": "components/index.d.ts",
|
package/tokens.json
CHANGED