@exponential-at/ui-solid 0.0.0-stage → 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.
- package/LICENSE +201 -0
- package/NOTICE +54 -0
- package/README.md +135 -2
- package/dist/chunks/image-loading-status-DZOoj4RQ.js +1724 -0
- package/dist/chunks/image-loading-status-DZOoj4RQ.js.map +1 -0
- package/dist/exponential-ui-solid.css +2 -0
- package/dist/index.js +12305 -0
- package/dist/index.js.map +1 -0
- package/dist/primitives.js +8439 -0
- package/dist/primitives.js.map +1 -0
- package/dist/types/behaviors/bubble-input.d.ts +35 -0
- package/dist/types/behaviors/collapsible.d.ts +15 -0
- package/dist/types/behaviors/dialog.d.ts +116 -0
- package/dist/types/behaviors/dismissable-layer.d.ts +48 -0
- package/dist/types/behaviors/drag-to-dismiss.d.ts +10 -0
- package/dist/types/behaviors/element-size.d.ts +7 -0
- package/dist/types/behaviors/focus-guards.d.ts +4 -0
- package/dist/types/behaviors/focus-scope.d.ts +20 -0
- package/dist/types/behaviors/grace-area.d.ts +10 -0
- package/dist/types/behaviors/image-loading-status.d.ts +4 -0
- package/dist/types/behaviors/index.d.ts +23 -0
- package/dist/types/behaviors/listbox.d.ts +44 -0
- package/dist/types/behaviors/menu.d.ts +95 -0
- package/dist/types/behaviors/modal.d.ts +3 -0
- package/dist/types/behaviors/picker-popover.d.ts +22 -0
- package/dist/types/behaviors/popper.d.ts +49 -0
- package/dist/types/behaviors/portal.d.ts +11 -0
- package/dist/types/behaviors/presence.d.ts +7 -0
- package/dist/types/behaviors/roving-focus.d.ts +30 -0
- package/dist/types/behaviors/scroll-lock.d.ts +4 -0
- package/dist/types/behaviors/search-match.d.ts +6 -0
- package/dist/types/behaviors/slider.d.ts +8 -0
- package/dist/types/behaviors/style-writer.d.ts +8 -0
- package/dist/types/behaviors/typeahead.d.ts +11 -0
- package/dist/types/behaviors/visually-hidden.d.ts +6 -0
- package/dist/types/bind-attrs.d.ts +4 -0
- package/dist/types/context.d.ts +74 -0
- package/dist/types/create-surface.d.ts +58 -0
- package/dist/types/extensions.d.ts +25 -0
- package/dist/types/form.d.ts +63 -0
- package/dist/types/host-surface.d.ts +33 -0
- package/dist/types/host.d.ts +37 -0
- package/dist/types/icons.d.ts +56 -0
- package/dist/types/index.d.ts +39 -0
- package/dist/types/inputs.d.ts +27 -0
- package/dist/types/list.d.ts +33 -0
- package/dist/types/markdown.d.ts +10 -0
- package/dist/types/media.d.ts +16 -0
- package/dist/types/natives/actions.d.ts +13 -0
- package/dist/types/natives/bound.d.ts +3 -0
- package/dist/types/natives/chart.d.ts +4 -0
- package/dist/types/natives/chips.d.ts +7 -0
- package/dist/types/natives/choice-tiles.d.ts +4 -0
- package/dist/types/natives/code.d.ts +4 -0
- package/dist/types/natives/dates.d.ts +30 -0
- package/dist/types/natives/feedback.d.ts +19 -0
- package/dist/types/natives/index.d.ts +6 -0
- package/dist/types/natives/inputs.d.ts +20 -0
- package/dist/types/natives/layout.d.ts +12 -0
- package/dist/types/natives/media.d.ts +14 -0
- package/dist/types/natives/nav.d.ts +14 -0
- package/dist/types/natives/overlays.d.ts +19 -0
- package/dist/types/natives/owners.d.ts +2 -0
- package/dist/types/natives/pending.d.ts +3 -0
- package/dist/types/natives/resizable.d.ts +4 -0
- package/dist/types/natives/search.d.ts +45 -0
- package/dist/types/natives/select.d.ts +10 -0
- package/dist/types/natives/shared.d.ts +50 -0
- package/dist/types/natives/table.d.ts +7 -0
- package/dist/types/natives/text.d.ts +5 -0
- package/dist/types/node-view.d.ts +83 -0
- package/dist/types/platform.d.ts +12 -0
- package/dist/types/primitives/alert-dialog.d.ts +24 -0
- package/dist/types/primitives/alert.d.ts +6 -0
- package/dist/types/primitives/avatar-color.d.ts +1 -0
- package/dist/types/primitives/avatar.d.ts +12 -0
- package/dist/types/primitives/badge.d.ts +8 -0
- package/dist/types/primitives/breadcrumb.d.ts +12 -0
- package/dist/types/primitives/button.d.ts +12 -0
- package/dist/types/primitives/calendar.d.ts +188 -0
- package/dist/types/primitives/card.d.ts +9 -0
- package/dist/types/primitives/checkbox.d.ts +14 -0
- package/dist/types/primitives/choice-tiles.d.ts +59 -0
- package/dist/types/primitives/cn.d.ts +1 -0
- package/dist/types/primitives/code-block.d.ts +34 -0
- package/dist/types/primitives/collapsible.d.ts +15 -0
- package/dist/types/primitives/command.d.ts +51 -0
- package/dist/types/primitives/context-ring.d.ts +14 -0
- package/dist/types/primitives/dialog-arms.d.ts +2 -0
- package/dist/types/primitives/dialog.d.ts +34 -0
- package/dist/types/primitives/disclosure-header.d.ts +7 -0
- package/dist/types/primitives/dock-card.d.ts +41 -0
- package/dist/types/primitives/dropdown-menu.d.ts +73 -0
- package/dist/types/primitives/empty-state.d.ts +19 -0
- package/dist/types/primitives/glass-card.d.ts +3 -0
- package/dist/types/primitives/hover-card.d.ts +28 -0
- package/dist/types/primitives/icon-disc.d.ts +11 -0
- package/dist/types/primitives/index.d.ts +51 -0
- package/dist/types/primitives/input.d.ts +6 -0
- package/dist/types/primitives/kbd.d.ts +4 -0
- package/dist/types/primitives/label.d.ts +3 -0
- package/dist/types/primitives/menu-surface.d.ts +1 -0
- package/dist/types/primitives/meter.d.ts +8 -0
- package/dist/types/primitives/popover.d.ts +31 -0
- package/dist/types/primitives/progress-ring.d.ts +12 -0
- package/dist/types/primitives/progress.d.ts +9 -0
- package/dist/types/primitives/scroll-area.d.ts +19 -0
- package/dist/types/primitives/segmented-control.d.ts +23 -0
- package/dist/types/primitives/select.d.ts +51 -0
- package/dist/types/primitives/separator.d.ts +6 -0
- package/dist/types/primitives/sheet-chrome.d.ts +11 -0
- package/dist/types/primitives/sheet.d.ts +21 -0
- package/dist/types/primitives/skeleton.d.ts +3 -0
- package/dist/types/primitives/spinner.d.ts +9 -0
- package/dist/types/primitives/switch.d.ts +14 -0
- package/dist/types/primitives/table.d.ts +11 -0
- package/dist/types/primitives/tabs.d.ts +29 -0
- package/dist/types/primitives/textarea.d.ts +5 -0
- package/dist/types/primitives/toast.d.ts +16 -0
- package/dist/types/primitives/tooltip.d.ts +34 -0
- package/dist/types/primitives/truncate.d.ts +1 -0
- package/dist/types/primitives/use-media-query.d.ts +4 -0
- package/dist/types/primitives/use-mobile.d.ts +4 -0
- package/dist/types/primitives/use-sheet-drag.d.ts +20 -0
- package/dist/types/style.d.ts +6 -0
- package/dist/types/surface.d.ts +99 -0
- package/package.json +55 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cn, getInitials } from "@exponential-at/ui/web/primitives";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import { CODE_TOKEN_CLASS, type CodeBlockLineVariantProps, type CodeBlockVariantProps } from "@exponential-at/ui/web/primitives";
|
|
3
|
+
import { type StyleInput } from "../style.js";
|
|
4
|
+
import { type ButtonProps } from "./button.js";
|
|
5
|
+
declare function CodeBlock(props: ComponentProps<`div`> & CodeBlockVariantProps & {
|
|
6
|
+
size?: `default` | `sm`;
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
declare const CodeBlockHeader: (props: ComponentProps<`div`>) => JSX.Element;
|
|
9
|
+
declare const CodeBlockTitle: (props: ComponentProps<`div`>) => JSX.Element;
|
|
10
|
+
declare const CodeBlockActions: (props: ComponentProps<`div`>) => JSX.Element;
|
|
11
|
+
declare const CodeBlockFooter: (props: ComponentProps<`div`>) => JSX.Element;
|
|
12
|
+
/** The copy action: ui-copy → ui-check for 2s, announced politely. A copy
|
|
13
|
+
* that did not happen (no clipboard, a refusal) changes nothing. */
|
|
14
|
+
declare function CodeBlockCopyButton(props: ButtonProps & {
|
|
15
|
+
value: string;
|
|
16
|
+
labels?: {
|
|
17
|
+
copy: string;
|
|
18
|
+
copied: string;
|
|
19
|
+
};
|
|
20
|
+
}): JSX.Element;
|
|
21
|
+
declare function CodeBlockContent(props: Omit<ComponentProps<`pre`>, `style`> & {
|
|
22
|
+
/** React-form (camelCase) or kebab-case keys, merged after the block's own. */
|
|
23
|
+
style?: StyleInput;
|
|
24
|
+
wrap?: boolean;
|
|
25
|
+
lineNumbers?: boolean;
|
|
26
|
+
startLine?: number;
|
|
27
|
+
/** A catalog language (`ts`, `json`, `ansi`…): string children are
|
|
28
|
+
* tokenized and coloured per token kind. */
|
|
29
|
+
language?: string;
|
|
30
|
+
/** Lines shown before the block scrolls; 0 = unbounded. */
|
|
31
|
+
maxLines?: number;
|
|
32
|
+
}): JSX.Element;
|
|
33
|
+
declare function CodeBlockLine(props: ComponentProps<`span`> & CodeBlockLineVariantProps): JSX.Element;
|
|
34
|
+
export { CodeBlock, CodeBlockHeader, CodeBlockTitle, CodeBlockActions, CodeBlockCopyButton, CodeBlockContent, CodeBlockLine, CodeBlockFooter, CODE_TOKEN_CLASS };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
export type CollapsibleProps = ComponentProps<`div`> & {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function Collapsible(props: CollapsibleProps): JSX.Element;
|
|
9
|
+
declare function CollapsibleTrigger(props: ComponentProps<`button`>): JSX.Element;
|
|
10
|
+
export type CollapsibleContentProps = Omit<ComponentProps<`div`>, `style`> & {
|
|
11
|
+
forceMount?: boolean;
|
|
12
|
+
style?: JSX.CSSProperties;
|
|
13
|
+
};
|
|
14
|
+
declare function CollapsibleContent(props: CollapsibleContentProps): JSX.Element;
|
|
15
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import { type CommandFilter } from "@exponential-at/ui/web/primitives";
|
|
3
|
+
type CommandProps = Omit<ComponentProps<`div`>, `onChange`> & {
|
|
4
|
+
/** The selected item's value (controlled). */
|
|
5
|
+
value?: string;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
onValueChange?: (value: string) => void;
|
|
8
|
+
/** Score an item against the query (0 hides it); default `commandScore`. */
|
|
9
|
+
filter?: CommandFilter;
|
|
10
|
+
/** `false` = the host filters: every item shows, in its own order. */
|
|
11
|
+
shouldFilter?: boolean;
|
|
12
|
+
/** Arrow keys wrap around. */
|
|
13
|
+
loop?: boolean;
|
|
14
|
+
/** The accessible label (a visually hidden <label> for the input). */
|
|
15
|
+
label?: string;
|
|
16
|
+
};
|
|
17
|
+
declare function Command(props: CommandProps): JSX.Element;
|
|
18
|
+
type CommandInputProps = Omit<ComponentProps<`input`>, `value` | `type` | `ref`> & {
|
|
19
|
+
/** The query (controlled). */
|
|
20
|
+
value?: string;
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
onValueChange?: (query: string) => void;
|
|
23
|
+
/** The clear button's accessible name. */
|
|
24
|
+
clearLabel?: string;
|
|
25
|
+
ref?: (el: HTMLInputElement) => void;
|
|
26
|
+
};
|
|
27
|
+
declare function CommandInput(props: CommandInputProps): JSX.Element;
|
|
28
|
+
declare function CommandList(props: ComponentProps<`div`>): JSX.Element;
|
|
29
|
+
declare function CommandEmpty(props: ComponentProps<`div`>): JSX.Element;
|
|
30
|
+
type CommandGroupProps = Omit<ComponentProps<`div`>, `value`> & {
|
|
31
|
+
heading?: JSX.Element;
|
|
32
|
+
value?: string;
|
|
33
|
+
forceMount?: boolean;
|
|
34
|
+
};
|
|
35
|
+
declare function CommandGroup(props: CommandGroupProps): JSX.Element;
|
|
36
|
+
type CommandItemProps = Omit<ComponentProps<`div`>, `onSelect`> & {
|
|
37
|
+
/** The value it filters and selects by (default: its text, trimmed). */
|
|
38
|
+
value?: string;
|
|
39
|
+
keywords?: string[];
|
|
40
|
+
onSelect?: (value: string) => void;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
/** Always rendered, whatever the query. */
|
|
43
|
+
forceMount?: boolean;
|
|
44
|
+
};
|
|
45
|
+
declare function CommandItem(props: CommandItemProps): JSX.Element;
|
|
46
|
+
declare function CommandSeparator(props: ComponentProps<`div`> & {
|
|
47
|
+
alwaysRender?: boolean;
|
|
48
|
+
}): JSX.Element;
|
|
49
|
+
declare function CommandShortcut(props: ComponentProps<`span`>): JSX.Element;
|
|
50
|
+
export { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, CommandShortcut };
|
|
51
|
+
export type { CommandProps, CommandInputProps, CommandItemProps, CommandGroupProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type RingTone } from "@exponential-at/ui/web/primitives";
|
|
2
|
+
import { type ButtonProps } from "./button.js";
|
|
3
|
+
export { RING_RADIUS, RING_SIZE, RING_STROKE, RING_TONE_CLASS, ringGeometry } from "@exponential-at/ui/web/primitives";
|
|
4
|
+
export type { RingGeometry, RingTone } from "@exponential-at/ui/web/primitives";
|
|
5
|
+
export interface ContextRingProps extends ButtonProps {
|
|
6
|
+
/** How full the context window is — null while nothing measured it. */
|
|
7
|
+
percent: number | null | undefined;
|
|
8
|
+
/** Which of the three tones to paint. Default: `normal`. */
|
|
9
|
+
tone?: RingTone;
|
|
10
|
+
/** Draw the empty track anyway (the run has other usage worth opening).
|
|
11
|
+
* Without it, a run with no context window renders NOTHING. */
|
|
12
|
+
showEmpty?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function ContextRing(props: ContextRingProps): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import { type AsProps, type DialogContentPartProps, type DialogRootProps } from "../behaviors/dialog.js";
|
|
3
|
+
import { type ButtonProps } from "./button.js";
|
|
4
|
+
import { type DialogMobileArm } from "./dialog-arms.js";
|
|
5
|
+
declare function Dialog(props: DialogRootProps): JSX.Element;
|
|
6
|
+
declare function DialogTrigger(props: AsProps): JSX.Element;
|
|
7
|
+
declare function DialogPortal(props: {
|
|
8
|
+
container?: HTMLElement | null;
|
|
9
|
+
children?: JSX.Element;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
declare function DialogClose(props: AsProps): JSX.Element;
|
|
12
|
+
declare function DialogOverlay(props: ComponentProps<`div`> & Record<string, unknown>): JSX.Element;
|
|
13
|
+
/** The `< sm` presentation of the enclosing dialog, for chrome that differs
|
|
14
|
+
* per arm (the ✕, DialogCancel). `null` outside a DialogContent. */
|
|
15
|
+
declare const DialogPresentationContext: import("solid-js").Context<DialogMobileArm | null>;
|
|
16
|
+
export type DialogContentProps = DialogContentPartProps & {
|
|
17
|
+
class?: string;
|
|
18
|
+
showCloseButton?: boolean;
|
|
19
|
+
/** How the dialog presents below `sm` (EXP-687). Defaults to the bottom
|
|
20
|
+
* `sheet`; the `sm:` presentation is identical for every arm. */
|
|
21
|
+
mobile?: DialogMobileArm;
|
|
22
|
+
container?: HTMLElement | null;
|
|
23
|
+
};
|
|
24
|
+
declare function DialogContent(props: DialogContentProps): JSX.Element;
|
|
25
|
+
declare function DialogHeader(props: ComponentProps<`div`>): JSX.Element;
|
|
26
|
+
declare function DialogBody(props: ComponentProps<`div`>): JSX.Element;
|
|
27
|
+
declare function DialogFooter(props: ComponentProps<`div`>): JSX.Element;
|
|
28
|
+
/** The Cancel of a dialog footer (EXP-687): hidden on a phone for the sheet
|
|
29
|
+
* arms (a sheet is dismissed by dragging it down or tapping outside),
|
|
30
|
+
* visible for `alert`/`page`. Desktop: a ghost button. */
|
|
31
|
+
declare function DialogCancel(props: ButtonProps): JSX.Element;
|
|
32
|
+
declare function DialogTitle(props: ComponentProps<`h2`>): JSX.Element;
|
|
33
|
+
declare function DialogDescription(props: ComponentProps<`p`>): JSX.Element;
|
|
34
|
+
export { Dialog, DialogBody, DialogCancel, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogPresentationContext, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
export declare function DisclosureHeader(props: Omit<ComponentProps<`button`>, `onClick` | `onToggle` | `type` | `aria-expanded` | `children`> & {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onToggle: () => void;
|
|
5
|
+
chevron?: `leading` | `trailing`;
|
|
6
|
+
children: JSX.Element;
|
|
7
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type Component, type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import { type DockCardTint } from "@exponential-at/ui/web/primitives";
|
|
3
|
+
type Glyph = Component<{
|
|
4
|
+
class?: string;
|
|
5
|
+
}>;
|
|
6
|
+
export type DockCardProps = Omit<ComponentProps<`div`>, `title` | `children`> & {
|
|
7
|
+
tint?: DockCardTint;
|
|
8
|
+
/** The kind glyph (a component; the card sizes and tints it). */
|
|
9
|
+
icon?: Glyph;
|
|
10
|
+
label: JSX.Element;
|
|
11
|
+
caption?: JSX.Element;
|
|
12
|
+
meta?: JSX.Element;
|
|
13
|
+
title: JSX.Element;
|
|
14
|
+
/** The card opens: the trailing chevron, a button role, Enter / Space. */
|
|
15
|
+
onOpen?: () => void;
|
|
16
|
+
/** Without `onOpen`: a trailing node (a banner's action). */
|
|
17
|
+
trailing?: JSX.Element;
|
|
18
|
+
/** A card behind the front one while piled: its chrome peeks, its words do not. */
|
|
19
|
+
hidden?: boolean;
|
|
20
|
+
/** The accessible name of a card that opens. */
|
|
21
|
+
openLabel?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare function DockCard(props: DockCardProps): JSX.Element;
|
|
24
|
+
export interface DockPileItem {
|
|
25
|
+
id: string;
|
|
26
|
+
/** The card (a `DockCard`; pass `hidden` for the ones behind the front). */
|
|
27
|
+
node: JSX.Element;
|
|
28
|
+
/** A known height (px) instead of the measured one (specimens, tests). */
|
|
29
|
+
height?: number;
|
|
30
|
+
}
|
|
31
|
+
export type DockPileProps = Omit<ComponentProps<`div`>, `children`> & {
|
|
32
|
+
/** Oldest first: the LAST item is the front card. */
|
|
33
|
+
items: readonly DockPileItem[];
|
|
34
|
+
/** Fanned: every card at full size, `gap` apart. */
|
|
35
|
+
expanded: boolean;
|
|
36
|
+
/** A pointer entering/leaving the pile or the focus moving in/out of it. */
|
|
37
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
38
|
+
};
|
|
39
|
+
export declare function DockPile(props: DockPileProps): JSX.Element;
|
|
40
|
+
export { DOCK_CARD_CLASSES, DOCK_PILE_CLASSES, DOCK_PILE_CONSTANTS, dockPileGeometry } from "@exponential-at/ui/web/primitives";
|
|
41
|
+
export type { DockCardTint } from "@exponential-at/ui/web/primitives";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import { type Align, type OutsideEvent, type Side } from "../behaviors/index.js";
|
|
3
|
+
import { type AsProps } from "../behaviors/dialog.js";
|
|
4
|
+
export interface DropdownMenuProps {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
/** Radix's `modal` (the root content is always modal here). */
|
|
9
|
+
modal?: boolean;
|
|
10
|
+
dir?: `ltr` | `rtl`;
|
|
11
|
+
children?: JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
declare function DropdownMenu(props: DropdownMenuProps): JSX.Element;
|
|
14
|
+
declare function DropdownMenuPortal(props: {
|
|
15
|
+
container?: HTMLElement | null;
|
|
16
|
+
children?: JSX.Element;
|
|
17
|
+
}): JSX.Element;
|
|
18
|
+
declare function DropdownMenuTrigger(props: AsProps & {
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}): JSX.Element;
|
|
21
|
+
type ContentProps = Omit<ComponentProps<`div`>, `style` | `onKeyDown`> & {
|
|
22
|
+
side?: Side;
|
|
23
|
+
align?: Align;
|
|
24
|
+
sideOffset?: number;
|
|
25
|
+
alignOffset?: number;
|
|
26
|
+
collisionPadding?: number;
|
|
27
|
+
container?: HTMLElement | null;
|
|
28
|
+
onKeyDown?: (e: KeyboardEvent) => void;
|
|
29
|
+
onCloseAutoFocus?: (e: Event) => void;
|
|
30
|
+
onEscapeKeyDown?: (e: KeyboardEvent) => void;
|
|
31
|
+
onFocusOutside?: (e: OutsideEvent) => void;
|
|
32
|
+
onInteractOutside?: (e: OutsideEvent) => void;
|
|
33
|
+
};
|
|
34
|
+
declare function DropdownMenuContent(props: ContentProps): JSX.Element;
|
|
35
|
+
declare function DropdownMenuGroup(props: ComponentProps<`div`>): JSX.Element;
|
|
36
|
+
type ItemProps = Omit<ComponentProps<`div`>, `onSelect`> & {
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
onSelect?: (e: Event) => void;
|
|
39
|
+
};
|
|
40
|
+
declare function DropdownMenuItem(props: ItemProps & {
|
|
41
|
+
inset?: boolean;
|
|
42
|
+
variant?: `default` | `destructive`;
|
|
43
|
+
}): JSX.Element;
|
|
44
|
+
type CheckedState = boolean | `indeterminate`;
|
|
45
|
+
declare function DropdownMenuCheckboxItem(props: ItemProps & {
|
|
46
|
+
checked?: CheckedState;
|
|
47
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
48
|
+
}): JSX.Element;
|
|
49
|
+
declare function DropdownMenuRadioGroup(props: Omit<ComponentProps<`div`>, `onChange`> & {
|
|
50
|
+
value?: string;
|
|
51
|
+
onValueChange?: (value: string) => void;
|
|
52
|
+
}): JSX.Element;
|
|
53
|
+
declare function DropdownMenuRadioItem(props: ItemProps & {
|
|
54
|
+
value: string;
|
|
55
|
+
}): JSX.Element;
|
|
56
|
+
declare function DropdownMenuLabel(props: ComponentProps<`div`> & {
|
|
57
|
+
inset?: boolean;
|
|
58
|
+
}): JSX.Element;
|
|
59
|
+
declare function DropdownMenuSeparator(props: ComponentProps<`div`>): JSX.Element;
|
|
60
|
+
declare function DropdownMenuShortcut(props: ComponentProps<`span`>): JSX.Element;
|
|
61
|
+
declare function DropdownMenuSub(props: {
|
|
62
|
+
open?: boolean;
|
|
63
|
+
defaultOpen?: boolean;
|
|
64
|
+
onOpenChange?: (open: boolean) => void;
|
|
65
|
+
children?: JSX.Element;
|
|
66
|
+
}): JSX.Element;
|
|
67
|
+
declare function DropdownMenuSubTrigger(props: ComponentProps<`div`> & {
|
|
68
|
+
inset?: boolean;
|
|
69
|
+
variant?: `default` | `destructive`;
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
}): JSX.Element;
|
|
72
|
+
declare function DropdownMenuSubContent(props: ContentProps): JSX.Element;
|
|
73
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import { type EmptyStateSize } from "@exponential-at/ui/web/primitives";
|
|
3
|
+
import type { IconComponent } from "../host.js";
|
|
4
|
+
export { EMPTY_STATE_SIZES } from "@exponential-at/ui/web/primitives";
|
|
5
|
+
export type { EmptyStateSize } from "@exponential-at/ui/web/primitives";
|
|
6
|
+
export declare function EmptyState(props: {
|
|
7
|
+
icon?: IconComponent;
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
size?: EmptyStateSize;
|
|
11
|
+
class?: string;
|
|
12
|
+
children?: JSX.Element;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
export declare function ListEmpty(props: Omit<ComponentProps<`p`>, `title`>): JSX.Element;
|
|
15
|
+
export declare function EmptyCta(props: Omit<ComponentProps<`button`>, `children` | `title`> & {
|
|
16
|
+
icon: IconComponent;
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import { type Align, type OutsideEvent, type Side } from "../behaviors/index.js";
|
|
3
|
+
import { type AsProps } from "../behaviors/dialog.js";
|
|
4
|
+
export interface HoverCardProps {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
openDelay?: number;
|
|
9
|
+
closeDelay?: number;
|
|
10
|
+
children?: JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
declare function HoverCard(props: HoverCardProps): JSX.Element;
|
|
13
|
+
declare function HoverCardTrigger(props: AsProps): JSX.Element;
|
|
14
|
+
export type HoverCardContentProps = Omit<ComponentProps<`div`>, `style`> & {
|
|
15
|
+
side?: Side;
|
|
16
|
+
align?: Align;
|
|
17
|
+
sideOffset?: number;
|
|
18
|
+
alignOffset?: number;
|
|
19
|
+
collisionPadding?: number;
|
|
20
|
+
container?: HTMLElement | null;
|
|
21
|
+
style?: JSX.CSSProperties;
|
|
22
|
+
onEscapeKeyDown?: (e: KeyboardEvent) => void;
|
|
23
|
+
onPointerDownOutside?: (e: OutsideEvent) => void;
|
|
24
|
+
onFocusOutside?: (e: OutsideEvent) => void;
|
|
25
|
+
onInteractOutside?: (e: OutsideEvent) => void;
|
|
26
|
+
};
|
|
27
|
+
declare function HoverCardContent(props: HoverCardContentProps): JSX.Element;
|
|
28
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
import { type IconDiscTone } from "@exponential-at/ui/web/primitives";
|
|
3
|
+
import type { IconComponent } from "../host.js";
|
|
4
|
+
export { ICON_DISC_TONES } from "@exponential-at/ui/web/primitives";
|
|
5
|
+
export type { IconDiscTone } from "@exponential-at/ui/web/primitives";
|
|
6
|
+
export declare function IconDisc(props: {
|
|
7
|
+
icon: IconComponent;
|
|
8
|
+
tone?: IconDiscTone;
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
class?: string;
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export * from "./alert.js";
|
|
2
|
+
export * from "./alert-dialog.js";
|
|
3
|
+
export * from "./avatar.js";
|
|
4
|
+
export * from "./avatar-color.js";
|
|
5
|
+
export * from "./badge.js";
|
|
6
|
+
export * from "./breadcrumb.js";
|
|
7
|
+
export * from "./button.js";
|
|
8
|
+
export * from "./calendar.js";
|
|
9
|
+
export * from "./card.js";
|
|
10
|
+
export * from "./checkbox.js";
|
|
11
|
+
export * from "./choice-tiles.js";
|
|
12
|
+
export * from "./cn.js";
|
|
13
|
+
export * from "./code-block.js";
|
|
14
|
+
export * from "./collapsible.js";
|
|
15
|
+
export * from "./command.js";
|
|
16
|
+
export * from "./context-ring.js";
|
|
17
|
+
export * from "./dialog.js";
|
|
18
|
+
export * from "./dialog-arms.js";
|
|
19
|
+
export * from "./disclosure-header.js";
|
|
20
|
+
export * from "./dock-card.js";
|
|
21
|
+
export * from "./dropdown-menu.js";
|
|
22
|
+
export * from "./empty-state.js";
|
|
23
|
+
export * from "./glass-card.js";
|
|
24
|
+
export * from "./hover-card.js";
|
|
25
|
+
export * from "./icon-disc.js";
|
|
26
|
+
export * from "./input.js";
|
|
27
|
+
export * from "./kbd.js";
|
|
28
|
+
export * from "./label.js";
|
|
29
|
+
export * from "./menu-surface.js";
|
|
30
|
+
export * from "./meter.js";
|
|
31
|
+
export * from "./popover.js";
|
|
32
|
+
export * from "./progress.js";
|
|
33
|
+
export * from "./progress-ring.js";
|
|
34
|
+
export * from "./scroll-area.js";
|
|
35
|
+
export * from "./segmented-control.js";
|
|
36
|
+
export * from "./select.js";
|
|
37
|
+
export * from "./separator.js";
|
|
38
|
+
export * from "./sheet.js";
|
|
39
|
+
export * from "./sheet-chrome.js";
|
|
40
|
+
export * from "./skeleton.js";
|
|
41
|
+
export * from "./spinner.js";
|
|
42
|
+
export * from "./switch.js";
|
|
43
|
+
export * from "./table.js";
|
|
44
|
+
export * from "./tabs.js";
|
|
45
|
+
export * from "./textarea.js";
|
|
46
|
+
export * from "./toast.js";
|
|
47
|
+
export * from "./tooltip.js";
|
|
48
|
+
export * from "./truncate.js";
|
|
49
|
+
export * from "./use-media-query.js";
|
|
50
|
+
export * from "./use-mobile.js";
|
|
51
|
+
export * from "./use-sheet-drag.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentProps } from "solid-js";
|
|
2
|
+
export { BARE_FIELD_CLASS, FIELD_CHROME_CLASS } from "@exponential-at/ui/web/primitives";
|
|
3
|
+
/** React reflects a controlled `value` as the attribute too (shared.tsx
|
|
4
|
+
* rule 2): `attr:value` mirrors it. */
|
|
5
|
+
declare function Input(props: ComponentProps<`input`>): import("solid-js").JSX.Element;
|
|
6
|
+
export { Input };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MENU_CHECK_ITEM_CLASS, MENU_CHEVRON_CLASS, MENU_CONTENT_CLASS, MENU_ITEM_CLASS, MENU_LABEL_CLASS, MENU_SEPARATOR_CLASS, MENU_SHORTCUT_CLASS, MENU_SUB_TRIGGER_CLASS, MENU_SURFACE_CLASS, MENU_VALUE_CLASS } from "@exponential-at/ui/web/primitives";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type MeterTone } from "@exponential-at/ui/web/primitives";
|
|
2
|
+
import { type ProgressProps } from "./progress.js";
|
|
3
|
+
export type { MeterTone } from "@exponential-at/ui/web/primitives";
|
|
4
|
+
export declare function Meter(props: Omit<ProgressProps, `value`> & {
|
|
5
|
+
/** 0-100, the caller clamps. `null` = indeterminate. */
|
|
6
|
+
value: number | null;
|
|
7
|
+
tone?: MeterTone;
|
|
8
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import { type Align, type OutsideEvent, type Side } from "../behaviors/index.js";
|
|
3
|
+
import { type AsProps } from "../behaviors/dialog.js";
|
|
4
|
+
export interface PopoverProps {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
modal?: boolean;
|
|
9
|
+
children?: JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
declare function Popover(props: PopoverProps): JSX.Element;
|
|
12
|
+
declare function PopoverTrigger(props: AsProps): JSX.Element;
|
|
13
|
+
declare function PopoverAnchor(props: ComponentProps<`div`>): JSX.Element;
|
|
14
|
+
export type PopoverContentProps = Omit<ComponentProps<`div`>, `style` | `onKeyDown`> & {
|
|
15
|
+
side?: Side;
|
|
16
|
+
align?: Align;
|
|
17
|
+
sideOffset?: number;
|
|
18
|
+
alignOffset?: number;
|
|
19
|
+
collisionPadding?: number;
|
|
20
|
+
container?: HTMLElement | null;
|
|
21
|
+
style?: JSX.CSSProperties;
|
|
22
|
+
onKeyDown?: unknown;
|
|
23
|
+
onOpenAutoFocus?: (e: Event) => void;
|
|
24
|
+
onCloseAutoFocus?: (e: Event) => void;
|
|
25
|
+
onEscapeKeyDown?: (e: KeyboardEvent) => void;
|
|
26
|
+
onPointerDownOutside?: (e: OutsideEvent) => void;
|
|
27
|
+
onFocusOutside?: (e: OutsideEvent) => void;
|
|
28
|
+
onInteractOutside?: (e: OutsideEvent) => void;
|
|
29
|
+
};
|
|
30
|
+
declare function PopoverContent(props: PopoverContentProps): JSX.Element;
|
|
31
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { progressRingPercent } from "@exponential-at/ui/web/primitives";
|
|
2
|
+
export declare function ProgressRing(props: {
|
|
3
|
+
done: number;
|
|
4
|
+
total: number;
|
|
5
|
+
/** Rendered box in px. */
|
|
6
|
+
size?: number;
|
|
7
|
+
/** A `text-*` token class — the builtin completed status. */
|
|
8
|
+
colorClass?: string;
|
|
9
|
+
/** A synced hex — a custom completed row. Wins over `colorClass`. */
|
|
10
|
+
colorHex?: string;
|
|
11
|
+
class?: string;
|
|
12
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentProps } from "solid-js";
|
|
2
|
+
export type ProgressProps = ComponentProps<`div`> & {
|
|
3
|
+
/** 0..max; `null`/`undefined` = indeterminate. */
|
|
4
|
+
value?: number | null;
|
|
5
|
+
max?: number;
|
|
6
|
+
getValueLabel?: (value: number, max: number) => string;
|
|
7
|
+
};
|
|
8
|
+
declare function Progress(props: ProgressProps): import("solid-js").JSX.Element;
|
|
9
|
+
export { Progress };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import { type ScrollAreaDir, type ScrollAreaOrientation } from "@exponential-at/ui/web/primitives";
|
|
3
|
+
type Type = `auto` | `always` | `scroll` | `hover`;
|
|
4
|
+
type Dir = ScrollAreaDir;
|
|
5
|
+
type Orientation = ScrollAreaOrientation;
|
|
6
|
+
export type ScrollAreaProps = Omit<ComponentProps<`div`>, `dir` | `style`> & {
|
|
7
|
+
type?: Type;
|
|
8
|
+
dir?: Dir;
|
|
9
|
+
scrollHideDelay?: number;
|
|
10
|
+
style?: JSX.CSSProperties;
|
|
11
|
+
};
|
|
12
|
+
declare function ScrollArea(props: ScrollAreaProps): JSX.Element;
|
|
13
|
+
type ScrollbarProps = Omit<ComponentProps<`div`>, `style`> & {
|
|
14
|
+
orientation?: Orientation;
|
|
15
|
+
forceMount?: boolean;
|
|
16
|
+
style?: JSX.CSSProperties;
|
|
17
|
+
};
|
|
18
|
+
declare function ScrollBar(props: ScrollbarProps): JSX.Element;
|
|
19
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { IconComponent } from "../host.js";
|
|
3
|
+
interface SegmentedOption<TValue extends string> {
|
|
4
|
+
value: TValue;
|
|
5
|
+
label: JSX.Element;
|
|
6
|
+
/** A leading glyph (a lucide-solid component), painted as lucide-react paints it. */
|
|
7
|
+
icon?: IconComponent;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface SegmentedControlProps<TValue extends string> {
|
|
11
|
+
value: TValue;
|
|
12
|
+
onValueChange: (value: TValue) => void;
|
|
13
|
+
options: readonly SegmentedOption<TValue>[];
|
|
14
|
+
/** Span the container instead of the capsule's natural `w-fit`. */
|
|
15
|
+
fill?: boolean;
|
|
16
|
+
/** Disables every segment. */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Extra classes on the strip (the `TabsList`). */
|
|
19
|
+
class?: string;
|
|
20
|
+
}
|
|
21
|
+
declare function SegmentedControl<TValue extends string>(props: SegmentedControlProps<TValue>): JSX.Element;
|
|
22
|
+
export { SegmentedControl };
|
|
23
|
+
export type { SegmentedControlProps, SegmentedOption };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import { type Align, type OutsideEvent, type Side } from "../behaviors/index.js";
|
|
3
|
+
export interface SelectProps {
|
|
4
|
+
value?: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
onValueChange?: (value: string) => void;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
dir?: `ltr` | `rtl`;
|
|
11
|
+
name?: string;
|
|
12
|
+
autoComplete?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
form?: string;
|
|
16
|
+
children?: JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
declare function Select(props: SelectProps): JSX.Element;
|
|
19
|
+
declare function SelectGroup(props: ComponentProps<`div`>): JSX.Element;
|
|
20
|
+
declare function SelectValue(props: {
|
|
21
|
+
placeholder?: JSX.Element;
|
|
22
|
+
children?: JSX.Element;
|
|
23
|
+
class?: string;
|
|
24
|
+
style?: JSX.CSSProperties | string;
|
|
25
|
+
} & Omit<ComponentProps<`span`>, `children` | `class` | `style`>): JSX.Element;
|
|
26
|
+
declare function SelectTrigger(props: ComponentProps<`button`> & {
|
|
27
|
+
size?: `sm` | `default`;
|
|
28
|
+
}): JSX.Element;
|
|
29
|
+
export interface SelectContentProps extends Omit<ComponentProps<`div`>, `onKeyDown`> {
|
|
30
|
+
position?: `item-aligned` | `popper`;
|
|
31
|
+
side?: Side;
|
|
32
|
+
sideOffset?: number;
|
|
33
|
+
align?: Align;
|
|
34
|
+
alignOffset?: number;
|
|
35
|
+
collisionPadding?: number;
|
|
36
|
+
onCloseAutoFocus?: (e: Event) => void;
|
|
37
|
+
onEscapeKeyDown?: (e: KeyboardEvent) => void;
|
|
38
|
+
onPointerDownOutside?: (e: OutsideEvent) => void;
|
|
39
|
+
onKeyDown?: (e: KeyboardEvent) => void;
|
|
40
|
+
}
|
|
41
|
+
declare function SelectContent(props: SelectContentProps): JSX.Element;
|
|
42
|
+
declare function SelectLabel(props: ComponentProps<`div`>): JSX.Element;
|
|
43
|
+
declare function SelectItem(props: ComponentProps<`div`> & {
|
|
44
|
+
value: string;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
textValue?: string;
|
|
47
|
+
}): JSX.Element;
|
|
48
|
+
declare function SelectSeparator(props: ComponentProps<`div`>): JSX.Element;
|
|
49
|
+
declare function SelectScrollUpButton(props: ComponentProps<`div`>): JSX.Element;
|
|
50
|
+
declare function SelectScrollDownButton(props: ComponentProps<`div`>): JSX.Element;
|
|
51
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import type { SheetDragHandleProps } from "./use-sheet-drag.js";
|
|
3
|
+
export declare function SheetDragProvider(props: {
|
|
4
|
+
value: SheetDragHandleProps | null;
|
|
5
|
+
children?: JSX.Element;
|
|
6
|
+
}): JSX.Element;
|
|
7
|
+
/** The drag props of the enclosing sheet, or `null` outside one (a desktop
|
|
8
|
+
* panel, a side drawer). Header components spread these so the whole title
|
|
9
|
+
* area is draggable, not just the 4px bar. */
|
|
10
|
+
export declare function createSheetDragHandleProps(): SheetDragHandleProps | null;
|
|
11
|
+
export declare function SheetGrabber(props: ComponentProps<`div`>): JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
import { type SheetSide } from "@exponential-at/ui/web/primitives";
|
|
3
|
+
import { type AsProps, type DialogContentPartProps, type DialogRootProps } from "../behaviors/dialog.js";
|
|
4
|
+
declare function Sheet(props: DialogRootProps): JSX.Element;
|
|
5
|
+
declare function SheetTrigger(props: AsProps): JSX.Element;
|
|
6
|
+
declare function SheetClose(props: AsProps): JSX.Element;
|
|
7
|
+
export type SheetContentProps = DialogContentPartProps & {
|
|
8
|
+
class?: string;
|
|
9
|
+
side?: SheetSide;
|
|
10
|
+
showCloseButton?: boolean;
|
|
11
|
+
/** The drag pill at the top edge. On by default for `bottom`; the two
|
|
12
|
+
* page-like bottom sheets (New issue, search) turn it off. */
|
|
13
|
+
showGrabber?: boolean;
|
|
14
|
+
container?: HTMLElement | null;
|
|
15
|
+
};
|
|
16
|
+
declare function SheetContent(props: SheetContentProps): JSX.Element;
|
|
17
|
+
declare function SheetHeader(props: ComponentProps<`div`>): JSX.Element;
|
|
18
|
+
declare function SheetFooter(props: ComponentProps<`div`>): JSX.Element;
|
|
19
|
+
declare function SheetTitle(props: ComponentProps<`h2`>): JSX.Element;
|
|
20
|
+
declare function SheetDescription(props: ComponentProps<`p`>): JSX.Element;
|
|
21
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription };
|