@photon-ai/pho-ui 1.4.0 → 1.5.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/dist/chunks/IconArrowUpRight-DGgKzQwV.js +14 -0
- package/dist/chunks/IconArrowUpRight-DGgKzQwV.js.map +1 -0
- package/dist/chunks/IconChevronLeft-CSWMKQ4C.js +11 -0
- package/dist/chunks/IconChevronLeft-CSWMKQ4C.js.map +1 -0
- package/dist/chunks/{basic-page-4_GZOvRr.js → basic-page-awtvmT-6.js} +106 -91
- package/dist/chunks/basic-page-awtvmT-6.js.map +1 -0
- package/dist/chunks/combobox-rLdS6fl-.js +117 -0
- package/dist/chunks/combobox-rLdS6fl-.js.map +1 -0
- package/dist/chunks/dialog--PQoodig.js +247 -0
- package/dist/chunks/dialog--PQoodig.js.map +1 -0
- package/dist/chunks/{sidebar-DGpEKxOn.js → sidebar-DLYTxo2j.js} +72 -64
- package/dist/chunks/sidebar-DLYTxo2j.js.map +1 -0
- package/dist/components/combobox.js +2 -114
- package/dist/components/command.js +278 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/dialog.js +1 -1
- package/dist/components/phone-input.js +16982 -0
- package/dist/components/phone-input.js.map +1 -0
- package/dist/index.js +18 -18
- package/dist/sections/basic-page.js +1 -1
- package/dist/sections/sidebar.js +1 -1
- package/dist/src/components/command/command.d.ts +114 -0
- package/dist/src/components/command/index.d.ts +1 -0
- package/dist/src/components/dialog/dialog.d.ts +81 -1
- package/dist/src/components/phone-input/country-alpha3.d.ts +250 -0
- package/dist/src/components/phone-input/country-search.d.ts +8 -0
- package/dist/src/components/phone-input/index.d.ts +1 -0
- package/dist/src/components/phone-input/phone-input.d.ts +41 -0
- package/dist/src/sections/basic-page/basic-page.d.ts +8 -2
- package/dist/src/sections/sidebar/sidebar.d.ts +8 -3
- package/dist/src/utils/animated-height.d.ts +10 -0
- package/package.json +12 -1
- package/dist/chunks/basic-page-4_GZOvRr.js.map +0 -1
- package/dist/chunks/dialog-Ba0UUE5g.js +0 -155
- package/dist/chunks/dialog-Ba0UUE5g.js.map +0 -1
- package/dist/chunks/sidebar-DGpEKxOn.js.map +0 -1
- package/dist/components/combobox.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -5,25 +5,25 @@ import { t as S } from "./chunks/resolve-variant-CcD8iG5l.js";
|
|
|
5
5
|
import { n as I, r as T, t as i } from "./chunks/use-press-pulse-8iorQPsh.js";
|
|
6
6
|
import "./utils.js";
|
|
7
7
|
import { a as B, c as e, d as R, f as C, i as O, l as f, n as p, o as P, r as u, s as D, t as N, u as L } from "./chunks/close-button-B8gF5UNk.js";
|
|
8
|
-
import { a as U,
|
|
9
|
-
import { a as F, i as Z, n as b, o as v, r as H, s as w, t as x } from "./chunks/
|
|
8
|
+
import { a as U, i as c, n as G, o as l, r as M, s as d, t as g } from "./chunks/basic-page-awtvmT-6.js";
|
|
9
|
+
import { a as W, c as F, i as Z, n as b, o as v, r as H, s as w, t as x } from "./chunks/sidebar-DLYTxo2j.js";
|
|
10
10
|
import { t as h } from "./chunks/input-CxS7ndpb.js";
|
|
11
11
|
import { t as q } from "./chunks/input-group-D6dlma8k.js";
|
|
12
12
|
import { n as z, t as J } from "./chunks/card-9cGnv-VD.js";
|
|
13
|
-
import { n as Q, t as X } from "./chunks/dialog
|
|
13
|
+
import { n as Q, t as X } from "./chunks/dialog--PQoodig.js";
|
|
14
14
|
import { i as aa, n as sa, r as ta, t as oa } from "./chunks/status-view-CcbctPqR.js";
|
|
15
15
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
g as BASIC_PAGE_CALLOUT,
|
|
17
|
+
G as BASIC_PAGE_CARD,
|
|
18
|
+
M as BASIC_PAGE_ITEM,
|
|
19
|
+
c as BASIC_PAGE_ITEM_PANEL,
|
|
20
|
+
U as BASIC_PAGE_ITEM_PANEL_DIVIDED,
|
|
21
|
+
l as BASIC_PAGE_ROW,
|
|
22
22
|
p as BUTTON_COLORS,
|
|
23
23
|
u as BUTTON_SHAPES,
|
|
24
24
|
O as BUTTON_SIZES,
|
|
25
25
|
B as BUTTON_VARIANTS,
|
|
26
|
-
|
|
26
|
+
d as BasicPage,
|
|
27
27
|
P as Button,
|
|
28
28
|
D as ButtonLink,
|
|
29
29
|
J as CARD_SURFACE,
|
|
@@ -38,17 +38,17 @@ export {
|
|
|
38
38
|
h as Input,
|
|
39
39
|
q as InputGroup,
|
|
40
40
|
_ as LinkProvider,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
x as SIDEBAR_HEADER_INSET,
|
|
42
|
+
b as SIDEBAR_ITEM,
|
|
43
|
+
H as SIDEBAR_ITEM_ACTIVE,
|
|
44
|
+
Z as SIDEBAR_ITEM_INACTIVE,
|
|
45
|
+
W as SIDEBAR_ROOT,
|
|
46
|
+
v as SIDEBAR_ROOT_BASE,
|
|
47
|
+
w as SIDEBAR_ROOT_INSET,
|
|
48
48
|
oa as STATUS_VIEW,
|
|
49
49
|
sa as STATUS_VIEW_COPY,
|
|
50
50
|
ta as STATUS_VIEW_SIZES,
|
|
51
|
-
|
|
51
|
+
F as Sidebar,
|
|
52
52
|
aa as StatusView,
|
|
53
53
|
R as buttonVariants,
|
|
54
54
|
s as cn,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as _, i as E, n as I, o as a, r as s, s as P, t as C } from "../chunks/basic-page-
|
|
2
|
+
import { a as _, i as E, n as I, o as a, r as s, s as P, t as C } from "../chunks/basic-page-awtvmT-6.js";
|
|
3
3
|
export {
|
|
4
4
|
C as BASIC_PAGE_CALLOUT,
|
|
5
5
|
I as BASIC_PAGE_CARD,
|
package/dist/sections/sidebar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as I, c as _, i as A, n as R, o as S, r as a, s, t as T } from "../chunks/sidebar-
|
|
2
|
+
import { a as I, c as _, i as A, n as R, o as S, r as a, s, t as T } from "../chunks/sidebar-DLYTxo2j.js";
|
|
3
3
|
export {
|
|
4
4
|
T as SIDEBAR_HEADER_INSET,
|
|
5
5
|
R as SIDEBAR_ITEM,
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { Command as CommandPrimitive, useCommandState } from 'cmdk';
|
|
3
|
+
import { Dialog as PhoDialog } from '../dialog';
|
|
4
|
+
declare function Root({ className, children, ...props }: ComponentProps<typeof CommandPrimitive>): import("react").JSX.Element;
|
|
5
|
+
/**
|
|
6
|
+
* The input row — a bottom hairline separates it from the list. Position
|
|
7
|
+
* leading icons absolutely and pad the input (`pl-9`), mirroring
|
|
8
|
+
* `Autocomplete.InputGroup`.
|
|
9
|
+
*/
|
|
10
|
+
declare function InputGroup({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
11
|
+
declare function Input({ className, value, ref: consumerRef, ...props }: ComponentProps<typeof CommandPrimitive.Input>): import("react").JSX.Element;
|
|
12
|
+
declare function List({ className, children, ...props }: ComponentProps<typeof CommandPrimitive.List>): import("react").JSX.Element;
|
|
13
|
+
declare function Empty({ className, ...props }: ComponentProps<typeof CommandPrimitive.Empty>): import("react").JSX.Element;
|
|
14
|
+
declare function Group({ className, ...props }: ComponentProps<typeof CommandPrimitive.Group>): import("react").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Row layout mode:
|
|
17
|
+
* - `item` / `subitem` / `subsubitem` — idle hierarchy (icon column + indent)
|
|
18
|
+
* - `result` — flat search hit (breadcrumb + trailing scope)
|
|
19
|
+
*/
|
|
20
|
+
export type CommandItemLevel = "item" | "subitem" | "subsubitem" | "result";
|
|
21
|
+
type ItemPrimitiveProps = ComponentProps<typeof CommandPrimitive.Item>;
|
|
22
|
+
export interface CommandItemProps extends Omit<ItemPrimitiveProps, "children" | "title"> {
|
|
23
|
+
/**
|
|
24
|
+
* Row depth / mode in the palette:
|
|
25
|
+
* - `item` — page / top destination (icon + title)
|
|
26
|
+
* - `subitem` — section under an item (label aligns with the item title)
|
|
27
|
+
* - `subsubitem` — row under a section (one step deeper)
|
|
28
|
+
* - `result` — flat search hit (`title` + `path` crumbs + `scope`)
|
|
29
|
+
*/
|
|
30
|
+
level?: CommandItemLevel;
|
|
31
|
+
/**
|
|
32
|
+
* Leading glyph. On idle `item` rows (and reserved for sub-levels). On
|
|
33
|
+
* `result` rows, pass the resolved icon (self → parent → grandparent).
|
|
34
|
+
*/
|
|
35
|
+
icon?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* When `level="result"`, force the icon column so labels align across the
|
|
38
|
+
* list even if this row's `icon` is empty. Set true when any sibling result
|
|
39
|
+
* has an icon; omit when the whole result set is icon-less.
|
|
40
|
+
*/
|
|
41
|
+
iconSlot?: boolean;
|
|
42
|
+
/** Primary label. Prefer this over free-form children for the shared layout. */
|
|
43
|
+
title?: ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Ancestors after `title` for `level="result"` — parent → page
|
|
46
|
+
* (e.g. `["Agent profile", "Settings"]` → `Name < Agent profile < Settings`).
|
|
47
|
+
*/
|
|
48
|
+
path?: ReactNode[];
|
|
49
|
+
/**
|
|
50
|
+
* Trailing scope for `level="result"` — `Project` vs `Personal`, not a nav group.
|
|
51
|
+
*/
|
|
52
|
+
scope?: ReactNode;
|
|
53
|
+
/** Shows a trailing external-link glyph (opens outside the app). */
|
|
54
|
+
external?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Free-form content. When `title` is set, rendered after the label stack.
|
|
57
|
+
* When `title` is omitted, becomes the row body (legacy / simple items).
|
|
58
|
+
*/
|
|
59
|
+
children?: ReactNode;
|
|
60
|
+
}
|
|
61
|
+
/** Leading icon column — `size-4`, secondary ink. */
|
|
62
|
+
declare function ItemIcon({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
|
|
63
|
+
/** Primary label — medium + primary ink on `item` rows. */
|
|
64
|
+
declare function ItemTitle({ className, level, ...props }: ComponentProps<"span"> & {
|
|
65
|
+
level?: CommandItemLevel;
|
|
66
|
+
}): import("react").JSX.Element;
|
|
67
|
+
declare function Item({ className, level, icon, iconSlot, title, path, scope, external, children, value, ...props }: CommandItemProps): import("react").JSX.Element;
|
|
68
|
+
declare function Separator({ className, ...props }: ComponentProps<typeof CommandPrimitive.Separator>): import("react").JSX.Element;
|
|
69
|
+
declare function Loading({ className, ...props }: ComponentProps<typeof CommandPrimitive.Loading>): import("react").JSX.Element;
|
|
70
|
+
type DialogRootProps = ComponentProps<typeof PhoDialog.Root>;
|
|
71
|
+
interface CommandDialogProps extends ComponentProps<typeof CommandPrimitive> {
|
|
72
|
+
/** Controlled dialog state — pass straight through to `Dialog.Root`. */
|
|
73
|
+
open?: DialogRootProps["open"];
|
|
74
|
+
onOpenChange?: DialogRootProps["onOpenChange"];
|
|
75
|
+
/** Accessible name for the palette (dialog and command menu). */
|
|
76
|
+
label?: string;
|
|
77
|
+
/** Extra classes for the dialog panel (not the command root). */
|
|
78
|
+
className?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A command palette in a modal — Pho's `Dialog` overlay (Base UI) around a
|
|
82
|
+
* `Command.Root`, raised above center. We deliberately skip cmdk's own
|
|
83
|
+
* `Command.Dialog` (Radix) so overlays stay on one primitive stack.
|
|
84
|
+
*
|
|
85
|
+
* List height springs via `AnimatedHeight` (same feel as the Card shell on
|
|
86
|
+
* onboarding / invite) — the input row stays put while results resize.
|
|
87
|
+
*/
|
|
88
|
+
declare function Dialog({ open, onOpenChange, label, className, children, ...props }: CommandDialogProps): import("react").JSX.Element;
|
|
89
|
+
/**
|
|
90
|
+
* Command menu built on `cmdk` — a filterable list of actions driven from a
|
|
91
|
+
* single input, keyboard-first. Compose inline (`Command.Root`) or as a
|
|
92
|
+
* ⌘K-style modal palette (`Command.Dialog`, which owns the overlay). By
|
|
93
|
+
* default cmdk filters and ranks items for you; pass `shouldFilter={false}`
|
|
94
|
+
* to render your own result set (e.g. hierarchy-preserving navigation).
|
|
95
|
+
*
|
|
96
|
+
* Rows share one layout via `Command.Item` `level` — idle
|
|
97
|
+
* `item` → `subitem` → `subsubitem`, or flat `result` while searching.
|
|
98
|
+
*/
|
|
99
|
+
export declare const Command: {
|
|
100
|
+
Root: typeof Root;
|
|
101
|
+
InputGroup: typeof InputGroup;
|
|
102
|
+
Input: typeof Input;
|
|
103
|
+
List: typeof List;
|
|
104
|
+
Empty: typeof Empty;
|
|
105
|
+
Group: typeof Group;
|
|
106
|
+
Item: typeof Item;
|
|
107
|
+
ItemIcon: typeof ItemIcon;
|
|
108
|
+
ItemTitle: typeof ItemTitle;
|
|
109
|
+
Separator: typeof Separator;
|
|
110
|
+
Loading: typeof Loading;
|
|
111
|
+
Dialog: typeof Dialog;
|
|
112
|
+
};
|
|
113
|
+
/** Re-export of cmdk's state selector hook (search, value, filtered counts). */
|
|
114
|
+
export { useCommandState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Command, useCommandState, type CommandItemLevel, type CommandItemProps, } from './command';
|
|
@@ -40,6 +40,12 @@ declare function Popup({ className, ...props }: StyledProps<typeof BaseDialog.Po
|
|
|
40
40
|
declare function Title({ className, ...props }: StyledProps<typeof BaseDialog.Title>): import("react").JSX.Element;
|
|
41
41
|
declare function Description({ className, ...props }: StyledProps<typeof BaseDialog.Description>): import("react").JSX.Element;
|
|
42
42
|
interface ContentProps extends Omit<StyledProps<typeof BaseDialog.Popup>, "title"> {
|
|
43
|
+
/**
|
|
44
|
+
* Decorative icon above the title — typically a Tabler outline icon.
|
|
45
|
+
* Rendered aria-hidden in secondary ink at 32px (`[&>svg]:size-8`). Pass a
|
|
46
|
+
* styled node to override the ink; the size is owned by the slot.
|
|
47
|
+
*/
|
|
48
|
+
icon?: ReactNode;
|
|
43
49
|
/** Heading rendered in the panel header. */
|
|
44
50
|
title?: ReactNode;
|
|
45
51
|
/** Supporting text under the title. */
|
|
@@ -77,7 +83,77 @@ interface ContentProps extends Omit<StyledProps<typeof BaseDialog.Popup>, "title
|
|
|
77
83
|
* full control, compose the parts directly (`Dialog.Portal` /
|
|
78
84
|
* `Dialog.Backdrop` / `Dialog.Popup`).
|
|
79
85
|
*/
|
|
80
|
-
declare function Content({ title, description, consequences, warning, actions, showClose, children, className, ...props }: ContentProps): import("react").JSX.Element;
|
|
86
|
+
declare function Content({ icon, title, description, consequences, warning, actions, showClose, children, className, ...props }: ContentProps): import("react").JSX.Element;
|
|
87
|
+
/**
|
|
88
|
+
* Near-fullscreen popup — the viewport minus a breathing ring, floating over
|
|
89
|
+
* a backdrop (the page stays visible through the gap, so it dims like any
|
|
90
|
+
* floating layer). Still a card: border, elevation, rounded corners; the
|
|
91
|
+
* scale gesture stays but shrinks to 98% — at this size 95% reads like a jump.
|
|
92
|
+
*/
|
|
93
|
+
declare function InsetPopup({ className, ...props }: StyledProps<typeof BaseDialog.Popup>): import("react").JSX.Element;
|
|
94
|
+
interface InsetContentProps extends Omit<StyledProps<typeof BaseDialog.Popup>, "title"> {
|
|
95
|
+
/** Decorative icon above the title — same treatment as `Content`. */
|
|
96
|
+
icon?: ReactNode;
|
|
97
|
+
/** Heading rendered in the panel header. */
|
|
98
|
+
title?: ReactNode;
|
|
99
|
+
/** Supporting text under the title. */
|
|
100
|
+
description?: ReactNode;
|
|
101
|
+
/**
|
|
102
|
+
* Bottom action row. Iron rule as `Content`: when `actions` is set, the
|
|
103
|
+
* header close button is never shown — dismiss via the actions.
|
|
104
|
+
*/
|
|
105
|
+
actions?: ReactNode;
|
|
106
|
+
/**
|
|
107
|
+
* Header close control. Only applies when `actions` is absent.
|
|
108
|
+
* @default true
|
|
109
|
+
*/
|
|
110
|
+
showClose?: boolean;
|
|
111
|
+
children?: ReactNode;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Convenience near-fullscreen panel: header pinned on top, body filling and
|
|
115
|
+
* scrolling on its own, optional action row pinned at the bottom. Sits
|
|
116
|
+
* between `Content` (a focused card) and `FullscreenContent` (a page
|
|
117
|
+
* takeover): use it for roomy working surfaces — pickers, editors, previews —
|
|
118
|
+
* that still want the page peeking through an edge.
|
|
119
|
+
*/
|
|
120
|
+
declare function InsetContent({ icon, title, description, actions, showClose, children, className, ...props }: InsetContentProps): import("react").JSX.Element;
|
|
121
|
+
/**
|
|
122
|
+
* Full-viewport popup — a page-surface takeover instead of a floating card.
|
|
123
|
+
* No backdrop: the popup itself is the layer. Fade only; scale is a floating-
|
|
124
|
+
* card gesture and reads wrong at viewport size.
|
|
125
|
+
*/
|
|
126
|
+
declare function FullscreenPopup({ className, ...props }: StyledProps<typeof BaseDialog.Popup>): import("react").JSX.Element;
|
|
127
|
+
interface FullscreenContentProps extends Omit<StyledProps<typeof BaseDialog.Popup>, "title"> {
|
|
128
|
+
/**
|
|
129
|
+
* Decorative icon above the title — same chrome as `Content`, but 48px
|
|
130
|
+
* (`size-12`) for viewport-scale gates.
|
|
131
|
+
*/
|
|
132
|
+
icon?: ReactNode;
|
|
133
|
+
/** Heading of the takeover. */
|
|
134
|
+
title?: ReactNode;
|
|
135
|
+
/** Supporting text under the title. */
|
|
136
|
+
description?: ReactNode;
|
|
137
|
+
/**
|
|
138
|
+
* Action row under the body. Iron rule as `Content`: when `actions` is set,
|
|
139
|
+
* the corner close button is never shown — dismiss via the actions.
|
|
140
|
+
*/
|
|
141
|
+
actions?: ReactNode;
|
|
142
|
+
/**
|
|
143
|
+
* Corner close control. Only applies when `actions` is absent.
|
|
144
|
+
* @default true
|
|
145
|
+
*/
|
|
146
|
+
showClose?: boolean;
|
|
147
|
+
children?: ReactNode;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Convenience full-screen panel: the whole viewport becomes the dialog, with
|
|
151
|
+
* a centered column at the standalone-flow width (28rem — the same measure as
|
|
152
|
+
* onboarding / invite cards). Use for gates the visitor must deal with before
|
|
153
|
+
* the page behind makes sense (e.g. binding a phone number); prefer `Content`
|
|
154
|
+
* for everything conversational.
|
|
155
|
+
*/
|
|
156
|
+
declare function FullscreenContent({ icon, title, description, actions, showClose, children, className, ...props }: FullscreenContentProps): import("react").JSX.Element;
|
|
81
157
|
/**
|
|
82
158
|
* Modal dialog built on Base UI `Dialog`. Controlled or uncontrolled via
|
|
83
159
|
* `Dialog.Root` (`open` / `onOpenChange` / `defaultOpen`). `Dialog.Action`
|
|
@@ -90,10 +166,14 @@ export declare const Dialog: {
|
|
|
90
166
|
Portal: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').AlertDialogPortalProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
91
167
|
Backdrop: typeof Backdrop;
|
|
92
168
|
Popup: typeof Popup;
|
|
169
|
+
InsetPopup: typeof InsetPopup;
|
|
170
|
+
FullscreenPopup: typeof FullscreenPopup;
|
|
93
171
|
Title: typeof Title;
|
|
94
172
|
Description: typeof Description;
|
|
95
173
|
Close: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').AlertDialogCloseProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
96
174
|
Action: typeof Action;
|
|
97
175
|
Content: typeof Content;
|
|
176
|
+
InsetContent: typeof InsetContent;
|
|
177
|
+
FullscreenContent: typeof FullscreenContent;
|
|
98
178
|
};
|
|
99
179
|
export {};
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { CountryCode } from 'libphonenumber-js/min';
|
|
2
|
+
/** ISO 3166-1 alpha-3 for every country code `libphonenumber-js` exposes. */
|
|
3
|
+
export declare const COUNTRY_ALPHA3: {
|
|
4
|
+
readonly AC: "ASC";
|
|
5
|
+
readonly AD: "AND";
|
|
6
|
+
readonly AE: "ARE";
|
|
7
|
+
readonly AF: "AFG";
|
|
8
|
+
readonly AG: "ATG";
|
|
9
|
+
readonly AI: "AIA";
|
|
10
|
+
readonly AL: "ALB";
|
|
11
|
+
readonly AM: "ARM";
|
|
12
|
+
readonly AO: "AGO";
|
|
13
|
+
readonly AR: "ARG";
|
|
14
|
+
readonly AS: "ASM";
|
|
15
|
+
readonly AT: "AUT";
|
|
16
|
+
readonly AU: "AUS";
|
|
17
|
+
readonly AW: "ABW";
|
|
18
|
+
readonly AX: "ALA";
|
|
19
|
+
readonly AZ: "AZE";
|
|
20
|
+
readonly BA: "BIH";
|
|
21
|
+
readonly BB: "BRB";
|
|
22
|
+
readonly BD: "BGD";
|
|
23
|
+
readonly BE: "BEL";
|
|
24
|
+
readonly BF: "BFA";
|
|
25
|
+
readonly BG: "BGR";
|
|
26
|
+
readonly BH: "BHR";
|
|
27
|
+
readonly BI: "BDI";
|
|
28
|
+
readonly BJ: "BEN";
|
|
29
|
+
readonly BL: "BLM";
|
|
30
|
+
readonly BM: "BMU";
|
|
31
|
+
readonly BN: "BRN";
|
|
32
|
+
readonly BO: "BOL";
|
|
33
|
+
readonly BQ: "BES";
|
|
34
|
+
readonly BR: "BRA";
|
|
35
|
+
readonly BS: "BHS";
|
|
36
|
+
readonly BT: "BTN";
|
|
37
|
+
readonly BW: "BWA";
|
|
38
|
+
readonly BY: "BLR";
|
|
39
|
+
readonly BZ: "BLZ";
|
|
40
|
+
readonly CA: "CAN";
|
|
41
|
+
readonly CC: "CCK";
|
|
42
|
+
readonly CD: "COD";
|
|
43
|
+
readonly CF: "CAF";
|
|
44
|
+
readonly CG: "COG";
|
|
45
|
+
readonly CH: "CHE";
|
|
46
|
+
readonly CI: "CIV";
|
|
47
|
+
readonly CK: "COK";
|
|
48
|
+
readonly CL: "CHL";
|
|
49
|
+
readonly CM: "CMR";
|
|
50
|
+
readonly CN: "CHN";
|
|
51
|
+
readonly CO: "COL";
|
|
52
|
+
readonly CR: "CRI";
|
|
53
|
+
readonly CU: "CUB";
|
|
54
|
+
readonly CV: "CPV";
|
|
55
|
+
readonly CW: "CUW";
|
|
56
|
+
readonly CX: "CXR";
|
|
57
|
+
readonly CY: "CYP";
|
|
58
|
+
readonly CZ: "CZE";
|
|
59
|
+
readonly DE: "DEU";
|
|
60
|
+
readonly DJ: "DJI";
|
|
61
|
+
readonly DK: "DNK";
|
|
62
|
+
readonly DM: "DMA";
|
|
63
|
+
readonly DO: "DOM";
|
|
64
|
+
readonly DZ: "DZA";
|
|
65
|
+
readonly EC: "ECU";
|
|
66
|
+
readonly EE: "EST";
|
|
67
|
+
readonly EG: "EGY";
|
|
68
|
+
readonly EH: "ESH";
|
|
69
|
+
readonly ER: "ERI";
|
|
70
|
+
readonly ES: "ESP";
|
|
71
|
+
readonly ET: "ETH";
|
|
72
|
+
readonly FI: "FIN";
|
|
73
|
+
readonly FJ: "FJI";
|
|
74
|
+
readonly FK: "FLK";
|
|
75
|
+
readonly FM: "FSM";
|
|
76
|
+
readonly FO: "FRO";
|
|
77
|
+
readonly FR: "FRA";
|
|
78
|
+
readonly GA: "GAB";
|
|
79
|
+
readonly GB: "GBR";
|
|
80
|
+
readonly GD: "GRD";
|
|
81
|
+
readonly GE: "GEO";
|
|
82
|
+
readonly GF: "GUF";
|
|
83
|
+
readonly GG: "GGY";
|
|
84
|
+
readonly GH: "GHA";
|
|
85
|
+
readonly GI: "GIB";
|
|
86
|
+
readonly GL: "GRL";
|
|
87
|
+
readonly GM: "GMB";
|
|
88
|
+
readonly GN: "GIN";
|
|
89
|
+
readonly GP: "GLP";
|
|
90
|
+
readonly GQ: "GNQ";
|
|
91
|
+
readonly GR: "GRC";
|
|
92
|
+
readonly GT: "GTM";
|
|
93
|
+
readonly GU: "GUM";
|
|
94
|
+
readonly GW: "GNB";
|
|
95
|
+
readonly GY: "GUY";
|
|
96
|
+
readonly HK: "HKG";
|
|
97
|
+
readonly HN: "HND";
|
|
98
|
+
readonly HR: "HRV";
|
|
99
|
+
readonly HT: "HTI";
|
|
100
|
+
readonly HU: "HUN";
|
|
101
|
+
readonly ID: "IDN";
|
|
102
|
+
readonly IE: "IRL";
|
|
103
|
+
readonly IL: "ISR";
|
|
104
|
+
readonly IM: "IMN";
|
|
105
|
+
readonly IN: "IND";
|
|
106
|
+
readonly IO: "IOT";
|
|
107
|
+
readonly IQ: "IRQ";
|
|
108
|
+
readonly IR: "IRN";
|
|
109
|
+
readonly IS: "ISL";
|
|
110
|
+
readonly IT: "ITA";
|
|
111
|
+
readonly JE: "JEY";
|
|
112
|
+
readonly JM: "JAM";
|
|
113
|
+
readonly JO: "JOR";
|
|
114
|
+
readonly JP: "JPN";
|
|
115
|
+
readonly KE: "KEN";
|
|
116
|
+
readonly KG: "KGZ";
|
|
117
|
+
readonly KH: "KHM";
|
|
118
|
+
readonly KI: "KIR";
|
|
119
|
+
readonly KM: "COM";
|
|
120
|
+
readonly KN: "KNA";
|
|
121
|
+
readonly KP: "PRK";
|
|
122
|
+
readonly KR: "KOR";
|
|
123
|
+
readonly KW: "KWT";
|
|
124
|
+
readonly KY: "CYM";
|
|
125
|
+
readonly KZ: "KAZ";
|
|
126
|
+
readonly LA: "LAO";
|
|
127
|
+
readonly LB: "LBN";
|
|
128
|
+
readonly LC: "LCA";
|
|
129
|
+
readonly LI: "LIE";
|
|
130
|
+
readonly LK: "LKA";
|
|
131
|
+
readonly LR: "LBR";
|
|
132
|
+
readonly LS: "LSO";
|
|
133
|
+
readonly LT: "LTU";
|
|
134
|
+
readonly LU: "LUX";
|
|
135
|
+
readonly LV: "LVA";
|
|
136
|
+
readonly LY: "LBY";
|
|
137
|
+
readonly MA: "MAR";
|
|
138
|
+
readonly MC: "MCO";
|
|
139
|
+
readonly MD: "MDA";
|
|
140
|
+
readonly ME: "MNE";
|
|
141
|
+
readonly MF: "MAF";
|
|
142
|
+
readonly MG: "MDG";
|
|
143
|
+
readonly MH: "MHL";
|
|
144
|
+
readonly MK: "MKD";
|
|
145
|
+
readonly ML: "MLI";
|
|
146
|
+
readonly MM: "MMR";
|
|
147
|
+
readonly MN: "MNG";
|
|
148
|
+
readonly MO: "MAC";
|
|
149
|
+
readonly MP: "MNP";
|
|
150
|
+
readonly MQ: "MTQ";
|
|
151
|
+
readonly MR: "MRT";
|
|
152
|
+
readonly MS: "MSR";
|
|
153
|
+
readonly MT: "MLT";
|
|
154
|
+
readonly MU: "MUS";
|
|
155
|
+
readonly MV: "MDV";
|
|
156
|
+
readonly MW: "MWI";
|
|
157
|
+
readonly MX: "MEX";
|
|
158
|
+
readonly MY: "MYS";
|
|
159
|
+
readonly MZ: "MOZ";
|
|
160
|
+
readonly NA: "NAM";
|
|
161
|
+
readonly NC: "NCL";
|
|
162
|
+
readonly NE: "NER";
|
|
163
|
+
readonly NF: "NFK";
|
|
164
|
+
readonly NG: "NGA";
|
|
165
|
+
readonly NI: "NIC";
|
|
166
|
+
readonly NL: "NLD";
|
|
167
|
+
readonly NO: "NOR";
|
|
168
|
+
readonly NP: "NPL";
|
|
169
|
+
readonly NR: "NRU";
|
|
170
|
+
readonly NU: "NIU";
|
|
171
|
+
readonly NZ: "NZL";
|
|
172
|
+
readonly OM: "OMN";
|
|
173
|
+
readonly PA: "PAN";
|
|
174
|
+
readonly PE: "PER";
|
|
175
|
+
readonly PF: "PYF";
|
|
176
|
+
readonly PG: "PNG";
|
|
177
|
+
readonly PH: "PHL";
|
|
178
|
+
readonly PK: "PAK";
|
|
179
|
+
readonly PL: "POL";
|
|
180
|
+
readonly PM: "SPM";
|
|
181
|
+
readonly PR: "PRI";
|
|
182
|
+
readonly PS: "PSE";
|
|
183
|
+
readonly PT: "PRT";
|
|
184
|
+
readonly PW: "PLW";
|
|
185
|
+
readonly PY: "PRY";
|
|
186
|
+
readonly QA: "QAT";
|
|
187
|
+
readonly RE: "REU";
|
|
188
|
+
readonly RO: "ROU";
|
|
189
|
+
readonly RS: "SRB";
|
|
190
|
+
readonly RU: "RUS";
|
|
191
|
+
readonly RW: "RWA";
|
|
192
|
+
readonly SA: "SAU";
|
|
193
|
+
readonly SB: "SLB";
|
|
194
|
+
readonly SC: "SYC";
|
|
195
|
+
readonly SD: "SDN";
|
|
196
|
+
readonly SE: "SWE";
|
|
197
|
+
readonly SG: "SGP";
|
|
198
|
+
readonly SH: "SHN";
|
|
199
|
+
readonly SI: "SVN";
|
|
200
|
+
readonly SJ: "SJM";
|
|
201
|
+
readonly SK: "SVK";
|
|
202
|
+
readonly SL: "SLE";
|
|
203
|
+
readonly SM: "SMR";
|
|
204
|
+
readonly SN: "SEN";
|
|
205
|
+
readonly SO: "SOM";
|
|
206
|
+
readonly SR: "SUR";
|
|
207
|
+
readonly SS: "SSD";
|
|
208
|
+
readonly ST: "STP";
|
|
209
|
+
readonly SV: "SLV";
|
|
210
|
+
readonly SX: "SXM";
|
|
211
|
+
readonly SY: "SYR";
|
|
212
|
+
readonly SZ: "SWZ";
|
|
213
|
+
readonly TA: "TAA";
|
|
214
|
+
readonly TC: "TCA";
|
|
215
|
+
readonly TD: "TCD";
|
|
216
|
+
readonly TG: "TGO";
|
|
217
|
+
readonly TH: "THA";
|
|
218
|
+
readonly TJ: "TJK";
|
|
219
|
+
readonly TK: "TKL";
|
|
220
|
+
readonly TL: "TLS";
|
|
221
|
+
readonly TM: "TKM";
|
|
222
|
+
readonly TN: "TUN";
|
|
223
|
+
readonly TO: "TON";
|
|
224
|
+
readonly TR: "TUR";
|
|
225
|
+
readonly TT: "TTO";
|
|
226
|
+
readonly TV: "TUV";
|
|
227
|
+
readonly TW: "TWN";
|
|
228
|
+
readonly TZ: "TZA";
|
|
229
|
+
readonly UA: "UKR";
|
|
230
|
+
readonly UG: "UGA";
|
|
231
|
+
readonly US: "USA";
|
|
232
|
+
readonly UY: "URY";
|
|
233
|
+
readonly UZ: "UZB";
|
|
234
|
+
readonly VA: "VAT";
|
|
235
|
+
readonly VC: "VCT";
|
|
236
|
+
readonly VE: "VEN";
|
|
237
|
+
readonly VG: "VGB";
|
|
238
|
+
readonly VI: "VIR";
|
|
239
|
+
readonly VN: "VNM";
|
|
240
|
+
readonly VU: "VUT";
|
|
241
|
+
readonly WF: "WLF";
|
|
242
|
+
readonly WS: "WSM";
|
|
243
|
+
readonly XK: "XKX";
|
|
244
|
+
readonly YE: "YEM";
|
|
245
|
+
readonly YT: "MYT";
|
|
246
|
+
readonly ZA: "ZAF";
|
|
247
|
+
readonly ZM: "ZMB";
|
|
248
|
+
readonly ZW: "ZWE";
|
|
249
|
+
};
|
|
250
|
+
export declare function getCountryAlpha3(country: CountryCode): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CountryCode } from 'libphonenumber-js/min';
|
|
2
|
+
/**
|
|
3
|
+
* Fold a search string for accent-insensitive matching — `Åland` ↔ `aland`,
|
|
4
|
+
* `Côte` ↔ `cote`. NFD splits base letters from combining marks; we drop the
|
|
5
|
+
* marks and lowercase.
|
|
6
|
+
*/
|
|
7
|
+
export declare function foldSearch(value: string): string;
|
|
8
|
+
export declare function countrySearchAliases(country: CountryCode): readonly string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PhoneInput, type CountryCode, type PhoneInputChangeMeta, type PhoneInputProps, } from './phone-input';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
import { CountryCode } from 'libphonenumber-js/min';
|
|
3
|
+
import { InputGroupSize } from '../input-group';
|
|
4
|
+
export type { CountryCode };
|
|
5
|
+
export interface PhoneInputChangeMeta {
|
|
6
|
+
country: CountryCode;
|
|
7
|
+
isValid: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface PhoneInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "defaultValue" | "onChange"> {
|
|
10
|
+
/** Controlled E.164 value (`+14155550123`), or `""` when empty. */
|
|
11
|
+
value?: string;
|
|
12
|
+
/** Uncontrolled initial E.164 value. */
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
/** Fires with the E.164 value (or `""`) and validity metadata. */
|
|
15
|
+
onValueChange?: (value: string, meta: PhoneInputChangeMeta) => void;
|
|
16
|
+
/** Country used when the value has no country. @default `"US"` */
|
|
17
|
+
defaultCountry?: CountryCode;
|
|
18
|
+
/** Countries offered in the picker. Defaults to every libphonenumber country. */
|
|
19
|
+
countries?: CountryCode[];
|
|
20
|
+
/** Size variant, matching Input / Input Group. @default `"md"` */
|
|
21
|
+
size?: InputGroupSize;
|
|
22
|
+
/** Render the invalid state (error ring + error-colored hint). */
|
|
23
|
+
invalid?: boolean;
|
|
24
|
+
/** Field label (associated for accessibility). */
|
|
25
|
+
label?: ReactNode;
|
|
26
|
+
/** Helper text below the field; rendered in the error color when `invalid`. */
|
|
27
|
+
hint?: ReactNode;
|
|
28
|
+
/** Node rendered at the right edge of the label row. */
|
|
29
|
+
labelTrailing?: ReactNode;
|
|
30
|
+
/** Class applied to the Input Group surface. */
|
|
31
|
+
wrapperClassName?: string;
|
|
32
|
+
ref?: Ref<HTMLInputElement>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Phone number field — country picker (searchable Combobox) + national number
|
|
36
|
+
* input on a shared Input Group surface. The committed value is always E.164.
|
|
37
|
+
*/
|
|
38
|
+
export declare function PhoneInput({ value, defaultValue, onValueChange, defaultCountry, countries: countriesProp, size, invalid, label, hint, labelTrailing, disabled, required, placeholder, className, wrapperClassName, id, ref, "aria-label": ariaLabel, onKeyDown, ...props }: PhoneInputProps): import("react").JSX.Element;
|
|
39
|
+
export declare namespace PhoneInput {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
@@ -156,9 +156,15 @@ declare function ItemPanel({ divided, className, ...props }: BasicPageItemPanelP
|
|
|
156
156
|
* Standalone callout. Pair with `CalloutTitle` / `CalloutDescription` (and
|
|
157
157
|
* optional actions) for a featured block — e.g. an invite form. Do not wrap
|
|
158
158
|
* in `Card`; this is already the outer surface.
|
|
159
|
+
*
|
|
160
|
+
* Pass `icon` for a decorative glyph anchored to the header block (first
|
|
161
|
+
* child) — typically a Tabler outline icon. The icon is aria-hidden; keep
|
|
162
|
+
* meaning in the title/description.
|
|
159
163
|
*/
|
|
160
|
-
declare function Callout({ className, ...props }: ComponentProps<"div"> & {
|
|
164
|
+
declare function Callout({ className, icon, children, ...props }: ComponentProps<"div"> & {
|
|
161
165
|
ref?: Ref<HTMLDivElement>;
|
|
166
|
+
/** Decorative icon, top-right of the header (first child). */
|
|
167
|
+
icon?: ReactNode;
|
|
162
168
|
}): import("react").JSX.Element;
|
|
163
169
|
/** Callout heading — same type as `SectionTitle`. Hashable via slug `id`. */
|
|
164
170
|
declare function CalloutTitle({ id, className, children, ...props }: ComponentProps<"h2"> & {
|
|
@@ -279,7 +285,7 @@ declare function RowLink({ label, description, leading, href, className, childre
|
|
|
279
285
|
* </BasicPage.Row>
|
|
280
286
|
* </BasicPage.Card>
|
|
281
287
|
* </div>
|
|
282
|
-
* <BasicPage.Callout>
|
|
288
|
+
* <BasicPage.Callout icon={<IconMail stroke={1.25} />}>
|
|
283
289
|
* <BasicPage.Header>
|
|
284
290
|
* <BasicPage.CalloutTitle>Invitations</BasicPage.CalloutTitle>
|
|
285
291
|
* <BasicPage.CalloutDescription>…</BasicPage.CalloutDescription>
|
|
@@ -78,13 +78,18 @@ interface ItemBaseProps {
|
|
|
78
78
|
children?: ReactNode;
|
|
79
79
|
className?: string;
|
|
80
80
|
}
|
|
81
|
-
|
|
81
|
+
/**
|
|
82
|
+
* DOM handlers whose React signatures clash with Motion's gesture props.
|
|
83
|
+
* Same omit list as `Button` — rows render through `motion.*`.
|
|
84
|
+
*/
|
|
85
|
+
type MotionHandlerConflicts = "onAnimationStart" | "onAnimationEnd" | "onAnimationIteration" | "onDrag" | "onDragStart" | "onDragEnd" | "onDragEnter" | "onDragExit" | "onDragLeave" | "onDragOver" | "onDrop";
|
|
86
|
+
export interface SidebarItemLinkProps extends ItemBaseProps, Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof ItemBaseProps | MotionHandlerConflicts> {
|
|
82
87
|
/** Destination — rendered through the host's `LinkProvider`. */
|
|
83
88
|
href: string;
|
|
84
89
|
/** Leaves the app: opens in a new tab and renders a ↗ cue. */
|
|
85
90
|
external?: boolean;
|
|
86
91
|
}
|
|
87
|
-
export interface SidebarItemButtonProps extends ItemBaseProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof ItemBaseProps> {
|
|
92
|
+
export interface SidebarItemButtonProps extends ItemBaseProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof ItemBaseProps | MotionHandlerConflicts> {
|
|
88
93
|
href?: undefined;
|
|
89
94
|
external?: undefined;
|
|
90
95
|
}
|
|
@@ -95,7 +100,7 @@ export type SidebarItemProps = SidebarItemLinkProps | SidebarItemButtonProps;
|
|
|
95
100
|
* primary surface; `external` opens a new tab and appends a ↗ cue.
|
|
96
101
|
*/
|
|
97
102
|
declare function Item({ icon, active, className, children, href, external, ...rest }: SidebarItemProps): import("react").JSX.Element;
|
|
98
|
-
export interface SidebarAccountRowProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
103
|
+
export interface SidebarAccountRowProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | MotionHandlerConflicts> {
|
|
99
104
|
/** Display name — also the source for fallback initials. */
|
|
100
105
|
name: string;
|
|
101
106
|
/** Avatar image URL; falls back to initials while loading or on error. */
|