@jirawatpyk/aura-react 4.18.0 → 4.19.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/dist/index.d.ts CHANGED
@@ -117,6 +117,11 @@ export interface DataTableProps {
117
117
  onSelectionChange?: ((keys: Array<string | number>) => void) | undefined;
118
118
  /** Shown when rows is empty. */
119
119
  empty?: DataTableEmpty | undefined;
120
+ /** A totals row under the body (4.19): content per column key, e.g. `{ id: 'Total', vat: '7,000.00', total: '107,000.00' }`.
121
+ * Cells share the body's widths and alignment, so right-aligned money lines up. Stacked cards get a Totals card. */
122
+ footer?: Record<string, React$1.ReactNode> | undefined;
123
+ /** Keep the totals row visible while a `height` table scrolls. (4.19) */
124
+ stickyFooter?: boolean | undefined;
120
125
  /** Rows per page; omit for no pagination. */
121
126
  pageSize?: number | undefined;
122
127
  /** Controlled page (1-based); pair with onPageChange. */
@@ -201,6 +206,8 @@ export interface AuraProviderProps {
201
206
  calendar?: "buddhist" | "gregory" | undefined;
202
207
  /** Override individual strings. */
203
208
  strings?: Partial<Record<string, string | ((...args: any[]) => string)>> | undefined;
209
+ /** IANA time zone for "today" in DatePicker, DateRangePicker and Calendar, e.g. `Asia/Bangkok` (4.19). Default: the browser's. */
210
+ timeZone?: string | undefined;
204
211
  /** `compact`: 36px fields and buttons, 40px table rows — dense admin screens. Touch screens keep 44px. Default: comfortable (or an ancestor's `data-density`). */
205
212
  density?: "comfortable" | "compact" | undefined;
206
213
  /** Your router's link (e.g. `Link` from `next/link`), used by every AURA component that renders a link: Button with `href`, SideNav, Breadcrumb, Stat, Pagination, DataTable row links. It gets `href`, `className`, `aria-current`, the children and the ref. A component's own `linkComponent` wins. */
@@ -256,6 +263,16 @@ export interface MenuItem {
256
263
  /** A divider instead of an item. */
257
264
  separator?: boolean | undefined;
258
265
  onSelect?: (() => void) | undefined;
266
+ /** A link item (4.19): rendered through your router's link (`linkComponent`), e.g. a download or "Open in new tab". */
267
+ href?: string | undefined;
268
+ /** Link target, e.g. `_blank`, with `href`. */
269
+ target?: string | undefined;
270
+ /** `danger` for destructive items (Void, Delete): danger colour, put them last after a separator. (4.19) */
271
+ tone?: "danger" | undefined;
272
+ /** `radio` makes a single-choice item (menuitemradio); `checked` marks the chosen one. (4.19) */
273
+ type?: "radio" | undefined;
274
+ /** Radio items with the same `group` form one labelled group (the name is read out). (4.19) */
275
+ group?: string | undefined;
259
276
  }
260
277
  /** Popover list anchored to an element, rendered in a portal. */
261
278
  export interface MenuProps {
@@ -268,6 +285,8 @@ export interface MenuProps {
268
285
  onClose: (restoreFocus: boolean) => void;
269
286
  /** Focus the first item on open. Default true; turn off only for static demos. */
270
287
  autoFocus?: boolean | undefined;
288
+ /** Router link for items with `href`; defaults to AuraProvider's `linkComponent`, then `<a>`. (4.19) */
289
+ linkComponent?: React$1.ElementType | undefined;
271
290
  }
272
291
  export interface FieldProps {
273
292
  /** Visible label; also the accessible name. */
@@ -516,14 +535,20 @@ export interface TabItem {
516
535
  count?: number | undefined;
517
536
  disabled?: boolean | undefined;
518
537
  content?: React$1.ReactNode | undefined;
538
+ /** A route (4.19). When every tab has one, Tabs renders a `nav` of links (section tabs that are pages), with
539
+ * `aria-current="page"` on the current one and no panels. */
540
+ href?: string | undefined;
519
541
  }
520
542
  export interface TabsProps {
521
543
  tabs: TabItem[];
522
- /** Accessible name for the tab list. */
544
+ /** Accessible name for the tab list (or the nav, for link tabs). */
523
545
  label: string;
546
+ /** The current tab's id. For link tabs, the current route's tab. */
524
547
  value?: string | undefined;
525
548
  defaultValue?: string | undefined;
526
549
  onChange?: ((id: string) => void) | undefined;
550
+ /** Router link for tabs with `href`; defaults to AuraProvider's `linkComponent`, then `<a>`. (4.19) */
551
+ linkComponent?: React$1.ElementType | undefined;
527
552
  className?: string | undefined;
528
553
  }
529
554
  export interface NavItem {
@@ -592,6 +617,8 @@ export interface DropdownMenuProps {
592
617
  items: MenuItem[];
593
618
  /** Accessible name for the menu. */
594
619
  label?: string | undefined;
620
+ /** Router link for items with `href`. (4.19) */
621
+ linkComponent?: React$1.ElementType | undefined;
595
622
  }
596
623
  export interface ComboboxOption {
597
624
  value: string;
@@ -726,11 +753,17 @@ export interface CalendarProps extends DateDisplayOptions {
726
753
  end?: ISODate | null | undefined;
727
754
  focus?: ISODate | null | undefined;
728
755
  range?: boolean | undefined;
729
- min?: ISODate | undefined;
730
- max?: ISODate | undefined;
756
+ /** Earliest / latest day; `'today'` means today in `timeZone` (4.19). */
757
+ min?: ISODate | "today" | undefined;
758
+ max?: ISODate | "today" | undefined;
731
759
  isDateDisabled?: ((iso: ISODate) => boolean) | undefined;
732
760
  /** 0 = Sunday (Thai default), 1 = Monday. */
733
761
  weekStartsOn?: 0 | 1 | undefined;
762
+ /** IANA time zone that decides which day is "today" (the marker, `min`/`max="today"`, the Today button), e.g.
763
+ * `Asia/Bangkok`. Default: the provider's `timeZone`, else the browser's. (4.19) */
764
+ timeZone?: string | undefined;
765
+ /** Today, given outright (ISO). Wins over `timeZone`; handy in tests and server-rendered pages. (4.19) */
766
+ today?: ISODate | undefined;
734
767
  onSelect?: ((iso: ISODate | null) => void) | undefined;
735
768
  /** Adds a Clear link to the footer. */
736
769
  onClear?: (() => void) | undefined;
@@ -746,10 +779,16 @@ export interface DateFieldProps extends FieldProps, DateDisplayOptions {
746
779
  disabled?: boolean | undefined;
747
780
  /** Clear button while there is a value. Default true. */
748
781
  clearable?: boolean | undefined;
749
- min?: ISODate | undefined;
750
- max?: ISODate | undefined;
782
+ /** Earliest / latest day; `'today'` means today in `timeZone` (4.19). */
783
+ min?: ISODate | "today" | undefined;
784
+ max?: ISODate | "today" | undefined;
751
785
  isDateDisabled?: ((iso: ISODate) => boolean) | undefined;
752
786
  weekStartsOn?: 0 | 1 | undefined;
787
+ /** IANA time zone that decides which day is "today" (the marker, `min`/`max="today"`, the Today button), e.g.
788
+ * `Asia/Bangkok`. Default: the provider's `timeZone`, else the browser's. (4.19) */
789
+ timeZone?: string | undefined;
790
+ /** Today, given outright (ISO). Wins over `timeZone`; handy in tests and server-rendered pages. (4.19) */
791
+ today?: ISODate | undefined;
753
792
  className?: string | undefined;
754
793
  }
755
794
  export interface DatePickerProps extends DateFieldProps {
@@ -822,6 +861,56 @@ export interface AppShellProps {
822
861
  menuLabel?: string | undefined;
823
862
  /** id of `<main>`, for a skip link. Default `main`. */
824
863
  mainId?: string | undefined;
864
+ /** A BottomNav for phones (4.19). Shown below its `hideFrom` breakpoint; the content keeps room for it, and a
865
+ * viewport ActionBar sits on top of it. With a `bottomNav` and no `nav`, there is no menu button. */
866
+ bottomNav?: React$1.ReactElement | undefined;
867
+ className?: string | undefined;
868
+ }
869
+ export interface ActionBarProps {
870
+ /** Buttons, right-aligned (the primary one last). */
871
+ children?: React$1.ReactNode | undefined;
872
+ /** A short line such as "Total 107,000.00 THB · due Oct 22, 2026" or "Unsaved changes". It sits in a polite live
873
+ * region that is always in the page, so a change is announced. */
874
+ status?: React$1.ReactNode | undefined;
875
+ /** `viewport` (default): sticks to the bottom of the screen, padded for the home indicator, above a BottomNav.
876
+ * `container`: sticks to the bottom of the scrolling card or panel it's in. Both stay in the flow at the end of their
877
+ * parent, so they never cover the last field. Make it the last child of the form or card it belongs to: like any
878
+ * `position: sticky` element it sticks only while that parent is on screen. */
879
+ position?: "viewport" | "container" | undefined;
880
+ /** Bulk actions: the number of selected rows. Shows "N selected" in the status; at 0 the bar hides (its live region
881
+ * stays, so the next selection is announced) and its actions leave the tab order. */
882
+ selected?: number | undefined;
883
+ /** Adds a "Clear" button next to the count. */
884
+ onClearSelection?: (() => void) | undefined;
885
+ /** Name of the region. Default "Actions". */
886
+ label?: string | undefined;
887
+ className?: string | undefined;
888
+ }
889
+ export interface BottomNavItem {
890
+ id: string;
891
+ /** Short: five items share 320px. */
892
+ label: string;
893
+ icon: IconInput;
894
+ href?: string | undefined;
895
+ /** A number on the icon (99+ above 99); 0 hides it. Part of the item's accessible name. */
896
+ count?: number | undefined;
897
+ /** A dot on the icon, e.g. "new". Give it words with `badgeLabel`. */
898
+ badge?: boolean | undefined;
899
+ /** Read after the label when `badge` is set, e.g. "new". */
900
+ badgeLabel?: string | undefined;
901
+ }
902
+ export interface BottomNavProps {
903
+ /** 2–5 items. */
904
+ items: BottomNavItem[];
905
+ value?: string | undefined;
906
+ defaultValue?: string | undefined;
907
+ onChange?: ((id: string) => void) | undefined;
908
+ /** Default "Main". */
909
+ label?: string | undefined;
910
+ /** Router link for items with `href`; defaults to the AuraProvider's `linkComponent`, then `<a>`. */
911
+ linkComponent?: React$1.ElementType | undefined;
912
+ /** Hidden from this breakpoint up, in CSS (so the server's HTML is right). Default `lg` (1024px); `false` never hides. */
913
+ hideFrom?: "md" | "lg" | "xl" | false | undefined;
825
914
  className?: string | undefined;
826
915
  }
827
916
  export interface StatChange {
@@ -1105,6 +1194,8 @@ export type FormatDateOptions = DateDisplayOptions & {
1105
1194
  export declare function formatDate(iso: ISODate | null | undefined, opts?: FormatDateOptions): string;
1106
1195
  /** Parse typed text: dd/mm/yyyy (Buddhist years ≥ 2400 are converted), d-m-yyyy, d.m.yyyy, yyyy-mm-dd or '18 ก.ย. 2569' / '18 Sep 2026'. */
1107
1196
  export declare function parseDate(text: string | null | undefined): ISODate | null;
1197
+ /** Today as an ISO date in an IANA time zone (e.g. `Asia/Bangkok`), or in the runtime's own zone without one. (4.19) */
1198
+ export declare function todayIn(timeZone?: string | null): ISODate;
1108
1199
  /** formatDate bound to the nearest AuraProvider: its locale and calendar (English, Gregorian without one).
1109
1200
  * Options you pass still win. Use it in components; plain formatDate() stays for code outside React. */
1110
1201
  export declare function useFormatDate(): (iso: ISODate | null | undefined, opts?: FormatDateOptions) => string;
@@ -1163,6 +1254,13 @@ export declare const Container: React$1.ForwardRefExoticComponent<ContainerProps
1163
1254
  * Which one shows is decided in CSS (4.16), so the server's HTML is already right on a phone and nothing shifts on
1164
1255
  * hydration; JavaScript only opens and closes the drawer. */
1165
1256
  export declare const AppShell: React$1.ForwardRefExoticComponent<AppShellProps & React$1.RefAttributes<HTMLDivElement>>;
1257
+ /** ActionBar — a bar stuck to the bottom of the screen or of a card: a status line and the form's or selection's
1258
+ * actions. It is `position: sticky`, so it stays in the flow at the end of its parent and never covers the last field. */
1259
+ export declare const ActionBar: React$1.ForwardRefExoticComponent<ActionBarProps & React$1.RefAttributes<HTMLDivElement>>;
1260
+ /** BottomNav — a phone tab bar: icon over a short label, a count or dot, the current page marked. Fixed to the bottom,
1261
+ * padded for the home indicator, with a spacer of the same height in the flow so nothing sits under it. Which
1262
+ * breakpoints show it is decided in CSS, so the server's HTML is already right and nothing shifts on hydration. */
1263
+ export declare const BottomNav: React$1.ForwardRefExoticComponent<BottomNavProps & React$1.RefAttributes<HTMLElement>>;
1166
1264
  /** Min-width breakpoints in px, mirroring the aura-bp-* tokens. */
1167
1265
  export declare const breakpoints: {
1168
1266
  sm: 640;
@@ -1227,6 +1325,7 @@ export interface AuraStrings {
1227
1325
  prevPage: string;
1228
1326
  nextPage: string;
1229
1327
  rowCount: (c: number) => string;
1328
+ totals: string;
1230
1329
  actions: string;
1231
1330
  optional: string;
1232
1331
  timePlaceholder: string;
@@ -1267,6 +1366,8 @@ export interface AuraLocaleValue {
1267
1366
  linkComponent?: React$1.ElementType | null | undefined;
1268
1367
  /** The density set on the nearest AuraProvider that sets one (null: none, i.e. comfortable unless an ancestor's data-density says otherwise). */
1269
1368
  density?: "comfortable" | "compact" | null | undefined;
1369
+ /** The time zone set on the nearest AuraProvider that sets one (4.19). */
1370
+ timeZone?: string | null | undefined;
1270
1371
  }
1271
1372
  /** Sets the language of built-in labels (and the default date locale) for everything inside. */
1272
1373
  export declare function AuraProvider(props: AuraProviderProps): React$1.ReactElement;
@@ -32,7 +32,8 @@ __export(server_exports, {
32
32
  parseDate: () => parseDate,
33
33
  parseTime: () => parseTime,
34
34
  statusTone: () => toneFor,
35
- toISO: () => toISO
35
+ toISO: () => toISO,
36
+ todayIn: () => todayIn
36
37
  });
37
38
  module.exports = __toCommonJS(server_exports);
38
39
 
@@ -112,6 +113,16 @@ function parseDate(text) {
112
113
  const dt = new Date(y, mo - 1, d);
113
114
  return dt.getMonth() === mo - 1 && dt.getDate() === d ? toISO(dt) : null;
114
115
  }
116
+ function todayIn(timeZone) {
117
+ const now = /* @__PURE__ */ new Date();
118
+ if (!timeZone) return toISO(now);
119
+ return new Intl.DateTimeFormat("en-CA", {
120
+ timeZone,
121
+ year: "numeric",
122
+ month: "2-digit",
123
+ day: "2-digit"
124
+ }).format(now);
125
+ }
115
126
 
116
127
  // src/text.ts
117
128
  function formatBytes(n2) {
@@ -230,6 +241,7 @@ var STRINGS = {
230
241
  },
231
242
  prevPage: "Previous page",
232
243
  nextPage: "Next page",
244
+ totals: "Totals",
233
245
  rowCount: function(c) {
234
246
  return n(c) + " rows";
235
247
  },
@@ -343,6 +355,7 @@ var STRINGS = {
343
355
  },
344
356
  prevPage: "\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",
345
357
  nextPage: "\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",
358
+ totals: "\u0E23\u0E27\u0E21",
346
359
  rowCount: function(c) {
347
360
  return n(c) + " \u0E41\u0E16\u0E27";
348
361
  },
@@ -456,6 +469,7 @@ var STRINGS = {
456
469
  },
457
470
  prevPage: "F\xF6reg\xE5ende sida",
458
471
  nextPage: "N\xE4sta sida",
472
+ totals: "Summa",
459
473
  rowCount: function(c) {
460
474
  return nsv(c) + " rader";
461
475
  },
@@ -44,6 +44,8 @@ export declare function toISO(d: Date | null | undefined): ISODate | null;
44
44
  export declare function fromISO(s: ISODate | null | undefined): Date | null;
45
45
  /** Parse typed text: dd/mm/yyyy (Buddhist years ≥ 2400 are converted), d-m-yyyy, d.m.yyyy, yyyy-mm-dd or '18 ก.ย. 2569' / '18 Sep 2026'. */
46
46
  export declare function parseDate(text: string | null | undefined): ISODate | null;
47
+ /** Today as an ISO date in an IANA time zone (e.g. `Asia/Bangkok`), or in the runtime's own zone without one. (4.19) */
48
+ export declare function todayIn(timeZone?: string | null): ISODate;
47
49
  /** 1536 → "1.5 KB". */
48
50
  export declare function formatBytes(n: number | null | undefined): string;
49
51
  /** Parse typed time: 9 · 09 · 930 · 0930 · 9:30 · 9.30 · 09.30 น. · 9:30 pm → "HH:mm" (24-hour) or null. */
@@ -102,6 +104,7 @@ export interface AuraStrings {
102
104
  prevPage: string;
103
105
  nextPage: string;
104
106
  rowCount: (c: number) => string;
107
+ totals: string;
105
108
  actions: string;
106
109
  optional: string;
107
110
  timePlaceholder: string;
@@ -74,6 +74,16 @@ function parseDate(text) {
74
74
  const dt = new Date(y, mo - 1, d);
75
75
  return dt.getMonth() === mo - 1 && dt.getDate() === d ? toISO(dt) : null;
76
76
  }
77
+ function todayIn(timeZone) {
78
+ const now = /* @__PURE__ */ new Date();
79
+ if (!timeZone) return toISO(now);
80
+ return new Intl.DateTimeFormat("en-CA", {
81
+ timeZone,
82
+ year: "numeric",
83
+ month: "2-digit",
84
+ day: "2-digit"
85
+ }).format(now);
86
+ }
77
87
 
78
88
  // src/text.ts
79
89
  function formatBytes(n2) {
@@ -192,6 +202,7 @@ var STRINGS = {
192
202
  },
193
203
  prevPage: "Previous page",
194
204
  nextPage: "Next page",
205
+ totals: "Totals",
195
206
  rowCount: function(c) {
196
207
  return n(c) + " rows";
197
208
  },
@@ -305,6 +316,7 @@ var STRINGS = {
305
316
  },
306
317
  prevPage: "\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",
307
318
  nextPage: "\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",
319
+ totals: "\u0E23\u0E27\u0E21",
308
320
  rowCount: function(c) {
309
321
  return n(c) + " \u0E41\u0E16\u0E27";
310
322
  },
@@ -418,6 +430,7 @@ var STRINGS = {
418
430
  },
419
431
  prevPage: "F\xF6reg\xE5ende sida",
420
432
  nextPage: "N\xE4sta sida",
433
+ totals: "Summa",
421
434
  rowCount: function(c) {
422
435
  return nsv(c) + " rader";
423
436
  },
@@ -764,5 +777,6 @@ export {
764
777
  parseDate,
765
778
  parseTime,
766
779
  toneFor as statusTone,
767
- toISO
780
+ toISO,
781
+ todayIn
768
782
  };
package/dist/styles.css CHANGED
@@ -234,6 +234,16 @@ a.aura-btn { text-decoration: none; }
234
234
  }
235
235
  .aura-menu__check.is-on { background: var(--aura-button-primary-bg); border-color: var(--aura-button-primary-bg); color: var(--aura-button-primary-fg); }
236
236
  .aura-menu__check.is-on .aura-icon { color: inherit; }
237
+ .aura-menu__item--danger, .aura-menu__item--danger .aura-icon { color: var(--aura-fg-danger); }
238
+ .aura-menu__item--danger:hover, .aura-menu__item--danger:focus { background: var(--aura-alert-danger-bg); color: var(--aura-alert-danger-fg); }
239
+ .aura-menu__item--danger:hover .aura-icon, .aura-menu__item--danger:focus .aura-icon { color: var(--aura-alert-danger-fg); }
240
+ a.aura-menu__item { text-decoration: none; box-sizing: border-box; }
241
+ .aura-menu__radio {
242
+ flex: none; box-sizing: border-box; width: 16px; height: 16px; border-radius: var(--aura-radius-full);
243
+ border: 1px solid var(--aura-border-control); display: inline-flex; align-items: center; justify-content: center;
244
+ }
245
+ .aura-menu__radio.is-on { border-color: var(--aura-button-primary-bg); }
246
+ .aura-menu__radio.is-on::after { content: ''; width: 8px; height: 8px; border-radius: var(--aura-radius-full); background: var(--aura-button-primary-bg); }
237
247
  .aura-menu__sep { height: 1px; margin: var(--aura-space-1) calc(-1 * var(--aura-space-1)); background: var(--aura-border-default); }
238
248
 
239
249
  /* Footer + pager */
@@ -564,7 +574,8 @@ a.aura-icon-btn { text-decoration: none; }
564
574
  }
565
575
  .aura-tab:hover { color: var(--aura-fg-primary); }
566
576
  .aura-tab.is-active { color: var(--aura-fg-primary); border-bottom-color: var(--aura-fg-primary); }
567
- .aura-tab:disabled { opacity: var(--aura-disabled-opacity); cursor: not-allowed; }
577
+ .aura-tab:disabled, .aura-tab.is-disabled { opacity: var(--aura-disabled-opacity); cursor: not-allowed; }
578
+ a.aura-tab { text-decoration: none; }
568
579
  .aura-tab:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: -4px; border-radius: var(--aura-radius-xs); }
569
580
  .aura-tab__count {
570
581
  min-width: 18px; padding: 0 6px; box-sizing: border-box; border-radius: var(--aura-radius-full);
@@ -856,6 +867,13 @@ a.aura-icon-btn { text-decoration: none; }
856
867
  .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; }
857
868
  .aura-table__card-fields dt { font-family: var(--font-mono); font-size: 11px; color: var(--aura-fg-secondary); }
858
869
  .aura-table__card-fields dd { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
870
+ .aura-table__card-fields dd.is-end { text-align: right; font-variant-numeric: tabular-nums; }
871
+ .aura-table__card--total { background: var(--aura-bg-canvas); font-weight: 600; }
872
+ /* Totals row (4.19): under the body, a strong top edge; sticky at the bottom of a `height` table with stickyFooter. */
873
+ .aura-table__total { background: var(--aura-bg-canvas); border-top: 1px solid var(--aura-border-strong); font-weight: 600; }
874
+ .aura-table__total.is-sticky { position: sticky; bottom: 0; z-index: 3; }
875
+ .aura-table__total .aura-table__td.is-end { font-variant-numeric: tabular-nums; }
876
+ .aura-tooltip--above { transform: translateY(-100%); max-width: min(var(--aura-tooltip-max), 90vw); white-space: normal; }
859
877
  .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); }
860
878
  .aura-table--stacked .aura-table__empty { background: var(--aura-bg-surface); border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-lg); }
861
879
 
@@ -1349,3 +1367,67 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
1349
1367
  @container (max-width: 959.98px) { .aura-table-dual[data-stack-below='960'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1350
1368
  @container (min-width: 1024px) { .aura-table-dual[data-stack-below='1024'] > .aura-table--stacked { display: none; } }
1351
1369
  @container (max-width: 1023.98px) { .aura-table-dual[data-stack-below='1024'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1370
+
1371
+ /* ---------- 4.19: BottomNav ---------- */
1372
+ /* Fixed to the bottom and padded for the home indicator; the spacer before it holds the same height in the flow.
1373
+ * Shown below its breakpoint in CSS, so the server's HTML is right before hydration. */
1374
+ .aura-bottomnav-spacer { height: calc(var(--aura-bottomnav-height) + env(safe-area-inset-bottom, 0px)); flex: none; }
1375
+ .aura-bottomnav {
1376
+ position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--aura-z-bar); box-sizing: border-box;
1377
+ padding-bottom: env(safe-area-inset-bottom, 0px);
1378
+ background: var(--aura-bg-surface); border-top: 1px solid var(--aura-border-default); font-family: var(--font-sans);
1379
+ }
1380
+ .aura-bottomnav__list { display: flex; margin: 0; padding: 0; list-style: none; }
1381
+ .aura-bottomnav__cell { flex: 1 1 0; min-width: 0; }
1382
+ .aura-bottomnav__item {
1383
+ box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
1384
+ width: 100%; height: var(--aura-bottomnav-height); padding: 0 2px; border: 0; background: transparent;
1385
+ color: var(--aura-fg-secondary); font: inherit; font-size: 11px; font-weight: 500; line-height: 14px;
1386
+ text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
1387
+ }
1388
+ .aura-bottomnav__item:hover { color: var(--aura-fg-primary); }
1389
+ .aura-bottomnav__item.is-active { color: var(--aura-fg-primary); font-weight: 600; }
1390
+ .aura-bottomnav__item.is-active .aura-icon { color: var(--aura-fg-accent); }
1391
+ .aura-bottomnav__item:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: -2px; border-radius: var(--aura-radius-sm); }
1392
+ .aura-bottomnav__icon {
1393
+ position: relative; display: inline-flex; align-items: center; justify-content: center;
1394
+ width: 48px; height: 28px; border-radius: var(--aura-radius-full);
1395
+ }
1396
+ .aura-bottomnav__item.is-active .aura-bottomnav__icon { background: var(--aura-bg-selected); }
1397
+ .aura-bottomnav__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1398
+ .aura-bottomnav__count {
1399
+ position: absolute; top: -2px; left: calc(50% + 4px); min-width: 16px; height: 16px; box-sizing: border-box; padding: 0 4px;
1400
+ border-radius: var(--aura-radius-full); background: var(--aura-bg-inverted); color: var(--aura-fg-inverted);
1401
+ font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums;
1402
+ box-shadow: 0 0 0 2px var(--aura-bg-surface);
1403
+ }
1404
+ .aura-bottomnav__dot {
1405
+ position: absolute; top: 2px; left: calc(50% + 6px); width: 8px; height: 8px; border-radius: var(--aura-radius-full);
1406
+ background: var(--aura-fg-accent); box-shadow: 0 0 0 2px var(--aura-bg-surface);
1407
+ }
1408
+ @media (min-width: 768px) { .aura-bottomnav.aura-bottomnav--below-md, .aura-bottomnav-spacer.aura-bottomnav--below-md { display: none; } }
1409
+ @media (min-width: 1024px) { .aura-bottomnav.aura-bottomnav--below-lg, .aura-bottomnav-spacer.aura-bottomnav--below-lg { display: none; } }
1410
+ @media (min-width: 1280px) { .aura-bottomnav.aura-bottomnav--below-xl, .aura-bottomnav-spacer.aura-bottomnav--below-xl { display: none; } }
1411
+ /* While a BottomNav shows, viewport ActionBars and phone toasts sit on top of it. */
1412
+ :root:has(.aura-bottomnav--always) { --aura-bottomnav-offset: calc(var(--aura-bottomnav-height) + env(safe-area-inset-bottom, 0px)); }
1413
+ @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)); } }
1414
+ @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)); } }
1415
+ @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)); } }
1416
+ @media (max-width: 639.98px) { .aura-toaster:not(.is-top) { bottom: calc(var(--aura-space-4) + var(--aura-bottomnav-offset, 0px)); } }
1417
+
1418
+ /* ---------- 4.19: ActionBar ---------- */
1419
+ /* Sticky, not fixed: it keeps its place at the end of its parent, so it never covers the last field. */
1420
+ .aura-actionbar { position: sticky; z-index: var(--aura-z-bar); box-sizing: border-box; background: var(--aura-bg-surface); color: var(--aura-fg-primary); font-family: var(--font-sans); }
1421
+ .aura-actionbar--viewport {
1422
+ bottom: calc(var(--aura-bottomnav-offset, 0px) + max(var(--aura-space-3), env(safe-area-inset-bottom, 0px)));
1423
+ margin-top: var(--aura-space-6);
1424
+ border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-lg); box-shadow: var(--aura-shadow-overlay);
1425
+ }
1426
+ .aura-actionbar--container { bottom: 0; border-top: 1px solid var(--aura-border-default); }
1427
+ .aura-actionbar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aura-space-2) var(--aura-space-3); min-height: 60px; box-sizing: border-box; padding: var(--aura-space-2) var(--aura-space-3) var(--aura-space-2) var(--aura-space-4); }
1428
+ .aura-actionbar__status { flex: 1 1 8rem; min-width: 0; font-size: 14px; color: var(--aura-fg-secondary); font-variant-numeric: tabular-nums; }
1429
+ .aura-actionbar__status:empty { flex-basis: 0; }
1430
+ .aura-actionbar__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--aura-space-2); margin-left: auto; }
1431
+ /* Bulk bar with nothing selected: out of sight and out of the tab order, its live region still in the page. */
1432
+ .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; }
1433
+ .aura-actionbar--container > .aura-actionbar__inner { padding-left: 0; padding-right: 0; }
@@ -236,6 +236,16 @@ a.aura-btn { text-decoration: none; }
236
236
  }
237
237
  .aura-menu__check.is-on { background: var(--aura-button-primary-bg); border-color: var(--aura-button-primary-bg); color: var(--aura-button-primary-fg); }
238
238
  .aura-menu__check.is-on .aura-icon { color: inherit; }
239
+ .aura-menu__item--danger, .aura-menu__item--danger .aura-icon { color: var(--aura-fg-danger); }
240
+ .aura-menu__item--danger:hover, .aura-menu__item--danger:focus { background: var(--aura-alert-danger-bg); color: var(--aura-alert-danger-fg); }
241
+ .aura-menu__item--danger:hover .aura-icon, .aura-menu__item--danger:focus .aura-icon { color: var(--aura-alert-danger-fg); }
242
+ a.aura-menu__item { text-decoration: none; box-sizing: border-box; }
243
+ .aura-menu__radio {
244
+ flex: none; box-sizing: border-box; width: 16px; height: 16px; border-radius: var(--aura-radius-full);
245
+ border: 1px solid var(--aura-border-control); display: inline-flex; align-items: center; justify-content: center;
246
+ }
247
+ .aura-menu__radio.is-on { border-color: var(--aura-button-primary-bg); }
248
+ .aura-menu__radio.is-on::after { content: ''; width: 8px; height: 8px; border-radius: var(--aura-radius-full); background: var(--aura-button-primary-bg); }
239
249
  .aura-menu__sep { height: 1px; margin: var(--aura-space-1) calc(-1 * var(--aura-space-1)); background: var(--aura-border-default); }
240
250
 
241
251
  /* Footer + pager */
@@ -566,7 +576,8 @@ a.aura-icon-btn { text-decoration: none; }
566
576
  }
567
577
  .aura-tab:hover { color: var(--aura-fg-primary); }
568
578
  .aura-tab.is-active { color: var(--aura-fg-primary); border-bottom-color: var(--aura-fg-primary); }
569
- .aura-tab:disabled { opacity: var(--aura-disabled-opacity); cursor: not-allowed; }
579
+ .aura-tab:disabled, .aura-tab.is-disabled { opacity: var(--aura-disabled-opacity); cursor: not-allowed; }
580
+ a.aura-tab { text-decoration: none; }
570
581
  .aura-tab:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: -4px; border-radius: var(--aura-radius-xs); }
571
582
  .aura-tab__count {
572
583
  min-width: 18px; padding: 0 6px; box-sizing: border-box; border-radius: var(--aura-radius-full);
@@ -858,6 +869,13 @@ a.aura-icon-btn { text-decoration: none; }
858
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; }
859
870
  .aura-table__card-fields dt { font-family: var(--font-mono); font-size: 11px; color: var(--aura-fg-secondary); }
860
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
+ /* Totals row (4.19): under the body, a strong top edge; sticky at the bottom of a `height` table with stickyFooter. */
875
+ .aura-table__total { background: var(--aura-bg-canvas); border-top: 1px solid var(--aura-border-strong); font-weight: 600; }
876
+ .aura-table__total.is-sticky { position: sticky; bottom: 0; z-index: 3; }
877
+ .aura-table__total .aura-table__td.is-end { font-variant-numeric: tabular-nums; }
878
+ .aura-tooltip--above { transform: translateY(-100%); max-width: min(var(--aura-tooltip-max), 90vw); white-space: normal; }
861
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); }
862
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); }
863
881
 
@@ -1352,4 +1370,68 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
1352
1370
  @container (min-width: 1024px) { .aura-table-dual[data-stack-below='1024'] > .aura-table--stacked { display: none; } }
1353
1371
  @container (max-width: 1023.98px) { .aura-table-dual[data-stack-below='1024'] > .aura-table:not(.aura-table--stacked) { display: none; } }
1354
1372
 
1373
+ /* ---------- 4.19: BottomNav ---------- */
1374
+ /* Fixed to the bottom and padded for the home indicator; the spacer before it holds the same height in the flow.
1375
+ * Shown below its breakpoint in CSS, so the server's HTML is right before hydration. */
1376
+ .aura-bottomnav-spacer { height: calc(var(--aura-bottomnav-height) + env(safe-area-inset-bottom, 0px)); flex: none; }
1377
+ .aura-bottomnav {
1378
+ position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--aura-z-bar); box-sizing: border-box;
1379
+ padding-bottom: env(safe-area-inset-bottom, 0px);
1380
+ background: var(--aura-bg-surface); border-top: 1px solid var(--aura-border-default); font-family: var(--font-sans);
1381
+ }
1382
+ .aura-bottomnav__list { display: flex; margin: 0; padding: 0; list-style: none; }
1383
+ .aura-bottomnav__cell { flex: 1 1 0; min-width: 0; }
1384
+ .aura-bottomnav__item {
1385
+ box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
1386
+ width: 100%; height: var(--aura-bottomnav-height); padding: 0 2px; border: 0; background: transparent;
1387
+ color: var(--aura-fg-secondary); font: inherit; font-size: 11px; font-weight: 500; line-height: 14px;
1388
+ text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
1389
+ }
1390
+ .aura-bottomnav__item:hover { color: var(--aura-fg-primary); }
1391
+ .aura-bottomnav__item.is-active { color: var(--aura-fg-primary); font-weight: 600; }
1392
+ .aura-bottomnav__item.is-active .aura-icon { color: var(--aura-fg-accent); }
1393
+ .aura-bottomnav__item:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: -2px; border-radius: var(--aura-radius-sm); }
1394
+ .aura-bottomnav__icon {
1395
+ position: relative; display: inline-flex; align-items: center; justify-content: center;
1396
+ width: 48px; height: 28px; border-radius: var(--aura-radius-full);
1397
+ }
1398
+ .aura-bottomnav__item.is-active .aura-bottomnav__icon { background: var(--aura-bg-selected); }
1399
+ .aura-bottomnav__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1400
+ .aura-bottomnav__count {
1401
+ position: absolute; top: -2px; left: calc(50% + 4px); min-width: 16px; height: 16px; box-sizing: border-box; padding: 0 4px;
1402
+ border-radius: var(--aura-radius-full); background: var(--aura-bg-inverted); color: var(--aura-fg-inverted);
1403
+ font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums;
1404
+ box-shadow: 0 0 0 2px var(--aura-bg-surface);
1405
+ }
1406
+ .aura-bottomnav__dot {
1407
+ position: absolute; top: 2px; left: calc(50% + 6px); width: 8px; height: 8px; border-radius: var(--aura-radius-full);
1408
+ background: var(--aura-fg-accent); box-shadow: 0 0 0 2px var(--aura-bg-surface);
1409
+ }
1410
+ @media (min-width: 768px) { .aura-bottomnav.aura-bottomnav--below-md, .aura-bottomnav-spacer.aura-bottomnav--below-md { display: none; } }
1411
+ @media (min-width: 1024px) { .aura-bottomnav.aura-bottomnav--below-lg, .aura-bottomnav-spacer.aura-bottomnav--below-lg { display: none; } }
1412
+ @media (min-width: 1280px) { .aura-bottomnav.aura-bottomnav--below-xl, .aura-bottomnav-spacer.aura-bottomnav--below-xl { display: none; } }
1413
+ /* While a BottomNav shows, viewport ActionBars and phone toasts sit on top of it. */
1414
+ :root:has(.aura-bottomnav--always) { --aura-bottomnav-offset: calc(var(--aura-bottomnav-height) + env(safe-area-inset-bottom, 0px)); }
1415
+ @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)); } }
1416
+ @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)); } }
1417
+ @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)); } }
1418
+ @media (max-width: 639.98px) { .aura-toaster:not(.is-top) { bottom: calc(var(--aura-space-4) + var(--aura-bottomnav-offset, 0px)); } }
1419
+
1420
+ /* ---------- 4.19: ActionBar ---------- */
1421
+ /* Sticky, not fixed: it keeps its place at the end of its parent, so it never covers the last field. */
1422
+ .aura-actionbar { position: sticky; z-index: var(--aura-z-bar); box-sizing: border-box; background: var(--aura-bg-surface); color: var(--aura-fg-primary); font-family: var(--font-sans); }
1423
+ .aura-actionbar--viewport {
1424
+ bottom: calc(var(--aura-bottomnav-offset, 0px) + max(var(--aura-space-3), env(safe-area-inset-bottom, 0px)));
1425
+ margin-top: var(--aura-space-6);
1426
+ border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-lg); box-shadow: var(--aura-shadow-overlay);
1427
+ }
1428
+ .aura-actionbar--container { bottom: 0; border-top: 1px solid var(--aura-border-default); }
1429
+ .aura-actionbar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aura-space-2) var(--aura-space-3); min-height: 60px; box-sizing: border-box; padding: var(--aura-space-2) var(--aura-space-3) var(--aura-space-2) var(--aura-space-4); }
1430
+ .aura-actionbar__status { flex: 1 1 8rem; min-width: 0; font-size: 14px; color: var(--aura-fg-secondary); font-variant-numeric: tabular-nums; }
1431
+ .aura-actionbar__status:empty { flex-basis: 0; }
1432
+ .aura-actionbar__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--aura-space-2); margin-left: auto; }
1433
+ /* Bulk bar with nothing selected: out of sight and out of the tab order, its live region still in the page. */
1434
+ .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
+ .aura-actionbar--container > .aura-actionbar__inner { padding-left: 0; padding-right: 0; }
1436
+
1355
1437
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jirawatpyk/aura-react",
3
- "version": "4.18.0",
3
+ "version": "4.19.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",