@ablehi/automation-app-ui 0.3.0 → 0.3.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/catalog.js CHANGED
@@ -1 +1 @@
1
- var r={name:"@ablehi/automation-app-ui",version:"0.3.0",description:"Iframe-native public UI Foundation for Ablehi Automation Apps.",license:"UNLICENSED",private:!1,type:"module",main:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js"},"./styles.css":"./dist/styles.css","./catalog":{types:"./dist/catalog.d.ts",import:"./dist/catalog.js"},"./package.json":"./package.json"},files:["dist"],sideEffects:["./dist/styles.css"],publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},scripts:{build:"tsup && esbuild styles.css --bundle --minify --outfile=dist/styles.css",typecheck:"tsc --noEmit -p tsconfig.json",lint:"eslint src --ext .ts,.tsx",test:"vitest run",check:"pnpm build && pnpm typecheck && pnpm lint && pnpm test"},dependencies:{"@ablehi/automation-app-host-bridge":"workspace:0.3.0","@base-ui/react":"1.6.0","class-variance-authority":"0.7.1",clsx:"2.1.1","lucide-react":"1.16.0","tailwind-merge":"3.6.0"},peerDependencies:{react:"19.2.4","react-dom":"19.2.4"},devDependencies:{"@ablehi/server-api-contract":"0.10.0","@types/node":"20.19.41","@types/react":"19.2.14","@types/react-dom":"19.2.3",esbuild:"0.27.7",eslint:"9.39.2",jsdom:"27.4.0",react:"19.2.4","react-dom":"19.2.4",tsup:"8.5.1",typescript:"5.9.3",vitest:"4.1.7"}};var t=(o,a,i,n)=>({name:o,type:a,required:i,description:n}),e=()=>(o,a,i,n,p,s,u=[])=>({exportName:o,category:a,summary:i,nativeElement:n,props:p,variants:s??{},accessibility:u}),c=[["--aaui-background","Frame and page background"],["--aaui-foreground","Primary text and icon color"],["--aaui-card","Section surface"],["--aaui-popover","Floating overlay surface"],["--aaui-muted","Subdued surface"],["--aaui-muted-foreground","Secondary text"],["--aaui-border","Structural border"],["--aaui-input","Input border and surface"],["--aaui-primary","Primary action"],["--aaui-primary-foreground","Text on primary action"],["--aaui-secondary","Secondary action surface"],["--aaui-secondary-foreground","Text on secondary action"],["--aaui-accent","Interactive highlight"],["--aaui-destructive","Destructive or error emphasis"],["--aaui-success","Success emphasis"],["--aaui-warning","Warning emphasis"],["--aaui-info","Informational emphasis"],["--aaui-ring","Keyboard focus ring"],["--aaui-radius","Foundation corner radius"],["--aaui-shadow","Floating-surface shadow"],["--aaui-font-sans","Frame sans-serif font stack"],["--aaui-space-1","4px spacing step"],["--aaui-space-2","8px spacing step"],["--aaui-space-3","12px spacing step"],["--aaui-space-4","16px spacing step"],["--aaui-space-6","24px spacing step"],["--aaui-space-8","32px spacing step"]],d=[e()("AutomationAppGrid","layout","Responsive grid for peer surfaces.","div",[t("columns","1 | 2 | 3 | 4",!1,"Maximum desktop column count."),t("gap",'"sm" | "md" | "lg"',!1,"Foundation gap step.")],{columns:["1","2","3","4"],gap:["sm","md","lg"]}),e()("AutomationAppHeader","layout","Page heading with description and actions.","header",[t("title","ReactNode",!0,"Unique page title."),t("description","ReactNode",!1,"Supporting page copy."),t("actions","ReactNode",!1,"Primary page actions.")],{},["Keep one h1-level header per mounted mode."]),e()("AutomationAppLayout","layout","Top-level frame layout.","main",[],{},["Use once as the mode's main landmark."]),e()("AutomationAppSection","layout","Titled card-like content surface.","section",[t("title","ReactNode",!1,"Section heading."),t("description","ReactNode",!1,"Section description."),t("actions","ReactNode",!1,"Section-scoped actions.")],{},["Use a title when the section needs a navigable heading."]),e()("AutomationAppStack","layout","Horizontal or vertical flex stack.","div",[t("direction",'"horizontal" | "vertical"',!1,"Stack direction."),t("align",'"start" | "center" | "end" | "stretch"',!1,"Cross-axis alignment."),t("gap",'"sm" | "md" | "lg"',!1,"Foundation gap step.")],{direction:["horizontal","vertical"],align:["start","center","end","stretch"],gap:["sm","md","lg"]}),e()("AutomationAppButton","form","Accessible action button.","button",[t("variant",'"primary" | "secondary" | "ghost" | "destructive"',!1,"Action hierarchy."),t("size",'"sm" | "md" | "lg"',!1,"Control size."),t("disabled","boolean",!1,"Prevents activation.")],{variant:["primary","secondary","ghost","destructive"],size:["sm","md","lg"]},["Buttons with icons only require an aria-label."]),e()("AutomationAppField","form","Label, description and error wrapper for one control.","div",[t("label","ReactNode",!0,"Visible control label."),t("children","ReactElement",!0,"Single form control."),t("description","ReactNode",!1,"Helpful input guidance."),t("error","ReactNode",!1,"Validation message announced as an alert."),t("required","boolean",!1,"Marks and wires a required control.")],{},["Do not use placeholder text as the only label."]),e()("AutomationAppInput","form","Single-line text input.","input",[t("type","HTMLInputTypeAttribute",!1,"Native input type."),t("value","string | number",!1,"Controlled value.")]),e()("AutomationAppSelect","form","Portal-safe single-value select.",null,[t("options","readonly AutomationAppSelectOption[]",!0,"Closed option inventory."),t("value","string | null",!1,"Controlled selection."),t("onValueChange","(value: string | null) => void",!1,"Selection callback."),t("placeholder","ReactNode",!1,"No-selection prompt.")],{},["Provide a visible AutomationAppField label."]),e()("AutomationAppTextarea","form","Multi-line text input.","textarea",[t("value","string",!1,"Controlled value."),t("rows","number",!1,"Visible line count.")]),e()("AutomationAppCheckbox","form","Native boolean checkbox.","input",[t("checked","boolean",!1,"Controlled checked state."),t("onChange","ChangeEventHandler<HTMLInputElement>",!1,"Change callback.")],{},["Pair with visible label text through AutomationAppField or label."]),e()("AutomationAppRadioGroup","form","Single selection from visible radio options.","fieldset",[t("legend","ReactNode",!0,"Visible group label."),t("name","string",!0,"Native radio group name."),t("options","readonly AutomationAppRadioOption[]",!0,"Closed option inventory."),t("value","string",!1,"Controlled selection."),t("onValueChange","(value: string) => void",!1,"Selection callback.")],{},["The legend must describe the decision represented by the options."]),e()("AutomationAppSwitch","form","Immediate boolean setting switch.","button",[t("label","ReactNode",!0,"Visible setting label."),t("checked","boolean",!1,"Controlled checked state."),t("onCheckedChange","(checked: boolean) => void",!1,"State callback.")],{},["Use for immediate settings, not form submission consent."]),e()("AutomationAppTabs","navigation","Keyboard-operable local view tabs.",null,[t("label","string",!0,"Accessible tab-list label."),t("tabs","readonly AutomationAppTabItem[]",!0,"Tab and panel inventory."),t("value","string",!1,"Controlled tab id."),t("onValueChange","(value: string) => void",!1,"Tab callback.")],{},["Tab ids must be unique and stable."]),e()("AutomationAppDialog","feedback","Modal confirmation or focused task overlay.",null,[t("trigger","ReactElement",!0,"Element that opens the dialog."),t("title","ReactNode",!0,"Dialog title."),t("description","ReactNode",!1,"Dialog purpose and consequence."),t("footer","ReactNode",!1,"Confirmation and cancel actions.")],{},["Destructive confirmation must state the consequence and offer cancel."]),e()("AutomationAppPopover","feedback","Non-modal contextual overlay.",null,[t("trigger","ReactElement",!0,"Element that opens the popover."),t("title","ReactNode",!1,"Popover title."),t("description","ReactNode",!1,"Popover description.")]),e()("AutomationAppToast","feedback","Transient portal-safe notification.","div",[t("title","ReactNode",!0,"Concise outcome."),t("description","ReactNode",!1,"Supporting detail."),t("intent",'"info" | "success" | "warning" | "error"',!1,"Semantic tone.")],{intent:["info","success","warning","error"]},["Do not use a toast as the only record of a blocking error."]),e()("AutomationAppTooltip","feedback","Short supplemental label or explanation.",null,[t("children","ReactElement",!0,"Focusable trigger."),t("content","ReactNode",!0,"Supplemental text."),t("side",'"bottom" | "left" | "right" | "top"',!1,"Preferred placement.")],{},["Never hide required instructions only in a tooltip."]),e()("AutomationAppAlert","feedback","Persistent inline feedback.","div",[t("children","ReactNode",!0,"Alert details."),t("title","ReactNode",!1,"Concise feedback title."),t("intent",'"info" | "success" | "warning" | "error"',!1,"Semantic tone."),t("action","ReactNode",!1,"Recovery action.")],{intent:["info","success","warning","error"]}),e()("AutomationAppEmptyState","status","Full-surface no-content state.","div",[t("title","ReactNode",!0,"State summary."),t("description","ReactNode",!1,"Why no content exists."),t("action","ReactNode",!1,"Available next action.")]),e()("AutomationAppErrorState","status","Full-surface failed state.","div",[t("title","ReactNode",!0,"Failure summary."),t("description","ReactNode",!1,"Safe failure detail."),t("action","ReactNode",!1,"Recovery action."),t("severity",'"error" | "warning"',!1,"Failure severity.")],{severity:["error","warning"]}),e()("AutomationAppLoadingState","status","Full-surface loading state.","div",[t("title","ReactNode",!0,"Current activity."),t("description","ReactNode",!1,"Expected next state.")],{},["Use a specific loading title instead of an unlabeled spinner."]),e()("AutomationAppStatus","status","Live workflow or application state label.","span",[t("intent",'"neutral" | "info" | "success" | "warning" | "error"',!1,"Semantic state tone.")],{intent:["neutral","info","success","warning","error"]},["Include state text; color is supplemental."]),e()("AutomationAppBadge","status","Non-live categorical label.","span",[t("intent",'"neutral" | "info" | "success" | "warning" | "error"',!1,"Category tone.")],{intent:["neutral","info","success","warning","error"]}),e()("AutomationAppSkeleton","status","Decorative content placeholder.","div",[],{},["Pair with nearby loading text or a loading landmark."]),e()("AutomationAppProgress","status","Labeled determinate or indeterminate progress.","progress",[t("label","string",!0,"Visible progress label."),t("value","number",!1,"Omit for indeterminate progress."),t("max","number",!1,"Maximum progress value.")]),e()("AutomationAppSeparator","data-display","Semantic content separator.","hr",[]),e()("AutomationAppTable","data-display","Responsive semantic table shell with horizontal overflow.","table",[t("caption","ReactNode",!1,"Visible table description."),t("captionPosition",'"bottom" | "top"',!1,"Caption placement."),t("children","ReactNode",!1,"Semantic thead/tbody/tr/th/td content.")],{},["Use scope on header cells and a caption for unfamiliar data."])],m=[{id:"form-action",description:"A labeled form with inline validation and one primary action.",source:'<AutomationAppSection title="Create profile"><AutomationAppStack><AutomationAppField label="Name" error={error}><AutomationAppInput value={name} onChange={onNameChange} /></AutomationAppField><AutomationAppButton onClick={save}>Save</AutomationAppButton></AutomationAppStack></AutomationAppSection>'},{id:"collection",description:"A collection with loading, empty, error and populated branches.",source:'{loading ? <AutomationAppLoadingState title="Loading runs" /> : error ? <AutomationAppErrorState title="Runs unavailable" action={<AutomationAppButton onClick={retry}>Retry</AutomationAppButton>} /> : rows.length === 0 ? <AutomationAppEmptyState title="No runs yet" /> : <AutomationAppTable caption="Recent runs"><tbody>{rows.map(renderRow)}</tbody></AutomationAppTable>}'},{id:"detail-status",description:"A detail page with categorical metadata and live status.",source:'<AutomationAppLayout><AutomationAppHeader title={title} actions={<AutomationAppStatus intent={intent}>{status}</AutomationAppStatus>} /><AutomationAppSection title="Details"><AutomationAppBadge>{category}</AutomationAppBadge>{content}</AutomationAppSection></AutomationAppLayout>'},{id:"confirmation",description:"An explicit confirmation for a consequential command.",source:'<AutomationAppDialog trigger={<AutomationAppButton variant="destructive">Delete</AutomationAppButton>} title="Delete profile?" description="Runs stop and this cannot be undone." footer={<><AutomationAppButton variant="secondary">Cancel</AutomationAppButton><AutomationAppButton variant="destructive" onClick={confirm}>Delete</AutomationAppButton></>}>{detail}</AutomationAppDialog>'}],f={schemaVersion:"automation.app-ui-foundation-catalog.v1",packageName:"@ablehi/automation-app-ui",packageVersion:r.version,styleEntry:"@ablehi/automation-app-ui/styles.css",runtimeExports:["AutomationAppPortalProvider","useAutomationAppOverlayRoot"],tokens:c.map(([o,a])=>({name:o,role:a})),components:d,patterns:m};export{f as AUTOMATION_APP_UI_FOUNDATION_CATALOG};
1
+ var e=`0.3.1`;const t=(e,t,n,r)=>({name:e,type:t,required:n,description:r}),n=()=>(e,t,n,r,i,a,o=[])=>({exportName:e,category:t,summary:n,nativeElement:r,props:i,variants:a??{},accessibility:o}),r=[[`--aaui-background`,`Frame and page background`],[`--aaui-foreground`,`Primary text and icon color`],[`--aaui-card`,`Section surface`],[`--aaui-popover`,`Floating overlay surface`],[`--aaui-muted`,`Subdued surface`],[`--aaui-muted-foreground`,`Secondary text`],[`--aaui-border`,`Structural border`],[`--aaui-input`,`Input border and surface`],[`--aaui-primary`,`Primary action`],[`--aaui-primary-foreground`,`Text on primary action`],[`--aaui-secondary`,`Secondary action surface`],[`--aaui-secondary-foreground`,`Text on secondary action`],[`--aaui-accent`,`Interactive highlight`],[`--aaui-destructive`,`Destructive or error emphasis`],[`--aaui-success`,`Success emphasis`],[`--aaui-warning`,`Warning emphasis`],[`--aaui-info`,`Informational emphasis`],[`--aaui-ring`,`Keyboard focus ring`],[`--aaui-radius`,`Foundation corner radius`],[`--aaui-shadow`,`Floating-surface shadow`],[`--aaui-font-sans`,`Frame sans-serif font stack`],[`--aaui-space-1`,`4px spacing step`],[`--aaui-space-2`,`8px spacing step`],[`--aaui-space-3`,`12px spacing step`],[`--aaui-space-4`,`16px spacing step`],[`--aaui-space-6`,`24px spacing step`],[`--aaui-space-8`,`32px spacing step`]],i=[n()(`AutomationAppGrid`,`layout`,`Responsive grid for peer surfaces.`,`div`,[t(`columns`,`1 | 2 | 3 | 4`,!1,`Maximum desktop column count.`),t(`gap`,`"sm" | "md" | "lg"`,!1,`Foundation gap step.`)],{columns:[`1`,`2`,`3`,`4`],gap:[`sm`,`md`,`lg`]}),n()(`AutomationAppHeader`,`layout`,`Page heading with description and actions.`,`header`,[t(`title`,`ReactNode`,!0,`Unique page title.`),t(`description`,`ReactNode`,!1,`Supporting page copy.`),t(`actions`,`ReactNode`,!1,`Primary page actions.`)],{},[`Keep one h1-level header per mounted mode.`]),n()(`AutomationAppLayout`,`layout`,`Top-level frame layout.`,`main`,[],{},[`Use once as the mode's main landmark.`]),n()(`AutomationAppSection`,`layout`,`Titled card-like content surface.`,`section`,[t(`title`,`ReactNode`,!1,`Section heading.`),t(`description`,`ReactNode`,!1,`Section description.`),t(`actions`,`ReactNode`,!1,`Section-scoped actions.`)],{},[`Use a title when the section needs a navigable heading.`]),n()(`AutomationAppStack`,`layout`,`Horizontal or vertical flex stack.`,`div`,[t(`direction`,`"horizontal" | "vertical"`,!1,`Stack direction.`),t(`align`,`"start" | "center" | "end" | "stretch"`,!1,`Cross-axis alignment.`),t(`gap`,`"sm" | "md" | "lg"`,!1,`Foundation gap step.`)],{direction:[`horizontal`,`vertical`],align:[`start`,`center`,`end`,`stretch`],gap:[`sm`,`md`,`lg`]}),n()(`AutomationAppButton`,`form`,`Accessible action button.`,`button`,[t(`variant`,`"primary" | "secondary" | "ghost" | "destructive"`,!1,`Action hierarchy.`),t(`size`,`"sm" | "md" | "lg"`,!1,`Control size.`),t(`disabled`,`boolean`,!1,`Prevents activation.`)],{variant:[`primary`,`secondary`,`ghost`,`destructive`],size:[`sm`,`md`,`lg`]},[`Buttons with icons only require an aria-label.`]),n()(`AutomationAppField`,`form`,`Label, description and error wrapper for one control.`,`div`,[t(`label`,`ReactNode`,!0,`Visible control label.`),t(`children`,`ReactElement`,!0,`Single form control.`),t(`description`,`ReactNode`,!1,`Helpful input guidance.`),t(`error`,`ReactNode`,!1,`Validation message announced as an alert.`),t(`required`,`boolean`,!1,`Marks and wires a required control.`)],{},[`Do not use placeholder text as the only label.`]),n()(`AutomationAppInput`,`form`,`Single-line text input.`,`input`,[t(`type`,`HTMLInputTypeAttribute`,!1,`Native input type.`),t(`value`,`string | number`,!1,`Controlled value.`)]),n()(`AutomationAppSelect`,`form`,`Portal-safe single-value select.`,null,[t(`options`,`readonly AutomationAppSelectOption[]`,!0,`Closed option inventory.`),t(`value`,`string | null`,!1,`Controlled selection.`),t(`onValueChange`,`(value: string | null) => void`,!1,`Selection callback.`),t(`placeholder`,`ReactNode`,!1,`No-selection prompt.`)],{},[`Provide a visible AutomationAppField label.`]),n()(`AutomationAppTextarea`,`form`,`Multi-line text input.`,`textarea`,[t(`value`,`string`,!1,`Controlled value.`),t(`rows`,`number`,!1,`Visible line count.`)]),n()(`AutomationAppCheckbox`,`form`,`Native boolean checkbox.`,`input`,[t(`checked`,`boolean`,!1,`Controlled checked state.`),t(`onChange`,`ChangeEventHandler<HTMLInputElement>`,!1,`Change callback.`)],{},[`Pair with visible label text through AutomationAppField or label.`]),n()(`AutomationAppRadioGroup`,`form`,`Single selection from visible radio options.`,`fieldset`,[t(`legend`,`ReactNode`,!0,`Visible group label.`),t(`name`,`string`,!0,`Native radio group name.`),t(`options`,`readonly AutomationAppRadioOption[]`,!0,`Closed option inventory.`),t(`value`,`string`,!1,`Controlled selection.`),t(`onValueChange`,`(value: string) => void`,!1,`Selection callback.`)],{},[`The legend must describe the decision represented by the options.`]),n()(`AutomationAppSwitch`,`form`,`Immediate boolean setting switch.`,`button`,[t(`label`,`ReactNode`,!0,`Visible setting label.`),t(`checked`,`boolean`,!1,`Controlled checked state.`),t(`onCheckedChange`,`(checked: boolean) => void`,!1,`State callback.`)],{},[`Use for immediate settings, not form submission consent.`]),n()(`AutomationAppTabs`,`navigation`,`Keyboard-operable local view tabs.`,null,[t(`label`,`string`,!0,`Accessible tab-list label.`),t(`tabs`,`readonly AutomationAppTabItem[]`,!0,`Tab and panel inventory.`),t(`value`,`string`,!1,`Controlled tab id.`),t(`onValueChange`,`(value: string) => void`,!1,`Tab callback.`)],{},[`Tab ids must be unique and stable.`]),n()(`AutomationAppDialog`,`feedback`,`Modal confirmation or focused task overlay.`,null,[t(`trigger`,`ReactElement`,!0,`Element that opens the dialog.`),t(`title`,`ReactNode`,!0,`Dialog title.`),t(`description`,`ReactNode`,!1,`Dialog purpose and consequence.`),t(`footer`,`ReactNode`,!1,`Confirmation and cancel actions.`)],{},[`Destructive confirmation must state the consequence and offer cancel.`]),n()(`AutomationAppPopover`,`feedback`,`Non-modal contextual overlay.`,null,[t(`trigger`,`ReactElement`,!0,`Element that opens the popover.`),t(`title`,`ReactNode`,!1,`Popover title.`),t(`description`,`ReactNode`,!1,`Popover description.`)]),n()(`AutomationAppToast`,`feedback`,`Transient portal-safe notification.`,`div`,[t(`title`,`ReactNode`,!0,`Concise outcome.`),t(`description`,`ReactNode`,!1,`Supporting detail.`),t(`intent`,`"info" | "success" | "warning" | "error"`,!1,`Semantic tone.`)],{intent:[`info`,`success`,`warning`,`error`]},[`Do not use a toast as the only record of a blocking error.`]),n()(`AutomationAppTooltip`,`feedback`,`Short supplemental label or explanation.`,null,[t(`children`,`ReactElement`,!0,`Focusable trigger.`),t(`content`,`ReactNode`,!0,`Supplemental text.`),t(`side`,`"bottom" | "left" | "right" | "top"`,!1,`Preferred placement.`)],{},[`Never hide required instructions only in a tooltip.`]),n()(`AutomationAppAlert`,`feedback`,`Persistent inline feedback.`,`div`,[t(`children`,`ReactNode`,!0,`Alert details.`),t(`title`,`ReactNode`,!1,`Concise feedback title.`),t(`intent`,`"info" | "success" | "warning" | "error"`,!1,`Semantic tone.`),t(`action`,`ReactNode`,!1,`Recovery action.`)],{intent:[`info`,`success`,`warning`,`error`]}),n()(`AutomationAppEmptyState`,`status`,`Full-surface no-content state.`,`div`,[t(`title`,`ReactNode`,!0,`State summary.`),t(`description`,`ReactNode`,!1,`Why no content exists.`),t(`action`,`ReactNode`,!1,`Available next action.`)]),n()(`AutomationAppErrorState`,`status`,`Full-surface failed state.`,`div`,[t(`title`,`ReactNode`,!0,`Failure summary.`),t(`description`,`ReactNode`,!1,`Safe failure detail.`),t(`action`,`ReactNode`,!1,`Recovery action.`),t(`severity`,`"error" | "warning"`,!1,`Failure severity.`)],{severity:[`error`,`warning`]}),n()(`AutomationAppLoadingState`,`status`,`Full-surface loading state.`,`div`,[t(`title`,`ReactNode`,!0,`Current activity.`),t(`description`,`ReactNode`,!1,`Expected next state.`)],{},[`Use a specific loading title instead of an unlabeled spinner.`]),n()(`AutomationAppStatus`,`status`,`Live workflow or application state label.`,`span`,[t(`intent`,`"neutral" | "info" | "success" | "warning" | "error"`,!1,`Semantic state tone.`)],{intent:[`neutral`,`info`,`success`,`warning`,`error`]},[`Include state text; color is supplemental.`]),n()(`AutomationAppBadge`,`status`,`Non-live categorical label.`,`span`,[t(`intent`,`"neutral" | "info" | "success" | "warning" | "error"`,!1,`Category tone.`)],{intent:[`neutral`,`info`,`success`,`warning`,`error`]}),n()(`AutomationAppSkeleton`,`status`,`Decorative content placeholder.`,`div`,[],{},[`Pair with nearby loading text or a loading landmark.`]),n()(`AutomationAppProgress`,`status`,`Labeled determinate or indeterminate progress.`,`progress`,[t(`label`,`string`,!0,`Visible progress label.`),t(`value`,`number`,!1,`Omit for indeterminate progress.`),t(`max`,`number`,!1,`Maximum progress value.`)]),n()(`AutomationAppSeparator`,`data-display`,`Semantic content separator.`,`hr`,[]),n()(`AutomationAppTable`,`data-display`,`Responsive semantic table shell with horizontal overflow.`,`table`,[t(`caption`,`ReactNode`,!1,`Visible table description.`),t(`captionPosition`,`"bottom" | "top"`,!1,`Caption placement.`),t(`children`,`ReactNode`,!1,`Semantic thead/tbody/tr/th/td content.`)],{},[`Use scope on header cells and a caption for unfamiliar data.`])],a={schemaVersion:`automation.app-ui-foundation-catalog.v1`,packageName:`@ablehi/automation-app-ui`,packageVersion:e,styleEntry:`@ablehi/automation-app-ui/styles.css`,runtimeExports:[`AutomationAppPortalProvider`,`useAutomationAppOverlayRoot`],tokens:r.map(([e,t])=>({name:e,role:t})),components:i,patterns:[{id:`form-action`,description:`A labeled form with inline validation and one primary action.`,source:`<AutomationAppSection title="Create profile"><AutomationAppStack><AutomationAppField label="Name" error={error}><AutomationAppInput value={name} onChange={onNameChange} /></AutomationAppField><AutomationAppButton onClick={save}>Save</AutomationAppButton></AutomationAppStack></AutomationAppSection>`},{id:`collection`,description:`A collection with loading, empty, error and populated branches.`,source:`{loading ? <AutomationAppLoadingState title="Loading runs" /> : error ? <AutomationAppErrorState title="Runs unavailable" action={<AutomationAppButton onClick={retry}>Retry</AutomationAppButton>} /> : rows.length === 0 ? <AutomationAppEmptyState title="No runs yet" /> : <AutomationAppTable caption="Recent runs"><tbody>{rows.map(renderRow)}</tbody></AutomationAppTable>}`},{id:`detail-status`,description:`A detail page with categorical metadata and live status.`,source:`<AutomationAppLayout><AutomationAppHeader title={title} actions={<AutomationAppStatus intent={intent}>{status}</AutomationAppStatus>} /><AutomationAppSection title="Details"><AutomationAppBadge>{category}</AutomationAppBadge>{content}</AutomationAppSection></AutomationAppLayout>`},{id:`confirmation`,description:`An explicit confirmation for a consequential command.`,source:`<AutomationAppDialog trigger={<AutomationAppButton variant="destructive">Delete</AutomationAppButton>} title="Delete profile?" description="Runs stop and this cannot be undone." footer={<><AutomationAppButton variant="secondary">Cancel</AutomationAppButton><AutomationAppButton variant="destructive" onClick={confirm}>Delete</AutomationAppButton></>}>{detail}</AutomationAppDialog>`}]};export{a as AUTOMATION_APP_UI_FOUNDATION_CATALOG};
package/dist/index.d.ts CHANGED
@@ -1,15 +1,218 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
- export { v as AutomationAppAlert, w as AutomationAppBadge, x as AutomationAppButton, y as AutomationAppCheckbox, z as AutomationAppDialog, B as AutomationAppEmptyState, C as AutomationAppErrorState, D as AutomationAppField, E as AutomationAppGrid, F as AutomationAppHeader, G as AutomationAppInput, H as AutomationAppLayout, I as AutomationAppLoadingState, J as AutomationAppPopover, K as AutomationAppProgress, L as AutomationAppRadioGroup, M as AutomationAppSection, N as AutomationAppSelect, O as AutomationAppSeparator, P as AutomationAppSkeleton, Q as AutomationAppStack, R as AutomationAppStatus, S as AutomationAppSwitch, T as AutomationAppTable, U as AutomationAppTabs, V as AutomationAppTextarea, W as AutomationAppToast, X as AutomationAppTooltip } from './data-display-CmUtl6XB.js';
4
- import 'class-variance-authority/types';
5
- import 'class-variance-authority';
6
- import '@base-ui/react/button';
7
-
1
+ import { ComponentProps, ReactElement, ReactNode } from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import { Button } from "@base-ui/react/button";
4
+ //#region src/portal-provider.d.ts
8
5
  interface AutomationAppPortalProviderProps {
9
- children: ReactNode;
10
- overlayRoot: HTMLElement;
6
+ children: ReactNode;
7
+ overlayRoot: HTMLElement;
11
8
  }
12
- declare function AutomationAppPortalProvider({ children, overlayRoot, }: AutomationAppPortalProviderProps): react_jsx_runtime.JSX.Element;
9
+ declare function AutomationAppPortalProvider({ children, overlayRoot }: AutomationAppPortalProviderProps): import("react/jsx-runtime").JSX.Element;
13
10
  declare function useAutomationAppOverlayRoot(): HTMLElement;
14
-
15
- export { AutomationAppPortalProvider, useAutomationAppOverlayRoot };
11
+ //#endregion
12
+ //#region src/layout.d.ts
13
+ declare const stackVariants: (props?: ({
14
+ align?: "start" | "center" | "end" | "stretch" | null | undefined;
15
+ direction?: "horizontal" | "vertical" | null | undefined;
16
+ gap?: "sm" | "md" | "lg" | null | undefined;
17
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
18
+ declare const gridVariants: (props?: ({
19
+ columns?: 1 | 2 | 3 | 4 | null | undefined;
20
+ gap?: "sm" | "md" | "lg" | null | undefined;
21
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
22
+ type AutomationAppLayoutProps = ComponentProps<"main">;
23
+ declare function AutomationAppLayout({ className, ...props }: AutomationAppLayoutProps): import("react/jsx-runtime").JSX.Element;
24
+ interface AutomationAppHeaderProps extends Omit<ComponentProps<"header">, "title"> {
25
+ actions?: ReactNode;
26
+ description?: ReactNode;
27
+ title: ReactNode;
28
+ }
29
+ declare function AutomationAppHeader({ actions, children, className, description, title, ...props }: AutomationAppHeaderProps): import("react/jsx-runtime").JSX.Element;
30
+ interface AutomationAppSectionProps extends Omit<ComponentProps<"section">, "title"> {
31
+ actions?: ReactNode;
32
+ description?: ReactNode;
33
+ title?: ReactNode;
34
+ }
35
+ declare function AutomationAppSection({ actions, children, className, description, title, ...props }: AutomationAppSectionProps): import("react/jsx-runtime").JSX.Element;
36
+ type AutomationAppStackProps = ComponentProps<"div"> & VariantProps<typeof stackVariants>;
37
+ declare function AutomationAppStack({ align, className, direction, gap, ...props }: AutomationAppStackProps): import("react/jsx-runtime").JSX.Element;
38
+ type AutomationAppGridProps = ComponentProps<"div"> & VariantProps<typeof gridVariants>;
39
+ declare function AutomationAppGrid({ className, columns, gap, ...props }: AutomationAppGridProps): import("react/jsx-runtime").JSX.Element;
40
+ //#endregion
41
+ //#region src/form.d.ts
42
+ declare const buttonVariants: (props?: ({
43
+ size?: "sm" | "md" | "lg" | null | undefined;
44
+ variant?: "primary" | "secondary" | "ghost" | "destructive" | null | undefined;
45
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
46
+ interface AutomationAppFieldProps extends ComponentProps<"div"> {
47
+ children: ReactElement;
48
+ description?: ReactNode;
49
+ disabled?: boolean;
50
+ error?: ReactNode;
51
+ label: ReactNode;
52
+ required?: boolean;
53
+ }
54
+ declare function AutomationAppField({ children, className, description, disabled, error, label, required, ...props }: AutomationAppFieldProps): import("react/jsx-runtime").JSX.Element;
55
+ type AutomationAppButtonProps = Button.Props & VariantProps<typeof buttonVariants>;
56
+ declare function AutomationAppButton({ className, size, variant, ...props }: AutomationAppButtonProps): import("react/jsx-runtime").JSX.Element;
57
+ type AutomationAppInputProps = ComponentProps<"input">;
58
+ declare function AutomationAppInput({ className, ...props }: AutomationAppInputProps): import("react/jsx-runtime").JSX.Element;
59
+ type AutomationAppTextareaProps = ComponentProps<"textarea">;
60
+ declare function AutomationAppTextarea({ className, ...props }: AutomationAppTextareaProps): import("react/jsx-runtime").JSX.Element;
61
+ interface AutomationAppSelectOption {
62
+ disabled?: boolean;
63
+ label: ReactNode;
64
+ textValue?: string;
65
+ value: string;
66
+ }
67
+ interface AutomationAppSelectProps {
68
+ "aria-describedby"?: string;
69
+ "aria-invalid"?: boolean | "false" | "true";
70
+ className?: string;
71
+ defaultValue?: string | null;
72
+ disabled?: boolean;
73
+ id?: string;
74
+ name?: string;
75
+ onValueChange?: (value: string | null) => void;
76
+ options: readonly AutomationAppSelectOption[];
77
+ placeholder?: ReactNode;
78
+ required?: boolean;
79
+ value?: string | null;
80
+ }
81
+ type AutomationAppCheckboxProps = Omit<ComponentProps<"input">, "type">;
82
+ declare function AutomationAppCheckbox({ className, ...props }: AutomationAppCheckboxProps): import("react/jsx-runtime").JSX.Element;
83
+ interface AutomationAppRadioOption {
84
+ disabled?: boolean;
85
+ label: ReactNode;
86
+ value: string;
87
+ }
88
+ interface AutomationAppRadioGroupProps extends Omit<ComponentProps<"fieldset">, "defaultValue" | "onChange"> {
89
+ defaultValue?: string;
90
+ legend: ReactNode;
91
+ name: string;
92
+ onValueChange?: (value: string) => void;
93
+ options: readonly AutomationAppRadioOption[];
94
+ value?: string;
95
+ }
96
+ declare function AutomationAppRadioGroup({ className, defaultValue, disabled, legend, name, onValueChange, options, value, ...props }: AutomationAppRadioGroupProps): import("react/jsx-runtime").JSX.Element;
97
+ interface AutomationAppSwitchProps extends Omit<ComponentProps<"button">, "onChange" | "role" | "type" | "value"> {
98
+ checked?: boolean;
99
+ defaultChecked?: boolean;
100
+ label: ReactNode;
101
+ onCheckedChange?: (checked: boolean) => void;
102
+ }
103
+ declare function AutomationAppSwitch({ checked, className, defaultChecked, disabled, label, onCheckedChange, onClick, ...props }: AutomationAppSwitchProps): import("react/jsx-runtime").JSX.Element;
104
+ declare function AutomationAppSelect({ className, defaultValue, disabled, id, name, onValueChange, options, placeholder, required, value, ...triggerProps }: AutomationAppSelectProps): import("react/jsx-runtime").JSX.Element;
105
+ //#endregion
106
+ //#region src/feedback.d.ts
107
+ interface AutomationAppDialogProps {
108
+ children: ReactNode;
109
+ className?: string;
110
+ closeLabel?: string;
111
+ defaultOpen?: boolean;
112
+ description?: ReactNode;
113
+ footer?: ReactNode;
114
+ onOpenChange?: (open: boolean) => void;
115
+ open?: boolean;
116
+ title: ReactNode;
117
+ trigger: ReactElement;
118
+ }
119
+ declare function AutomationAppDialog({ children, className, closeLabel, defaultOpen, description, footer, onOpenChange, open, title, trigger }: AutomationAppDialogProps): import("react/jsx-runtime").JSX.Element;
120
+ interface AutomationAppPopoverProps {
121
+ children: ReactNode;
122
+ className?: string;
123
+ defaultOpen?: boolean;
124
+ description?: ReactNode;
125
+ onOpenChange?: (open: boolean) => void;
126
+ open?: boolean;
127
+ title?: ReactNode;
128
+ trigger: ReactElement;
129
+ }
130
+ declare function AutomationAppPopover({ children, className, defaultOpen, description, onOpenChange, open, title, trigger }: AutomationAppPopoverProps): import("react/jsx-runtime").JSX.Element;
131
+ interface AutomationAppTooltipProps {
132
+ children: ReactElement;
133
+ content: ReactNode;
134
+ delay?: number;
135
+ disabled?: boolean;
136
+ side?: "bottom" | "left" | "right" | "top";
137
+ }
138
+ declare function AutomationAppTooltip({ children, content, delay, disabled, side }: AutomationAppTooltipProps): import("react/jsx-runtime").JSX.Element;
139
+ declare const toastVariants: (props?: ({
140
+ intent?: "info" | "success" | "warning" | "error" | null | undefined;
141
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
142
+ declare const alertVariants: (props?: ({
143
+ intent?: "info" | "success" | "warning" | "error" | null | undefined;
144
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
145
+ interface AutomationAppAlertProps extends VariantProps<typeof alertVariants> {
146
+ action?: ReactNode;
147
+ children: ReactNode;
148
+ className?: string;
149
+ title?: ReactNode;
150
+ }
151
+ declare function AutomationAppAlert({ action, children, className, intent, title }: AutomationAppAlertProps): import("react/jsx-runtime").JSX.Element;
152
+ interface AutomationAppToastProps extends VariantProps<typeof toastVariants> {
153
+ action?: ReactNode;
154
+ className?: string;
155
+ closeLabel?: string;
156
+ description?: ReactNode;
157
+ onClose?: () => void;
158
+ open?: boolean;
159
+ title: ReactNode;
160
+ }
161
+ declare function AutomationAppToast({ action, className, closeLabel, description, intent, onClose, open, title }: AutomationAppToastProps): import("react").ReactPortal | null;
162
+ //#endregion
163
+ //#region src/status.d.ts
164
+ declare const statusVariants: (props?: ({
165
+ intent?: "info" | "success" | "warning" | "error" | "neutral" | null | undefined;
166
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
167
+ declare const badgeVariants: (props?: ({
168
+ intent?: "info" | "success" | "warning" | "error" | "neutral" | null | undefined;
169
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
170
+ type AutomationAppStatusProps = ComponentProps<"span"> & VariantProps<typeof statusVariants>;
171
+ declare function AutomationAppStatus({ className, intent, ...props }: AutomationAppStatusProps): import("react/jsx-runtime").JSX.Element;
172
+ type AutomationAppBadgeProps = ComponentProps<"span"> & VariantProps<typeof badgeVariants>;
173
+ declare function AutomationAppBadge({ className, intent, ...props }: AutomationAppBadgeProps): import("react/jsx-runtime").JSX.Element;
174
+ type AutomationAppSkeletonProps = ComponentProps<"div">;
175
+ declare function AutomationAppSkeleton({ className, ...props }: AutomationAppSkeletonProps): import("react/jsx-runtime").JSX.Element;
176
+ interface AutomationAppProgressProps extends Omit<ComponentProps<"progress">, "children"> {
177
+ label: string;
178
+ }
179
+ declare function AutomationAppProgress({ className, label, max, ...props }: AutomationAppProgressProps): import("react/jsx-runtime").JSX.Element;
180
+ interface AutomationAppStateProps extends Omit<ComponentProps<"div">, "title"> {
181
+ action?: ReactNode;
182
+ description?: ReactNode;
183
+ title: ReactNode;
184
+ }
185
+ declare function AutomationAppLoadingState({ "aria-live": ariaLive, title, ...props }: AutomationAppStateProps): import("react/jsx-runtime").JSX.Element;
186
+ declare function AutomationAppEmptyState(props: AutomationAppStateProps): import("react/jsx-runtime").JSX.Element;
187
+ interface AutomationAppErrorStateProps extends AutomationAppStateProps {
188
+ severity?: "error" | "warning";
189
+ }
190
+ declare function AutomationAppErrorState({ severity, ...props }: AutomationAppErrorStateProps): import("react/jsx-runtime").JSX.Element;
191
+ //#endregion
192
+ //#region src/navigation.d.ts
193
+ interface AutomationAppTabItem {
194
+ disabled?: boolean;
195
+ id: string;
196
+ label: ReactNode;
197
+ panel: ReactNode;
198
+ }
199
+ interface AutomationAppTabsProps extends Omit<ComponentProps<"div">, "onChange"> {
200
+ defaultValue?: string;
201
+ label: string;
202
+ onValueChange?: (value: string) => void;
203
+ tabs: readonly AutomationAppTabItem[];
204
+ value?: string;
205
+ }
206
+ declare function AutomationAppTabs({ className, defaultValue, label, onValueChange, tabs, value, ...props }: AutomationAppTabsProps): import("react/jsx-runtime").JSX.Element;
207
+ //#endregion
208
+ //#region src/data-display.d.ts
209
+ type AutomationAppSeparatorProps = ComponentProps<"hr">;
210
+ declare function AutomationAppSeparator({ className, ...props }: AutomationAppSeparatorProps): import("react/jsx-runtime").JSX.Element;
211
+ interface AutomationAppTableProps extends ComponentProps<"table"> {
212
+ caption?: ReactNode;
213
+ captionPosition?: "bottom" | "top";
214
+ containerClassName?: string;
215
+ }
216
+ declare function AutomationAppTable({ caption, captionPosition, children, className, containerClassName, ...props }: AutomationAppTableProps): import("react/jsx-runtime").JSX.Element;
217
+ //#endregion
218
+ export { AutomationAppAlert, AutomationAppBadge, AutomationAppButton, AutomationAppCheckbox, AutomationAppDialog, AutomationAppEmptyState, AutomationAppErrorState, AutomationAppField, AutomationAppGrid, AutomationAppHeader, AutomationAppInput, AutomationAppLayout, AutomationAppLoadingState, AutomationAppPopover, AutomationAppPortalProvider, AutomationAppProgress, AutomationAppRadioGroup, AutomationAppSection, AutomationAppSelect, AutomationAppSeparator, AutomationAppSkeleton, AutomationAppStack, AutomationAppStatus, AutomationAppSwitch, AutomationAppTable, AutomationAppTabs, AutomationAppTextarea, AutomationAppToast, AutomationAppTooltip, useAutomationAppOverlayRoot };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{Tooltip as q}from"@base-ui/react/tooltip";import{createContext as U,useContext as X}from"react";import{jsx as L}from"react/jsx-runtime";var $=U(null);function W({children:a,overlayRoot:t}){if(!t)throw new Error("AutomationAppPortalProvider requires an overlay root");return L($.Provider,{value:t,children:L(q.Provider,{delay:400,children:a})})}function x(){let a=X($);if(!a)throw new Error("AutomationAppPortalProvider is required");return a}import{cva as H}from"class-variance-authority";import{clsx as J}from"clsx";import{twMerge as Q}from"tailwind-merge";function n(...a){return Q(J(a))}import{jsx as y,jsxs as T}from"react/jsx-runtime";var Y=H("aaui-stack",{variants:{align:{start:"aaui-stack--align-start",center:"aaui-stack--align-center",end:"aaui-stack--align-end",stretch:"aaui-stack--align-stretch"},direction:{horizontal:"aaui-stack--horizontal",vertical:"aaui-stack--vertical"},gap:{sm:"aaui-gap-sm",md:"aaui-gap-md",lg:"aaui-gap-lg"}},defaultVariants:{align:"stretch",direction:"vertical",gap:"md"}}),Z=H("aaui-grid",{variants:{columns:{1:"aaui-grid--1",2:"aaui-grid--2",3:"aaui-grid--3",4:"aaui-grid--4"},gap:{sm:"aaui-gap-sm",md:"aaui-gap-md",lg:"aaui-gap-lg"}},defaultVariants:{columns:1,gap:"md"}});function j({className:a,...t}){return y("main",{className:n("aaui-layout",a),...t})}function aa({actions:a,children:t,className:e,description:o,title:i,...r}){return T("header",{className:n("aaui-header",e),...r,children:[T("div",{className:"aaui-header__copy",children:[y("h1",{className:"aaui-header__title",children:i}),o?y("div",{className:"aaui-header__description",children:o}):null]}),a?y("div",{className:"aaui-header__actions",children:a}):null,t]})}function ta({actions:a,children:t,className:e,description:o,title:i,...r}){return T("section",{className:n("aaui-section",e),...r,children:[i||o||a?T("div",{className:"aaui-section__header",children:[T("div",{className:"aaui-section__copy",children:[i?y("h2",{className:"aaui-section__title",children:i}):null,o?y("div",{className:"aaui-section__description",children:o}):null]}),a?y("div",{className:"aaui-section__actions",children:a}):null]}):null,t]})}function ea({align:a,className:t,direction:e,gap:o,...i}){return y("div",{className:n(Y({align:a,direction:e,gap:o}),t),...i})}function oa({className:a,columns:t,gap:e,...o}){return y("div",{className:n(Z({columns:t,gap:e}),a),...o})}import{Button as ia}from"@base-ui/react/button";import{Input as na}from"@base-ui/react/input";import{Select as N}from"@base-ui/react/select";import{cva as ra}from"class-variance-authority";import{CheckIcon as pa,ChevronDownIcon as sa}from"lucide-react";import{cloneElement as la,isValidElement as ua,useId as da,useState as ca}from"react";import{jsx as l,jsxs as R}from"react/jsx-runtime";var ma=ra("aaui-button",{variants:{size:{sm:"aaui-button--sm",md:"aaui-button--md",lg:"aaui-button--lg"},variant:{primary:"aaui-button--primary",secondary:"aaui-button--secondary",ghost:"aaui-button--ghost",destructive:"aaui-button--destructive"}},defaultVariants:{size:"md",variant:"primary"}});function Aa({children:a,className:t,description:e,disabled:o,error:i,label:r,required:c,...u}){let f=da(),d=a.props,g=d.id??`aaui-field-${f}`,P=e?`${g}-description`:void 0,_=i?`${g}-error`:void 0,m=[d["aria-describedby"],P,_].filter(Boolean).join(" ")||void 0,I=ua(a)?la(a,{"aria-describedby":m,...i?{"aria-invalid":!0}:{},...o===void 0?{}:{disabled:o},id:g,...c===void 0?{}:{required:c}}):a;return R("div",{className:n("aaui-field",t),"data-disabled":o||void 0,"data-invalid":!!i||void 0,...u,children:[R("label",{className:"aaui-field__label",htmlFor:g,children:[r,c?l("span",{"aria-hidden":"true",children:" *"}):null]}),I,e?l("div",{className:"aaui-field__description",id:P,children:e}):null,i?l("div",{className:"aaui-field__error",id:_,role:"alert",children:i}):null]})}function fa({className:a,size:t,variant:e,...o}){return l(ia,{className:n(ma({size:t,variant:e}),a),...o})}function va({className:a,...t}){return l(na,{className:n("aaui-input",a),...t})}function ga({className:a,...t}){return l("textarea",{className:n("aaui-textarea",a),...t})}function Pa({className:a,...t}){return l("input",{...t,className:n("aaui-checkbox",a),type:"checkbox"})}function ba({className:a,defaultValue:t,disabled:e,legend:o,name:i,onValueChange:r,options:c,value:u,...f}){return R("fieldset",{className:n("aaui-radio-group",a),disabled:e,...f,children:[l("legend",{className:"aaui-radio-group__legend",children:o}),l("div",{className:"aaui-radio-group__options",children:c.map(d=>R("label",{className:"aaui-radio-group__option",children:[l("input",{checked:u===void 0?void 0:u===d.value,defaultChecked:u===void 0?t===d.value:void 0,disabled:d.disabled,name:i,onChange:()=>r?.(d.value),type:"radio",value:d.value}),l("span",{children:d.label})]},d.value))})]})}function Na({checked:a,className:t,defaultChecked:e=!1,disabled:o,label:i,onCheckedChange:r,onClick:c,...u}){let[f,d]=ca(e),g=a??f;return R("button",{...u,"aria-checked":g,className:n("aaui-switch",t),disabled:o,onClick:P=>{if(c?.(P),P.defaultPrevented)return;let _=!g;a===void 0&&d(_),r?.(_)},role:"switch",type:"button",children:[l("span",{"aria-hidden":"true",className:"aaui-switch__track",children:l("span",{className:"aaui-switch__thumb"})}),l("span",{className:"aaui-switch__label",children:i})]})}function _a({className:a,defaultValue:t,disabled:e,id:o,name:i,onValueChange:r,options:c,placeholder:u,required:f,value:d,...g}){let P=x(),_=c.map(m=>({label:m.label,value:m.value}));return R(N.Root,{defaultValue:t,disabled:e,id:o,items:_,name:i,onValueChange:m=>r?.(m),required:f,value:d,children:[R(N.Trigger,{className:n("aaui-select__trigger",a),...g,children:[l(N.Value,{placeholder:u}),l(N.Icon,{className:"aaui-select__icon",children:l(sa,{"aria-hidden":"true"})})]}),l(N.Portal,{container:P,children:l(N.Positioner,{alignItemWithTrigger:!1,className:"aaui-select__positioner",sideOffset:4,children:l(N.Popup,{className:"aaui-select__popup",children:l(N.List,{className:"aaui-select__list",children:c.map(m=>R(N.Item,{className:"aaui-select__item",disabled:m.disabled,label:m.textValue,value:m.value,children:[l(N.ItemText,{children:m.label}),l(N.ItemIndicator,{className:"aaui-select__indicator",children:l(pa,{"aria-hidden":"true"})})]},m.value))})})})})]})}import{Dialog as C}from"@base-ui/react/dialog";import{Popover as S}from"@base-ui/react/popover";import{Tooltip as V}from"@base-ui/react/tooltip";import{cva as F}from"class-variance-authority";import{XIcon as G}from"lucide-react";import{createPortal as ya}from"react-dom";import{jsx as s,jsxs as b}from"react/jsx-runtime";function ha({children:a,className:t,closeLabel:e="Close",defaultOpen:o,description:i,footer:r,onOpenChange:c,open:u,title:f,trigger:d}){let g=x();return b(C.Root,{defaultOpen:o,onOpenChange:P=>c?.(P),open:u,children:[s(C.Trigger,{render:d}),b(C.Portal,{container:g,children:[s(C.Backdrop,{className:"aaui-dialog__backdrop"}),b(C.Popup,{className:n("aaui-dialog",t),children:[b("div",{className:"aaui-dialog__header",children:[b("div",{className:"aaui-dialog__copy",children:[s(C.Title,{className:"aaui-dialog__title",children:f}),i?s(C.Description,{className:"aaui-dialog__description",children:i}):null]}),s(C.Close,{className:"aaui-icon-button","aria-label":e,children:s(G,{"aria-hidden":"true"})})]}),s("div",{className:"aaui-dialog__content",children:a}),r?s("div",{className:"aaui-dialog__footer",children:r}):null]})]})]})}function xa({children:a,className:t,defaultOpen:e,description:o,onOpenChange:i,open:r,title:c,trigger:u}){let f=x();return b(S.Root,{defaultOpen:e,onOpenChange:d=>i?.(d),open:r,children:[s(S.Trigger,{render:u}),s(S.Portal,{container:f,children:s(S.Positioner,{align:"start",sideOffset:6,children:b(S.Popup,{className:n("aaui-popover",t),children:[c?s(S.Title,{className:"aaui-popover__title",children:c}):null,o?s(S.Description,{className:"aaui-popover__description",children:o}):null,a]})})})]})}function Ra({children:a,content:t,delay:e,disabled:o,side:i="top"}){let r=x();return b(V.Root,{disabled:o,children:[s(V.Trigger,{delay:e,render:a}),s(V.Portal,{container:r,children:s(V.Positioner,{side:i,sideOffset:4,children:s(V.Popup,{className:"aaui-tooltip",children:t})})})]})}var Ca=F("aaui-toast",{variants:{intent:{info:"aaui-toast--info",success:"aaui-toast--success",warning:"aaui-toast--warning",error:"aaui-toast--error"}},defaultVariants:{intent:"info"}}),Sa=F("aaui-alert",{variants:{intent:{info:"aaui-alert--info",success:"aaui-alert--success",warning:"aaui-alert--warning",error:"aaui-alert--error"}},defaultVariants:{intent:"info"}});function ka({action:a,children:t,className:e,intent:o,title:i}){return b("div",{className:n(Sa({intent:o}),e),role:o==="error"?"alert":"status",children:[b("div",{className:"aaui-alert__copy",children:[i?s("div",{className:"aaui-alert__title",children:i}):null,s("div",{className:"aaui-alert__description",children:t})]}),a?s("div",{className:"aaui-alert__action",children:a}):null]})}function Ta({action:a,className:t,closeLabel:e="Dismiss",description:o,intent:i,onClose:r,open:c=!0,title:u}){let f=x();return c?ya(b("div",{"aria-atomic":"true",className:n(Ca({intent:i}),t),role:i==="error"?"alert":"status",children:[b("div",{className:"aaui-toast__copy",children:[s("div",{className:"aaui-toast__title",children:u}),o?s("div",{className:"aaui-toast__description",children:o}):null]}),a?s("div",{className:"aaui-toast__action",children:a}):null,r?s("button",{"aria-label":e,className:"aaui-icon-button",onClick:r,type:"button",children:s(G,{"aria-hidden":"true"})}):null]}),f):null}import{cva as M}from"class-variance-authority";import{CircleAlertIcon as Va,CircleXIcon as Ia,InfoIcon as wa,Loader2Icon as Oa}from"lucide-react";import{jsx as v,jsxs as z}from"react/jsx-runtime";var Ea=M("aaui-status",{variants:{intent:{neutral:"aaui-status--neutral",info:"aaui-status--info",success:"aaui-status--success",warning:"aaui-status--warning",error:"aaui-status--error"}},defaultVariants:{intent:"neutral"}}),Da=M("aaui-badge",{variants:{intent:{neutral:"aaui-badge--neutral",info:"aaui-badge--info",success:"aaui-badge--success",warning:"aaui-badge--warning",error:"aaui-badge--error"}},defaultVariants:{intent:"neutral"}});function Ba({className:a,intent:t,...e}){return v("span",{className:n(Ea({intent:t}),a),...e})}function La({className:a,intent:t,...e}){return v("span",{className:n(Da({intent:t}),a),...e})}function $a({className:a,...t}){return v("div",{"aria-hidden":"true",className:n("aaui-skeleton",a),...t})}function Ha({className:a,label:t,max:e=100,...o}){return z("label",{className:n("aaui-progress",a),children:[v("span",{className:"aaui-progress__label",children:t}),v("progress",{max:e,...o})]})}function O({action:a,children:t,className:e,description:o,title:i,...r}){return z("div",{className:n("aaui-state",e),...r,children:[v("div",{className:"aaui-state__icon",children:t}),v("div",{className:"aaui-state__title",children:i}),o?v("div",{className:"aaui-state__description",children:o}):null,a?v("div",{className:"aaui-state__action",children:a}):null]})}function Fa({"aria-live":a="polite",title:t,...e}){return v(O,{"aria-live":a,title:t,...e,children:v(Oa,{"aria-hidden":"true",className:"aaui-spin"})})}function Ga(a){return v(O,{...a,children:v(wa,{"aria-hidden":"true"})})}function Ma({severity:a="error",...t}){let e=a==="warning"?Va:Ia;return v(O,{className:`aaui-state--${a}`,role:"alert",...t,children:v(e,{"aria-hidden":"true"})})}import{useId as za,useState as Ka}from"react";import{jsx as E,jsxs as Ua}from"react/jsx-runtime";function qa({className:a,defaultValue:t,label:e,onValueChange:o,tabs:i,value:r,...c}){let u=za(),f=i.find(p=>!p.disabled)?.id,[d,g]=Ka(t??f??""),P=r??d,_=p=>{r===void 0&&g(p),o?.(p)},m=(p,h)=>{h!==void 0&&(p.preventDefault(),_(h.id),document.getElementById(`${u}-tab-${h.id}`)?.focus())},I=(p,h)=>{let A=i.filter(w=>!w.disabled);if(A.length===0)return;let k=A.findIndex(w=>w.id===P),K=(Math.max(k,0)+h+A.length)%A.length;m(p,A[K])},B=i.find(p=>p.id===P&&!p.disabled);return Ua("div",{className:n("aaui-tabs",a),...c,children:[E("div",{"aria-label":e,className:"aaui-tabs__list",role:"tablist",children:i.map(p=>{let h=p.id===B?.id;return E("button",{"aria-controls":`${u}-panel-${p.id}`,"aria-selected":h,className:"aaui-tabs__tab",disabled:p.disabled,id:`${u}-tab-${p.id}`,onClick:()=>_(p.id),onKeyDown:A=>{A.key==="ArrowRight"||A.key==="ArrowDown"?I(A,1):A.key==="ArrowLeft"||A.key==="ArrowUp"?I(A,-1):A.key==="Home"?m(A,i.find(k=>!k.disabled)):A.key==="End"&&m(A,[...i].reverse().find(k=>!k.disabled))},role:"tab",tabIndex:h?0:-1,type:"button",children:p.label},p.id)})}),i.map(p=>E("div",{"aria-labelledby":`${u}-tab-${p.id}`,className:"aaui-tabs__panel",hidden:p.id!==B?.id,id:`${u}-panel-${p.id}`,role:"tabpanel",tabIndex:0,children:p.panel},p.id))]})}import{jsx as D,jsxs as Ja}from"react/jsx-runtime";function Xa({className:a,...t}){return D("hr",{className:n("aaui-separator",a),...t})}function Wa({caption:a,captionPosition:t="top",children:e,className:o,containerClassName:i,...r}){return D("div",{className:n("aaui-table__scroll",i),children:Ja("table",{className:n("aaui-table",o),...r,children:[a?D("caption",{"data-position":t,children:a}):null,e]})})}export{ka as AutomationAppAlert,La as AutomationAppBadge,fa as AutomationAppButton,Pa as AutomationAppCheckbox,ha as AutomationAppDialog,Ga as AutomationAppEmptyState,Ma as AutomationAppErrorState,Aa as AutomationAppField,oa as AutomationAppGrid,aa as AutomationAppHeader,va as AutomationAppInput,j as AutomationAppLayout,Fa as AutomationAppLoadingState,xa as AutomationAppPopover,W as AutomationAppPortalProvider,Ha as AutomationAppProgress,ba as AutomationAppRadioGroup,ta as AutomationAppSection,_a as AutomationAppSelect,Xa as AutomationAppSeparator,$a as AutomationAppSkeleton,ea as AutomationAppStack,Ba as AutomationAppStatus,Na as AutomationAppSwitch,Wa as AutomationAppTable,qa as AutomationAppTabs,ga as AutomationAppTextarea,Ta as AutomationAppToast,Ra as AutomationAppTooltip,x as useAutomationAppOverlayRoot};
1
+ import{Tooltip as e}from"@base-ui/react/tooltip";import{cloneElement as t,createContext as n,isValidElement as r,useContext as i,useId as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{cva as l}from"class-variance-authority";import{clsx as u}from"clsx";import{twMerge as d}from"tailwind-merge";import{Button as f}from"@base-ui/react/button";import{Input as p}from"@base-ui/react/input";import{Select as m}from"@base-ui/react/select";import{CheckIcon as h,ChevronDownIcon as g,CircleAlertIcon as _,CircleXIcon as v,InfoIcon as y,Loader2Icon as b,XIcon as x}from"lucide-react";import{Dialog as S}from"@base-ui/react/dialog";import{Popover as C}from"@base-ui/react/popover";import{createPortal as ee}from"react-dom";const w=n(null);function te({children:t,overlayRoot:n}){if(!n)throw Error(`AutomationAppPortalProvider requires an overlay root`);return s(w.Provider,{value:n,children:s(e.Provider,{delay:400,children:t})})}function T(){let e=i(w);if(!e)throw Error(`AutomationAppPortalProvider is required`);return e}function E(...e){return d(u(e))}const D=l(`aaui-stack`,{variants:{align:{start:`aaui-stack--align-start`,center:`aaui-stack--align-center`,end:`aaui-stack--align-end`,stretch:`aaui-stack--align-stretch`},direction:{horizontal:`aaui-stack--horizontal`,vertical:`aaui-stack--vertical`},gap:{sm:`aaui-gap-sm`,md:`aaui-gap-md`,lg:`aaui-gap-lg`}},defaultVariants:{align:`stretch`,direction:`vertical`,gap:`md`}}),O=l(`aaui-grid`,{variants:{columns:{1:`aaui-grid--1`,2:`aaui-grid--2`,3:`aaui-grid--3`,4:`aaui-grid--4`},gap:{sm:`aaui-gap-sm`,md:`aaui-gap-md`,lg:`aaui-gap-lg`}},defaultVariants:{columns:1,gap:`md`}});function k({className:e,...t}){return s(`main`,{className:E(`aaui-layout`,e),...t})}function A({actions:e,children:t,className:n,description:r,title:i,...a}){return c(`header`,{className:E(`aaui-header`,n),...a,children:[c(`div`,{className:`aaui-header__copy`,children:[s(`h1`,{className:`aaui-header__title`,children:i}),r?s(`div`,{className:`aaui-header__description`,children:r}):null]}),e?s(`div`,{className:`aaui-header__actions`,children:e}):null,t]})}function j({actions:e,children:t,className:n,description:r,title:i,...a}){return c(`section`,{className:E(`aaui-section`,n),...a,children:[i||r||e?c(`div`,{className:`aaui-section__header`,children:[c(`div`,{className:`aaui-section__copy`,children:[i?s(`h2`,{className:`aaui-section__title`,children:i}):null,r?s(`div`,{className:`aaui-section__description`,children:r}):null]}),e?s(`div`,{className:`aaui-section__actions`,children:e}):null]}):null,t]})}function M({align:e,className:t,direction:n,gap:r,...i}){return s(`div`,{className:E(D({align:e,direction:n,gap:r}),t),...i})}function N({className:e,columns:t,gap:n,...r}){return s(`div`,{className:E(O({columns:t,gap:n}),e),...r})}const P=l(`aaui-button`,{variants:{size:{sm:`aaui-button--sm`,md:`aaui-button--md`,lg:`aaui-button--lg`},variant:{primary:`aaui-button--primary`,secondary:`aaui-button--secondary`,ghost:`aaui-button--ghost`,destructive:`aaui-button--destructive`}},defaultVariants:{size:`md`,variant:`primary`}});function F({children:e,className:n,description:i,disabled:o,error:l,label:u,required:d,...f}){let p=a(),m=e.props,h=m.id??`aaui-field-${p}`,g=i?`${h}-description`:void 0,_=l?`${h}-error`:void 0,v=[m[`aria-describedby`],g,_].filter(Boolean).join(` `)||void 0,y=r(e)?t(e,{"aria-describedby":v,...l?{"aria-invalid":!0}:{},...o===void 0?{}:{disabled:o},id:h,...d===void 0?{}:{required:d}}):e;return c(`div`,{className:E(`aaui-field`,n),"data-disabled":o||void 0,"data-invalid":!!l||void 0,...f,children:[c(`label`,{className:`aaui-field__label`,htmlFor:h,children:[u,d?s(`span`,{"aria-hidden":`true`,children:` *`}):null]}),y,i?s(`div`,{className:`aaui-field__description`,id:g,children:i}):null,l?s(`div`,{className:`aaui-field__error`,id:_,role:`alert`,children:l}):null]})}function I({className:e,size:t,variant:n,...r}){return s(f,{className:E(P({size:t,variant:n}),e),...r})}function L({className:e,...t}){return s(p,{className:E(`aaui-input`,e),...t})}function R({className:e,...t}){return s(`textarea`,{className:E(`aaui-textarea`,e),...t})}function z({className:e,...t}){return s(`input`,{...t,className:E(`aaui-checkbox`,e),type:`checkbox`})}function B({className:e,defaultValue:t,disabled:n,legend:r,name:i,onValueChange:a,options:o,value:l,...u}){return c(`fieldset`,{className:E(`aaui-radio-group`,e),disabled:n,...u,children:[s(`legend`,{className:`aaui-radio-group__legend`,children:r}),s(`div`,{className:`aaui-radio-group__options`,children:o.map(e=>c(`label`,{className:`aaui-radio-group__option`,children:[s(`input`,{checked:l===void 0?void 0:l===e.value,defaultChecked:l===void 0?t===e.value:void 0,disabled:e.disabled,name:i,onChange:()=>a?.(e.value),type:`radio`,value:e.value}),s(`span`,{children:e.label})]},e.value))})]})}function V({checked:e,className:t,defaultChecked:n=!1,disabled:r,label:i,onCheckedChange:a,onClick:l,...u}){let[d,f]=o(n),p=e??d;return c(`button`,{...u,"aria-checked":p,className:E(`aaui-switch`,t),disabled:r,onClick:t=>{if(l?.(t),t.defaultPrevented)return;let n=!p;e===void 0&&f(n),a?.(n)},role:`switch`,type:`button`,children:[s(`span`,{"aria-hidden":`true`,className:`aaui-switch__track`,children:s(`span`,{className:`aaui-switch__thumb`})}),s(`span`,{className:`aaui-switch__label`,children:i})]})}function ne({className:e,defaultValue:t,disabled:n,id:r,name:i,onValueChange:a,options:o,placeholder:l,required:u,value:d,...f}){let p=T(),_=o.map(e=>({label:e.label,value:e.value}));return c(m.Root,{defaultValue:t,disabled:n,id:r,items:_,name:i,onValueChange:e=>a?.(e),required:u,value:d,children:[c(m.Trigger,{className:E(`aaui-select__trigger`,e),...f,children:[s(m.Value,{placeholder:l}),s(m.Icon,{className:`aaui-select__icon`,children:s(g,{"aria-hidden":`true`})})]}),s(m.Portal,{container:p,children:s(m.Positioner,{alignItemWithTrigger:!1,className:`aaui-select__positioner`,sideOffset:4,children:s(m.Popup,{className:`aaui-select__popup`,children:s(m.List,{className:`aaui-select__list`,children:o.map(e=>c(m.Item,{className:`aaui-select__item`,disabled:e.disabled,label:e.textValue,value:e.value,children:[s(m.ItemText,{children:e.label}),s(m.ItemIndicator,{className:`aaui-select__indicator`,children:s(h,{"aria-hidden":`true`})})]},e.value))})})})})]})}function H({children:e,className:t,closeLabel:n=`Close`,defaultOpen:r,description:i,footer:a,onOpenChange:o,open:l,title:u,trigger:d}){let f=T();return c(S.Root,{defaultOpen:r,onOpenChange:e=>o?.(e),open:l,children:[s(S.Trigger,{render:d}),c(S.Portal,{container:f,children:[s(S.Backdrop,{className:`aaui-dialog__backdrop`}),c(S.Popup,{className:E(`aaui-dialog`,t),children:[c(`div`,{className:`aaui-dialog__header`,children:[c(`div`,{className:`aaui-dialog__copy`,children:[s(S.Title,{className:`aaui-dialog__title`,children:u}),i?s(S.Description,{className:`aaui-dialog__description`,children:i}):null]}),s(S.Close,{className:`aaui-icon-button`,"aria-label":n,children:s(x,{"aria-hidden":`true`})})]}),s(`div`,{className:`aaui-dialog__content`,children:e}),a?s(`div`,{className:`aaui-dialog__footer`,children:a}):null]})]})]})}function U({children:e,className:t,defaultOpen:n,description:r,onOpenChange:i,open:a,title:o,trigger:l}){let u=T();return c(C.Root,{defaultOpen:n,onOpenChange:e=>i?.(e),open:a,children:[s(C.Trigger,{render:l}),s(C.Portal,{container:u,children:s(C.Positioner,{align:`start`,sideOffset:6,children:c(C.Popup,{className:E(`aaui-popover`,t),children:[o?s(C.Title,{className:`aaui-popover__title`,children:o}):null,r?s(C.Description,{className:`aaui-popover__description`,children:r}):null,e]})})})]})}function W({children:t,content:n,delay:r,disabled:i,side:a=`top`}){let o=T();return c(e.Root,{disabled:i,children:[s(e.Trigger,{delay:r,render:t}),s(e.Portal,{container:o,children:s(e.Positioner,{side:a,sideOffset:4,children:s(e.Popup,{className:`aaui-tooltip`,children:n})})})]})}const G=l(`aaui-toast`,{variants:{intent:{info:`aaui-toast--info`,success:`aaui-toast--success`,warning:`aaui-toast--warning`,error:`aaui-toast--error`}},defaultVariants:{intent:`info`}}),K=l(`aaui-alert`,{variants:{intent:{info:`aaui-alert--info`,success:`aaui-alert--success`,warning:`aaui-alert--warning`,error:`aaui-alert--error`}},defaultVariants:{intent:`info`}});function q({action:e,children:t,className:n,intent:r,title:i}){return c(`div`,{className:E(K({intent:r}),n),role:r===`error`?`alert`:`status`,children:[c(`div`,{className:`aaui-alert__copy`,children:[i?s(`div`,{className:`aaui-alert__title`,children:i}):null,s(`div`,{className:`aaui-alert__description`,children:t})]}),e?s(`div`,{className:`aaui-alert__action`,children:e}):null]})}function J({action:e,className:t,closeLabel:n=`Dismiss`,description:r,intent:i,onClose:a,open:o=!0,title:l}){let u=T();return o?ee(c(`div`,{"aria-atomic":`true`,className:E(G({intent:i}),t),role:i===`error`?`alert`:`status`,children:[c(`div`,{className:`aaui-toast__copy`,children:[s(`div`,{className:`aaui-toast__title`,children:l}),r?s(`div`,{className:`aaui-toast__description`,children:r}):null]}),e?s(`div`,{className:`aaui-toast__action`,children:e}):null,a?s(`button`,{"aria-label":n,className:`aaui-icon-button`,onClick:a,type:`button`,children:s(x,{"aria-hidden":`true`})}):null]}),u):null}const Y=l(`aaui-status`,{variants:{intent:{neutral:`aaui-status--neutral`,info:`aaui-status--info`,success:`aaui-status--success`,warning:`aaui-status--warning`,error:`aaui-status--error`}},defaultVariants:{intent:`neutral`}}),X=l(`aaui-badge`,{variants:{intent:{neutral:`aaui-badge--neutral`,info:`aaui-badge--info`,success:`aaui-badge--success`,warning:`aaui-badge--warning`,error:`aaui-badge--error`}},defaultVariants:{intent:`neutral`}});function Z({className:e,intent:t,...n}){return s(`span`,{className:E(Y({intent:t}),e),...n})}function re({className:e,intent:t,...n}){return s(`span`,{className:E(X({intent:t}),e),...n})}function ie({className:e,...t}){return s(`div`,{"aria-hidden":`true`,className:E(`aaui-skeleton`,e),...t})}function ae({className:e,label:t,max:n=100,...r}){return c(`label`,{className:E(`aaui-progress`,e),children:[s(`span`,{className:`aaui-progress__label`,children:t}),s(`progress`,{max:n,...r})]})}function Q({action:e,children:t,className:n,description:r,title:i,...a}){return c(`div`,{className:E(`aaui-state`,n),...a,children:[s(`div`,{className:`aaui-state__icon`,children:t}),s(`div`,{className:`aaui-state__title`,children:i}),r?s(`div`,{className:`aaui-state__description`,children:r}):null,e?s(`div`,{className:`aaui-state__action`,children:e}):null]})}function oe({"aria-live":e=`polite`,title:t,...n}){return s(Q,{"aria-live":e,title:t,...n,children:s(b,{"aria-hidden":`true`,className:`aaui-spin`})})}function $(e){return s(Q,{...e,children:s(y,{"aria-hidden":`true`})})}function se({severity:e=`error`,...t}){let n=e===`warning`?_:v;return s(Q,{className:`aaui-state--${e}`,role:`alert`,...t,children:s(n,{"aria-hidden":`true`})})}function ce({className:e,defaultValue:t,label:n,onValueChange:r,tabs:i,value:l,...u}){let d=a(),f=i.find(e=>!e.disabled)?.id,[p,m]=o(t??f??``),h=l??p,g=e=>{l===void 0&&m(e),r?.(e)},_=(e,t)=>{t!==void 0&&(e.preventDefault(),g(t.id),document.getElementById(`${d}-tab-${t.id}`)?.focus())},v=(e,t)=>{let n=i.filter(e=>!e.disabled);if(n.length===0)return;let r=n.findIndex(e=>e.id===h),a=(Math.max(r,0)+t+n.length)%n.length;_(e,n[a])},y=i.find(e=>e.id===h&&!e.disabled);return c(`div`,{className:E(`aaui-tabs`,e),...u,children:[s(`div`,{"aria-label":n,className:`aaui-tabs__list`,role:`tablist`,children:i.map(e=>{let t=e.id===y?.id;return s(`button`,{"aria-controls":`${d}-panel-${e.id}`,"aria-selected":t,className:`aaui-tabs__tab`,disabled:e.disabled,id:`${d}-tab-${e.id}`,onClick:()=>g(e.id),onKeyDown:e=>{e.key===`ArrowRight`||e.key===`ArrowDown`?v(e,1):e.key===`ArrowLeft`||e.key===`ArrowUp`?v(e,-1):e.key===`Home`?_(e,i.find(e=>!e.disabled)):e.key===`End`&&_(e,[...i].reverse().find(e=>!e.disabled))},role:`tab`,tabIndex:t?0:-1,type:`button`,children:e.label},e.id)})}),i.map(e=>s(`div`,{"aria-labelledby":`${d}-tab-${e.id}`,className:`aaui-tabs__panel`,hidden:e.id!==y?.id,id:`${d}-panel-${e.id}`,role:`tabpanel`,tabIndex:0,children:e.panel},e.id))]})}function le({className:e,...t}){return s(`hr`,{className:E(`aaui-separator`,e),...t})}function ue({caption:e,captionPosition:t=`top`,children:n,className:r,containerClassName:i,...a}){return s(`div`,{className:E(`aaui-table__scroll`,i),children:c(`table`,{className:E(`aaui-table`,r),...a,children:[e?s(`caption`,{"data-position":t,children:e}):null,n]})})}export{q as AutomationAppAlert,re as AutomationAppBadge,I as AutomationAppButton,z as AutomationAppCheckbox,H as AutomationAppDialog,$ as AutomationAppEmptyState,se as AutomationAppErrorState,F as AutomationAppField,N as AutomationAppGrid,A as AutomationAppHeader,L as AutomationAppInput,k as AutomationAppLayout,oe as AutomationAppLoadingState,U as AutomationAppPopover,te as AutomationAppPortalProvider,ae as AutomationAppProgress,B as AutomationAppRadioGroup,j as AutomationAppSection,ne as AutomationAppSelect,le as AutomationAppSeparator,ie as AutomationAppSkeleton,M as AutomationAppStack,Z as AutomationAppStatus,V as AutomationAppSwitch,ue as AutomationAppTable,ce as AutomationAppTabs,R as AutomationAppTextarea,J as AutomationAppToast,W as AutomationAppTooltip,T as useAutomationAppOverlayRoot};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ablehi/automation-app-ui",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Iframe-native public UI Foundation for Ablehi Automation Apps.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -30,7 +30,7 @@
30
30
  "registry": "https://registry.npmjs.org/"
31
31
  },
32
32
  "dependencies": {
33
- "@ablehi/automation-app-host-bridge": "0.3.0",
33
+ "@ablehi/automation-app-host-bridge": "0.3.1",
34
34
  "@base-ui/react": "1.6.0",
35
35
  "class-variance-authority": "0.7.1",
36
36
  "clsx": "2.1.1",
@@ -42,23 +42,17 @@
42
42
  "react-dom": "19.2.4"
43
43
  },
44
44
  "devDependencies": {
45
- "@ablehi/server-api-contract": "0.10.0",
46
- "@types/node": "20.19.41",
45
+ "@ablehi/server-api-contract": "0.10.1",
47
46
  "@types/react": "19.2.14",
48
47
  "@types/react-dom": "19.2.3",
49
- "esbuild": "0.27.7",
50
- "eslint": "9.39.2",
51
48
  "jsdom": "27.4.0",
52
49
  "react": "19.2.4",
53
- "react-dom": "19.2.4",
54
- "tsup": "8.5.1",
55
- "typescript": "5.9.3",
56
- "vitest": "4.1.7"
50
+ "react-dom": "19.2.4"
57
51
  },
58
52
  "scripts": {
59
- "build": "tsup && esbuild styles.css --bundle --minify --outfile=dist/styles.css",
53
+ "build": "tsdown && esbuild styles.css --bundle --minify --outfile=dist/styles.css",
60
54
  "typecheck": "tsc --noEmit -p tsconfig.json",
61
- "lint": "eslint src --ext .ts,.tsx",
55
+ "lint": "eslint src",
62
56
  "test": "vitest run",
63
57
  "check": "pnpm build && pnpm typecheck && pnpm lint && pnpm test"
64
58
  }
@@ -1,208 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import { VariantProps } from 'class-variance-authority';
4
- import * as react from 'react';
5
- import { ComponentProps, ReactNode, ReactElement } from 'react';
6
- import { Button } from '@base-ui/react/button';
7
-
8
- declare const stackVariants: (props?: ({
9
- align?: "center" | "start" | "end" | "stretch" | null | undefined;
10
- direction?: "horizontal" | "vertical" | null | undefined;
11
- gap?: "sm" | "md" | "lg" | null | undefined;
12
- } & class_variance_authority_types.ClassProp) | undefined) => string;
13
- declare const gridVariants: (props?: ({
14
- columns?: 2 | 1 | 3 | 4 | null | undefined;
15
- gap?: "sm" | "md" | "lg" | null | undefined;
16
- } & class_variance_authority_types.ClassProp) | undefined) => string;
17
- type AutomationAppLayoutProps = ComponentProps<"main">;
18
- declare function AutomationAppLayout({ className, ...props }: AutomationAppLayoutProps): react_jsx_runtime.JSX.Element;
19
- interface AutomationAppHeaderProps extends Omit<ComponentProps<"header">, "title"> {
20
- actions?: ReactNode;
21
- description?: ReactNode;
22
- title: ReactNode;
23
- }
24
- declare function AutomationAppHeader({ actions, children, className, description, title, ...props }: AutomationAppHeaderProps): react_jsx_runtime.JSX.Element;
25
- interface AutomationAppSectionProps extends Omit<ComponentProps<"section">, "title"> {
26
- actions?: ReactNode;
27
- description?: ReactNode;
28
- title?: ReactNode;
29
- }
30
- declare function AutomationAppSection({ actions, children, className, description, title, ...props }: AutomationAppSectionProps): react_jsx_runtime.JSX.Element;
31
- type AutomationAppStackProps = ComponentProps<"div"> & VariantProps<typeof stackVariants>;
32
- declare function AutomationAppStack({ align, className, direction, gap, ...props }: AutomationAppStackProps): react_jsx_runtime.JSX.Element;
33
- type AutomationAppGridProps = ComponentProps<"div"> & VariantProps<typeof gridVariants>;
34
- declare function AutomationAppGrid({ className, columns, gap, ...props }: AutomationAppGridProps): react_jsx_runtime.JSX.Element;
35
-
36
- declare const buttonVariants: (props?: ({
37
- size?: "sm" | "md" | "lg" | null | undefined;
38
- variant?: "primary" | "secondary" | "ghost" | "destructive" | null | undefined;
39
- } & class_variance_authority_types.ClassProp) | undefined) => string;
40
- interface AutomationAppFieldProps extends ComponentProps<"div"> {
41
- children: ReactElement;
42
- description?: ReactNode;
43
- disabled?: boolean;
44
- error?: ReactNode;
45
- label: ReactNode;
46
- required?: boolean;
47
- }
48
- declare function AutomationAppField({ children, className, description, disabled, error, label, required, ...props }: AutomationAppFieldProps): react_jsx_runtime.JSX.Element;
49
- type AutomationAppButtonProps = Button.Props & VariantProps<typeof buttonVariants>;
50
- declare function AutomationAppButton({ className, size, variant, ...props }: AutomationAppButtonProps): react_jsx_runtime.JSX.Element;
51
- type AutomationAppInputProps = ComponentProps<"input">;
52
- declare function AutomationAppInput({ className, ...props }: AutomationAppInputProps): react_jsx_runtime.JSX.Element;
53
- type AutomationAppTextareaProps = ComponentProps<"textarea">;
54
- declare function AutomationAppTextarea({ className, ...props }: AutomationAppTextareaProps): react_jsx_runtime.JSX.Element;
55
- interface AutomationAppSelectOption {
56
- disabled?: boolean;
57
- label: ReactNode;
58
- textValue?: string;
59
- value: string;
60
- }
61
- interface AutomationAppSelectProps {
62
- "aria-describedby"?: string;
63
- "aria-invalid"?: boolean | "false" | "true";
64
- className?: string;
65
- defaultValue?: string | null;
66
- disabled?: boolean;
67
- id?: string;
68
- name?: string;
69
- onValueChange?: (value: string | null) => void;
70
- options: readonly AutomationAppSelectOption[];
71
- placeholder?: ReactNode;
72
- required?: boolean;
73
- value?: string | null;
74
- }
75
- type AutomationAppCheckboxProps = Omit<ComponentProps<"input">, "type">;
76
- declare function AutomationAppCheckbox({ className, ...props }: AutomationAppCheckboxProps): react_jsx_runtime.JSX.Element;
77
- interface AutomationAppRadioOption {
78
- disabled?: boolean;
79
- label: ReactNode;
80
- value: string;
81
- }
82
- interface AutomationAppRadioGroupProps extends Omit<ComponentProps<"fieldset">, "defaultValue" | "onChange"> {
83
- defaultValue?: string;
84
- legend: ReactNode;
85
- name: string;
86
- onValueChange?: (value: string) => void;
87
- options: readonly AutomationAppRadioOption[];
88
- value?: string;
89
- }
90
- declare function AutomationAppRadioGroup({ className, defaultValue, disabled, legend, name, onValueChange, options, value, ...props }: AutomationAppRadioGroupProps): react_jsx_runtime.JSX.Element;
91
- interface AutomationAppSwitchProps extends Omit<ComponentProps<"button">, "onChange" | "role" | "type" | "value"> {
92
- checked?: boolean;
93
- defaultChecked?: boolean;
94
- label: ReactNode;
95
- onCheckedChange?: (checked: boolean) => void;
96
- }
97
- declare function AutomationAppSwitch({ checked, className, defaultChecked, disabled, label, onCheckedChange, onClick, ...props }: AutomationAppSwitchProps): react_jsx_runtime.JSX.Element;
98
- declare function AutomationAppSelect({ className, defaultValue, disabled, id, name, onValueChange, options, placeholder, required, value, ...triggerProps }: AutomationAppSelectProps): react_jsx_runtime.JSX.Element;
99
-
100
- interface AutomationAppDialogProps {
101
- children: ReactNode;
102
- className?: string;
103
- closeLabel?: string;
104
- defaultOpen?: boolean;
105
- description?: ReactNode;
106
- footer?: ReactNode;
107
- onOpenChange?: (open: boolean) => void;
108
- open?: boolean;
109
- title: ReactNode;
110
- trigger: ReactElement;
111
- }
112
- declare function AutomationAppDialog({ children, className, closeLabel, defaultOpen, description, footer, onOpenChange, open, title, trigger, }: AutomationAppDialogProps): react_jsx_runtime.JSX.Element;
113
- interface AutomationAppPopoverProps {
114
- children: ReactNode;
115
- className?: string;
116
- defaultOpen?: boolean;
117
- description?: ReactNode;
118
- onOpenChange?: (open: boolean) => void;
119
- open?: boolean;
120
- title?: ReactNode;
121
- trigger: ReactElement;
122
- }
123
- declare function AutomationAppPopover({ children, className, defaultOpen, description, onOpenChange, open, title, trigger, }: AutomationAppPopoverProps): react_jsx_runtime.JSX.Element;
124
- interface AutomationAppTooltipProps {
125
- children: ReactElement;
126
- content: ReactNode;
127
- delay?: number;
128
- disabled?: boolean;
129
- side?: "bottom" | "left" | "right" | "top";
130
- }
131
- declare function AutomationAppTooltip({ children, content, delay, disabled, side, }: AutomationAppTooltipProps): react_jsx_runtime.JSX.Element;
132
- declare const toastVariants: (props?: ({
133
- intent?: "error" | "info" | "success" | "warning" | null | undefined;
134
- } & class_variance_authority_types.ClassProp) | undefined) => string;
135
- declare const alertVariants: (props?: ({
136
- intent?: "error" | "info" | "success" | "warning" | null | undefined;
137
- } & class_variance_authority_types.ClassProp) | undefined) => string;
138
- interface AutomationAppAlertProps extends VariantProps<typeof alertVariants> {
139
- action?: ReactNode;
140
- children: ReactNode;
141
- className?: string;
142
- title?: ReactNode;
143
- }
144
- declare function AutomationAppAlert({ action, children, className, intent, title, }: AutomationAppAlertProps): react_jsx_runtime.JSX.Element;
145
- interface AutomationAppToastProps extends VariantProps<typeof toastVariants> {
146
- action?: ReactNode;
147
- className?: string;
148
- closeLabel?: string;
149
- description?: ReactNode;
150
- onClose?: () => void;
151
- open?: boolean;
152
- title: ReactNode;
153
- }
154
- declare function AutomationAppToast({ action, className, closeLabel, description, intent, onClose, open, title, }: AutomationAppToastProps): react.ReactPortal | null;
155
-
156
- declare const statusVariants: (props?: ({
157
- intent?: "error" | "info" | "success" | "warning" | "neutral" | null | undefined;
158
- } & class_variance_authority_types.ClassProp) | undefined) => string;
159
- declare const badgeVariants: (props?: ({
160
- intent?: "error" | "info" | "success" | "warning" | "neutral" | null | undefined;
161
- } & class_variance_authority_types.ClassProp) | undefined) => string;
162
- type AutomationAppStatusProps = ComponentProps<"span"> & VariantProps<typeof statusVariants>;
163
- declare function AutomationAppStatus({ className, intent, ...props }: AutomationAppStatusProps): react_jsx_runtime.JSX.Element;
164
- type AutomationAppBadgeProps = ComponentProps<"span"> & VariantProps<typeof badgeVariants>;
165
- declare function AutomationAppBadge({ className, intent, ...props }: AutomationAppBadgeProps): react_jsx_runtime.JSX.Element;
166
- type AutomationAppSkeletonProps = ComponentProps<"div">;
167
- declare function AutomationAppSkeleton({ className, ...props }: AutomationAppSkeletonProps): react_jsx_runtime.JSX.Element;
168
- interface AutomationAppProgressProps extends Omit<ComponentProps<"progress">, "children"> {
169
- label: string;
170
- }
171
- declare function AutomationAppProgress({ className, label, max, ...props }: AutomationAppProgressProps): react_jsx_runtime.JSX.Element;
172
- interface AutomationAppStateProps extends Omit<ComponentProps<"div">, "title"> {
173
- action?: ReactNode;
174
- description?: ReactNode;
175
- title: ReactNode;
176
- }
177
- declare function AutomationAppLoadingState({ "aria-live": ariaLive, title, ...props }: AutomationAppStateProps): react_jsx_runtime.JSX.Element;
178
- declare function AutomationAppEmptyState(props: AutomationAppStateProps): react_jsx_runtime.JSX.Element;
179
- interface AutomationAppErrorStateProps extends AutomationAppStateProps {
180
- severity?: "error" | "warning";
181
- }
182
- declare function AutomationAppErrorState({ severity, ...props }: AutomationAppErrorStateProps): react_jsx_runtime.JSX.Element;
183
-
184
- interface AutomationAppTabItem {
185
- disabled?: boolean;
186
- id: string;
187
- label: ReactNode;
188
- panel: ReactNode;
189
- }
190
- interface AutomationAppTabsProps extends Omit<ComponentProps<"div">, "onChange"> {
191
- defaultValue?: string;
192
- label: string;
193
- onValueChange?: (value: string) => void;
194
- tabs: readonly AutomationAppTabItem[];
195
- value?: string;
196
- }
197
- declare function AutomationAppTabs({ className, defaultValue, label, onValueChange, tabs, value, ...props }: AutomationAppTabsProps): react_jsx_runtime.JSX.Element;
198
-
199
- type AutomationAppSeparatorProps = ComponentProps<"hr">;
200
- declare function AutomationAppSeparator({ className, ...props }: AutomationAppSeparatorProps): react_jsx_runtime.JSX.Element;
201
- interface AutomationAppTableProps extends ComponentProps<"table"> {
202
- caption?: ReactNode;
203
- captionPosition?: "bottom" | "top";
204
- containerClassName?: string;
205
- }
206
- declare function AutomationAppTable({ caption, captionPosition, children, className, containerClassName, ...props }: AutomationAppTableProps): react_jsx_runtime.JSX.Element;
207
-
208
- export { type AutomationAppGridProps as A, AutomationAppEmptyState as B, AutomationAppErrorState as C, AutomationAppField as D, AutomationAppGrid as E, AutomationAppHeader as F, AutomationAppInput as G, AutomationAppLayout as H, AutomationAppLoadingState as I, AutomationAppPopover as J, AutomationAppProgress as K, AutomationAppRadioGroup as L, AutomationAppSection as M, AutomationAppSelect as N, AutomationAppSeparator as O, AutomationAppSkeleton as P, AutomationAppStack as Q, AutomationAppStatus as R, AutomationAppSwitch as S, AutomationAppTable as T, AutomationAppTabs as U, AutomationAppTextarea as V, AutomationAppToast as W, AutomationAppTooltip as X, type AutomationAppHeaderProps as a, type AutomationAppSectionProps as b, type AutomationAppStackProps as c, type AutomationAppButtonProps as d, type AutomationAppFieldProps as e, type AutomationAppSelectProps as f, type AutomationAppCheckboxProps as g, type AutomationAppRadioGroupProps as h, type AutomationAppSwitchProps as i, type AutomationAppTabsProps as j, type AutomationAppDialogProps as k, type AutomationAppPopoverProps as l, type AutomationAppToastProps as m, type AutomationAppTooltipProps as n, type AutomationAppAlertProps as o, type AutomationAppStateProps as p, type AutomationAppErrorStateProps as q, type AutomationAppStatusProps as r, type AutomationAppBadgeProps as s, type AutomationAppProgressProps as t, type AutomationAppTableProps as u, AutomationAppAlert as v, AutomationAppBadge as w, AutomationAppButton as x, AutomationAppCheckbox as y, AutomationAppDialog as z };