@jirawatpyk/aura-react 5.7.2 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/aura.bundle.js +1003 -824
- package/dist/cjs/index.cjs +1003 -824
- package/dist/esm/Alert.js +5 -18
- package/dist/esm/Badge.js +2 -19
- package/dist/esm/Button.js +15 -16
- package/dist/esm/Card.js +2 -19
- package/dist/esm/EmptyState.js +2 -15
- package/dist/esm/FormErrorSummary.js +40 -4
- package/dist/esm/Icon.js +1 -1
- package/dist/esm/StatusPill.js +4 -14
- package/dist/esm/Table.js +104 -11
- package/dist/esm/classes.js +20 -0
- package/dist/esm/display.js +145 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/internal.js +1 -14
- package/dist/index.d.cts +29 -5
- package/dist/index.d.ts +29 -5
- package/dist/server/index.cjs +217 -5
- package/dist/server/index.d.cts +117 -0
- package/dist/server/index.d.ts +117 -0
- package/dist/server/index.js +207 -5
- package/dist/styles.css +34 -0
- package/dist/styles.layer.css +34 -0
- package/package.json +1 -1
package/dist/server/index.d.ts
CHANGED
|
@@ -1,7 +1,86 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
|
|
3
|
+
/** Button look. */
|
|
4
|
+
export type ButtonVariant = "primary" | "secondary" | "ghost" | "creative" | "danger" | "danger-secondary";
|
|
5
|
+
/** `md` 44px (default) · `sm` 32px for toolbars, table rows and card footers (still a 44px hit area on touch screens). */
|
|
6
|
+
export type ButtonSize = "sm" | "md";
|
|
7
|
+
/** AURA pill button. Enterprise (`primary`, `secondary`) for product UI; `creative` for marketing moments only. */
|
|
8
|
+
export interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
9
|
+
/** Visual variant. Default `primary`. `ghost` has no fill or edge until hover (toolbars, rows, secondary actions beside a primary). `danger` (filled) and `danger-secondary` (outline) are for irreversible or destructive actions only — typically the confirm button of a `Dialog role="alertdialog"`. */
|
|
10
|
+
variant?: ButtonVariant | undefined;
|
|
11
|
+
/** Label text — short, Title Case English or Thai. */
|
|
12
|
+
children: React$1.ReactNode;
|
|
13
|
+
/** Leading icon name (see `IconName`). Hidden while loading. */
|
|
14
|
+
icon?: IconInput | undefined;
|
|
15
|
+
/** Trailing icon name, e.g. `arrow-right` for forward actions. */
|
|
16
|
+
iconRight?: IconInput | undefined;
|
|
17
|
+
/** Shows a spinner in place of the leading icon, sets aria-busy and swallows clicks. Keeps the label and width. */
|
|
18
|
+
loading?: boolean | undefined;
|
|
19
|
+
/** Fills its container and lets a long label wrap onto more lines (at least 44px tall) — phones, Thai and Swedish labels. */
|
|
20
|
+
fullWidth?: boolean | undefined;
|
|
21
|
+
/** `sm` is 32px with tighter padding, for toolbars, table rows and card footers. Default `md` (44px). */
|
|
22
|
+
size?: ButtonSize | undefined;
|
|
23
|
+
}
|
|
24
|
+
/** An AURA icon name, or any icon element (e.g. `<Building />` from lucide-react). AURA sizes it and hides it from screen readers. */
|
|
25
|
+
export type IconInput = IconName | React$1.ReactElement;
|
|
26
|
+
export type IconName = "check" | "x" | "plus" | "minus" | "search" | "chevron-down" | "chevron-up" | "chevron-left" | "chevron-right" | "arrow-right" | "arrow-up-right" | "arrow-up-down" | "loader-circle" | "circle-alert" | "circle-check" | "info" | "triangle-alert" | "settings" | "user" | "users" | "filter" | "ellipsis" | "external-link" | "copy" | "trash-2" | "pencil" | "download" | "upload" | "calendar" | "bell" | "menu" | "eye" | "log-out" | "circle" | "circle-dot-dashed" | "ban" | "arrow-up" | "arrow-down" | "inbox" | "pin" | "pin-off" | "eye-off" | "columns-3" | "arrow-left" | "rotate-ccw" | "house" | "layout-dashboard" | "folder" | "chart-column" | "file-text" | "mail" | "lock" | "clock" | "trending-up" | "trending-down" | "image" | "paperclip" | "cloud-upload" | "file" | "sun" | "moon" | "monitor" | "panel-left-close" | "panel-left-open" | "server" | "globe" | "activity" | "shield-alert" | "phone" | "wrench";
|
|
27
|
+
/** Lucide stroke icon drawn inline in currentColor. */
|
|
28
|
+
export interface IconProps {
|
|
29
|
+
/** A name from the set, or an icon element of your own (sized and styled the same way). */
|
|
30
|
+
name: IconInput;
|
|
31
|
+
/** `sm` 16 (default) · `md` 20 · `lg` 24, or a px number. */
|
|
32
|
+
size?: "sm" | "md" | "lg" | number | undefined;
|
|
33
|
+
/** Accessible name. Omit for decorative icons next to a text label (then aria-hidden). */
|
|
34
|
+
label?: string | undefined;
|
|
35
|
+
/** Default 2 (Lucide's). */
|
|
36
|
+
strokeWidth?: number | undefined;
|
|
37
|
+
className?: string | undefined;
|
|
38
|
+
}
|
|
3
39
|
/** `warning` (5.1): needs attention but still works — Warning, Problem, Degraded, At risk. */
|
|
4
40
|
export type StatusTone = "neutral" | "progress" | "ready" | "warning" | "blocked";
|
|
41
|
+
/** Status pill: tone fill + icon + the status word. Tone comes from the word unless given. */
|
|
42
|
+
export interface StatusPillProps extends Omit<React$1.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
43
|
+
/** The status word shown, e.g. "In Progress". Other attributes (`id`, `data-*`, `aria-*`) go on the pill (5.8). */
|
|
44
|
+
children: React$1.ReactNode;
|
|
45
|
+
/** Force a tone. Default: matched from the word (Ready/Done → ready, In Progress/In Review → progress, Warning/Problem/Degraded/At risk → warning (5.1), Blocked/Failed → blocked, anything else → neutral). */
|
|
46
|
+
tone?: StatusTone | undefined;
|
|
47
|
+
className?: string | undefined;
|
|
48
|
+
}
|
|
49
|
+
export type FeedbackTone = "info" | "success" | "warning" | "danger";
|
|
50
|
+
export interface AlertProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title" | "role"> {
|
|
51
|
+
tone?: FeedbackTone | undefined;
|
|
52
|
+
/** Default: `alert` for warning and danger, `status` otherwise (5.8). Pass `status` for a standing notice in a
|
|
53
|
+
* warning or danger tone that shouldn't interrupt; `note` or `none` for one that isn't a live region. */
|
|
54
|
+
role?: "alert" | "status" | "note" | "none" | undefined;
|
|
55
|
+
/** Replaces the tone's icon (5.8): a name or your own element; always hidden from screen readers. */
|
|
56
|
+
icon?: IconInput | undefined;
|
|
57
|
+
title?: React$1.ReactNode | undefined;
|
|
58
|
+
children?: React$1.ReactNode | undefined;
|
|
59
|
+
/** Usually a secondary Button. */
|
|
60
|
+
action?: React$1.ReactNode | undefined;
|
|
61
|
+
/** Adds a close button. */
|
|
62
|
+
onDismiss?: (() => void) | undefined;
|
|
63
|
+
className?: string | undefined;
|
|
64
|
+
}
|
|
65
|
+
/** Other attributes (`id`, `data-*`, `aria-*`) go on the card's root (5.8). */
|
|
66
|
+
export interface CardProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "title"> {
|
|
67
|
+
title?: React$1.ReactNode | undefined;
|
|
68
|
+
description?: React$1.ReactNode | undefined;
|
|
69
|
+
/** Top-right, usually an IconButton. */
|
|
70
|
+
actions?: React$1.ReactNode | undefined;
|
|
71
|
+
footer?: React$1.ReactNode | undefined;
|
|
72
|
+
children?: React$1.ReactNode | undefined;
|
|
73
|
+
/** Default `enterprise`. `creative` is for marketing and onboarding only. */
|
|
74
|
+
variant?: "enterprise" | "creative" | undefined;
|
|
75
|
+
/** Heading level of the title. Default 3 — use 2 when cards sit directly under the page h1. */
|
|
76
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
|
|
77
|
+
/** Hover edge for clickable cards. */
|
|
78
|
+
interactive?: boolean | undefined;
|
|
79
|
+
as?: keyof React$1.JSX.IntrinsicElements | undefined;
|
|
80
|
+
className?: string | undefined;
|
|
81
|
+
/** id for the title element; the card is then labelled by it (aria-labelledby). */
|
|
82
|
+
titleId?: string | undefined;
|
|
83
|
+
}
|
|
5
84
|
/** ISO date string, `YYYY-MM-DD` (Gregorian — the era is display only). */
|
|
6
85
|
export type ISODate = string;
|
|
7
86
|
export interface DateDisplayOptions {
|
|
@@ -10,6 +89,24 @@ export interface DateDisplayOptions {
|
|
|
10
89
|
/** `buddhist` (พ.ศ.; default for th) or `gregory` (ค.ศ.; default for en and sv). */
|
|
11
90
|
calendar?: "buddhist" | "gregory" | undefined;
|
|
12
91
|
}
|
|
92
|
+
export type Tone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
93
|
+
export interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
|
|
94
|
+
tone?: Tone | undefined;
|
|
95
|
+
/** soft (default) · solid · outline */
|
|
96
|
+
variant?: "soft" | "solid" | "outline" | undefined;
|
|
97
|
+
icon?: IconInput | undefined;
|
|
98
|
+
}
|
|
99
|
+
export interface EmptyStateProps {
|
|
100
|
+
title: React$1.ReactNode;
|
|
101
|
+
description?: React$1.ReactNode | undefined;
|
|
102
|
+
icon?: IconInput | undefined;
|
|
103
|
+
/** One or two buttons. */
|
|
104
|
+
action?: React$1.ReactNode | undefined;
|
|
105
|
+
size?: "sm" | "md" | undefined;
|
|
106
|
+
bordered?: boolean | undefined;
|
|
107
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
|
|
108
|
+
className?: string | undefined;
|
|
109
|
+
}
|
|
13
110
|
export interface ThemeOptions {
|
|
14
111
|
/** The project's brand colour, #rgb or #rrggbb. Replaces AURA violet (links, focus ring, selection, info, progress, creative shadow in dark, mesh). */
|
|
15
112
|
brand: string;
|
|
@@ -173,8 +270,28 @@ export declare const breakpoints: {
|
|
|
173
270
|
lg: 1024;
|
|
174
271
|
xl: 1280;
|
|
175
272
|
};
|
|
273
|
+
/** The class list of a Button (5.8): put it on your own link or `<Link>` to make it look like one, e.g. in a Server
|
|
274
|
+
* Component — `<Link href="/renew" className={buttonClass({ variant: 'secondary' })}>Renew</Link>`. */
|
|
275
|
+
export declare function buttonClass(opts?: {
|
|
276
|
+
variant?: ButtonProps["variant"];
|
|
277
|
+
size?: ButtonProps["size"];
|
|
278
|
+
fullWidth?: boolean | undefined;
|
|
279
|
+
loading?: boolean | undefined;
|
|
280
|
+
className?: string | undefined;
|
|
281
|
+
}): string;
|
|
282
|
+
declare function ServerAlert(props: Omit<AlertProps, "onDismiss">): React$1.ReactElement;
|
|
283
|
+
declare function ServerCard(props: CardProps): React$1.ReactElement;
|
|
284
|
+
declare function ServerStatusPill(props: StatusPillProps): React$1.ReactElement;
|
|
285
|
+
declare function ServerBadge(props: BadgeProps): React$1.ReactElement;
|
|
286
|
+
declare function ServerEmptyState(props: EmptyStateProps): React$1.ReactElement;
|
|
287
|
+
export declare const Icon: React$1.ForwardRefExoticComponent<IconProps & React$1.RefAttributes<SVGSVGElement>>;
|
|
176
288
|
|
|
177
289
|
export {
|
|
290
|
+
ServerAlert as Alert,
|
|
291
|
+
ServerBadge as Badge,
|
|
292
|
+
ServerCard as Card,
|
|
293
|
+
ServerEmptyState as EmptyState,
|
|
294
|
+
ServerStatusPill as StatusPill,
|
|
178
295
|
scale as brandScale,
|
|
179
296
|
toneFor as statusTone,
|
|
180
297
|
};
|
package/dist/server/index.js
CHANGED
|
@@ -522,14 +522,14 @@ var STRINGS = {
|
|
|
522
522
|
|
|
523
523
|
// src/theme.ts
|
|
524
524
|
function hexToRgb(hex) {
|
|
525
|
-
let
|
|
526
|
-
if (
|
|
527
|
-
|
|
525
|
+
let h3 = String(hex).trim().replace("#", "");
|
|
526
|
+
if (h3.length === 3)
|
|
527
|
+
h3 = h3.split("").map(function(c) {
|
|
528
528
|
return c + c;
|
|
529
529
|
}).join("");
|
|
530
|
-
if (!/^[0-9a-f]{6}$/i.test(
|
|
530
|
+
if (!/^[0-9a-f]{6}$/i.test(h3)) throw new Error('createTheme: "' + hex + '" is not a #rgb or #rrggbb colour');
|
|
531
531
|
return [0, 2, 4].map(function(i) {
|
|
532
|
-
return parseInt(
|
|
532
|
+
return parseInt(h3.slice(i, i + 2), 16) / 255;
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
535
|
function rgbToHex(rgb) {
|
|
@@ -803,10 +803,212 @@ function colorSchemeScript(options) {
|
|
|
803
803
|
|
|
804
804
|
// src/breakpoints.ts
|
|
805
805
|
var breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280 };
|
|
806
|
+
|
|
807
|
+
// src/display.tsx
|
|
808
|
+
import * as React2 from "react";
|
|
809
|
+
|
|
810
|
+
// src/Icon.tsx
|
|
811
|
+
import * as React from "react";
|
|
812
|
+
|
|
813
|
+
// src/classes.ts
|
|
814
|
+
function cx() {
|
|
815
|
+
return Array.prototype.filter.call(arguments, Boolean).join(" ");
|
|
816
|
+
}
|
|
817
|
+
function omit(src, keys) {
|
|
818
|
+
const out = {};
|
|
819
|
+
for (const k in src)
|
|
820
|
+
if (Object.prototype.hasOwnProperty.call(src, k) && keys.indexOf(k) < 0)
|
|
821
|
+
out[k] = src[k];
|
|
822
|
+
return out;
|
|
823
|
+
}
|
|
824
|
+
var TONES = ["neutral", "accent", "success", "warning", "danger"];
|
|
825
|
+
function tone(t) {
|
|
826
|
+
return TONES.indexOf(t) >= 0 ? t : "neutral";
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
// src/Icon.tsx
|
|
830
|
+
var h = React.createElement;
|
|
831
|
+
var ICONS = { "check": [["path", { "d": "M20 6 9 17l-5-5" }]], "x": [["path", { "d": "M18 6 6 18" }], ["path", { "d": "m6 6 12 12" }]], "plus": [["path", { "d": "M5 12h14" }], ["path", { "d": "M12 5v14" }]], "minus": [["path", { "d": "M5 12h14" }]], "search": [["path", { "d": "m21 21-4.34-4.34" }], ["circle", { "cx": "11", "cy": "11", "r": "8" }]], "chevron-down": [["path", { "d": "m6 9 6 6 6-6" }]], "chevron-up": [["path", { "d": "m18 15-6-6-6 6" }]], "chevron-left": [["path", { "d": "m15 18-6-6 6-6" }]], "chevron-right": [["path", { "d": "m9 18 6-6-6-6" }]], "arrow-right": [["path", { "d": "M5 12h14" }], ["path", { "d": "m12 5 7 7-7 7" }]], "arrow-up-right": [["path", { "d": "M7 7h10v10" }], ["path", { "d": "M7 17 17 7" }]], "arrow-up-down": [["path", { "d": "m21 16-4 4-4-4" }], ["path", { "d": "M17 20V4" }], ["path", { "d": "m3 8 4-4 4 4" }], ["path", { "d": "M7 4v16" }]], "loader-circle": [["path", { "d": "M21 12a9 9 0 1 1-6.219-8.56" }]], "circle-alert": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["line", { "x1": "12", "x2": "12", "y1": "8", "y2": "12" }], ["line", { "x1": "12", "x2": "12.01", "y1": "16", "y2": "16" }]], "circle-check": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "m16 9-5.5 5.5L8 12" }]], "info": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 16v-4" }], ["path", { "d": "M12 8h.01" }]], "triangle-alert": [["path", { "d": "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }], ["path", { "d": "M12 9v4" }], ["path", { "d": "M12 17h.01" }]], "settings": [["path", { "d": "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "user": [["path", { "d": "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }], ["circle", { "cx": "12", "cy": "7", "r": "4" }]], "users": [["path", { "d": "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["path", { "d": "M16 3.128a4 4 0 0 1 0 7.744" }], ["path", { "d": "M22 21v-2a4 4 0 0 0-3-3.87" }], ["circle", { "cx": "9", "cy": "7", "r": "4" }]], "filter": [["path", { "d": "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }]], "ellipsis": [["circle", { "cx": "12", "cy": "12", "r": "1" }], ["circle", { "cx": "19", "cy": "12", "r": "1" }], ["circle", { "cx": "5", "cy": "12", "r": "1" }]], "external-link": [["path", { "d": "M15 3h6v6" }], ["path", { "d": "M10 14 21 3" }], ["path", { "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }]], "copy": [["rect", { "width": "14", "height": "14", "x": "8", "y": "8", "rx": "2", "ry": "2" }], ["path", { "d": "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }]], "trash-2": [["path", { "d": "M10 11v6" }], ["path", { "d": "M14 11v6" }], ["path", { "d": "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }], ["path", { "d": "M3 6h18" }], ["path", { "d": "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]], "pencil": [["path", { "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }], ["path", { "d": "m15 5 4 4" }]], "download": [["path", { "d": "M12 15V3" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }], ["path", { "d": "m7 10 5 5 5-5" }]], "upload": [["path", { "d": "M12 3v12" }], ["path", { "d": "m17 8-5-5-5 5" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }]], "calendar": [["path", { "d": "M8 2v3" }], ["path", { "d": "M16 2v3" }], ["rect", { "x": "3", "y": "3", "width": "18", "height": "18", "rx": "2" }], ["path", { "d": "M3 9h18" }]], "bell": [["path", { "d": "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { "d": "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }]], "menu": [["path", { "d": "M4 5h16" }], ["path", { "d": "M4 12h16" }], ["path", { "d": "M4 19h16" }]], "eye": [["path", { "d": "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "log-out": [["path", { "d": "m16 17 5-5-5-5" }], ["path", { "d": "M21 12H9" }], ["path", { "d": "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]], "circle": [["circle", { "cx": "12", "cy": "12", "r": "10" }]], "circle-dot-dashed": [["path", { "d": "M10.1 2.18a9.93 9.93 0 0 1 3.8 0" }], ["path", { "d": "M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7" }], ["path", { "d": "M21.82 10.1a9.93 9.93 0 0 1 0 3.8" }], ["path", { "d": "M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69" }], ["path", { "d": "M13.9 21.82a9.94 9.94 0 0 1-3.8 0" }], ["path", { "d": "M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7" }], ["path", { "d": "M2.18 13.9a9.93 9.93 0 0 1 0-3.8" }], ["path", { "d": "M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69" }], ["circle", { "cx": "12", "cy": "12", "r": "1" }]], "ban": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M4.929 4.929 19.07 19.071" }]], "arrow-up": [["path", { "d": "m5 12 7-7 7 7" }], ["path", { "d": "M12 19V5" }]], "arrow-down": [["path", { "d": "M12 5v14" }], ["path", { "d": "m19 12-7 7-7-7" }]], "inbox": [["polyline", { "points": "22 12 16 12 14 15 10 15 8 12 2 12" }], ["path", { "d": "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }]], "pin": [["path", { "d": "M12 17v5" }], ["path", { "d": "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }]], "pin-off": [["path", { "d": "M12 17v5" }], ["path", { "d": "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" }], ["path", { "d": "m2 2 20 20" }], ["path", { "d": "M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" }]], "eye-off": [["path", { "d": "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }], ["path", { "d": "M14.084 14.158a3 3 0 0 1-4.242-4.242" }], ["path", { "d": "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }], ["path", { "d": "m2 2 20 20" }]], "columns-3": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "M15 3v18" }]], "arrow-left": [["path", { "d": "m12 19-7-7 7-7" }], ["path", { "d": "M19 12H5" }]], "rotate-ccw": [["path", { "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { "d": "M3 3v5h5" }]], "house": [["path", { "d": "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" }], ["path", { "d": "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }]], "layout-dashboard": [["rect", { "width": "7", "height": "9", "x": "3", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "14", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "9", "x": "14", "y": "12", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "3", "y": "16", "rx": "1" }]], "folder": [["path", { "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }]], "chart-column": [["path", { "d": "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { "d": "M18 17V9" }], ["path", { "d": "M13 17V5" }], ["path", { "d": "M8 17v-3" }]], "file-text": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { "d": "M10 9H8" }], ["path", { "d": "M16 13H8" }], ["path", { "d": "M16 17H8" }]], "mail": [["path", { "d": "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" }], ["rect", { "x": "2", "y": "4", "width": "20", "height": "16", "rx": "2" }]], "lock": [["rect", { "width": "18", "height": "11", "x": "3", "y": "11", "rx": "2", "ry": "2" }], ["path", { "d": "M7 11V7a5 5 0 0 1 10 0v4" }]], "clock": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 6v6l4 2" }]], "trending-up": [["path", { "d": "M16 7h6v6" }], ["path", { "d": "m22 7-8.5 8.5-5-5L2 17" }]], "trending-down": [["path", { "d": "M16 17h6v-6" }], ["path", { "d": "m22 17-8.5-8.5-5 5L2 7" }]], "image": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }], ["circle", { "cx": "9", "cy": "9", "r": "2" }], ["path", { "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]], "paperclip": [["path", { "d": "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }]], "cloud-upload": [["path", { "d": "M12 13v8" }], ["path", { "d": "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { "d": "m8 17 4-4 4 4" }]], "file": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }]], "sun": [["circle", { "cx": "12", "cy": "12", "r": "4" }], ["path", { "d": "M12 2v2" }], ["path", { "d": "M12 20v2" }], ["path", { "d": "m4.93 4.93 1.41 1.41" }], ["path", { "d": "m17.66 17.66 1.41 1.41" }], ["path", { "d": "M2 12h2" }], ["path", { "d": "M20 12h2" }], ["path", { "d": "m6.34 17.66-1.41 1.41" }], ["path", { "d": "m19.07 4.93-1.41 1.41" }]], "moon": [["path", { "d": "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }]], "monitor": [["rect", { "width": "20", "height": "14", "x": "2", "y": "3", "rx": "2" }], ["line", { "x1": "8", "x2": "16", "y1": "21", "y2": "21" }], ["line", { "x1": "12", "x2": "12", "y1": "17", "y2": "21" }]], "panel-left-close": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m16 15-3-3 3-3" }]], "panel-left-open": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m14 9 3 3-3 3" }]], "server": [["rect", { "width": "20", "height": "8", "x": "2", "y": "2", "rx": "2", "ry": "2" }], ["rect", { "width": "20", "height": "8", "x": "2", "y": "14", "rx": "2", "ry": "2" }], ["line", { "x1": "6", "x2": "6.01", "y1": "6", "y2": "6" }], ["line", { "x1": "6", "x2": "6.01", "y1": "18", "y2": "18" }]], "globe": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }], ["path", { "d": "M2 12h20" }]], "activity": [["path", { "d": "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" }]], "shield-alert": [["path", { "d": "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { "d": "M12 8v4" }], ["path", { "d": "M12 16h.01" }]], "phone": [["path", { "d": "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" }]], "wrench": [["path", { "d": "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" }]] };
|
|
832
|
+
var SIZES = { sm: 16, md: 20, lg: 24 };
|
|
833
|
+
var Icon = React.forwardRef(function Icon2(props, ref) {
|
|
834
|
+
const size = SIZES[props.size] || props.size || 16;
|
|
835
|
+
if (React.isValidElement(props.name)) {
|
|
836
|
+
return /* @__PURE__ */ React.createElement(
|
|
837
|
+
"span",
|
|
838
|
+
{
|
|
839
|
+
className: cx("aura-icon", "aura-icon--custom", props.className),
|
|
840
|
+
style: { width: size, height: size, ["--aura-icon-stroke"]: props.strokeWidth || 2 },
|
|
841
|
+
...props.label ? { role: "img", "aria-label": props.label } : { "aria-hidden": true }
|
|
842
|
+
},
|
|
843
|
+
props.name
|
|
844
|
+
);
|
|
845
|
+
}
|
|
846
|
+
const shapes = ICONS[props.name];
|
|
847
|
+
if (!shapes) return null;
|
|
848
|
+
const a11y = props.label ? { role: "img", "aria-label": props.label } : { "aria-hidden": true, focusable: "false" };
|
|
849
|
+
return /* @__PURE__ */ React.createElement(
|
|
850
|
+
"svg",
|
|
851
|
+
{
|
|
852
|
+
ref,
|
|
853
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
854
|
+
width: size,
|
|
855
|
+
height: size,
|
|
856
|
+
viewBox: "0 0 24 24",
|
|
857
|
+
fill: "none",
|
|
858
|
+
stroke: "currentColor",
|
|
859
|
+
strokeWidth: props.strokeWidth || 2,
|
|
860
|
+
strokeLinecap: "round",
|
|
861
|
+
strokeLinejoin: "round",
|
|
862
|
+
className: cx("aura-icon", props.className),
|
|
863
|
+
...a11y
|
|
864
|
+
},
|
|
865
|
+
shapes.map(function(s, i) {
|
|
866
|
+
const attrs = { key: i };
|
|
867
|
+
for (const k in s[1]) attrs[k === "stroke-width" ? "strokeWidth" : k] = s[1][k];
|
|
868
|
+
return h(s[0], attrs);
|
|
869
|
+
})
|
|
870
|
+
);
|
|
871
|
+
});
|
|
872
|
+
var iconNames = Object.keys(ICONS);
|
|
873
|
+
|
|
874
|
+
// src/display.tsx
|
|
875
|
+
var h2 = React2.createElement;
|
|
876
|
+
var ALERT_ICON = {
|
|
877
|
+
info: "info",
|
|
878
|
+
success: "circle-check",
|
|
879
|
+
warning: "triangle-alert",
|
|
880
|
+
danger: "circle-alert"
|
|
881
|
+
};
|
|
882
|
+
function alertElement(props, ref, close) {
|
|
883
|
+
const tone2 = props.tone || "info";
|
|
884
|
+
const rest = omit(props, ["tone", "title", "children", "action", "onDismiss", "className", "role", "icon"]);
|
|
885
|
+
return /* @__PURE__ */ React2.createElement(
|
|
886
|
+
"div",
|
|
887
|
+
{
|
|
888
|
+
...rest,
|
|
889
|
+
ref,
|
|
890
|
+
className: cx("aura-alert", "aura-alert--" + tone2, props.className),
|
|
891
|
+
role: props.role || (tone2 === "danger" || tone2 === "warning" ? "alert" : "status")
|
|
892
|
+
},
|
|
893
|
+
/* @__PURE__ */ React2.createElement(Icon, { name: props.icon || ALERT_ICON[tone2], className: "aura-alert__icon" }),
|
|
894
|
+
/* @__PURE__ */ React2.createElement("div", { className: "aura-alert__body" }, props.title ? /* @__PURE__ */ React2.createElement("p", { className: "aura-alert__title" }, props.title) : null, props.children ? /* @__PURE__ */ React2.createElement("div", { className: "aura-alert__text" }, props.children) : null, props.action ? /* @__PURE__ */ React2.createElement("div", { className: "aura-alert__action" }, props.action) : null),
|
|
895
|
+
close
|
|
896
|
+
);
|
|
897
|
+
}
|
|
898
|
+
function cardElement(props, ref) {
|
|
899
|
+
const creative = props.variant === "creative";
|
|
900
|
+
const rest = omit(props, [
|
|
901
|
+
"title",
|
|
902
|
+
"description",
|
|
903
|
+
"actions",
|
|
904
|
+
"footer",
|
|
905
|
+
"children",
|
|
906
|
+
"variant",
|
|
907
|
+
"headingLevel",
|
|
908
|
+
"interactive",
|
|
909
|
+
"as",
|
|
910
|
+
"className",
|
|
911
|
+
"titleId"
|
|
912
|
+
]);
|
|
913
|
+
return h2(
|
|
914
|
+
props.as || "section",
|
|
915
|
+
Object.assign({}, rest, {
|
|
916
|
+
ref,
|
|
917
|
+
className: cx(
|
|
918
|
+
"aura-card",
|
|
919
|
+
creative && "aura-card--creative",
|
|
920
|
+
props.interactive && "is-interactive",
|
|
921
|
+
props.className
|
|
922
|
+
),
|
|
923
|
+
/* A titled card is labelled by its title; otherwise the caller's aria-labelledby stays (5.8). */
|
|
924
|
+
"aria-labelledby": props.title && props.titleId ? props.titleId : props["aria-labelledby"]
|
|
925
|
+
}),
|
|
926
|
+
props.title || props.actions ? /* @__PURE__ */ React2.createElement("div", { className: "aura-card__head" }, /* @__PURE__ */ React2.createElement("div", { className: "aura-card__heading" }, props.title ? h2("h" + (props.headingLevel || 3), { className: "aura-card__title", id: props.titleId }, props.title) : null, props.description ? /* @__PURE__ */ React2.createElement("p", { className: "aura-card__desc" }, props.description) : null), props.actions ? /* @__PURE__ */ React2.createElement("div", { className: "aura-card__actions" }, props.actions) : null) : null,
|
|
927
|
+
props.children ? /* @__PURE__ */ React2.createElement("div", { className: "aura-card__body" }, props.children) : null,
|
|
928
|
+
props.footer ? /* @__PURE__ */ React2.createElement("div", { className: "aura-card__foot" }, props.footer) : null
|
|
929
|
+
);
|
|
930
|
+
}
|
|
931
|
+
var PILL_ICON = {
|
|
932
|
+
neutral: "circle",
|
|
933
|
+
progress: "circle-dot-dashed",
|
|
934
|
+
ready: "circle-check",
|
|
935
|
+
warning: "triangle-alert",
|
|
936
|
+
blocked: "ban"
|
|
937
|
+
};
|
|
938
|
+
function statusPillElement(props, ref) {
|
|
939
|
+
const tone2 = props.tone || toneFor(props.children);
|
|
940
|
+
const rest = omit(props, ["tone", "className", "children"]);
|
|
941
|
+
return /* @__PURE__ */ React2.createElement("span", { ...rest, ref, className: cx("aura-pill", "aura-pill--" + tone2, props.className) }, /* @__PURE__ */ React2.createElement(Icon, { name: PILL_ICON[tone2] || "circle", size: 12 }), props.children);
|
|
942
|
+
}
|
|
943
|
+
function badgeElement(props, ref) {
|
|
944
|
+
const rest = omit(props, ["tone", "variant", "icon", "className", "children"]);
|
|
945
|
+
return /* @__PURE__ */ React2.createElement(
|
|
946
|
+
"span",
|
|
947
|
+
{
|
|
948
|
+
...rest,
|
|
949
|
+
ref,
|
|
950
|
+
className: cx(
|
|
951
|
+
"aura-badge",
|
|
952
|
+
"aura-badge--" + tone(props.tone),
|
|
953
|
+
props.variant === "solid" && "is-solid",
|
|
954
|
+
props.variant === "outline" && "is-outline",
|
|
955
|
+
props.className
|
|
956
|
+
)
|
|
957
|
+
},
|
|
958
|
+
props.icon ? /* @__PURE__ */ React2.createElement(Icon, { name: props.icon, size: 12 }) : null,
|
|
959
|
+
props.children
|
|
960
|
+
);
|
|
961
|
+
}
|
|
962
|
+
function emptyStateElement(props, ref) {
|
|
963
|
+
const HT = "h" + (props.headingLevel || 3);
|
|
964
|
+
return /* @__PURE__ */ React2.createElement(
|
|
965
|
+
"div",
|
|
966
|
+
{
|
|
967
|
+
ref,
|
|
968
|
+
className: cx("aura-empty", props.size === "sm" && "is-sm", props.bordered && "is-bordered", props.className)
|
|
969
|
+
},
|
|
970
|
+
/* @__PURE__ */ React2.createElement("span", { className: "aura-empty__icon", "aria-hidden": true }, /* @__PURE__ */ React2.createElement(Icon, { name: props.icon || "inbox", size: props.size === "sm" ? "md" : "lg" })),
|
|
971
|
+
/* @__PURE__ */ React2.createElement(HT, { className: "aura-empty__title" }, props.title),
|
|
972
|
+
props.description ? /* @__PURE__ */ React2.createElement("p", { className: "aura-empty__text" }, props.description) : null,
|
|
973
|
+
props.action ? /* @__PURE__ */ React2.createElement("div", { className: "aura-empty__action" }, props.action) : null
|
|
974
|
+
);
|
|
975
|
+
}
|
|
976
|
+
function buttonClass(opts = {}) {
|
|
977
|
+
return cx(
|
|
978
|
+
"aura-btn",
|
|
979
|
+
"aura-btn--" + (opts.variant || "primary"),
|
|
980
|
+
opts.size === "sm" && "aura-btn--sm",
|
|
981
|
+
opts.fullWidth && "aura-btn--full",
|
|
982
|
+
opts.loading && "is-loading",
|
|
983
|
+
opts.className
|
|
984
|
+
);
|
|
985
|
+
}
|
|
986
|
+
function ServerAlert(props) {
|
|
987
|
+
return alertElement(props, void 0, null);
|
|
988
|
+
}
|
|
989
|
+
function ServerCard(props) {
|
|
990
|
+
return cardElement(props, void 0);
|
|
991
|
+
}
|
|
992
|
+
function ServerStatusPill(props) {
|
|
993
|
+
return statusPillElement(props, void 0);
|
|
994
|
+
}
|
|
995
|
+
function ServerBadge(props) {
|
|
996
|
+
return badgeElement(props, void 0);
|
|
997
|
+
}
|
|
998
|
+
function ServerEmptyState(props) {
|
|
999
|
+
return emptyStateElement(props, void 0);
|
|
1000
|
+
}
|
|
806
1001
|
export {
|
|
1002
|
+
ServerAlert as Alert,
|
|
1003
|
+
ServerBadge as Badge,
|
|
1004
|
+
ServerCard as Card,
|
|
1005
|
+
ServerEmptyState as EmptyState,
|
|
1006
|
+
Icon,
|
|
807
1007
|
STRINGS,
|
|
1008
|
+
ServerStatusPill as StatusPill,
|
|
808
1009
|
scale as brandScale,
|
|
809
1010
|
breakpoints,
|
|
1011
|
+
buttonClass,
|
|
810
1012
|
colorSchemeScript,
|
|
811
1013
|
contrast,
|
|
812
1014
|
createTheme,
|
package/dist/styles.css
CHANGED
|
@@ -1476,6 +1476,40 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1476
1476
|
.aura-tbl .is-numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
1477
1477
|
.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); }
|
|
1478
1478
|
.aura-tbl-wrap:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: 2px; }
|
|
1479
|
+
/* Stacked rows (5.8, Chamber-OS 67): below `stackBelow` (the table's own box: sm 640px, md 768px) each body row is a
|
|
1480
|
+
* card and each cell shows its column label. The column headers stay for screen readers (visually hidden) and the
|
|
1481
|
+
* table keeps explicit roles. The box is a size container, so it needs a width of its own. */
|
|
1482
|
+
.aura-tbl-wrap.is-stackable { container: aura-tbl / inline-size; width: 100%; }
|
|
1483
|
+
@container aura-tbl (width < 768px) {
|
|
1484
|
+
.aura-tbl--stack-md, .aura-tbl--stack-md > .aura-tbl__body, .aura-tbl--stack-md > .aura-tbl__foot, .aura-tbl--stack-md > .aura-tbl__body > .aura-tbl__row, .aura-tbl--stack-md > .aura-tbl__foot > .aura-tbl__row, .aura-tbl--stack-md > * > .aura-tbl__row > .aura-tbl__th, .aura-tbl--stack-md > * > .aura-tbl__row > .aura-tbl__td { display: block; }
|
|
1485
|
+
.aura-tbl--stack-md > .aura-tbl__head { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
1486
|
+
.aura-tbl--stack-md > .aura-tbl__caption { display: block; padding: var(--aura-space-4) var(--aura-space-4) 0; }
|
|
1487
|
+
.aura-tbl--stack-md > .aura-tbl__body > .aura-tbl__row, .aura-tbl--stack-md > .aura-tbl__foot > .aura-tbl__row { padding: var(--aura-space-3) var(--aura-space-4); }
|
|
1488
|
+
.aura-tbl-wrap[data-density='compact'] > .aura-tbl--stack-md > * > .aura-tbl__row { padding-top: var(--aura-space-2); padding-bottom: var(--aura-space-2); }
|
|
1489
|
+
.aura-tbl--stack-md > .aura-tbl__body > .aura-tbl__row + .aura-tbl__row, .aura-tbl--stack-md > .aura-tbl__foot > .aura-tbl__row:first-child { border-top: 1px solid var(--aura-border-default); }
|
|
1490
|
+
.aura-tbl--stack-md > * > .aura-tbl__row > .aura-tbl__th, .aura-tbl--stack-md > * > .aura-tbl__row > .aura-tbl__td { padding: 0; border-top: 0; background: none; text-align: start; white-space: normal; }
|
|
1491
|
+
.aura-tbl--stack-md > * > .aura-tbl__row > * + * { margin-top: var(--aura-space-2); }
|
|
1492
|
+
.aura-tbl--stack-md > .aura-tbl__body > .aura-tbl__row > .aura-tbl__th { font-size: 14px; font-weight: 600; }
|
|
1493
|
+
.aura-tbl--stack-md > * > .aura-tbl__row > .aura-tbl__td[data-label]::before {
|
|
1494
|
+
content: attr(data-label); content: attr(data-label) / '';
|
|
1495
|
+
display: block; margin-bottom: 2px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 400; color: var(--aura-fg-secondary);
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
@container aura-tbl (width < 640px) {
|
|
1499
|
+
.aura-tbl--stack-sm, .aura-tbl--stack-sm > .aura-tbl__body, .aura-tbl--stack-sm > .aura-tbl__foot, .aura-tbl--stack-sm > .aura-tbl__body > .aura-tbl__row, .aura-tbl--stack-sm > .aura-tbl__foot > .aura-tbl__row, .aura-tbl--stack-sm > * > .aura-tbl__row > .aura-tbl__th, .aura-tbl--stack-sm > * > .aura-tbl__row > .aura-tbl__td { display: block; }
|
|
1500
|
+
.aura-tbl--stack-sm > .aura-tbl__head { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
1501
|
+
.aura-tbl--stack-sm > .aura-tbl__caption { display: block; padding: var(--aura-space-4) var(--aura-space-4) 0; }
|
|
1502
|
+
.aura-tbl--stack-sm > .aura-tbl__body > .aura-tbl__row, .aura-tbl--stack-sm > .aura-tbl__foot > .aura-tbl__row { padding: var(--aura-space-3) var(--aura-space-4); }
|
|
1503
|
+
.aura-tbl-wrap[data-density='compact'] > .aura-tbl--stack-sm > * > .aura-tbl__row { padding-top: var(--aura-space-2); padding-bottom: var(--aura-space-2); }
|
|
1504
|
+
.aura-tbl--stack-sm > .aura-tbl__body > .aura-tbl__row + .aura-tbl__row, .aura-tbl--stack-sm > .aura-tbl__foot > .aura-tbl__row:first-child { border-top: 1px solid var(--aura-border-default); }
|
|
1505
|
+
.aura-tbl--stack-sm > * > .aura-tbl__row > .aura-tbl__th, .aura-tbl--stack-sm > * > .aura-tbl__row > .aura-tbl__td { padding: 0; border-top: 0; background: none; text-align: start; white-space: normal; }
|
|
1506
|
+
.aura-tbl--stack-sm > * > .aura-tbl__row > * + * { margin-top: var(--aura-space-2); }
|
|
1507
|
+
.aura-tbl--stack-sm > .aura-tbl__body > .aura-tbl__row > .aura-tbl__th { font-size: 14px; font-weight: 600; }
|
|
1508
|
+
.aura-tbl--stack-sm > * > .aura-tbl__row > .aura-tbl__td[data-label]::before {
|
|
1509
|
+
content: attr(data-label); content: attr(data-label) / '';
|
|
1510
|
+
display: block; margin-bottom: 2px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 400; color: var(--aura-fg-secondary);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1479
1513
|
|
|
1480
1514
|
/* ---------- 4.20: DataTable width queries and cards, one markup ---------- */
|
|
1481
1515
|
/* Each .aura-table-q is the table's width × 10000 / its threshold (DataTable.tsx, Q), so `(width < 9999.5px)` is true
|
package/dist/styles.layer.css
CHANGED
|
@@ -1478,6 +1478,40 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1478
1478
|
.aura-tbl .is-numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
1479
1479
|
.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); }
|
|
1480
1480
|
.aura-tbl-wrap:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: 2px; }
|
|
1481
|
+
/* Stacked rows (5.8, Chamber-OS 67): below `stackBelow` (the table's own box: sm 640px, md 768px) each body row is a
|
|
1482
|
+
* card and each cell shows its column label. The column headers stay for screen readers (visually hidden) and the
|
|
1483
|
+
* table keeps explicit roles. The box is a size container, so it needs a width of its own. */
|
|
1484
|
+
.aura-tbl-wrap.is-stackable { container: aura-tbl / inline-size; width: 100%; }
|
|
1485
|
+
@container aura-tbl (width < 768px) {
|
|
1486
|
+
.aura-tbl--stack-md, .aura-tbl--stack-md > .aura-tbl__body, .aura-tbl--stack-md > .aura-tbl__foot, .aura-tbl--stack-md > .aura-tbl__body > .aura-tbl__row, .aura-tbl--stack-md > .aura-tbl__foot > .aura-tbl__row, .aura-tbl--stack-md > * > .aura-tbl__row > .aura-tbl__th, .aura-tbl--stack-md > * > .aura-tbl__row > .aura-tbl__td { display: block; }
|
|
1487
|
+
.aura-tbl--stack-md > .aura-tbl__head { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
1488
|
+
.aura-tbl--stack-md > .aura-tbl__caption { display: block; padding: var(--aura-space-4) var(--aura-space-4) 0; }
|
|
1489
|
+
.aura-tbl--stack-md > .aura-tbl__body > .aura-tbl__row, .aura-tbl--stack-md > .aura-tbl__foot > .aura-tbl__row { padding: var(--aura-space-3) var(--aura-space-4); }
|
|
1490
|
+
.aura-tbl-wrap[data-density='compact'] > .aura-tbl--stack-md > * > .aura-tbl__row { padding-top: var(--aura-space-2); padding-bottom: var(--aura-space-2); }
|
|
1491
|
+
.aura-tbl--stack-md > .aura-tbl__body > .aura-tbl__row + .aura-tbl__row, .aura-tbl--stack-md > .aura-tbl__foot > .aura-tbl__row:first-child { border-top: 1px solid var(--aura-border-default); }
|
|
1492
|
+
.aura-tbl--stack-md > * > .aura-tbl__row > .aura-tbl__th, .aura-tbl--stack-md > * > .aura-tbl__row > .aura-tbl__td { padding: 0; border-top: 0; background: none; text-align: start; white-space: normal; }
|
|
1493
|
+
.aura-tbl--stack-md > * > .aura-tbl__row > * + * { margin-top: var(--aura-space-2); }
|
|
1494
|
+
.aura-tbl--stack-md > .aura-tbl__body > .aura-tbl__row > .aura-tbl__th { font-size: 14px; font-weight: 600; }
|
|
1495
|
+
.aura-tbl--stack-md > * > .aura-tbl__row > .aura-tbl__td[data-label]::before {
|
|
1496
|
+
content: attr(data-label); content: attr(data-label) / '';
|
|
1497
|
+
display: block; margin-bottom: 2px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 400; color: var(--aura-fg-secondary);
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
@container aura-tbl (width < 640px) {
|
|
1501
|
+
.aura-tbl--stack-sm, .aura-tbl--stack-sm > .aura-tbl__body, .aura-tbl--stack-sm > .aura-tbl__foot, .aura-tbl--stack-sm > .aura-tbl__body > .aura-tbl__row, .aura-tbl--stack-sm > .aura-tbl__foot > .aura-tbl__row, .aura-tbl--stack-sm > * > .aura-tbl__row > .aura-tbl__th, .aura-tbl--stack-sm > * > .aura-tbl__row > .aura-tbl__td { display: block; }
|
|
1502
|
+
.aura-tbl--stack-sm > .aura-tbl__head { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
1503
|
+
.aura-tbl--stack-sm > .aura-tbl__caption { display: block; padding: var(--aura-space-4) var(--aura-space-4) 0; }
|
|
1504
|
+
.aura-tbl--stack-sm > .aura-tbl__body > .aura-tbl__row, .aura-tbl--stack-sm > .aura-tbl__foot > .aura-tbl__row { padding: var(--aura-space-3) var(--aura-space-4); }
|
|
1505
|
+
.aura-tbl-wrap[data-density='compact'] > .aura-tbl--stack-sm > * > .aura-tbl__row { padding-top: var(--aura-space-2); padding-bottom: var(--aura-space-2); }
|
|
1506
|
+
.aura-tbl--stack-sm > .aura-tbl__body > .aura-tbl__row + .aura-tbl__row, .aura-tbl--stack-sm > .aura-tbl__foot > .aura-tbl__row:first-child { border-top: 1px solid var(--aura-border-default); }
|
|
1507
|
+
.aura-tbl--stack-sm > * > .aura-tbl__row > .aura-tbl__th, .aura-tbl--stack-sm > * > .aura-tbl__row > .aura-tbl__td { padding: 0; border-top: 0; background: none; text-align: start; white-space: normal; }
|
|
1508
|
+
.aura-tbl--stack-sm > * > .aura-tbl__row > * + * { margin-top: var(--aura-space-2); }
|
|
1509
|
+
.aura-tbl--stack-sm > .aura-tbl__body > .aura-tbl__row > .aura-tbl__th { font-size: 14px; font-weight: 600; }
|
|
1510
|
+
.aura-tbl--stack-sm > * > .aura-tbl__row > .aura-tbl__td[data-label]::before {
|
|
1511
|
+
content: attr(data-label); content: attr(data-label) / '';
|
|
1512
|
+
display: block; margin-bottom: 2px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 400; color: var(--aura-fg-secondary);
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1481
1515
|
|
|
1482
1516
|
/* ---------- 4.20: DataTable width queries and cards, one markup ---------- */
|
|
1483
1517
|
/* Each .aura-table-q is the table's width × 10000 / its threshold (DataTable.tsx, Q), so `(width < 9999.5px)` is true
|
package/package.json
CHANGED