@the-portland-company/shell 0.89.0 → 0.91.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/CHANGELOG.md +23 -0
- package/README.md +6 -48
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.d.cts +1 -1
- package/dist/app-chrome.d.ts +1 -1
- package/dist/app-chrome.js +3 -3
- package/dist/chrome.css +0 -20
- package/dist/{chunk-SJDFAK5R.js → chunk-WDVQBUWF.js} +4 -10
- package/dist/chunk-WDVQBUWF.js.map +1 -0
- package/dist/{chunk-J23MTK56.js → chunk-ZS7MQXDQ.js} +41 -402
- package/dist/chunk-ZS7MQXDQ.js.map +1 -0
- package/dist/{index-CZylXAP4.d.cts → index-Cg5aEImm.d.cts} +8 -201
- package/dist/{index-DwkSyAip.d.ts → index-DG32i0jC.d.ts} +8 -201
- package/dist/index.cjs +58 -437
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -19
- package/dist/index.js.map +1 -1
- package/dist/native.cjs +39 -412
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +1 -1
- package/dist/native.d.ts +1 -1
- package/dist/native.js +2 -2
- package/package.json +2 -13
- package/dist/chunk-J23MTK56.js.map +0 -1
- package/dist/chunk-SJDFAK5R.js.map +0 -1
- package/eslint/index.cjs +0 -172
- package/eslint/index.d.ts +0 -6
- package/eslint/index.mjs +0 -5
|
@@ -1,40 +1,16 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import { ReactNode, CSSProperties, ButtonHTMLAttributes, AnchorHTMLAttributes, ElementType, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes, ComponentType } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties, ComponentType } from 'react';
|
|
4
3
|
import { ThemePreference as ThemePreference$1 } from './theme-preference.cjs';
|
|
5
4
|
|
|
6
|
-
type CardPadding = 'none' | 'sm' | 'md' | 'lg';
|
|
7
5
|
type CardProps = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/** Secondary line under the title. Switches the card to the structured header layout. */
|
|
11
|
-
subtitle?: ReactNode;
|
|
12
|
-
/** Right-aligned header content (a link, chip or count). Same as `actions`; both may be set. */
|
|
13
|
-
aside?: ReactNode;
|
|
14
|
-
/** Right-aligned header buttons. */
|
|
15
|
-
actions?: ReactNode;
|
|
16
|
-
/** Bottom strip separated by a top border. */
|
|
17
|
-
footer?: ReactNode;
|
|
18
|
-
children?: ReactNode;
|
|
19
|
-
/** Padding of the card (legacy layout) or of the body (structured layout). Default `md` (p-6). */
|
|
20
|
-
padding?: CardPadding;
|
|
21
|
-
/** Replaces the body padding classes in the structured layout (e.g. `px-7 pb-6 pt-6`). */
|
|
22
|
-
bodyClassName?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
children: ReactNode;
|
|
23
8
|
minH?: string | number;
|
|
24
9
|
className?: string;
|
|
25
10
|
style?: CSSProperties;
|
|
26
11
|
[key: string]: unknown;
|
|
27
12
|
};
|
|
28
|
-
|
|
29
|
-
* Shared Card. Surface, border and text come from the `--app-card-*` tokens, which
|
|
30
|
-
* have light values on `:root` and dark values under `.dark`
|
|
31
|
-
* (chrome.css), so a card is correct in both themes.
|
|
32
|
-
*
|
|
33
|
-
* Plain `<Card title>` keeps the original layout (padding on the card, h3 above the
|
|
34
|
-
* content). Passing `subtitle`, `aside`, `actions`, `footer` or `bodyClassName` switches to
|
|
35
|
-
* the structured layout: bordered header, body, bordered footer.
|
|
36
|
-
*/
|
|
37
|
-
declare function Card({ title, subtitle, aside, actions, footer, children, padding, bodyClassName, minH, className, style, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
declare function Card({ title, children, minH, className, style, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
38
14
|
|
|
39
15
|
type FormColumnProps = {
|
|
40
16
|
children: ReactNode;
|
|
@@ -76,184 +52,15 @@ type PageHeaderProps = {
|
|
|
76
52
|
showEyebrow?: boolean;
|
|
77
53
|
/** Optional one-line subtitle, 15px G4, directly under the title. */
|
|
78
54
|
subtitle?: ReactNode;
|
|
55
|
+
/** @deprecated The breadcrumb trail is retired. Accepted for compatibility; renders nothing and warns once in dev. */
|
|
79
56
|
breadcrumbs?: BreadcrumbItem$1[];
|
|
80
57
|
actions?: ReactNode;
|
|
81
58
|
tabBar?: ReactNode;
|
|
59
|
+
/** @deprecated Ignored. The header spans its container; pages choose `FormColumn` (960px) or the fluid frame. */
|
|
82
60
|
maxW?: string;
|
|
83
61
|
hideSidebar?: boolean;
|
|
84
62
|
};
|
|
85
63
|
|
|
86
|
-
type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
87
|
-
type ButtonSize = 'md' | 'sm';
|
|
88
|
-
type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'type'> & {
|
|
89
|
-
/** Visual style. Default `primary`. */
|
|
90
|
-
variant?: ButtonVariant;
|
|
91
|
-
/** `md` is 44px tall (default), `sm` is 36px. */
|
|
92
|
-
size?: ButtonSize;
|
|
93
|
-
/** Shows a spinner, sets `aria-busy`, and blocks interaction. */
|
|
94
|
-
loading?: boolean;
|
|
95
|
-
disabled?: boolean;
|
|
96
|
-
/** Renders a link-button. Without `as`, `href` renders an `<a>`. */
|
|
97
|
-
href?: string;
|
|
98
|
-
/** Element or component to render as (e.g. a router `Link`). */
|
|
99
|
-
as?: ElementType;
|
|
100
|
-
type?: 'button' | 'submit' | 'reset';
|
|
101
|
-
children?: ReactNode;
|
|
102
|
-
className?: string;
|
|
103
|
-
/** Extra props for the rendered element (e.g. a router Link's `to`). */
|
|
104
|
-
to?: string;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* The shared button. Apps use this instead of a local Button. 5px radius, 12px
|
|
108
|
-
* horizontal padding; primary uses the shell's `--app-btn-primary-*` tokens
|
|
109
|
-
* (Specs buttonPrimary). Pass `href` (or `as`) for a link-button.
|
|
110
|
-
*/
|
|
111
|
-
declare const Button: react.ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "type"> & {
|
|
112
|
-
/** Visual style. Default `primary`. */
|
|
113
|
-
variant?: ButtonVariant;
|
|
114
|
-
/** `md` is 44px tall (default), `sm` is 36px. */
|
|
115
|
-
size?: ButtonSize;
|
|
116
|
-
/** Shows a spinner, sets `aria-busy`, and blocks interaction. */
|
|
117
|
-
loading?: boolean;
|
|
118
|
-
disabled?: boolean;
|
|
119
|
-
/** Renders a link-button. Without `as`, `href` renders an `<a>`. */
|
|
120
|
-
href?: string;
|
|
121
|
-
/** Element or component to render as (e.g. a router `Link`). */
|
|
122
|
-
as?: ElementType;
|
|
123
|
-
type?: "button" | "submit" | "reset";
|
|
124
|
-
children?: ReactNode;
|
|
125
|
-
className?: string;
|
|
126
|
-
/** Extra props for the rendered element (e.g. a router Link's `to`). */
|
|
127
|
-
to?: string;
|
|
128
|
-
} & react.RefAttributes<HTMLElement>>;
|
|
129
|
-
|
|
130
|
-
type FieldChromeProps = {
|
|
131
|
-
/** Visible label rendered above the control. */
|
|
132
|
-
label?: ReactNode;
|
|
133
|
-
/** Helper text under the control; replaced by `error` when one is set. */
|
|
134
|
-
helperText?: ReactNode;
|
|
135
|
-
/** Error message. Truthy marks the control invalid (aria-invalid). */
|
|
136
|
-
error?: ReactNode;
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Text-like input types the field styling supports. Checkbox has `Checkbox` and
|
|
141
|
-
* file has `FileInput`; radio, range and color need their own native layout and are
|
|
142
|
-
* not supported here.
|
|
143
|
-
*/
|
|
144
|
-
type InputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number' | 'date' | 'time' | 'datetime-local' | 'month' | 'week';
|
|
145
|
-
type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & FieldChromeProps & {
|
|
146
|
-
/** Text-like types only (see `InputType`). Default `text`. */
|
|
147
|
-
type?: InputType;
|
|
148
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
149
|
-
className?: string;
|
|
150
|
-
wrapperClassName?: string;
|
|
151
|
-
/** Marks the control invalid without an error message. */
|
|
152
|
-
invalid?: boolean;
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* Shared Input. Apps use this instead of a local Input. 5px radius, 12px
|
|
156
|
-
* horizontal padding, 44px control height, shell `--app-field-*` tokens.
|
|
157
|
-
*/
|
|
158
|
-
declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & FieldChromeProps & {
|
|
159
|
-
/** Text-like types only (see `InputType`). Default `text`. */
|
|
160
|
-
type?: InputType;
|
|
161
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
162
|
-
className?: string;
|
|
163
|
-
wrapperClassName?: string;
|
|
164
|
-
/** Marks the control invalid without an error message. */
|
|
165
|
-
invalid?: boolean;
|
|
166
|
-
} & react.RefAttributes<HTMLInputElement>>;
|
|
167
|
-
|
|
168
|
-
type SelectProps = SelectHTMLAttributes<HTMLSelectElement> & FieldChromeProps & {
|
|
169
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
170
|
-
className?: string;
|
|
171
|
-
wrapperClassName?: string;
|
|
172
|
-
/** Marks the control invalid without an error message. */
|
|
173
|
-
invalid?: boolean;
|
|
174
|
-
};
|
|
175
|
-
/**
|
|
176
|
-
* Shared Select. Apps use this instead of a local Select. 5px radius, 12px
|
|
177
|
-
* horizontal padding, 44px control height, shell `--app-field-*` tokens.
|
|
178
|
-
*/
|
|
179
|
-
declare const Select: react.ForwardRefExoticComponent<SelectHTMLAttributes<HTMLSelectElement> & FieldChromeProps & {
|
|
180
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
181
|
-
className?: string;
|
|
182
|
-
wrapperClassName?: string;
|
|
183
|
-
/** Marks the control invalid without an error message. */
|
|
184
|
-
invalid?: boolean;
|
|
185
|
-
} & react.RefAttributes<HTMLSelectElement>>;
|
|
186
|
-
|
|
187
|
-
type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & FieldChromeProps & {
|
|
188
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
189
|
-
className?: string;
|
|
190
|
-
wrapperClassName?: string;
|
|
191
|
-
/** Marks the control invalid without an error message. */
|
|
192
|
-
invalid?: boolean;
|
|
193
|
-
};
|
|
194
|
-
/**
|
|
195
|
-
* Shared Textarea. Apps use this instead of a local Textarea. 5px radius, 12px
|
|
196
|
-
* horizontal padding, 88px minimum height, shell `--app-field-*` tokens.
|
|
197
|
-
*/
|
|
198
|
-
declare const Textarea: react.ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & FieldChromeProps & {
|
|
199
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
200
|
-
className?: string;
|
|
201
|
-
wrapperClassName?: string;
|
|
202
|
-
/** Marks the control invalid without an error message. */
|
|
203
|
-
invalid?: boolean;
|
|
204
|
-
} & react.RefAttributes<HTMLTextAreaElement>>;
|
|
205
|
-
|
|
206
|
-
type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {
|
|
207
|
-
/** Visible label, clickable. */
|
|
208
|
-
label?: ReactNode;
|
|
209
|
-
/** Secondary text under the label. */
|
|
210
|
-
description?: ReactNode;
|
|
211
|
-
/** Mixed state (set on the DOM node; `checked` still controls the underlying value). */
|
|
212
|
-
indeterminate?: boolean;
|
|
213
|
-
/** Marks the checkbox invalid (red outline, aria-invalid). */
|
|
214
|
-
invalid?: boolean;
|
|
215
|
-
/** Class for the `<input>`; the row takes `wrapperClassName`. */
|
|
216
|
-
className?: string;
|
|
217
|
-
wrapperClassName?: string;
|
|
218
|
-
};
|
|
219
|
-
/**
|
|
220
|
-
* Shared Checkbox. The whole row is a 44px-tall touch target (label wraps the
|
|
221
|
-
* control); colors come from the shell tokens, with the accent as the fill.
|
|
222
|
-
*/
|
|
223
|
-
declare const Checkbox: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
224
|
-
/** Visible label, clickable. */
|
|
225
|
-
label?: ReactNode;
|
|
226
|
-
/** Secondary text under the label. */
|
|
227
|
-
description?: ReactNode;
|
|
228
|
-
/** Mixed state (set on the DOM node; `checked` still controls the underlying value). */
|
|
229
|
-
indeterminate?: boolean;
|
|
230
|
-
/** Marks the checkbox invalid (red outline, aria-invalid). */
|
|
231
|
-
invalid?: boolean;
|
|
232
|
-
/** Class for the `<input>`; the row takes `wrapperClassName`. */
|
|
233
|
-
className?: string;
|
|
234
|
-
wrapperClassName?: string;
|
|
235
|
-
} & react.RefAttributes<HTMLInputElement>>;
|
|
236
|
-
|
|
237
|
-
type FileInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'defaultValue'> & FieldChromeProps & {
|
|
238
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
239
|
-
className?: string;
|
|
240
|
-
wrapperClassName?: string;
|
|
241
|
-
/** Marks the control invalid without an error message. */
|
|
242
|
-
invalid?: boolean;
|
|
243
|
-
};
|
|
244
|
-
/**
|
|
245
|
-
* Shared file picker (`<input type="file">`). Same label/helper/error chrome and
|
|
246
|
-
* field tokens as `Input`; the native "Choose file" button is styled with the
|
|
247
|
-
* secondary-button tokens. Use `accept` / `multiple` as usual.
|
|
248
|
-
*/
|
|
249
|
-
declare const FileInput: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "type" | "defaultValue"> & FieldChromeProps & {
|
|
250
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
251
|
-
className?: string;
|
|
252
|
-
wrapperClassName?: string;
|
|
253
|
-
/** Marks the control invalid without an error message. */
|
|
254
|
-
invalid?: boolean;
|
|
255
|
-
} & react.RefAttributes<HTMLInputElement>>;
|
|
256
|
-
|
|
257
64
|
type BreadcrumbItem = {
|
|
258
65
|
label: string;
|
|
259
66
|
href?: string;
|
|
@@ -689,7 +496,7 @@ declare function useThemePreference(): {
|
|
|
689
496
|
setValue: (next: ThemePreference) => void;
|
|
690
497
|
};
|
|
691
498
|
|
|
692
|
-
/** Page header for apps with no react-router
|
|
499
|
+
/** Page header for apps with no react-router. Same view as the main entry. */
|
|
693
500
|
declare function PageHeader(props: PageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
694
501
|
|
|
695
502
|
/**
|
|
@@ -1335,4 +1142,4 @@ type NavAppShellProps = {
|
|
|
1335
1142
|
};
|
|
1336
1143
|
declare function NavAppShell({ sidebar, topBar, betaBanner, contentWrapper, accountMenuPlacement, modeId, children, }: NavAppShellProps): react_jsx_runtime.JSX.Element;
|
|
1337
1144
|
|
|
1338
|
-
export {
|
|
1145
|
+
export { NavChromeProvider as $, type CampaignFeatureAvailability as A, type BreadcrumbBarProps as B, Card as C, type ChromeMe as D, type ChromeNotificationAlert as E, FormColumn as F, type ChromeNotificationImport as G, HeaderTabBar as H, type ChromeNotificationQuarantine as I, type ChromeNotificationReply as J, type ChromeNotificationsPayload as K, type ChromeOrgSummary as L, type CommunicationsFuelStatus as M, type NavItem as N, type CreditHealthState as O, type PageHeaderProps as P, type CreditTypeKey as Q, CreditsAction as R, type StandardNavIconKey as S, type CreditsIconState as T, FuelAction as U, type FuelChannelStatus as V, NavAppShell as W, type NavAppShellProps as X, NavBetaBanner as Y, type NavBetaBannerProps as Z, type NavBrand as _, type CommsNotification as a, NavDisplayAction as a0, type NavLinkProps as a1, type NavLinkedAccount as a2, type NavModeOption as a3, type NavOrg as a4, type NavRoleBadge as a5, NavSidebar as a6, type NavSidebarProps as a7, type NavTab as a8, NavTabStrip as a9, envChipClasses as aA, isNavItemActive as aB, modeIdFromLabel as aC, resolveOrgLogoUrl as aD, shortEnvLabel as aE, shortUserName as aF, standardPolitogyNav as aG, topBarIconButtonClass as aH, useChromeMe as aI, useChromeOrgs as aJ, useNavChromeDedupedFetch as aK, useNavChromeFetcher as aL, useThemePreference as aM, type NavTabStripProps as aa, NavThemeControl as ab, NavTopBar as ac, type NavTopBarAction as ad, type NavTopBarProps as ae, type NavUser as af, NotificationsAction as ag, PageHeader as ah, type PageHeaderMode as ai, SPECS_ORIGIN as aj, SpecOverlayAction as ak, type StandardNavOptions as al, SupportAction as am, type ThemePreference as an, TopBarCountBadge as ao, type TopBarIconTone as ap, TopBarPanelArrow as aq, TopBarPopover as ar, TopBarTooltip as as, TopBarWidgetSlot as at, clearBetaBannerDismissal as au, creditGaugeRatio as av, creditStateWord as aw, creditTooltipLine as ax, creditsAriaLabel as ay, creditsIconState as az, type CommsNotificationKind as b, type HeaderTabBarItem as c, type NotificationsAdapter as d, type NotificationsFeed as e, createCommsNotificationsAdapter as f, emptyNotificationsFeed as g, type NavIcon as h, type NavBreadcrumb as i, type StandardNavMode as j, type NavLinkComponent as k, type NavChromeFetcher as l, type NavMode as m, normalizeNotificationsFeed as n, type NavUserMenu as o, type NavOrgOption as p, type NavFooterLink as q, type NavFooter as r, type NavDisplayMode as s, BETA_BANNER_DISMISS_KEY as t, BreadcrumbBar as u, CAMPAIGN_FEATURE_AVAILABILITY as v, CORE_APP_ORIGIN as w, CORE_BILLING_PATH as x, CREDIT_TYPE_LABELS as y, CREDIT_TYPE_ORDER as z };
|
|
@@ -1,40 +1,16 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import { ReactNode, CSSProperties, ButtonHTMLAttributes, AnchorHTMLAttributes, ElementType, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes, ComponentType } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties, ComponentType } from 'react';
|
|
4
3
|
import { ThemePreference as ThemePreference$1 } from './theme-preference.js';
|
|
5
4
|
|
|
6
|
-
type CardPadding = 'none' | 'sm' | 'md' | 'lg';
|
|
7
5
|
type CardProps = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/** Secondary line under the title. Switches the card to the structured header layout. */
|
|
11
|
-
subtitle?: ReactNode;
|
|
12
|
-
/** Right-aligned header content (a link, chip or count). Same as `actions`; both may be set. */
|
|
13
|
-
aside?: ReactNode;
|
|
14
|
-
/** Right-aligned header buttons. */
|
|
15
|
-
actions?: ReactNode;
|
|
16
|
-
/** Bottom strip separated by a top border. */
|
|
17
|
-
footer?: ReactNode;
|
|
18
|
-
children?: ReactNode;
|
|
19
|
-
/** Padding of the card (legacy layout) or of the body (structured layout). Default `md` (p-6). */
|
|
20
|
-
padding?: CardPadding;
|
|
21
|
-
/** Replaces the body padding classes in the structured layout (e.g. `px-7 pb-6 pt-6`). */
|
|
22
|
-
bodyClassName?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
children: ReactNode;
|
|
23
8
|
minH?: string | number;
|
|
24
9
|
className?: string;
|
|
25
10
|
style?: CSSProperties;
|
|
26
11
|
[key: string]: unknown;
|
|
27
12
|
};
|
|
28
|
-
|
|
29
|
-
* Shared Card. Surface, border and text come from the `--app-card-*` tokens, which
|
|
30
|
-
* have light values on `:root` and dark values under `.dark`
|
|
31
|
-
* (chrome.css), so a card is correct in both themes.
|
|
32
|
-
*
|
|
33
|
-
* Plain `<Card title>` keeps the original layout (padding on the card, h3 above the
|
|
34
|
-
* content). Passing `subtitle`, `aside`, `actions`, `footer` or `bodyClassName` switches to
|
|
35
|
-
* the structured layout: bordered header, body, bordered footer.
|
|
36
|
-
*/
|
|
37
|
-
declare function Card({ title, subtitle, aside, actions, footer, children, padding, bodyClassName, minH, className, style, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
declare function Card({ title, children, minH, className, style, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
38
14
|
|
|
39
15
|
type FormColumnProps = {
|
|
40
16
|
children: ReactNode;
|
|
@@ -76,184 +52,15 @@ type PageHeaderProps = {
|
|
|
76
52
|
showEyebrow?: boolean;
|
|
77
53
|
/** Optional one-line subtitle, 15px G4, directly under the title. */
|
|
78
54
|
subtitle?: ReactNode;
|
|
55
|
+
/** @deprecated The breadcrumb trail is retired. Accepted for compatibility; renders nothing and warns once in dev. */
|
|
79
56
|
breadcrumbs?: BreadcrumbItem$1[];
|
|
80
57
|
actions?: ReactNode;
|
|
81
58
|
tabBar?: ReactNode;
|
|
59
|
+
/** @deprecated Ignored. The header spans its container; pages choose `FormColumn` (960px) or the fluid frame. */
|
|
82
60
|
maxW?: string;
|
|
83
61
|
hideSidebar?: boolean;
|
|
84
62
|
};
|
|
85
63
|
|
|
86
|
-
type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
87
|
-
type ButtonSize = 'md' | 'sm';
|
|
88
|
-
type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'type'> & {
|
|
89
|
-
/** Visual style. Default `primary`. */
|
|
90
|
-
variant?: ButtonVariant;
|
|
91
|
-
/** `md` is 44px tall (default), `sm` is 36px. */
|
|
92
|
-
size?: ButtonSize;
|
|
93
|
-
/** Shows a spinner, sets `aria-busy`, and blocks interaction. */
|
|
94
|
-
loading?: boolean;
|
|
95
|
-
disabled?: boolean;
|
|
96
|
-
/** Renders a link-button. Without `as`, `href` renders an `<a>`. */
|
|
97
|
-
href?: string;
|
|
98
|
-
/** Element or component to render as (e.g. a router `Link`). */
|
|
99
|
-
as?: ElementType;
|
|
100
|
-
type?: 'button' | 'submit' | 'reset';
|
|
101
|
-
children?: ReactNode;
|
|
102
|
-
className?: string;
|
|
103
|
-
/** Extra props for the rendered element (e.g. a router Link's `to`). */
|
|
104
|
-
to?: string;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* The shared button. Apps use this instead of a local Button. 5px radius, 12px
|
|
108
|
-
* horizontal padding; primary uses the shell's `--app-btn-primary-*` tokens
|
|
109
|
-
* (Specs buttonPrimary). Pass `href` (or `as`) for a link-button.
|
|
110
|
-
*/
|
|
111
|
-
declare const Button: react.ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "type"> & {
|
|
112
|
-
/** Visual style. Default `primary`. */
|
|
113
|
-
variant?: ButtonVariant;
|
|
114
|
-
/** `md` is 44px tall (default), `sm` is 36px. */
|
|
115
|
-
size?: ButtonSize;
|
|
116
|
-
/** Shows a spinner, sets `aria-busy`, and blocks interaction. */
|
|
117
|
-
loading?: boolean;
|
|
118
|
-
disabled?: boolean;
|
|
119
|
-
/** Renders a link-button. Without `as`, `href` renders an `<a>`. */
|
|
120
|
-
href?: string;
|
|
121
|
-
/** Element or component to render as (e.g. a router `Link`). */
|
|
122
|
-
as?: ElementType;
|
|
123
|
-
type?: "button" | "submit" | "reset";
|
|
124
|
-
children?: ReactNode;
|
|
125
|
-
className?: string;
|
|
126
|
-
/** Extra props for the rendered element (e.g. a router Link's `to`). */
|
|
127
|
-
to?: string;
|
|
128
|
-
} & react.RefAttributes<HTMLElement>>;
|
|
129
|
-
|
|
130
|
-
type FieldChromeProps = {
|
|
131
|
-
/** Visible label rendered above the control. */
|
|
132
|
-
label?: ReactNode;
|
|
133
|
-
/** Helper text under the control; replaced by `error` when one is set. */
|
|
134
|
-
helperText?: ReactNode;
|
|
135
|
-
/** Error message. Truthy marks the control invalid (aria-invalid). */
|
|
136
|
-
error?: ReactNode;
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Text-like input types the field styling supports. Checkbox has `Checkbox` and
|
|
141
|
-
* file has `FileInput`; radio, range and color need their own native layout and are
|
|
142
|
-
* not supported here.
|
|
143
|
-
*/
|
|
144
|
-
type InputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number' | 'date' | 'time' | 'datetime-local' | 'month' | 'week';
|
|
145
|
-
type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & FieldChromeProps & {
|
|
146
|
-
/** Text-like types only (see `InputType`). Default `text`. */
|
|
147
|
-
type?: InputType;
|
|
148
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
149
|
-
className?: string;
|
|
150
|
-
wrapperClassName?: string;
|
|
151
|
-
/** Marks the control invalid without an error message. */
|
|
152
|
-
invalid?: boolean;
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* Shared Input. Apps use this instead of a local Input. 5px radius, 12px
|
|
156
|
-
* horizontal padding, 44px control height, shell `--app-field-*` tokens.
|
|
157
|
-
*/
|
|
158
|
-
declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & FieldChromeProps & {
|
|
159
|
-
/** Text-like types only (see `InputType`). Default `text`. */
|
|
160
|
-
type?: InputType;
|
|
161
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
162
|
-
className?: string;
|
|
163
|
-
wrapperClassName?: string;
|
|
164
|
-
/** Marks the control invalid without an error message. */
|
|
165
|
-
invalid?: boolean;
|
|
166
|
-
} & react.RefAttributes<HTMLInputElement>>;
|
|
167
|
-
|
|
168
|
-
type SelectProps = SelectHTMLAttributes<HTMLSelectElement> & FieldChromeProps & {
|
|
169
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
170
|
-
className?: string;
|
|
171
|
-
wrapperClassName?: string;
|
|
172
|
-
/** Marks the control invalid without an error message. */
|
|
173
|
-
invalid?: boolean;
|
|
174
|
-
};
|
|
175
|
-
/**
|
|
176
|
-
* Shared Select. Apps use this instead of a local Select. 5px radius, 12px
|
|
177
|
-
* horizontal padding, 44px control height, shell `--app-field-*` tokens.
|
|
178
|
-
*/
|
|
179
|
-
declare const Select: react.ForwardRefExoticComponent<SelectHTMLAttributes<HTMLSelectElement> & FieldChromeProps & {
|
|
180
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
181
|
-
className?: string;
|
|
182
|
-
wrapperClassName?: string;
|
|
183
|
-
/** Marks the control invalid without an error message. */
|
|
184
|
-
invalid?: boolean;
|
|
185
|
-
} & react.RefAttributes<HTMLSelectElement>>;
|
|
186
|
-
|
|
187
|
-
type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & FieldChromeProps & {
|
|
188
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
189
|
-
className?: string;
|
|
190
|
-
wrapperClassName?: string;
|
|
191
|
-
/** Marks the control invalid without an error message. */
|
|
192
|
-
invalid?: boolean;
|
|
193
|
-
};
|
|
194
|
-
/**
|
|
195
|
-
* Shared Textarea. Apps use this instead of a local Textarea. 5px radius, 12px
|
|
196
|
-
* horizontal padding, 88px minimum height, shell `--app-field-*` tokens.
|
|
197
|
-
*/
|
|
198
|
-
declare const Textarea: react.ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & FieldChromeProps & {
|
|
199
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
200
|
-
className?: string;
|
|
201
|
-
wrapperClassName?: string;
|
|
202
|
-
/** Marks the control invalid without an error message. */
|
|
203
|
-
invalid?: boolean;
|
|
204
|
-
} & react.RefAttributes<HTMLTextAreaElement>>;
|
|
205
|
-
|
|
206
|
-
type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {
|
|
207
|
-
/** Visible label, clickable. */
|
|
208
|
-
label?: ReactNode;
|
|
209
|
-
/** Secondary text under the label. */
|
|
210
|
-
description?: ReactNode;
|
|
211
|
-
/** Mixed state (set on the DOM node; `checked` still controls the underlying value). */
|
|
212
|
-
indeterminate?: boolean;
|
|
213
|
-
/** Marks the checkbox invalid (red outline, aria-invalid). */
|
|
214
|
-
invalid?: boolean;
|
|
215
|
-
/** Class for the `<input>`; the row takes `wrapperClassName`. */
|
|
216
|
-
className?: string;
|
|
217
|
-
wrapperClassName?: string;
|
|
218
|
-
};
|
|
219
|
-
/**
|
|
220
|
-
* Shared Checkbox. The whole row is a 44px-tall touch target (label wraps the
|
|
221
|
-
* control); colors come from the shell tokens, with the accent as the fill.
|
|
222
|
-
*/
|
|
223
|
-
declare const Checkbox: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
224
|
-
/** Visible label, clickable. */
|
|
225
|
-
label?: ReactNode;
|
|
226
|
-
/** Secondary text under the label. */
|
|
227
|
-
description?: ReactNode;
|
|
228
|
-
/** Mixed state (set on the DOM node; `checked` still controls the underlying value). */
|
|
229
|
-
indeterminate?: boolean;
|
|
230
|
-
/** Marks the checkbox invalid (red outline, aria-invalid). */
|
|
231
|
-
invalid?: boolean;
|
|
232
|
-
/** Class for the `<input>`; the row takes `wrapperClassName`. */
|
|
233
|
-
className?: string;
|
|
234
|
-
wrapperClassName?: string;
|
|
235
|
-
} & react.RefAttributes<HTMLInputElement>>;
|
|
236
|
-
|
|
237
|
-
type FileInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'defaultValue'> & FieldChromeProps & {
|
|
238
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
239
|
-
className?: string;
|
|
240
|
-
wrapperClassName?: string;
|
|
241
|
-
/** Marks the control invalid without an error message. */
|
|
242
|
-
invalid?: boolean;
|
|
243
|
-
};
|
|
244
|
-
/**
|
|
245
|
-
* Shared file picker (`<input type="file">`). Same label/helper/error chrome and
|
|
246
|
-
* field tokens as `Input`; the native "Choose file" button is styled with the
|
|
247
|
-
* secondary-button tokens. Use `accept` / `multiple` as usual.
|
|
248
|
-
*/
|
|
249
|
-
declare const FileInput: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "type" | "defaultValue"> & FieldChromeProps & {
|
|
250
|
-
/** Class for the control itself; the wrapper takes `wrapperClassName`. */
|
|
251
|
-
className?: string;
|
|
252
|
-
wrapperClassName?: string;
|
|
253
|
-
/** Marks the control invalid without an error message. */
|
|
254
|
-
invalid?: boolean;
|
|
255
|
-
} & react.RefAttributes<HTMLInputElement>>;
|
|
256
|
-
|
|
257
64
|
type BreadcrumbItem = {
|
|
258
65
|
label: string;
|
|
259
66
|
href?: string;
|
|
@@ -689,7 +496,7 @@ declare function useThemePreference(): {
|
|
|
689
496
|
setValue: (next: ThemePreference) => void;
|
|
690
497
|
};
|
|
691
498
|
|
|
692
|
-
/** Page header for apps with no react-router
|
|
499
|
+
/** Page header for apps with no react-router. Same view as the main entry. */
|
|
693
500
|
declare function PageHeader(props: PageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
694
501
|
|
|
695
502
|
/**
|
|
@@ -1335,4 +1142,4 @@ type NavAppShellProps = {
|
|
|
1335
1142
|
};
|
|
1336
1143
|
declare function NavAppShell({ sidebar, topBar, betaBanner, contentWrapper, accountMenuPlacement, modeId, children, }: NavAppShellProps): react_jsx_runtime.JSX.Element;
|
|
1337
1144
|
|
|
1338
|
-
export {
|
|
1145
|
+
export { NavChromeProvider as $, type CampaignFeatureAvailability as A, type BreadcrumbBarProps as B, Card as C, type ChromeMe as D, type ChromeNotificationAlert as E, FormColumn as F, type ChromeNotificationImport as G, HeaderTabBar as H, type ChromeNotificationQuarantine as I, type ChromeNotificationReply as J, type ChromeNotificationsPayload as K, type ChromeOrgSummary as L, type CommunicationsFuelStatus as M, type NavItem as N, type CreditHealthState as O, type PageHeaderProps as P, type CreditTypeKey as Q, CreditsAction as R, type StandardNavIconKey as S, type CreditsIconState as T, FuelAction as U, type FuelChannelStatus as V, NavAppShell as W, type NavAppShellProps as X, NavBetaBanner as Y, type NavBetaBannerProps as Z, type NavBrand as _, type CommsNotification as a, NavDisplayAction as a0, type NavLinkProps as a1, type NavLinkedAccount as a2, type NavModeOption as a3, type NavOrg as a4, type NavRoleBadge as a5, NavSidebar as a6, type NavSidebarProps as a7, type NavTab as a8, NavTabStrip as a9, envChipClasses as aA, isNavItemActive as aB, modeIdFromLabel as aC, resolveOrgLogoUrl as aD, shortEnvLabel as aE, shortUserName as aF, standardPolitogyNav as aG, topBarIconButtonClass as aH, useChromeMe as aI, useChromeOrgs as aJ, useNavChromeDedupedFetch as aK, useNavChromeFetcher as aL, useThemePreference as aM, type NavTabStripProps as aa, NavThemeControl as ab, NavTopBar as ac, type NavTopBarAction as ad, type NavTopBarProps as ae, type NavUser as af, NotificationsAction as ag, PageHeader as ah, type PageHeaderMode as ai, SPECS_ORIGIN as aj, SpecOverlayAction as ak, type StandardNavOptions as al, SupportAction as am, type ThemePreference as an, TopBarCountBadge as ao, type TopBarIconTone as ap, TopBarPanelArrow as aq, TopBarPopover as ar, TopBarTooltip as as, TopBarWidgetSlot as at, clearBetaBannerDismissal as au, creditGaugeRatio as av, creditStateWord as aw, creditTooltipLine as ax, creditsAriaLabel as ay, creditsIconState as az, type CommsNotificationKind as b, type HeaderTabBarItem as c, type NotificationsAdapter as d, type NotificationsFeed as e, createCommsNotificationsAdapter as f, emptyNotificationsFeed as g, type NavIcon as h, type NavBreadcrumb as i, type StandardNavMode as j, type NavLinkComponent as k, type NavChromeFetcher as l, type NavMode as m, normalizeNotificationsFeed as n, type NavUserMenu as o, type NavOrgOption as p, type NavFooterLink as q, type NavFooter as r, type NavDisplayMode as s, BETA_BANNER_DISMISS_KEY as t, BreadcrumbBar as u, CAMPAIGN_FEATURE_AVAILABILITY as v, CORE_APP_ORIGIN as w, CORE_BILLING_PATH as x, CREDIT_TYPE_LABELS as y, CREDIT_TYPE_ORDER as z };
|