@jirawatpyk/aura-react 5.1.0 → 5.1.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/dist/aura.bundle.js +418 -148
- package/dist/cjs/index.cjs +418 -148
- package/dist/esm/AppShell.js +10 -2
- package/dist/esm/Avatar.js +4 -3
- package/dist/esm/BottomNav.js +2 -1
- package/dist/esm/Checkbox.js +3 -2
- package/dist/esm/Combobox.js +19 -19
- package/dist/esm/Command.js +1 -0
- package/dist/esm/DataTable.js +44 -14
- package/dist/esm/DatePicker.js +81 -18
- package/dist/esm/DropdownMenu.js +12 -0
- package/dist/esm/FileUpload.js +15 -0
- package/dist/esm/FormErrorSummary.js +19 -4
- package/dist/esm/Menu.js +20 -7
- package/dist/esm/NumberField.js +3 -1
- package/dist/esm/Pagination.js +3 -3
- package/dist/esm/Popover.js +11 -1
- package/dist/esm/RadioGroup.js +14 -1
- package/dist/esm/SideNav.js +2 -1
- package/dist/esm/Switch.js +1 -1
- package/dist/esm/Table.js +3 -2
- package/dist/esm/Tabs.js +11 -7
- package/dist/esm/TextField.js +2 -2
- package/dist/esm/Textarea.js +2 -2
- package/dist/esm/ThemeStyle.js +13 -3
- package/dist/esm/Toaster.js +1 -0
- package/dist/esm/Tooltip.js +54 -29
- package/dist/esm/colorScheme.js +7 -3
- package/dist/esm/colorSchemeScript.js +3 -3
- package/dist/esm/dates.js +6 -3
- package/dist/esm/internal.js +18 -7
- package/dist/esm/locale.js +6 -5
- package/dist/esm/theme.js +3 -1
- package/dist/esm/useModal.js +31 -8
- package/dist/index.d.cts +1508 -0
- package/dist/index.d.ts +1 -1
- package/dist/server/index.cjs +6 -4
- package/dist/server/index.d.cts +176 -0
- package/dist/server/index.js +6 -4
- package/dist/styles.css +19 -3
- package/dist/styles.layer.css +19 -3
- package/package.json +19 -8
package/dist/index.d.ts
CHANGED
|
@@ -1454,7 +1454,7 @@ export interface ThemeStyleProps extends ThemeOptions {
|
|
|
1454
1454
|
/** Scope the theme to this selector instead of the whole page (multi-tenant). */
|
|
1455
1455
|
selector?: string | undefined;
|
|
1456
1456
|
}
|
|
1457
|
-
export declare function ThemeStyle(props: ThemeStyleProps): React$1.ReactElement;
|
|
1457
|
+
export declare function ThemeStyle(props: ThemeStyleProps): React$1.ReactElement | null;
|
|
1458
1458
|
/** `system` follows the operating system and changes with it. */
|
|
1459
1459
|
export type ColorScheme = "light" | "dark" | "system";
|
|
1460
1460
|
export interface ColorSchemeOptions {
|
package/dist/server/index.cjs
CHANGED
|
@@ -767,6 +767,8 @@ function createTheme(opts) {
|
|
|
767
767
|
}
|
|
768
768
|
if (s) check("light", "ink", "accent-lime (signal)", 4.5, INK, s[200]);
|
|
769
769
|
function css(selector) {
|
|
770
|
+
if (selector !== void 0 && /[<{};@\r\n]|\/\*|\*\//.test(selector))
|
|
771
|
+
throw new Error('createTheme: "' + selector + '" is not a plain CSS selector');
|
|
770
772
|
const light = selector ? selector : ':root, [data-theme="light"]';
|
|
771
773
|
const dark = selector ? selector + ".dark, .dark " + selector + ", " + selector + '[data-theme="dark"], [data-theme="dark"] ' + selector : '.dark, [data-theme="dark"]';
|
|
772
774
|
const system = selector ? '[data-theme="system"] ' + selector + ", " + selector + '[data-theme="system"]' : '[data-theme="system"]';
|
|
@@ -775,7 +777,7 @@ function createTheme(opts) {
|
|
|
775
777
|
return " --aura-" + k + ": " + m[k] + ";";
|
|
776
778
|
}).join("\n") + "\n}";
|
|
777
779
|
}
|
|
778
|
-
return "/* AURA theme" + (o.name ? ' "' + o.name + '"' : "") + ": brand " + o.brand + (o.signal ? ", signal " + o.signal : "") + (o.primary === "brand" ? ", brand primary buttons" : "") + ". Load after aura.css. Generated by createTheme. */\n" + block(light, L) + "\n" + block(dark, D) + "\n@media (prefers-color-scheme: dark) {\n" + block(system, D) + "\n}\n";
|
|
780
|
+
return "/* AURA theme" + (o.name ? ' "' + String(o.name).replace(/[*/<>\\]/g, "") + '"' : "") + ": brand " + o.brand + (o.signal ? ", signal " + o.signal : "") + (o.primary === "brand" ? ", brand primary buttons" : "") + ". Load after aura.css. Generated by createTheme. */\n" + block(light, L) + "\n" + block(dark, D) + "\n@media (prefers-color-scheme: dark) {\n" + block(system, D) + "\n}\n";
|
|
779
781
|
}
|
|
780
782
|
return {
|
|
781
783
|
name: o.name || null,
|
|
@@ -794,9 +796,9 @@ function createTheme(opts) {
|
|
|
794
796
|
// src/colorSchemeScript.ts
|
|
795
797
|
var DEFAULT_KEY = "aura-color-scheme";
|
|
796
798
|
function colorSchemeScript(options) {
|
|
797
|
-
const key = JSON.stringify(options && options.storageKey || DEFAULT_KEY);
|
|
798
|
-
const fallback = JSON.stringify(options && options.defaultScheme || "system");
|
|
799
|
-
return "(function(){try{var s=localStorage.getItem(" + key + ");if(s!=='light'&&s!=='dark'&&s!=='system')s=" + fallback + `;var d=document.documentElement;d.setAttribute("data-theme",s);var
|
|
799
|
+
const key = JSON.stringify(options && options.storageKey || DEFAULT_KEY).replace(/</g, "\\u003c");
|
|
800
|
+
const fallback = JSON.stringify(options && options.defaultScheme || "system").replace(/</g, "\\u003c");
|
|
801
|
+
return "(function(){try{var s=localStorage.getItem(" + key + ");if(s!=='light'&&s!=='dark'&&s!=='system')s=" + fallback + `;var d=document.documentElement;d.setAttribute("data-theme",s);var m=window.matchMedia('(prefers-color-scheme: dark)');d.classList.toggle('dark',s==='dark'||(s==='system'&&m.matches));if(m.addEventListener)m.addEventListener('change',function(e){if(d.getAttribute('data-theme')==='system')d.classList.toggle('dark',e.matches)});}catch(e){}})();`;
|
|
800
802
|
}
|
|
801
803
|
|
|
802
804
|
// src/breakpoints.ts
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
|
|
3
|
+
/** `warning` (5.1): needs attention but still works — Warning, Problem, Degraded, At risk. */
|
|
4
|
+
export type StatusTone = "neutral" | "progress" | "ready" | "warning" | "blocked";
|
|
5
|
+
/** ISO date string, `YYYY-MM-DD` (Gregorian — the era is display only). */
|
|
6
|
+
export type ISODate = string;
|
|
7
|
+
export interface DateDisplayOptions {
|
|
8
|
+
/** Components: the AuraProvider's locale, else `en`. `formatDate()` (no provider to read): `en` unless given (5.0; `th` before). */
|
|
9
|
+
locale?: "th" | "en" | "sv" | undefined;
|
|
10
|
+
/** `buddhist` (พ.ศ.; default for th) or `gregory` (ค.ศ.; default for en and sv). */
|
|
11
|
+
calendar?: "buddhist" | "gregory" | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface ThemeOptions {
|
|
14
|
+
/** The project's brand colour, #rgb or #rrggbb. Replaces AURA violet (links, focus ring, selection, info, progress, creative shadow in dark, mesh). */
|
|
15
|
+
brand: string;
|
|
16
|
+
/** Optional signal colour; replaces AURA lime in the accent dot and mesh only (success/ready stay green). */
|
|
17
|
+
signal?: string | undefined;
|
|
18
|
+
/** ink (default): primary buttons stay zinc ink. brand: primary buttons use the brand colour. */
|
|
19
|
+
primary?: "ink" | "brand" | undefined;
|
|
20
|
+
name?: string | undefined;
|
|
21
|
+
}
|
|
22
|
+
export interface ThemeCheck {
|
|
23
|
+
theme: "light" | "dark";
|
|
24
|
+
pair: string;
|
|
25
|
+
ratio: number;
|
|
26
|
+
target: number;
|
|
27
|
+
pass: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface Theme {
|
|
30
|
+
name: string | null;
|
|
31
|
+
brand: Record<50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900, string>;
|
|
32
|
+
signal: Record<50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900, string> | null;
|
|
33
|
+
light: Record<string, string>;
|
|
34
|
+
dark: Record<string, string>;
|
|
35
|
+
checks: ThemeCheck[];
|
|
36
|
+
ok: boolean;
|
|
37
|
+
/** CSS overriding the tokens. No selector: the whole page. A selector (".tenant-acme") scopes it. Load after aura.css. */
|
|
38
|
+
css(selector?: string): string;
|
|
39
|
+
}
|
|
40
|
+
/** Options for formatDate: locale/calendar plus a preset or any Intl.DateTimeFormat options. */
|
|
41
|
+
export type FormatDateOptions = DateDisplayOptions & {
|
|
42
|
+
format?: "short" | "long" | "numeric" | Intl.DateTimeFormatOptions | undefined;
|
|
43
|
+
};
|
|
44
|
+
export declare function toISO(d: Date | null | undefined): ISODate | null;
|
|
45
|
+
export declare function fromISO(s: ISODate | null | undefined): Date | null;
|
|
46
|
+
/** Format an ISO date for display: "18 Sept 2026" by default (English, Gregorian — 5.0); `{ locale: 'th' }` gives
|
|
47
|
+
* "18 ก.ย. 2569" (Buddhist era), `{ locale: 'sv' }` "18 sep. 2026". The same function from the package root and from
|
|
48
|
+
* `/server`. In components, `useFormatDate()` follows the AuraProvider's locale instead. */
|
|
49
|
+
export declare function formatDate(iso: ISODate | null | undefined, opts?: FormatDateOptions): string;
|
|
50
|
+
/** 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'. */
|
|
51
|
+
export declare function parseDate(text: string | null | undefined): ISODate | null;
|
|
52
|
+
/** 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) */
|
|
53
|
+
export declare function todayIn(timeZone?: string | null): ISODate;
|
|
54
|
+
/** 1536 → "1.5 KB". */
|
|
55
|
+
export declare function formatBytes(n: number | null | undefined): string;
|
|
56
|
+
/** Parse typed time: 9 · 09 · 930 · 0930 · 9:30 · 9.30 · 09.30 น. · 9:30 pm → "HH:mm" (24-hour) or null. */
|
|
57
|
+
export declare function parseTime(text: string | null | undefined): string | null;
|
|
58
|
+
/** The tone the pill would pick for a status word. */
|
|
59
|
+
declare function toneFor(status: unknown): StatusTone;
|
|
60
|
+
/** Every built-in label. Function entries build the text from their arguments. */
|
|
61
|
+
export interface AuraStrings {
|
|
62
|
+
close: string;
|
|
63
|
+
dismiss: string;
|
|
64
|
+
dismissToast: string;
|
|
65
|
+
showPassword: string;
|
|
66
|
+
filters: string;
|
|
67
|
+
search: string;
|
|
68
|
+
clearFilters: string;
|
|
69
|
+
results: (n: number) => string;
|
|
70
|
+
commandMenu: string;
|
|
71
|
+
commandPlaceholder: string;
|
|
72
|
+
commandHint: string;
|
|
73
|
+
errorSummary: (n: number) => string;
|
|
74
|
+
notifications: string;
|
|
75
|
+
mainNav: string;
|
|
76
|
+
breadcrumb: string;
|
|
77
|
+
navigation: string;
|
|
78
|
+
openNav: string;
|
|
79
|
+
collapseNav: string;
|
|
80
|
+
expandNav: string;
|
|
81
|
+
searching: string;
|
|
82
|
+
noMatches: string;
|
|
83
|
+
clear: (what?: string) => string;
|
|
84
|
+
keepTyping: (total: number) => string;
|
|
85
|
+
sortAsc: string;
|
|
86
|
+
sortDesc: string;
|
|
87
|
+
pin: string;
|
|
88
|
+
unpin: string;
|
|
89
|
+
moveLeft: string;
|
|
90
|
+
moveRight: string;
|
|
91
|
+
hideColumn: string;
|
|
92
|
+
resetColumns: string;
|
|
93
|
+
selectRows: string;
|
|
94
|
+
selectAllRows: string;
|
|
95
|
+
deselectAllRows: string;
|
|
96
|
+
selectAll: string;
|
|
97
|
+
selectRow: (k: React$1.ReactNode) => string;
|
|
98
|
+
selectedCount: (c: number) => string;
|
|
99
|
+
pinned: string;
|
|
100
|
+
columnOptions: (label?: string) => string;
|
|
101
|
+
column: (label?: string) => string;
|
|
102
|
+
columns: string;
|
|
103
|
+
showHideColumns: string;
|
|
104
|
+
empty: string;
|
|
105
|
+
loading: string;
|
|
106
|
+
loadingRows: string;
|
|
107
|
+
range: (a: number | string, b: number | string, total: number) => string;
|
|
108
|
+
page: (p: number, total: number) => string;
|
|
109
|
+
prevPage: string;
|
|
110
|
+
nextPage: string;
|
|
111
|
+
rowCount: (c: number) => string;
|
|
112
|
+
totals: string;
|
|
113
|
+
actions: string;
|
|
114
|
+
optional: string;
|
|
115
|
+
timePlaceholder: string;
|
|
116
|
+
timeInvalid: string;
|
|
117
|
+
timeOutOfRange: (a: number | string, b: number | string) => string;
|
|
118
|
+
dropFiles: string;
|
|
119
|
+
browse: string;
|
|
120
|
+
browseOne: string;
|
|
121
|
+
remove: (n: number | string) => string;
|
|
122
|
+
fileTooBig: (max?: number | string) => string;
|
|
123
|
+
fileWrongType: string;
|
|
124
|
+
tooManyFiles: (n: number | string) => string;
|
|
125
|
+
colorScheme: string;
|
|
126
|
+
increase: string;
|
|
127
|
+
decrease: string;
|
|
128
|
+
stepDone: string;
|
|
129
|
+
stepOf: (i: number, total: number) => string;
|
|
130
|
+
schemeLight: string;
|
|
131
|
+
schemeDark: string;
|
|
132
|
+
schemeSystem: string;
|
|
133
|
+
uploading: string;
|
|
134
|
+
images: string;
|
|
135
|
+
pagination: string;
|
|
136
|
+
pageN: (p: number) => string;
|
|
137
|
+
accepts: (list?: string, max?: number | string) => string;
|
|
138
|
+
}
|
|
139
|
+
export declare const STRINGS: {
|
|
140
|
+
en: AuraStrings;
|
|
141
|
+
th: AuraStrings;
|
|
142
|
+
sv: AuraStrings;
|
|
143
|
+
};
|
|
144
|
+
/** WCAG contrast ratio of two #hex colours. */
|
|
145
|
+
export declare function contrast(a: string, b: string): number;
|
|
146
|
+
/** A 50–900 scale around one colour: same hue, AURA's lightness steps, chroma kept in gamut. */
|
|
147
|
+
declare function scale(hex: string): Theme["brand"];
|
|
148
|
+
/**
|
|
149
|
+
* createTheme({ brand, signal?, primary?: 'ink' | 'brand', name? })
|
|
150
|
+
* → { name, brand: {50…900}, signal: {50…900}|null, light: {token: #hex}, dark: {…}, checks: [{pair, ratio, target, pass}], ok, css(selector?) }
|
|
151
|
+
*/
|
|
152
|
+
export declare function createTheme(opts: ThemeOptions): Theme;
|
|
153
|
+
/** `system` follows the operating system and changes with it. */
|
|
154
|
+
export type ColorScheme = "light" | "dark" | "system";
|
|
155
|
+
export interface ColorSchemeOptions {
|
|
156
|
+
/** localStorage key for the choice. Default `aura-color-scheme`. */
|
|
157
|
+
storageKey?: string | undefined;
|
|
158
|
+
/** Used when nothing is saved. Default `system`. */
|
|
159
|
+
defaultScheme?: ColorScheme | undefined;
|
|
160
|
+
}
|
|
161
|
+
/** The script ColorSchemeScript renders, as a string — for frameworks that want it in a raw <head> template. */
|
|
162
|
+
export declare function colorSchemeScript(options?: ColorSchemeOptions): string;
|
|
163
|
+
/** Min-width breakpoints in px, mirroring the aura-bp-* tokens. */
|
|
164
|
+
export declare const breakpoints: {
|
|
165
|
+
sm: 640;
|
|
166
|
+
md: 768;
|
|
167
|
+
lg: 1024;
|
|
168
|
+
xl: 1280;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export {
|
|
172
|
+
scale as brandScale,
|
|
173
|
+
toneFor as statusTone,
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export {};
|
package/dist/server/index.js
CHANGED
|
@@ -728,6 +728,8 @@ function createTheme(opts) {
|
|
|
728
728
|
}
|
|
729
729
|
if (s) check("light", "ink", "accent-lime (signal)", 4.5, INK, s[200]);
|
|
730
730
|
function css(selector) {
|
|
731
|
+
if (selector !== void 0 && /[<{};@\r\n]|\/\*|\*\//.test(selector))
|
|
732
|
+
throw new Error('createTheme: "' + selector + '" is not a plain CSS selector');
|
|
731
733
|
const light = selector ? selector : ':root, [data-theme="light"]';
|
|
732
734
|
const dark = selector ? selector + ".dark, .dark " + selector + ", " + selector + '[data-theme="dark"], [data-theme="dark"] ' + selector : '.dark, [data-theme="dark"]';
|
|
733
735
|
const system = selector ? '[data-theme="system"] ' + selector + ", " + selector + '[data-theme="system"]' : '[data-theme="system"]';
|
|
@@ -736,7 +738,7 @@ function createTheme(opts) {
|
|
|
736
738
|
return " --aura-" + k + ": " + m[k] + ";";
|
|
737
739
|
}).join("\n") + "\n}";
|
|
738
740
|
}
|
|
739
|
-
return "/* AURA theme" + (o.name ? ' "' + o.name + '"' : "") + ": brand " + o.brand + (o.signal ? ", signal " + o.signal : "") + (o.primary === "brand" ? ", brand primary buttons" : "") + ". Load after aura.css. Generated by createTheme. */\n" + block(light, L) + "\n" + block(dark, D) + "\n@media (prefers-color-scheme: dark) {\n" + block(system, D) + "\n}\n";
|
|
741
|
+
return "/* AURA theme" + (o.name ? ' "' + String(o.name).replace(/[*/<>\\]/g, "") + '"' : "") + ": brand " + o.brand + (o.signal ? ", signal " + o.signal : "") + (o.primary === "brand" ? ", brand primary buttons" : "") + ". Load after aura.css. Generated by createTheme. */\n" + block(light, L) + "\n" + block(dark, D) + "\n@media (prefers-color-scheme: dark) {\n" + block(system, D) + "\n}\n";
|
|
740
742
|
}
|
|
741
743
|
return {
|
|
742
744
|
name: o.name || null,
|
|
@@ -755,9 +757,9 @@ function createTheme(opts) {
|
|
|
755
757
|
// src/colorSchemeScript.ts
|
|
756
758
|
var DEFAULT_KEY = "aura-color-scheme";
|
|
757
759
|
function colorSchemeScript(options) {
|
|
758
|
-
const key = JSON.stringify(options && options.storageKey || DEFAULT_KEY);
|
|
759
|
-
const fallback = JSON.stringify(options && options.defaultScheme || "system");
|
|
760
|
-
return "(function(){try{var s=localStorage.getItem(" + key + ");if(s!=='light'&&s!=='dark'&&s!=='system')s=" + fallback + `;var d=document.documentElement;d.setAttribute("data-theme",s);var
|
|
760
|
+
const key = JSON.stringify(options && options.storageKey || DEFAULT_KEY).replace(/</g, "\\u003c");
|
|
761
|
+
const fallback = JSON.stringify(options && options.defaultScheme || "system").replace(/</g, "\\u003c");
|
|
762
|
+
return "(function(){try{var s=localStorage.getItem(" + key + ");if(s!=='light'&&s!=='dark'&&s!=='system')s=" + fallback + `;var d=document.documentElement;d.setAttribute("data-theme",s);var m=window.matchMedia('(prefers-color-scheme: dark)');d.classList.toggle('dark',s==='dark'||(s==='system'&&m.matches));if(m.addEventListener)m.addEventListener('change',function(e){if(d.getAttribute('data-theme')==='system')d.classList.toggle('dark',e.matches)});}catch(e){}})();`;
|
|
761
763
|
}
|
|
762
764
|
|
|
763
765
|
// src/breakpoints.ts
|
package/dist/styles.css
CHANGED
|
@@ -212,7 +212,7 @@ a.aura-btn { text-decoration: none; }
|
|
|
212
212
|
|
|
213
213
|
/* Menu — popover list for column options and the column picker */
|
|
214
214
|
.aura-menu {
|
|
215
|
-
position: fixed; z-index: var(--aura-z-menu); min-width: 200px; padding: var(--aura-space-1);
|
|
215
|
+
position: fixed; z-index: var(--aura-z-menu); min-width: 200px; padding: var(--aura-space-1); overflow-y: auto; overscroll-behavior: contain;
|
|
216
216
|
background: var(--aura-bg-surface); color: var(--aura-fg-primary);
|
|
217
217
|
border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-md);
|
|
218
218
|
box-shadow: var(--aura-shadow-enterprise);
|
|
@@ -520,6 +520,8 @@ a.aura-icon-btn { text-decoration: none; }
|
|
|
520
520
|
font-family: var(--font-sans); font-size: 12px; line-height: 1.5; pointer-events: none;
|
|
521
521
|
animation: aura-fade-in var(--aura-duration-fast) var(--aura-ease);
|
|
522
522
|
}
|
|
523
|
+
/* The Tooltip component's own tips can be hovered (WCAG 1.4.13, 5.1.1); rail labels and cell tips stay click-through. */
|
|
524
|
+
.aura-tooltip--hoverable { pointer-events: auto; }
|
|
523
525
|
@keyframes aura-fade-in { from { opacity: 0; } }
|
|
524
526
|
|
|
525
527
|
/* ---------- Dialog ---------- */
|
|
@@ -746,7 +748,7 @@ a.aura-tab { text-decoration: none; }
|
|
|
746
748
|
.aura-cal__day.is-outside { color: var(--aura-fg-tertiary); }
|
|
747
749
|
.aura-cal__day.is-today { box-shadow: inset 0 0 0 1px var(--aura-border-control); font-weight: 600; }
|
|
748
750
|
.aura-cal__day.is-selected { background: var(--aura-button-primary-bg); color: var(--aura-button-primary-fg); box-shadow: none; }
|
|
749
|
-
.aura-cal__day:disabled { opacity: var(--aura-disabled-opacity); cursor: not-allowed; background: transparent; text-decoration: line-through; }
|
|
751
|
+
.aura-cal__day:disabled, .aura-cal__day[aria-disabled='true'] { opacity: var(--aura-disabled-opacity); cursor: not-allowed; background: transparent; text-decoration: line-through; }
|
|
750
752
|
.aura-cal__day:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: 1px; }
|
|
751
753
|
.aura-cal__grid td.is-in-range { background: var(--aura-bg-selected); }
|
|
752
754
|
.aura-cal__grid td.is-range-start { background: linear-gradient(to right, transparent 50%, var(--aura-bg-selected) 50%); }
|
|
@@ -1423,7 +1425,7 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1423
1425
|
/* ---------- 4.20: DataTable width queries and cards, one markup ---------- */
|
|
1424
1426
|
/* Each .aura-table-q is the table's width × 10000 / its threshold (DataTable.tsx, Q), so `(width < 9999.5px)` is true
|
|
1425
1427
|
* exactly when the table is narrower than stackBelow or a hideBelow width — before hydration, at any width. */
|
|
1426
|
-
.aura-table-box { overflow-x: clip; }
|
|
1428
|
+
.aura-table-box { overflow-x: clip; width: 100%; } /* 5.1.1: container-type boxes have no content width; without this a table in a centred flex column collapsed to 0 */
|
|
1427
1429
|
.aura-table-q { width: calc(100% * var(--aura-q-scale)); container-type: inline-size; }
|
|
1428
1430
|
.aura-table-q--stack { container-name: aura-stack; }
|
|
1429
1431
|
.aura-table-q--h1 { container-name: aura-h1; }
|
|
@@ -1485,3 +1487,17 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1485
1487
|
.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); }
|
|
1486
1488
|
.aura-table__empty { background: var(--aura-bg-surface); border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-lg); }
|
|
1487
1489
|
}
|
|
1490
|
+
|
|
1491
|
+
/* ---------- 5.1.1: Windows High Contrast / forced colours ---------- */
|
|
1492
|
+
/* Backgrounds are replaced in forced colours, so controls that show state only by fill get borders and system colours. */
|
|
1493
|
+
@media (forced-colors: active) {
|
|
1494
|
+
.aura-switch { border: 1px solid CanvasText; }
|
|
1495
|
+
.aura-switch__thumb { background: CanvasText; forced-color-adjust: none; }
|
|
1496
|
+
.aura-switch.is-on { background: Highlight; forced-color-adjust: none; }
|
|
1497
|
+
.aura-switch.is-on .aura-switch__thumb { background: HighlightText; }
|
|
1498
|
+
.aura-progress__track, .aura-upload__bar { border: 1px solid CanvasText; }
|
|
1499
|
+
.aura-progress__bar, .aura-upload__bar > span { background: Highlight; forced-color-adjust: none; }
|
|
1500
|
+
.aura-segmented__option.is-selected { outline: 2px solid Highlight; outline-offset: -2px; }
|
|
1501
|
+
.aura-tab { border-bottom-color: Canvas; }
|
|
1502
|
+
.aura-tab.is-active { border-bottom-color: Highlight; }
|
|
1503
|
+
}
|
package/dist/styles.layer.css
CHANGED
|
@@ -214,7 +214,7 @@ a.aura-btn { text-decoration: none; }
|
|
|
214
214
|
|
|
215
215
|
/* Menu — popover list for column options and the column picker */
|
|
216
216
|
.aura-menu {
|
|
217
|
-
position: fixed; z-index: var(--aura-z-menu); min-width: 200px; padding: var(--aura-space-1);
|
|
217
|
+
position: fixed; z-index: var(--aura-z-menu); min-width: 200px; padding: var(--aura-space-1); overflow-y: auto; overscroll-behavior: contain;
|
|
218
218
|
background: var(--aura-bg-surface); color: var(--aura-fg-primary);
|
|
219
219
|
border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-md);
|
|
220
220
|
box-shadow: var(--aura-shadow-enterprise);
|
|
@@ -522,6 +522,8 @@ a.aura-icon-btn { text-decoration: none; }
|
|
|
522
522
|
font-family: var(--font-sans); font-size: 12px; line-height: 1.5; pointer-events: none;
|
|
523
523
|
animation: aura-fade-in var(--aura-duration-fast) var(--aura-ease);
|
|
524
524
|
}
|
|
525
|
+
/* The Tooltip component's own tips can be hovered (WCAG 1.4.13, 5.1.1); rail labels and cell tips stay click-through. */
|
|
526
|
+
.aura-tooltip--hoverable { pointer-events: auto; }
|
|
525
527
|
@keyframes aura-fade-in { from { opacity: 0; } }
|
|
526
528
|
|
|
527
529
|
/* ---------- Dialog ---------- */
|
|
@@ -748,7 +750,7 @@ a.aura-tab { text-decoration: none; }
|
|
|
748
750
|
.aura-cal__day.is-outside { color: var(--aura-fg-tertiary); }
|
|
749
751
|
.aura-cal__day.is-today { box-shadow: inset 0 0 0 1px var(--aura-border-control); font-weight: 600; }
|
|
750
752
|
.aura-cal__day.is-selected { background: var(--aura-button-primary-bg); color: var(--aura-button-primary-fg); box-shadow: none; }
|
|
751
|
-
.aura-cal__day:disabled { opacity: var(--aura-disabled-opacity); cursor: not-allowed; background: transparent; text-decoration: line-through; }
|
|
753
|
+
.aura-cal__day:disabled, .aura-cal__day[aria-disabled='true'] { opacity: var(--aura-disabled-opacity); cursor: not-allowed; background: transparent; text-decoration: line-through; }
|
|
752
754
|
.aura-cal__day:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: 1px; }
|
|
753
755
|
.aura-cal__grid td.is-in-range { background: var(--aura-bg-selected); }
|
|
754
756
|
.aura-cal__grid td.is-range-start { background: linear-gradient(to right, transparent 50%, var(--aura-bg-selected) 50%); }
|
|
@@ -1425,7 +1427,7 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1425
1427
|
/* ---------- 4.20: DataTable width queries and cards, one markup ---------- */
|
|
1426
1428
|
/* Each .aura-table-q is the table's width × 10000 / its threshold (DataTable.tsx, Q), so `(width < 9999.5px)` is true
|
|
1427
1429
|
* exactly when the table is narrower than stackBelow or a hideBelow width — before hydration, at any width. */
|
|
1428
|
-
.aura-table-box { overflow-x: clip; }
|
|
1430
|
+
.aura-table-box { overflow-x: clip; width: 100%; } /* 5.1.1: container-type boxes have no content width; without this a table in a centred flex column collapsed to 0 */
|
|
1429
1431
|
.aura-table-q { width: calc(100% * var(--aura-q-scale)); container-type: inline-size; }
|
|
1430
1432
|
.aura-table-q--stack { container-name: aura-stack; }
|
|
1431
1433
|
.aura-table-q--h1 { container-name: aura-h1; }
|
|
@@ -1488,4 +1490,18 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1488
1490
|
.aura-table__empty { background: var(--aura-bg-surface); border: 1px solid var(--aura-border-default); border-radius: var(--aura-radius-lg); }
|
|
1489
1491
|
}
|
|
1490
1492
|
|
|
1493
|
+
/* ---------- 5.1.1: Windows High Contrast / forced colours ---------- */
|
|
1494
|
+
/* Backgrounds are replaced in forced colours, so controls that show state only by fill get borders and system colours. */
|
|
1495
|
+
@media (forced-colors: active) {
|
|
1496
|
+
.aura-switch { border: 1px solid CanvasText; }
|
|
1497
|
+
.aura-switch__thumb { background: CanvasText; forced-color-adjust: none; }
|
|
1498
|
+
.aura-switch.is-on { background: Highlight; forced-color-adjust: none; }
|
|
1499
|
+
.aura-switch.is-on .aura-switch__thumb { background: HighlightText; }
|
|
1500
|
+
.aura-progress__track, .aura-upload__bar { border: 1px solid CanvasText; }
|
|
1501
|
+
.aura-progress__bar, .aura-upload__bar > span { background: Highlight; forced-color-adjust: none; }
|
|
1502
|
+
.aura-segmented__option.is-selected { outline: 2px solid Highlight; outline-offset: -2px; }
|
|
1503
|
+
.aura-tab { border-bottom-color: Canvas; }
|
|
1504
|
+
.aura-tab.is-active { border-bottom-color: Highlight; }
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1491
1507
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jirawatpyk/aura-react",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
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",
|
|
@@ -9,14 +9,24 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/esm/index.js"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"types": "./dist/index.d.cts",
|
|
18
|
+
"default": "./dist/cjs/index.cjs"
|
|
19
|
+
}
|
|
15
20
|
},
|
|
16
21
|
"./server": {
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
"import": {
|
|
23
|
+
"types": "./dist/server/index.d.ts",
|
|
24
|
+
"default": "./dist/server/index.js"
|
|
25
|
+
},
|
|
26
|
+
"require": {
|
|
27
|
+
"types": "./dist/server/index.d.cts",
|
|
28
|
+
"default": "./dist/server/index.cjs"
|
|
29
|
+
}
|
|
20
30
|
},
|
|
21
31
|
"./styles.css": "./dist/styles.css",
|
|
22
32
|
"./styles.layer.css": "./dist/styles.layer.css",
|
|
@@ -30,7 +40,8 @@
|
|
|
30
40
|
"LICENSE"
|
|
31
41
|
],
|
|
32
42
|
"sideEffects": [
|
|
33
|
-
"*.css"
|
|
43
|
+
"*.css",
|
|
44
|
+
"./dist/aura.bundle.js"
|
|
34
45
|
],
|
|
35
46
|
"scripts": {
|
|
36
47
|
"build": "node scripts/build.mjs && node scripts/sync-bundle.mjs",
|