@aiquants/console-ui 0.1.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.
@@ -0,0 +1,329 @@
1
+ import { ConsoleUiLocale, ConsoleUiLabels, ColumnWidth, ResourceFailure, SpaceToken, FgRole, TypeToken, ResourceOutcome, KeysetPage, NextPage, PagedState, PagedContent, ResourceState } from "./core.js";
2
+ export { AccentRole, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, ColorToken, ColumnWidthSource, CommandOutcome, ConsoleUiTokens, ContrastRole, MasterDetailOptions, MasterDetailPlan, PageFailure, PagedValue, RadiusToken, ReloadCause, SizeToken, Srgb, StrokeToken, SurfaceRole, TOKENS, TileGridPlan, TileGridStep, TokenName, WeightToken, ZonedTimeError, ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, contrastRatio, cssVar, flatMapOutcome, formatCount, formatInstant, hexToSrgb, keepLastGood, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, resolveConsoleUiLabels, settleFirstPage, settlePage, tableMinInlinePx, textWidthEm, tileGridPlan, toOffsetIso, toWallTime } from "./core.js";
3
+ import * as react from "react";
4
+ import { ReactNode, MouseEvent, Ref, RefObject, RefCallback, KeyboardEvent } from "react";
5
+ type DataAttributes = Readonly<Record<`data-${string}`, string | number | boolean>>;
6
+ type ButtonVariant = "primary" | "secondary" | "danger" | "link";
7
+ type ButtonProps = {
8
+ readonly variant: ButtonVariant;
9
+ readonly children: ReactNode;
10
+ readonly testId: string;
11
+ readonly type?: "button" | "submit";
12
+ readonly onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
13
+ readonly unavailable?: {
14
+ readonly reason: string;
15
+ };
16
+ readonly expanded?: boolean;
17
+ readonly controls?: string;
18
+ readonly ref?: Ref<HTMLButtonElement>;
19
+ readonly dataAttributes?: DataAttributes;
20
+ } & ({
21
+ readonly busy?: undefined;
22
+ readonly busyLabel?: undefined;
23
+ } | {
24
+ readonly busy: boolean;
25
+ readonly busyLabel: string;
26
+ });
27
+ declare const Button: ({ variant, children, testId, type, onClick, unavailable, expanded, controls, ref, dataAttributes, busy, busyLabel }: ButtonProps) => react.JSX.Element;
28
+ type LinkProps = {
29
+ readonly onNavigate: () => void;
30
+ readonly children: ReactNode;
31
+ readonly testId: string;
32
+ readonly ref?: Ref<HTMLButtonElement>;
33
+ };
34
+ declare const Link: ({ onNavigate, children, testId, ref }: LinkProps) => react.JSX.Element;
35
+ type CardProps = {
36
+ readonly id?: string;
37
+ readonly title: string;
38
+ readonly description?: ReactNode;
39
+ readonly actions?: ReactNode;
40
+ readonly testId: string;
41
+ readonly headingRef?: Ref<HTMLHeadingElement>;
42
+ readonly ref?: Ref<HTMLElement>;
43
+ readonly dataAttributes?: DataAttributes;
44
+ readonly children: ReactNode;
45
+ };
46
+ declare const Card: ({ id, title, description, actions, testId, headingRef, ref, dataAttributes, children }: CardProps) => react.JSX.Element;
47
+ type CardSectionProps = {
48
+ readonly id?: string;
49
+ readonly title: string;
50
+ readonly subtitle?: ReactNode;
51
+ readonly region?: boolean;
52
+ readonly testId: string;
53
+ readonly headingRef?: Ref<HTMLHeadingElement>;
54
+ readonly ref?: Ref<HTMLElement>;
55
+ readonly dataAttributes?: DataAttributes;
56
+ readonly children: ReactNode;
57
+ };
58
+ declare const CardSection: ({ id, title, subtitle, region, testId, headingRef, ref, dataAttributes, children }: CardSectionProps) => react.JSX.Element;
59
+ type ComparisonLayout = "table" | "stack";
60
+ type ComparisonAttribute = {
61
+ readonly key: string;
62
+ readonly label: string;
63
+ };
64
+ type ComparisonColumn = {
65
+ readonly key: string;
66
+ readonly heading: string;
67
+ readonly cells: Readonly<Record<string, (layout: ComparisonLayout) => ReactNode>>;
68
+ };
69
+ type ComparisonGridProps = {
70
+ readonly caption: string;
71
+ readonly attributes: readonly ComparisonAttribute[];
72
+ readonly columns: readonly ComparisonColumn[];
73
+ readonly attributePx: number;
74
+ readonly columnMinPx: number;
75
+ readonly testId: string;
76
+ };
77
+ declare const ComparisonGrid: ({ caption, attributes, columns, attributePx, columnMinPx, testId }: ComparisonGridProps) => react.JSX.Element;
78
+ type ConsoleUiContextValue = {
79
+ readonly locale: ConsoleUiLocale;
80
+ readonly formatLocale: string;
81
+ readonly timeZone: string;
82
+ readonly labels: ConsoleUiLabels;
83
+ readonly announce: (text: string) => void;
84
+ };
85
+ declare const ANNOUNCE_SETTLE_MS = 150;
86
+ type ConsoleUiRootProps = {
87
+ readonly locale: ConsoleUiLocale;
88
+ readonly formatLocale: string;
89
+ readonly timeZone: string;
90
+ readonly testId: string;
91
+ readonly children: ReactNode;
92
+ };
93
+ declare const ConsoleUiRoot: ({ locale, formatLocale, timeZone, testId, children }: ConsoleUiRootProps) => react.JSX.Element;
94
+ declare const useConsoleUi: () => ConsoleUiContextValue;
95
+ declare const useAnnounce: () => ((text: string) => void);
96
+ type ColumnDef<T> = {
97
+ readonly key: string;
98
+ readonly header: string;
99
+ readonly width: ColumnWidth;
100
+ readonly align: "start" | "end";
101
+ readonly cell: (row: T) => ReactNode;
102
+ };
103
+ type DataTableProps<T> = {
104
+ readonly caption: string;
105
+ readonly captionHidden: boolean;
106
+ readonly columns: readonly ColumnDef<T>[];
107
+ readonly rows: readonly T[];
108
+ readonly rowKey: (row: T) => string;
109
+ readonly rowTestId: string;
110
+ readonly rowData?: (row: T) => DataAttributes;
111
+ readonly rowSize: "row" | "row-control";
112
+ readonly empty: string;
113
+ readonly testId: string;
114
+ readonly ref?: Ref<HTMLDivElement>;
115
+ };
116
+ declare const DataTable: <T>({ caption, captionHidden, columns, rows, rowKey, rowTestId, rowData, rowSize, empty, testId, ref }: DataTableProps<T>) => react.JSX.Element;
117
+ type FieldControl = {
118
+ readonly id: string;
119
+ readonly "aria-describedby": string | undefined;
120
+ readonly "aria-invalid": true | undefined;
121
+ };
122
+ type FieldTexts = {
123
+ readonly label: string;
124
+ readonly description?: string;
125
+ readonly error?: string;
126
+ };
127
+ type FieldProps = FieldTexts & {
128
+ readonly testId: string;
129
+ readonly children: (control: FieldControl) => ReactNode;
130
+ };
131
+ declare const Field: ({ label, description, error, testId, children }: FieldProps) => react.JSX.Element;
132
+ type TextInputProps = FieldTexts & {
133
+ readonly value: string;
134
+ readonly onValueChange: (value: string) => void;
135
+ readonly type: "text" | "search" | "datetime-local";
136
+ readonly list?: string;
137
+ readonly required?: boolean;
138
+ readonly testId: string;
139
+ readonly ref?: Ref<HTMLInputElement>;
140
+ };
141
+ declare const TextInput: ({ label, description, error, value, onValueChange, type, list, required, testId, ref }: TextInputProps) => react.JSX.Element;
142
+ type TextAreaProps = FieldTexts & {
143
+ readonly value: string;
144
+ readonly onValueChange: (value: string) => void;
145
+ readonly required?: boolean;
146
+ readonly testId: string;
147
+ readonly ref?: Ref<HTMLTextAreaElement>;
148
+ };
149
+ declare const TextArea: ({ label, description, error, value, onValueChange, required, testId, ref }: TextAreaProps) => react.JSX.Element;
150
+ type FieldOption = {
151
+ readonly value: string;
152
+ readonly label: string;
153
+ };
154
+ type SelectProps = FieldTexts & {
155
+ readonly value: string;
156
+ readonly options: readonly FieldOption[];
157
+ readonly onValueChange: (value: string) => void;
158
+ readonly testId: string;
159
+ readonly ref?: Ref<HTMLSelectElement>;
160
+ };
161
+ declare const Select: ({ label, description, error, value, options, onValueChange, testId, ref }: SelectProps) => react.JSX.Element;
162
+ type RadioGroupProps = {
163
+ readonly legend: string;
164
+ readonly description?: string;
165
+ readonly error?: string;
166
+ readonly value: string | null;
167
+ readonly options: readonly FieldOption[];
168
+ readonly onValueChange: (value: string) => void;
169
+ readonly testId: string;
170
+ readonly ref?: Ref<HTMLInputElement>;
171
+ };
172
+ declare const RadioGroup: ({ legend, description, error, value, options, onValueChange, testId, ref }: RadioGroupProps) => react.JSX.Element;
173
+ type LoadMoreProps = {
174
+ readonly onLoad: () => void;
175
+ readonly busy: boolean;
176
+ readonly done: boolean;
177
+ readonly failure: {
178
+ readonly reason: string;
179
+ readonly occurrence: number;
180
+ } | null;
181
+ readonly limit: number;
182
+ readonly rows: {
183
+ readonly count: number;
184
+ readonly ref: RefObject<HTMLElement | null>;
185
+ };
186
+ readonly testId: string;
187
+ };
188
+ declare const LoadMore: ({ onLoad, busy, done, failure, limit, rows, testId }: LoadMoreProps) => react.JSX.Element;
189
+ type MasterDetailProps = {
190
+ readonly master: ReactNode;
191
+ readonly detail: ReactNode;
192
+ readonly masterMinPx: number;
193
+ readonly detailMinPx: number;
194
+ readonly testId: string;
195
+ };
196
+ declare const MasterDetail: ({ master, detail, masterMinPx, detailMinPx, testId }: MasterDetailProps) => react.JSX.Element;
197
+ type MeasuredProps = {
198
+ readonly value: number | null;
199
+ readonly unit?: string;
200
+ readonly testId: string;
201
+ };
202
+ declare const Measured: ({ value, unit, testId }: MeasuredProps) => react.JSX.Element;
203
+ type NoticeProps = {
204
+ readonly tone: "info" | "warning";
205
+ readonly testId: string;
206
+ readonly children: ReactNode;
207
+ };
208
+ declare const Notice: ({ tone, testId, children }: NoticeProps) => react.JSX.Element;
209
+ type AlertMessageProps = {
210
+ readonly occurrence: number;
211
+ readonly testId: string;
212
+ readonly children: ReactNode;
213
+ };
214
+ declare const AlertMessage: ({ occurrence, testId, children }: AlertMessageProps) => react.JSX.Element;
215
+ type PillTone = "neutral" | "info" | "success" | "warning" | "danger";
216
+ type PillProps = {
217
+ readonly tone: PillTone;
218
+ readonly variant: "tint" | "solid";
219
+ readonly testId: string;
220
+ readonly dataAttributes?: DataAttributes;
221
+ readonly children: ReactNode;
222
+ };
223
+ declare const Pill: ({ tone, variant, testId, dataAttributes, children }: PillProps) => react.JSX.Element;
224
+ type ProgressBarProps = {
225
+ readonly label: string;
226
+ readonly valueText: string;
227
+ readonly value: number | null;
228
+ readonly max: number | null;
229
+ readonly testId: string;
230
+ };
231
+ declare const ProgressBar: ({ label, valueText, value, max, testId }: ProgressBarProps) => react.JSX.Element;
232
+ type ResourceFailedProps = {
233
+ readonly failure: ResourceFailure;
234
+ readonly onReload: () => void;
235
+ readonly forbiddenMessage: string;
236
+ readonly failureMessage?: (reason: string) => string;
237
+ readonly rescueRef: RefCallback<HTMLElement>;
238
+ readonly testId: string;
239
+ };
240
+ declare const ResourceFailed: ({ failure, onReload, forbiddenMessage, failureMessage, rescueRef, testId }: ResourceFailedProps) => react.JSX.Element;
241
+ type RowButtonProps = {
242
+ readonly selected: boolean;
243
+ readonly controls: string;
244
+ readonly onSelect: () => void;
245
+ readonly testId: string;
246
+ readonly dataAttributes?: DataAttributes;
247
+ readonly ref?: Ref<HTMLButtonElement>;
248
+ readonly children: ReactNode;
249
+ };
250
+ declare const RowButton: ({ selected, controls, onSelect, testId, dataAttributes, ref, children }: RowButtonProps) => react.JSX.Element;
251
+ type SelectableListProps<T> = {
252
+ readonly label: string;
253
+ readonly items: readonly T[];
254
+ readonly itemKey: (item: T) => string;
255
+ readonly selectedKey: string | null;
256
+ readonly onSelect: (item: T) => void;
257
+ readonly detailId: string;
258
+ readonly renderRow: (item: T) => ReactNode;
259
+ readonly rowTestId: string;
260
+ readonly rowData?: (item: T) => DataAttributes;
261
+ readonly empty: string;
262
+ readonly testId: string;
263
+ readonly ref?: Ref<HTMLDivElement>;
264
+ };
265
+ declare const SelectableList: <T>({ label, items, itemKey, selectedKey, onSelect, detailId, renderRow, rowTestId, rowData, empty, testId, ref }: SelectableListProps<T>) => react.JSX.Element;
266
+ type StackProps = {
267
+ readonly gap: SpaceToken;
268
+ readonly testId: string;
269
+ readonly children: ReactNode;
270
+ };
271
+ declare const Stack: ({ gap, testId, children }: StackProps) => react.JSX.Element;
272
+ declare const Cluster: ({ gap, testId, children }: StackProps) => react.JSX.Element;
273
+ type TextFace = "sans" | "mono";
274
+ type TextProps = {
275
+ readonly fg: FgRole;
276
+ readonly type: TypeToken;
277
+ readonly face?: TextFace;
278
+ readonly as?: "span" | "p" | "div";
279
+ readonly testId?: string;
280
+ readonly id?: string;
281
+ readonly tabIndex?: -1;
282
+ readonly ref?: Ref<HTMLElement>;
283
+ readonly children: ReactNode;
284
+ };
285
+ declare const Text: ({ fg, type, face, as: Element, testId, id, tabIndex, ref, children }: TextProps) => react.JSX.Element;
286
+ type MetricTileTone = "neutral" | "danger" | "warning" | "success";
287
+ type MetricTileProps = {
288
+ readonly label: string;
289
+ readonly sublabel: string;
290
+ readonly value: number | null;
291
+ readonly tone: MetricTileTone;
292
+ readonly testId: string;
293
+ readonly dataAttributes?: DataAttributes;
294
+ };
295
+ declare const MetricTile: ({ label, sublabel, value, tone, testId, dataAttributes }: MetricTileProps) => react.JSX.Element;
296
+ type TileGridProps = {
297
+ readonly count: number;
298
+ readonly minInlinePx: number;
299
+ readonly testId: string;
300
+ readonly children: ReactNode;
301
+ };
302
+ declare const TileGrid: ({ count, minInlinePx, testId, children }: TileGridProps) => react.JSX.Element;
303
+ declare const useEscapeToClose: (onClose: () => void) => ((event: KeyboardEvent<HTMLElement>) => void);
304
+ declare const useFocusRescue: (getTarget: () => HTMLElement | null) => RefCallback<HTMLElement>;
305
+ type PagedLoaders<T, C, M> = {
306
+ readonly first: (signal: AbortSignal) => Promise<ResourceOutcome<KeysetPage<T, C, M>>>;
307
+ readonly next: (cursor: C, signal: AbortSignal) => Promise<ResourceOutcome<NextPage<T, C>>>;
308
+ };
309
+ type UsePagedResourceResult<K, T, C, M> = {
310
+ readonly state: PagedState<T, C, M>;
311
+ readonly reload: () => void;
312
+ readonly refresh: () => void;
313
+ readonly loadMore: () => void;
314
+ readonly updateList: (key: K, map: (content: PagedContent<T, M>) => PagedContent<T, M>) => void;
315
+ };
316
+ declare const usePagedResource: <K extends string | number, T, C extends string | number, M>(key: K | null, loaders: PagedLoaders<T, C, M>, revision: number) => UsePagedResourceResult<K, T, C, M>;
317
+ type UseResourceResult<K, T> = {
318
+ readonly state: ResourceState<T>;
319
+ readonly reload: () => void;
320
+ readonly refresh: () => void;
321
+ readonly put: (key: K, value: T) => void;
322
+ };
323
+ declare const useResource: <K extends string | number, T>(key: K | null, load: (signal: AbortSignal) => Promise<ResourceOutcome<T>>, revision: number) => UseResourceResult<K, T>;
324
+ type VisuallyHiddenProps = {
325
+ readonly testId: string;
326
+ readonly children: ReactNode;
327
+ };
328
+ declare const VisuallyHidden: ({ testId, children }: VisuallyHiddenProps) => react.JSX.Element;
329
+ export { ANNOUNCE_SETTLE_MS, AlertMessage, type AlertMessageProps, Button, type ButtonProps, type ButtonVariant, Card, type CardProps, CardSection, type CardSectionProps, Cluster, type ColumnDef, ColumnWidth, type ComparisonAttribute, type ComparisonColumn, ComparisonGrid, type ComparisonGridProps, type ComparisonLayout, type ConsoleUiContextValue, ConsoleUiLabels, ConsoleUiLocale, ConsoleUiRoot, type ConsoleUiRootProps, type DataAttributes, DataTable, type DataTableProps, FgRole, Field, type FieldControl, type FieldOption, type FieldProps, KeysetPage, Link, type LinkProps, LoadMore, type LoadMoreProps, MasterDetail, type MasterDetailProps, Measured, type MeasuredProps, MetricTile, type MetricTileProps, type MetricTileTone, NextPage, Notice, type NoticeProps, PagedContent, type PagedLoaders, PagedState, Pill, type PillProps, type PillTone, ProgressBar, type ProgressBarProps, RadioGroup, type RadioGroupProps, ResourceFailed, type ResourceFailedProps, ResourceFailure, ResourceOutcome, ResourceState, RowButton, type RowButtonProps, Select, type SelectProps, SelectableList, type SelectableListProps, SpaceToken, Stack, type StackProps, Text, TextArea, type TextAreaProps, type TextFace, TextInput, type TextInputProps, type TextProps, TileGrid, type TileGridProps, TypeToken, type UsePagedResourceResult, type UseResourceResult, VisuallyHidden, type VisuallyHiddenProps, useAnnounce, useConsoleUi, useEscapeToClose, useFocusRescue, usePagedResource, useResource };
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{A as W,B as xo,a as V,b as io,c as lo,d as co,e as uo,f as po,g as ue,h as A,i as yo,j as pe,k as ye,l as mo,m as fo,n as go,o as me,p as Ro,q as bo,r as Q,s as j,t as fe,u as ee,v as ge,w as Re,x as be,y as Te,z as te}from"./chunk-4F6Q2VL5.js";import{a as To,b as ho,c as vo,d as Co}from"./chunk-MYMCHY7C.js";import{useId as et}from"react";import{createContext as qe,useCallback as _e,useContext as xe,useLayoutEffect as Ge,useMemo as he,useRef as ve}from"react";import{jsx as Ce,jsxs as Qe}from"react/jsx-runtime";var oe=qe(null),Ve=" ",We='[inert], [aria-hidden="true" i]',Pe="dialog:modal",Ze=e=>{if(e.closest(We)!==null)return'an ancestor is inert or aria-hidden="true"';let t=e.ownerDocument,o=[...t.querySelectorAll(Pe)],r=t.activeElement,n=o.filter(l=>l.contains(r)),a=n.length>0?n:o,s=a.filter(l=>l.contains(e)).length;return s===a.length?null:s===0?"the topmost open modal dialog does not contain the console":"open modal dialogs both contain and do not contain the console, and focus does not tell which one is topmost"},ze=e=>{try{e.querySelectorAll(Pe)}catch(t){throw typeof t=="object"&&t!==null&&"name"in t&&t.name==="SyntaxError"?new Error("ConsoleUiRoot requires the :modal selector (Chrome 105, Firefox 103, Safari 15.6, jsdom 27 or later): announcements check whether a modal dialog hides the live region",{cause:t}):t}},re=150,Ye=1e3,Xe=({locale:e,formatLocale:t,timeZone:o,testId:r,children:n})=>{if(xe(oe)!==null)throw new Error("ConsoleUiRoot must not be rendered inside another ConsoleUiRoot (a console has exactly one root)");let s=ue(e),[l]=Intl.getCanonicalLocales(t),d=he(()=>new Intl.DateTimeFormat(l,{timeZone:o}).resolvedOptions().timeZone,[l,o]),u=ve(null),p=ve(null);Ge(()=>{ze(u.current.ownerDocument)},[]);let i=_e(y=>{if(y.trim()==="")throw new RangeError("announce: text must be a non-empty sentence");let R=()=>{let{texts:N,settle:g,deadline:b}=p.current;p.current=null,clearTimeout(g),clearTimeout(b);let f=u.current;if(f===null)return;let T=N.join(Ve),h=Ze(f);if(h!==null)throw new Error(`announce: the live region is hidden from assistive technology (${h}), so this announcement would be lost: ${T}`);let L=f.ownerDocument.createElement("span");L.textContent=T,f.replaceChildren(L)},P=p.current;if(P===null){p.current={texts:[y],settle:setTimeout(R,re),deadline:setTimeout(R,Ye)};return}P.texts.push(y),clearTimeout(P.settle),P.settle=setTimeout(R,re)},[]),c=he(()=>({locale:e,formatLocale:l,timeZone:d,labels:s,announce:i}),[e,l,d,s,i]);return Ce(oe.Provider,{value:c,children:Qe("div",{"data-cui-root":"","data-cui-surface":"surface","data-cui-fg":"fg","data-testid":r,children:[n,Ce("div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${r}-announcer`,ref:u})]})})},w=()=>{let e=xe(oe);if(e===null)throw new Error("useConsoleUi must be called inside ConsoleUiRoot");return e},m=()=>{w()},Je=()=>w().announce;var E=e=>{if(e===void 0)return{};for(let t of Object.keys(e))if(!t.startsWith("data-")||t.startsWith("data-cui-")||t==="data-testid")throw new RangeError(`Caller attributes must be data-* and must not override data-cui-* or data-testid: ${t}`);return e};import{jsx as je}from"react/jsx-runtime";var x=({fg:e,type:t,face:o,as:r="span",testId:n,id:a,tabIndex:s,ref:l,children:d})=>(m(),je(r,{className:"cui-text","data-cui-fg":e,"data-cui-type":t,"data-cui-face":o,"data-testid":n,id:a,tabIndex:s,ref:l,children:d}));import{jsx as F,jsxs as rt}from"react/jsx-runtime";var tt={primary:{fg:"on-solid",surface:"info-solid",type:"body"},secondary:{fg:"fg",surface:void 0,type:"body"},danger:{fg:"on-solid",surface:"danger-solid",type:"body"},link:{fg:"info-fg",surface:void 0,type:"prose"}},Ee=({children:e})=>F("span",{children:e}),O=({variant:e,children:t,testId:o,type:r="button",onClick:n,unavailable:a,expanded:s,controls:l,ref:d,dataAttributes:u,busy:p,busyLabel:i})=>{m();let c=et(),y=p===!0||a!==void 0,R=tt[e],P=N=>{if(y){N.preventDefault();return}n?.(N)};return rt("span",{className:"cui-button-group",children:[F("button",{className:"cui-button",type:r==="submit"?"submit":"button","data-cui-variant":e,"data-cui-fg":R.fg,"data-cui-surface":R.surface,"data-cui-type":R.type,"data-testid":o,"aria-disabled":y?!0:void 0,"aria-busy":p===!0?!0:void 0,"aria-describedby":a===void 0?void 0:c,"aria-expanded":s,"aria-controls":l,onClick:P,ref:d,...E(u),children:F(Ee,{children:p===!0?i:t})}),a===void 0?null:F(x,{fg:"fg-muted",type:"body",id:c,testId:`${o}-reason`,children:a.reason})]})},ot=({onNavigate:e,children:t,testId:o,ref:r})=>(m(),F("button",{className:"cui-link",type:"button","data-cui-fg":"info-fg","data-cui-type":"prose","data-testid":o,onClick:e,ref:r,children:F(Ee,{children:t})}));import{useId as Ne}from"react";import{Fragment as st,jsx as k,jsxs as $}from"react/jsx-runtime";var at=({id:e,title:t,description:o,actions:r,testId:n,headingRef:a,ref:s,dataAttributes:l,children:d})=>{m();let u=Ne();return $("section",{className:"cui-card",id:e,"aria-labelledby":u,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":n,ref:s,...E(l),children:[$("div",{className:"cui-card-header",children:[$("div",{className:"cui-card-heading",children:[k("h2",{className:"cui-card-title",id:u,"data-cui-type":"title",ref:a,tabIndex:a===void 0?void 0:-1,children:t}),o===void 0?null:k("div",{className:"cui-card-description","data-cui-fg":"fg-muted","data-cui-type":"body",children:o})]}),r===void 0?null:k("div",{className:"cui-card-actions",children:r})]}),d]})},nt=({id:e,title:t,subtitle:o,region:r=!1,testId:n,headingRef:a,ref:s,dataAttributes:l,children:d})=>{m();let u=Ne(),p=$(st,{children:[$("div",{className:"cui-card-section-heading",children:[k("h3",{className:"cui-card-section-title",id:u,"data-cui-type":"body",ref:a,tabIndex:a===void 0?void 0:-1,children:t}),o===void 0?null:k("div",{className:"cui-card-section-subtitle","data-cui-fg":"fg-muted","data-cui-type":"body",children:o})]}),d]});return r?k("section",{className:"cui-card-section",id:e,"aria-labelledby":u,"data-testid":n,ref:s,...E(l),children:p}):k("div",{className:"cui-card-section",id:e,"data-testid":n,ref:s,...E(l),children:p})};import{useId as lt}from"react";import{jsx as it}from"react/jsx-runtime";var D=({ruleKey:e,css:t})=>it("style",{href:e,precedence:"cui",children:t});import{jsx as C,jsxs as S}from"react/jsx-runtime";var dt=({caption:e,attributes:t,columns:o,attributePx:r,columnMinPx:n,testId:a})=>{m();let s=lt();for(let i of[r,n])if(!(Number.isFinite(i)&&i>0))throw new RangeError(`ComparisonGrid widths must be positive px values: ${i}`);if(o.length===0)throw new RangeError("ComparisonGrid needs at least one column");for(let i of o)for(let c of t)if(!Object.hasOwn(i.cells,c.key))throw new RangeError(`Column "${i.key}" has no value for attribute "${c.key}"`);let l=r+o.length*n,d=`cui-comparison-a${r}-c${n}-n${o.length}`,u=i=>`[data-cui-comparison="${d}"][data-cui-comparison-layout="${i}"]`,p=`${u("table")}{display:none}@container (min-width:${A(l)}){${u("table")}{display:block}${u("stack")}{display:none}}`;return S("div",{className:"cui-container","data-cui-stack-below-px":l,"data-testid":a,children:[C(D,{ruleKey:d,css:p}),C("div",{className:"cui-comparison-frame","data-cui-comparison":d,"data-cui-comparison-layout":"table",children:S("table",{className:"cui-comparison-table","data-cui-type":"prose",children:[C("caption",{className:"cui-visually-hidden",children:e}),S("colgroup",{children:[C("col",{style:{width:A(r)}}),o.map(i=>C("col",{},i.key))]}),C("thead",{children:S("tr",{children:[C("td",{}),o.map(i=>C("th",{scope:"col",children:i.heading},i.key))]})}),C("tbody",{children:t.map(i=>S("tr",{children:[C("th",{scope:"row",children:i.label}),o.map(c=>C("td",{children:c.cells[i.key]("table")},c.key))]},i.key))})]})}),C("div",{className:"cui-comparison-stack","data-cui-comparison":d,"data-cui-comparison-layout":"stack",children:o.map((i,c)=>{let y=`${s}-column-${c}`;return S("div",{className:"cui-comparison-column",role:"group","aria-labelledby":y,"data-cui-type":"prose",children:[C("p",{className:"cui-comparison-heading",id:y,children:i.heading}),C("dl",{className:"cui-comparison-list",children:t.map(R=>S("div",{children:[C("dt",{children:R.label}),C("dd",{children:i.cells[R.key]("stack")})]},R.key))})]},i.key)})})]})};import{useId as ct}from"react";import{jsx as M,jsxs as pt}from"react/jsx-runtime";var ut=({caption:e,captionHidden:t,columns:o,rows:r,rowKey:n,rowTestId:a,rowData:s,rowSize:l,empty:d,testId:u,ref:p})=>{m();let i=ct(),c=ye(o);return M("div",{className:"cui-container","data-testid":u,ref:p,children:r.length===0?M(x,{as:"p",fg:"fg-muted",type:"prose",testId:`${u}-empty`,children:d}):M("section",{className:"cui-table-frame",tabIndex:0,"aria-labelledby":i,"data-testid":`${u}-frame`,children:pt("table",{className:"cui-table","data-cui-type":"prose","data-cui-row-size":l,style:{"--cui-table-min":A(c)},children:[M("caption",{className:t?"cui-visually-hidden":"cui-table-caption",id:i,children:e}),M("colgroup",{children:o.map(y=>M("col",{style:y.width.fixedPx===void 0?void 0:{width:A(y.width.fixedPx)}},y.key))}),M("thead",{children:M("tr",{children:o.map(y=>M("th",{scope:"col","data-cui-align":y.align,"data-cui-surface":"subtle","data-cui-type":"caption",children:y.header},y.key))})}),M("tbody",{children:r.map(y=>M("tr",{tabIndex:-1,"data-cui-row-focus":"","data-testid":a,...E(s?.(y)),children:o.map(R=>M("td",{"data-cui-align":R.align,children:R.cell(y)},R.key))},n(y)))})]})})})};import{useId as Z}from"react";import{Fragment as bt,jsx as v,jsxs as I}from"react/jsx-runtime";var B=({description:e,error:t})=>{m();let o=Z(),r=Z(),n=Z(),a=[e===void 0?null:r,t===void 0?null:n].filter(l=>l!==null).join(" ");return{control:{id:o,"aria-describedby":a===""?void 0:a,"aria-invalid":t===void 0?void 0:!0},descriptionId:r,errorId:n}},q=({description:e,error:t,descriptionId:o,errorId:r,testId:n})=>I(bt,{children:[e===void 0?null:v(x,{as:"p",fg:"fg-muted",type:"body",id:o,testId:`${n}-description`,children:e}),t===void 0?null:v(x,{as:"p",fg:"danger-fg",type:"body",id:r,testId:`${n}-error`,children:t})]}),yt=({label:e,description:t,error:o,testId:r,children:n})=>{let{control:a,descriptionId:s,errorId:l}=B({label:e,description:t,error:o});return I("div",{className:"cui-field","data-invalid":o!==void 0,"data-testid":r,children:[v("label",{className:"cui-field-label",htmlFor:a.id,"data-cui-type":"body",children:e}),n(a),v(q,{description:t,error:o,descriptionId:s,errorId:l,testId:r})]})},mt=({label:e,description:t,error:o,value:r,onValueChange:n,type:a,list:s,required:l,testId:d,ref:u})=>{let{control:p,descriptionId:i,errorId:c}=B({label:e,description:t,error:o});return I("div",{className:"cui-field","data-invalid":o!==void 0,"data-testid":`${d}-field`,children:[v("label",{className:"cui-field-label",htmlFor:p.id,"data-cui-type":"body",children:e}),v("input",{className:"cui-input",type:a,value:r,list:s,required:l,onChange:y=>n(y.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":d,ref:u,...p}),v(q,{description:t,error:o,descriptionId:i,errorId:c,testId:d})]})},ft=({label:e,description:t,error:o,value:r,onValueChange:n,required:a,testId:s,ref:l})=>{let{control:d,descriptionId:u,errorId:p}=B({label:e,description:t,error:o});return I("div",{className:"cui-field","data-invalid":o!==void 0,"data-testid":`${s}-field`,children:[v("label",{className:"cui-field-label",htmlFor:d.id,"data-cui-type":"body",children:e}),v("textarea",{className:"cui-input cui-textarea",value:r,required:a,onChange:i=>n(i.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"prose","data-testid":s,ref:l,...d}),v(q,{description:t,error:o,descriptionId:u,errorId:p,testId:s})]})},gt=({label:e,description:t,error:o,value:r,options:n,onValueChange:a,testId:s,ref:l})=>{let{control:d,descriptionId:u,errorId:p}=B({label:e,description:t,error:o});return I("div",{className:"cui-field","data-invalid":o!==void 0,"data-testid":`${s}-field`,children:[v("label",{className:"cui-field-label",htmlFor:d.id,"data-cui-type":"body",children:e}),v("select",{className:"cui-input",value:r,onChange:i=>a(i.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":s,ref:l,...d,children:n.map(i=>v("option",{value:i.value,children:i.label},i.value))}),v(q,{description:t,error:o,descriptionId:u,errorId:p,testId:s})]})},Rt=({legend:e,description:t,error:o,value:r,options:n,onValueChange:a,testId:s,ref:l})=>{let d=Z(),{control:u,descriptionId:p,errorId:i}=B({label:e,description:t,error:o});return I("fieldset",{className:"cui-radio-group","aria-describedby":u["aria-describedby"],"data-invalid":o!==void 0,"data-testid":s,children:[v("legend",{className:"cui-radio-group-legend","data-cui-type":"body",children:e}),n.map((c,y)=>I("label",{className:"cui-radio","data-cui-type":"body",children:[v("input",{type:"radio",name:d,value:c.value,checked:c.value===r,onChange:()=>a(c.value),"aria-invalid":u["aria-invalid"],"data-testid":`${s}-option-${c.value}`,ref:y===0?l:void 0}),v("span",{children:c.label})]},c.value)),v(q,{description:t,error:o,descriptionId:p,errorId:i,testId:s})]})};import{useCallback as ke,useLayoutEffect as xt,useRef as z}from"react";import{jsx as Me}from"react/jsx-runtime";var Tt=({tone:e,testId:t,children:o})=>(m(),Me("div",{className:"cui-notice","data-cui-tone":e,"data-cui-surface":e==="info"?"info-tint":"warning-tint","data-cui-fg":"fg","data-cui-type":"prose","data-testid":t,children:o})),_=({occurrence:e,testId:t,children:o})=>(m(),Me("div",{className:"cui-alert",role:"alert","data-cui-surface":"danger-tint","data-cui-fg":"danger-fg","data-cui-type":"prose","data-cui-occurrence":e,"data-testid":t,children:o},e));import{useCallback as ht,useLayoutEffect as we,useReducer as vt,useRef as Le}from"react";var Ct=e=>e+1,ae=e=>{let t=Le(e),o=Le(null),[,r]=vt(Ct,0),n=ht((a=>()=>{a.contains(document.activeElement)&&(o.current=a,r())}),[]);return we(()=>{t.current=e}),we(()=>{let a=o.current;if(a===null)return;o.current=null;let s=[null,document.body].includes(document.activeElement);a.isConnected||!s||t.current()?.focus()}),n};import{jsx as Y,jsxs as Mt}from"react/jsx-runtime";var ne="[data-cui-row-focus]",Pt=e=>{let t=e.ref.current;if(t===null)throw new Error("LoadMore: rows.ref is not attached to the element holding the rows");let o=[...t.querySelectorAll(ne)];if(o.length!==e.count)throw new Error(`LoadMore: rows.ref holds ${o.length} ${ne} elements for ${e.count} rows`);return o},Et=(e,t)=>{let o=-1;return e.forEach((r,n)=>{t.has(r)&&(o=n)}),e[o+1]},Nt=({onLoad:e,busy:t,done:o,failure:r,limit:n,rows:a,testId:s})=>{let{formatLocale:l,labels:d}=w(),u=z(null),p=z(null),i=z(null),c=z(!1),y=()=>{let g=a.ref.current;u.current={shown:new Set(g===null?[]:g.querySelectorAll(ne)),failureOccurrence:r===null?null:r.occurrence,busySeen:!1},e()};xt(()=>{let g=c.current;c.current=!1;let b=u.current;if(b===null)return;let f=Pt(a);if(t){b.busySeen=!0,b.shown=new Set(f);return}let T=Et(f,b.shown),h=r!==null&&r.occurrence!==b.failureOccurrence;if(!(b.busySeen||T!==void 0||h||o)||(u.current=null,h||T===void 0))return;let L=[null,document.body].includes(document.activeElement);(i.current!==null&&document.activeElement===i.current||g&&L)&&T.focus()});let R=ae(()=>o?p.current:i.current),P=ke((g=>{i.current=g;let b=R(g);return()=>{i.current=null,c.current=g===document.activeElement,b()}}),[R]),N=ke((g=>{p.current=g;let b=R(g);return()=>{p.current=null,b()}}),[R]);return o?Y("div",{className:"cui-load-more","data-testid":s,children:Y(x,{as:"p",fg:"fg-muted",type:"body",tabIndex:-1,ref:N,testId:`${s}-end`,children:d.endOfRecords})}):Mt("div",{className:"cui-load-more","data-testid":s,children:[Y(O,{variant:"secondary",busy:t,busyLabel:d.loading,onClick:y,ref:P,testId:`${s}-button`,children:d.loadMore(V(n,l))}),r===null?null:Y(_,{occurrence:r.occurrence,testId:`${s}-failure`,children:d.loadFailed(r.reason)})]})};import{jsx as se,jsxs as Se}from"react/jsx-runtime";var wt=({master:e,detail:t,masterMinPx:o,detailMinPx:r,testId:n})=>{m();let a=pe({masterMinPx:o,detailMinPx:r,gapPx:W.space["space-6"]});return Se("div",{className:"cui-container","data-testid":n,children:[se(D,{ruleKey:a.key,css:a.css}),Se("div",{className:"cui-master-detail","data-cui-master-detail":a.key,children:[se("div",{className:"cui-master-detail-pane","data-testid":`${n}-master`,children:e}),se("div",{className:"cui-master-detail-pane","data-testid":`${n}-detail`,children:t})]})]})};import{jsx as Ie}from"react/jsx-runtime";var ie=({value:e,unit:t,testId:o})=>{let{formatLocale:r,labels:n}=w();if(e===null)return Ie("span",{className:"cui-measured","data-measured":"false","data-testid":o,children:n.unmeasured});let a=V(e,r);return Ie("span",{className:"cui-measured","data-measured":"true","data-testid":o,children:t===void 0?a:`${a} ${t}`})};import{jsx as It}from"react/jsx-runtime";var Lt={neutral:{fg:"fg-secondary",surface:"sunken"},info:{fg:"info-fg",surface:"info-tint"},success:{fg:"success-fg",surface:"success-tint"},warning:{fg:"warning-fg",surface:"warning-tint"},danger:{fg:"danger-fg",surface:"danger-tint"}},kt={neutral:"neutral-solid",info:"info-solid",success:"success-solid",warning:"warning-solid",danger:"danger-solid"},St=({tone:e,variant:t,testId:o,dataAttributes:r,children:n})=>{m();let a=t==="tint"?Lt[e]:{fg:"on-solid",surface:kt[e]};return It("span",{className:"cui-pill","data-cui-tone":e,"data-cui-variant":t,"data-cui-fg":a.fg,"data-cui-surface":a.surface,"data-cui-type":"caption","data-testid":o,...E(r),children:n})};import{useId as At}from"react";import{jsx as G,jsxs as Dt}from"react/jsx-runtime";var Ft=({label:e,valueText:t,value:o,max:r,testId:n})=>{m();let a=At();if(r!==null){if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Progress maximum must be positive: ${r}`);if(o===null||!(Number.isFinite(o)&&o>=0))throw new RangeError(`A determinate progress value must be a number >= 0: ${o}`)}let s=r===null?null:{max:r,now:Math.min(o,r)};return Dt("div",{className:"cui-progress","data-testid":n,children:[G(x,{as:"p",fg:"fg",type:"body",id:a,children:e}),G("div",{className:"cui-progress-track",role:"progressbar","aria-labelledby":a,"aria-valuetext":t,"aria-valuemin":s===null?void 0:0,"aria-valuemax":s?.max,"aria-valuenow":s?.now,"data-cui-surface":"sunken","data-cui-indeterminate":s===null,"data-testid":`${n}-bar`,children:G("div",{className:"cui-progress-fill","data-cui-accent":"info-accent",style:s===null?void 0:{inlineSize:`${s.now/s.max*100}%`},"data-testid":`${n}-fill`})}),G("div",{"aria-hidden":"true",children:G(x,{as:"p",fg:"fg-secondary",type:"body",testId:`${n}-value`,children:t})})]})};import{jsx as Ae,jsxs as Kt}from"react/jsx-runtime";var Ut=403,Ht=({failure:e,onReload:t,forbiddenMessage:o,failureMessage:r,rescueRef:n,testId:a})=>{let{labels:s}=w(),l=e.status===Ut,d=r===void 0?s.loadFailed:r;return Kt("div",{className:"cui-resource-failed","data-testid":a,children:[Ae(_,{occurrence:e.occurrence,testId:`${a}-alert`,children:l?o:d(e.reason)}),l?null:Ae(O,{variant:"secondary",busy:e.retrying,busyLabel:s.loading,onClick:t,ref:n,testId:`${a}-reload`,children:s.reload})]})};import{jsx as U}from"react/jsx-runtime";var Fe=({selected:e,controls:t,onSelect:o,testId:r,dataAttributes:n,ref:a,children:s})=>(m(),U("button",{className:"cui-row-button",type:"button","data-selected":e,"aria-expanded":e,"aria-controls":t,"data-cui-row-focus":"","data-cui-surface":e?"info-tint":"surface","data-cui-fg":"fg","data-cui-type":"prose","data-testid":r,onClick:o,ref:a,...E(n),children:s})),Ot=({label:e,items:t,itemKey:o,selectedKey:r,onSelect:n,detailId:a,renderRow:s,rowTestId:l,rowData:d,empty:u,testId:p,ref:i})=>(m(),U("div",{className:"cui-selectable","data-testid":p,ref:i,children:t.length===0?U(x,{as:"p",fg:"fg-muted",type:"prose",testId:`${p}-empty`,children:u}):U("ul",{className:"cui-selectable-list",role:"list","aria-label":e,children:t.map(c=>{let y=o(c);return U("li",{children:U(Fe,{selected:y===r,controls:a,onSelect:()=>n(c),testId:l,dataAttributes:d?.(c),children:s(c)})},y)})})}));import{jsx as De}from"react/jsx-runtime";var $t=({gap:e,testId:t,children:o})=>(m(),De("div",{className:"cui-stack","data-cui-gap":e,"data-testid":t,children:o})),Bt=({gap:e,testId:t,children:o})=>(m(),De("div",{className:"cui-cluster","data-cui-gap":e,"data-testid":t,children:o}));import{Children as qt,Fragment as _t,isValidElement as Gt}from"react";import{jsx as H,jsxs as He}from"react/jsx-runtime";var Vt={neutral:"fg",danger:"danger-fg",warning:"warning-fg",success:"success-fg"},Wt=({label:e,sublabel:t,value:o,tone:r,testId:n,dataAttributes:a})=>{if(m(),o===null&&r!=="neutral")throw new RangeError(`An unmeasured tile value carries no tone: ${r}`);return He("div",{className:"cui-tile","data-cui-surface":"subtle","data-cui-fg":"fg","data-cui-tone":r,"data-testid":n,...E(a),children:[H("p",{className:"cui-tile-label","data-cui-type":"caption",children:e}),H("p",{className:"cui-tile-sublabel","data-cui-fg":"fg-muted","data-cui-type":"caption",children:t}),H("p",{className:"cui-tile-value","data-cui-fg":Vt[r],"data-cui-type":"heading",children:H(ie,{value:o,testId:`${n}-value`})})]})},Ue=e=>qt.toArray(e).flatMap(t=>{if(!Gt(t))throw new RangeError(`TileGrid children must be tile elements, not text: ${String(t)}`);return t.type===_t?Ue(t.props.children):[t]}),Zt=({count:e,minInlinePx:t,testId:o,children:r})=>{m();let n=me(e,t,W.space["space-2"]),a=Ue(r).length;if(a!==e)throw new RangeError(`TileGrid has ${a} tiles but count is ${e}`);return He("div",{className:"cui-container","data-testid":o,children:[H(D,{ruleKey:n.key,css:n.css}),H("div",{className:"cui-tile-grid","data-cui-tile-grid":n.key,"data-cui-gap":"space-2",children:r})]})};import{useCallback as zt}from"react";var Yt=229,Xt=new Set(["text","search","email","url","tel","password","number","date","datetime-local","month","time","week"]),Jt=e=>e instanceof HTMLTextAreaElement?e.value!=="":e instanceof HTMLInputElement&&Xt.has(e.type)&&(e.value!==""||e.validity.badInput),Qt=e=>zt(t=>{t.key!=="Escape"||t.nativeEvent.isComposing||t.keyCode===Yt||Jt(t.target)||(t.stopPropagation(),e())},[e]);import{useCallback as K,useEffect as to,useLayoutEffect as Oe,useRef as ce}from"react";import{useCallback as X,useEffect as jt,useLayoutEffect as eo,useRef as le,useState as de}from"react";var Ke=e=>e===null?Q:j,J=(e,t,o,r,n)=>{let[a,s]=de(()=>({key:e,state:Ke(e)})),[l,d]=de(0),[u,p]=de(0),i=le(t),c=le(null),y=le(l);eo(()=>{i.current=t}),jt(()=>{if(e===null){s({key:null,state:Q});return}let f=new AbortController;c.current=e;let T=l===y.current?"revision":"reload";return y.current=l,s(h=>Object.is(h.key,e)?{key:e,state:r(h.state,T)}:{key:e,state:j}),i.current(f.signal).then(h=>{f.signal.aborted||(c.current=null,s(L=>({key:e,state:n(L.state,h)})))},h=>{f.signal.aborted||s(()=>{throw h})}),()=>{f.abort(),c.current=null}},[e,o,l,u]);let R=X(()=>d(f=>f+1),[]),P=X(()=>p(f=>f+1),[]),N=X((f,T)=>{s(h=>Object.is(h.key,f)?{key:f,state:T(h.state)}:h)},[]),g=X((f,T)=>{N(f,T),Object.is(c.current,f)&&P()},[N,P]);return{state:Object.is(a.key,e)?a.state:Ke(e),reload:R,refresh:P,update:N,write:g}};var oo=(e,t,o)=>{let r=ce(t);Oe(()=>{r.current=t});let n=K(g=>r.current.first(g),[]),{state:a,reload:s,refresh:l,update:d,write:u}=J(e,n,o,ge,Re),p=ce({key:e,state:a});Oe(()=>{p.current={key:e,state:a}});let i=ce(null),c=K(()=>{i.current?.controller.abort(),i.current=null},[]);to(()=>c,[e,o,c]);let y=K(()=>{c(),s()},[c,s]),R=K(()=>{c(),l()},[c,l]),P=K(()=>{let{key:g,state:b}=p.current;if(g===null||b.kind!=="ready"||b.refreshing||b.value.next===null||b.value.loadingMore)throw new Error("usePagedResource: loadMore needs a shown list with a next cursor, no page in flight and no re-read in flight");let f=b.value.next,T={key:g,controller:new AbortController,maps:[]};i.current=T,d(g,be),r.current.next(f,T.controller.signal).then(h=>{i.current===T&&(i.current=null,d(g,L=>T.maps.reduce(($e,Be)=>te($e,Be),Te(L,f,h))))},h=>{i.current===T&&d(g,()=>{throw h})})},[d]),N=K((g,b)=>{let f=i.current;f!==null&&Object.is(f.key,g)&&f.maps.push(b),u(g,T=>te(T,b))},[u]);return{state:a,reload:y,refresh:R,loadMore:P,updateList:N}};import{useCallback as ro}from"react";var ao=(e,t,o)=>{let{state:r,reload:n,refresh:a,write:s}=J(e,t,o,fe,ee),l=ro((d,u)=>s(d,p=>ee(p,{ok:!0,value:u})),[s]);return{state:r,reload:n,refresh:a,put:l}};import{jsx as so}from"react/jsx-runtime";var no=({testId:e,children:t})=>(m(),so("span",{className:"cui-visually-hidden","data-testid":e,children:t}));export{re as ANNOUNCE_SETTLE_MS,_ as AlertMessage,O as Button,po as CONSOLE_UI_LABEL_CATALOGS,vo as CONTRAST_MINIMUM,Co as CONTRAST_PAIRS,at as Card,nt as CardSection,Bt as Cluster,dt as ComparisonGrid,Xe as ConsoleUiRoot,ut as DataTable,yt as Field,ot as Link,Nt as LoadMore,wt as MasterDetail,ie as Measured,Wt as MetricTile,Tt as Notice,St as Pill,Ft as ProgressBar,Rt as RadioGroup,Ht as ResourceFailed,Fe as RowButton,gt as Select,Ot as SelectableList,$t as Stack,W as TOKENS,x as Text,ft as TextArea,mt as TextInput,Zt as TileGrid,no as VisuallyHidden,io as ZonedTimeError,be as beginPage,ge as beginPagedReload,fe as beginReload,go as ceil8,ho as contrastRatio,xo as cssVar,bo as flatMapOutcome,V as formatCount,uo as formatInstant,To as hexToSrgb,ee as keepLastGood,Ro as mapOutcome,te as mapPagedList,yo as masterDetailPlan,fo as monoTextWidthEm,ue as resolveConsoleUiLabels,Re as settleFirstPage,Te as settlePage,ye as tableMinInlinePx,mo as textWidthEm,me as tileGridPlan,lo as toOffsetIso,co as toWallTime,Je as useAnnounce,w as useConsoleUi,Qt as useEscapeToClose,ae as useFocusRescue,oo as usePagedResource,ao as useResource};