@cloudflare/component-page 4.2.511 → 5.0.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 +24 -0
- package/README.md +2 -5
- package/dist/Page.d.ts +18 -260
- package/dist/index.d.ts +2 -327
- package/es/Page.js +151 -5
- package/es/index.js +2 -5
- package/lib/Page.js +173 -4
- package/lib/index.js +3 -17
- package/package.json +7 -6
- package/src/Page.tsx +215 -7
- package/src/index.ts +2 -6
- package/dist/PageContent.d.ts +0 -10
- package/dist/PageHeader.d.ts +0 -8
- package/es/PageContent.js +0 -29
- package/es/PageHeader.js +0 -50
- package/lib/PageContent.js +0 -43
- package/lib/PageHeader.js +0 -67
- package/src/PageContent.tsx +0 -34
- package/src/PageHeader.tsx +0 -66
package/dist/index.d.ts
CHANGED
|
@@ -1,327 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import PageContent from './PageContent';
|
|
4
|
-
export declare const Page: import("react").ComponentType<{
|
|
5
|
-
slot?: string | undefined;
|
|
6
|
-
style?: import("react").CSSProperties | undefined;
|
|
7
|
-
title?: string | undefined;
|
|
8
|
-
children?: import("react").ReactNode;
|
|
9
|
-
key?: import("react").Key | null | undefined;
|
|
10
|
-
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
11
|
-
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
12
|
-
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
13
|
-
draggable?: (boolean | "true" | "false") | undefined;
|
|
14
|
-
onDragStart?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
15
|
-
onDrag?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
16
|
-
onDragEnd?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
17
|
-
className?: string | undefined;
|
|
18
|
-
color?: (string & (string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined])) | undefined;
|
|
19
|
-
id?: string | undefined;
|
|
20
|
-
lang?: string | undefined;
|
|
21
|
-
role?: string | undefined;
|
|
22
|
-
tabIndex?: number | undefined;
|
|
23
|
-
'aria-activedescendant'?: string | undefined;
|
|
24
|
-
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
|
25
|
-
'aria-autocomplete'?: "none" | "inline" | "list" | "both" | undefined;
|
|
26
|
-
'aria-busy'?: boolean | "true" | "false" | undefined;
|
|
27
|
-
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
|
|
28
|
-
'aria-colcount'?: number | undefined;
|
|
29
|
-
'aria-colindex'?: number | undefined;
|
|
30
|
-
'aria-colspan'?: number | undefined;
|
|
31
|
-
'aria-controls'?: string | undefined;
|
|
32
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
33
|
-
'aria-describedby'?: string | undefined;
|
|
34
|
-
'aria-details'?: string | undefined;
|
|
35
|
-
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
|
36
|
-
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
37
|
-
'aria-errormessage'?: string | undefined;
|
|
38
|
-
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
|
39
|
-
'aria-flowto'?: string | undefined;
|
|
40
|
-
'aria-grabbed'?: boolean | "true" | "false" | undefined;
|
|
41
|
-
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "listbox" | "tree" | "grid" | undefined;
|
|
42
|
-
'aria-hidden'?: boolean | "true" | "false" | undefined;
|
|
43
|
-
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
44
|
-
'aria-keyshortcuts'?: string | undefined;
|
|
45
|
-
'aria-label'?: string | undefined;
|
|
46
|
-
'aria-labelledby'?: string | undefined;
|
|
47
|
-
'aria-level'?: number | undefined;
|
|
48
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
49
|
-
'aria-modal'?: boolean | "true" | "false" | undefined;
|
|
50
|
-
'aria-multiline'?: boolean | "true" | "false" | undefined;
|
|
51
|
-
'aria-multiselectable'?: boolean | "true" | "false" | undefined;
|
|
52
|
-
'aria-orientation'?: "horizontal" | "vertical" | undefined;
|
|
53
|
-
'aria-owns'?: string | undefined;
|
|
54
|
-
'aria-placeholder'?: string | undefined;
|
|
55
|
-
'aria-posinset'?: number | undefined;
|
|
56
|
-
'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
|
|
57
|
-
'aria-readonly'?: boolean | "true" | "false" | undefined;
|
|
58
|
-
'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
59
|
-
'aria-required'?: boolean | "true" | "false" | undefined;
|
|
60
|
-
'aria-roledescription'?: string | undefined;
|
|
61
|
-
'aria-rowcount'?: number | undefined;
|
|
62
|
-
'aria-rowindex'?: number | undefined;
|
|
63
|
-
'aria-rowspan'?: number | undefined;
|
|
64
|
-
'aria-selected'?: boolean | "true" | "false" | undefined;
|
|
65
|
-
'aria-setsize'?: number | undefined;
|
|
66
|
-
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
67
|
-
'aria-valuemax'?: number | undefined;
|
|
68
|
-
'aria-valuemin'?: number | undefined;
|
|
69
|
-
'aria-valuenow'?: number | undefined;
|
|
70
|
-
'aria-valuetext'?: string | undefined;
|
|
71
|
-
dangerouslySetInnerHTML?: {
|
|
72
|
-
__html: string;
|
|
73
|
-
} | undefined;
|
|
74
|
-
onCopy?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
75
|
-
onCopyCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
76
|
-
onCut?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
77
|
-
onCutCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
78
|
-
onPaste?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
79
|
-
onPasteCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
80
|
-
onCompositionEnd?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
81
|
-
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
82
|
-
onCompositionStart?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
83
|
-
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
84
|
-
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
85
|
-
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
86
|
-
onFocus?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
87
|
-
onFocusCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
88
|
-
onBlur?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
89
|
-
onBlurCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
90
|
-
onChange?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
91
|
-
onChangeCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
92
|
-
onBeforeInput?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
93
|
-
onBeforeInputCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
94
|
-
onInput?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
95
|
-
onInputCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
96
|
-
onReset?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
97
|
-
onResetCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
98
|
-
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
99
|
-
onSubmitCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
100
|
-
onInvalid?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
101
|
-
onInvalidCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
102
|
-
onLoad?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
103
|
-
onLoadCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
104
|
-
onError?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
105
|
-
onErrorCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
106
|
-
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
107
|
-
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
108
|
-
onKeyPress?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
109
|
-
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
110
|
-
onKeyUp?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
111
|
-
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
112
|
-
onAbort?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
113
|
-
onAbortCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
114
|
-
onCanPlay?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
115
|
-
onCanPlayCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
116
|
-
onCanPlayThrough?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
117
|
-
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
118
|
-
onDurationChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
119
|
-
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
120
|
-
onEmptied?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
121
|
-
onEmptiedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
122
|
-
onEncrypted?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
123
|
-
onEncryptedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
124
|
-
onEnded?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
125
|
-
onEndedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
126
|
-
onLoadedData?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
127
|
-
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
128
|
-
onLoadedMetadata?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
129
|
-
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
130
|
-
onLoadStart?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
131
|
-
onLoadStartCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
132
|
-
onPause?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
133
|
-
onPauseCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
134
|
-
onPlay?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
135
|
-
onPlayCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
136
|
-
onPlaying?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
137
|
-
onPlayingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
138
|
-
onProgress?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
139
|
-
onProgressCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
140
|
-
onRateChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
141
|
-
onRateChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
142
|
-
onSeeked?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
143
|
-
onSeekedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
144
|
-
onSeeking?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
145
|
-
onSeekingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
146
|
-
onStalled?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
147
|
-
onStalledCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
148
|
-
onSuspend?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
149
|
-
onSuspendCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
150
|
-
onTimeUpdate?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
151
|
-
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
152
|
-
onVolumeChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
153
|
-
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
154
|
-
onWaiting?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
155
|
-
onWaitingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
156
|
-
onAuxClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
157
|
-
onAuxClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
158
|
-
onClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
159
|
-
onContextMenu?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
160
|
-
onContextMenuCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
161
|
-
onDoubleClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
162
|
-
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
163
|
-
onDragCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
164
|
-
onDragEndCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
165
|
-
onDragEnter?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
166
|
-
onDragEnterCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
167
|
-
onDragExit?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
168
|
-
onDragExitCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
169
|
-
onDragLeave?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
170
|
-
onDragLeaveCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
171
|
-
onDragOver?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
172
|
-
onDragOverCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
173
|
-
onDragStartCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
174
|
-
onDrop?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
175
|
-
onDropCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
176
|
-
onMouseDown?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
177
|
-
onMouseDownCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
178
|
-
onMouseMove?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
179
|
-
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
180
|
-
onMouseOut?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
181
|
-
onMouseOutCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
182
|
-
onMouseOver?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
183
|
-
onMouseOverCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
184
|
-
onMouseUp?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
185
|
-
onMouseUpCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
186
|
-
onSelect?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
187
|
-
onSelectCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
188
|
-
onTouchCancel?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
189
|
-
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
190
|
-
onTouchEnd?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
191
|
-
onTouchEndCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
192
|
-
onTouchMove?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
193
|
-
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
194
|
-
onTouchStart?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
195
|
-
onTouchStartCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
196
|
-
onPointerDown?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
197
|
-
onPointerDownCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
198
|
-
onPointerMove?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
199
|
-
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
200
|
-
onPointerUp?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
201
|
-
onPointerUpCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
202
|
-
onPointerCancel?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
203
|
-
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
204
|
-
onPointerEnter?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
205
|
-
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
206
|
-
onPointerLeave?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
207
|
-
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
208
|
-
onPointerOver?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
209
|
-
onPointerOverCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
210
|
-
onPointerOut?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
211
|
-
onPointerOutCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
212
|
-
onGotPointerCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
213
|
-
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
214
|
-
onLostPointerCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
215
|
-
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
216
|
-
onScroll?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
217
|
-
onScrollCapture?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
218
|
-
onWheel?: import("react").WheelEventHandler<HTMLElement> | undefined;
|
|
219
|
-
onWheelCapture?: import("react").WheelEventHandler<HTMLElement> | undefined;
|
|
220
|
-
onAnimationStart?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
221
|
-
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
222
|
-
onAnimationEnd?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
223
|
-
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
224
|
-
onAnimationIteration?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
225
|
-
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
226
|
-
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
227
|
-
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
228
|
-
dir?: string | undefined;
|
|
229
|
-
is?: string | undefined;
|
|
230
|
-
translate?: "no" | "yes" | undefined;
|
|
231
|
-
defaultChecked?: boolean | undefined;
|
|
232
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
|
233
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
234
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
235
|
-
accessKey?: string | undefined;
|
|
236
|
-
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
237
|
-
contextMenu?: string | undefined;
|
|
238
|
-
placeholder?: string | undefined;
|
|
239
|
-
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
240
|
-
inputMode?: "text" | "none" | "search" | "email" | "url" | "tel" | "numeric" | "decimal" | undefined;
|
|
241
|
-
radioGroup?: string | undefined;
|
|
242
|
-
about?: string | undefined;
|
|
243
|
-
datatype?: string | undefined;
|
|
244
|
-
inlist?: any;
|
|
245
|
-
prefix?: string | undefined;
|
|
246
|
-
property?: string | undefined;
|
|
247
|
-
resource?: string | undefined;
|
|
248
|
-
typeof?: string | undefined;
|
|
249
|
-
vocab?: string | undefined;
|
|
250
|
-
autoCapitalize?: string | undefined;
|
|
251
|
-
autoCorrect?: string | undefined;
|
|
252
|
-
autoSave?: string | undefined;
|
|
253
|
-
itemProp?: string | undefined;
|
|
254
|
-
itemScope?: boolean | undefined;
|
|
255
|
-
itemType?: string | undefined;
|
|
256
|
-
itemID?: string | undefined;
|
|
257
|
-
itemRef?: string | undefined;
|
|
258
|
-
results?: number | undefined;
|
|
259
|
-
security?: string | undefined;
|
|
260
|
-
unselectable?: "off" | "on" | undefined;
|
|
261
|
-
hidden?: boolean | undefined;
|
|
262
|
-
p?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
263
|
-
height?: import("csstype").HeightProperty<string | number> | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | [import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined, import("csstype").HeightProperty<string | number> | undefined] | undefined;
|
|
264
|
-
width?: import("csstype").WidthProperty<string | number> | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | [import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined, import("csstype").WidthProperty<string | number> | undefined] | undefined;
|
|
265
|
-
cursor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
266
|
-
display?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
267
|
-
fontSize?: import("csstype").FontSizeProperty<string | number> | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | [import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined, import("csstype").FontSizeProperty<string | number> | undefined] | undefined;
|
|
268
|
-
fontWeight?: import("csstype").FontWeightProperty | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | [import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined, import("csstype").FontWeightProperty | undefined] | undefined;
|
|
269
|
-
textDecoration?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
270
|
-
textAlign?: import("csstype").TextAlignProperty | [import("csstype").TextAlignProperty | undefined, import("csstype").TextAlignProperty | undefined] | [import("csstype").TextAlignProperty | undefined, import("csstype").TextAlignProperty | undefined, import("csstype").TextAlignProperty | undefined] | undefined;
|
|
271
|
-
backgroundColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
272
|
-
borderColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
273
|
-
borderLeftColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
274
|
-
borderRightColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
275
|
-
borderTopColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
276
|
-
borderBottomColor?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
277
|
-
minWidth?: import("csstype").MinWidthProperty<string | number> | [import("csstype").MinWidthProperty<string | number> | undefined, import("csstype").MinWidthProperty<string | number> | undefined] | [import("csstype").MinWidthProperty<string | number> | undefined, import("csstype").MinWidthProperty<string | number> | undefined, import("csstype").MinWidthProperty<string | number> | undefined] | undefined;
|
|
278
|
-
minHeight?: import("csstype").MinHeightProperty<string | number> | [import("csstype").MinHeightProperty<string | number> | undefined, import("csstype").MinHeightProperty<string | number> | undefined] | [import("csstype").MinHeightProperty<string | number> | undefined, import("csstype").MinHeightProperty<string | number> | undefined, import("csstype").MinHeightProperty<string | number> | undefined] | undefined;
|
|
279
|
-
maxWidth?: import("csstype").MaxWidthProperty<string | number> | [import("csstype").MaxWidthProperty<string | number> | undefined, import("csstype").MaxWidthProperty<string | number> | undefined] | [import("csstype").MaxWidthProperty<string | number> | undefined, import("csstype").MaxWidthProperty<string | number> | undefined, import("csstype").MaxWidthProperty<string | number> | undefined] | undefined;
|
|
280
|
-
maxHeight?: import("csstype").MaxHeightProperty<string | number> | [import("csstype").MaxHeightProperty<string | number> | undefined, import("csstype").MaxHeightProperty<string | number> | undefined] | [import("csstype").MaxHeightProperty<string | number> | undefined, import("csstype").MaxHeightProperty<string | number> | undefined, import("csstype").MaxHeightProperty<string | number> | undefined] | undefined;
|
|
281
|
-
margin?: import("csstype").MarginProperty<string | number> | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | undefined;
|
|
282
|
-
marginTop?: import("csstype").MarginTopProperty<string | number> | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | undefined;
|
|
283
|
-
marginRight?: import("csstype").MarginRightProperty<string | number> | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | undefined;
|
|
284
|
-
marginLeft?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
285
|
-
padding?: import("csstype").PaddingProperty<string | number> | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | [import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined, import("csstype").PaddingProperty<string | number> | undefined] | undefined;
|
|
286
|
-
paddingTop?: import("csstype").PaddingTopProperty<string | number> | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | undefined;
|
|
287
|
-
paddingRight?: import("csstype").PaddingRightProperty<string | number> | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | undefined;
|
|
288
|
-
paddingLeft?: import("csstype").PaddingLeftProperty<string | number> | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | undefined;
|
|
289
|
-
borderRadius?: import("csstype").BorderRadiusProperty<string | number> | [import("csstype").BorderRadiusProperty<string | number> | undefined, import("csstype").BorderRadiusProperty<string | number> | undefined] | [import("csstype").BorderRadiusProperty<string | number> | undefined, import("csstype").BorderRadiusProperty<string | number> | undefined, import("csstype").BorderRadiusProperty<string | number> | undefined] | undefined;
|
|
290
|
-
verticalAlign?: import("csstype").VerticalAlignProperty<string | number> | [import("csstype").VerticalAlignProperty<string | number> | undefined, import("csstype").VerticalAlignProperty<string | number> | undefined] | [import("csstype").VerticalAlignProperty<string | number> | undefined, import("csstype").VerticalAlignProperty<string | number> | undefined, import("csstype").VerticalAlignProperty<string | number> | undefined] | undefined;
|
|
291
|
-
alignItems?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
292
|
-
alignSelf?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
293
|
-
borderBottomLeftRadius?: import("csstype").BorderBottomLeftRadiusProperty<string | number> | [import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined, import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined] | [import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined, import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined, import("csstype").BorderBottomLeftRadiusProperty<string | number> | undefined] | undefined;
|
|
294
|
-
borderBottomStyle?: import("csstype").BorderBottomStyleProperty | [import("csstype").BorderBottomStyleProperty | undefined, import("csstype").BorderBottomStyleProperty | undefined] | [import("csstype").BorderBottomStyleProperty | undefined, import("csstype").BorderBottomStyleProperty | undefined, import("csstype").BorderBottomStyleProperty | undefined] | undefined;
|
|
295
|
-
borderBottomWidth?: import("csstype").BorderBottomWidthProperty<string | number> | [import("csstype").BorderBottomWidthProperty<string | number> | undefined, import("csstype").BorderBottomWidthProperty<string | number> | undefined] | [import("csstype").BorderBottomWidthProperty<string | number> | undefined, import("csstype").BorderBottomWidthProperty<string | number> | undefined, import("csstype").BorderBottomWidthProperty<string | number> | undefined] | undefined;
|
|
296
|
-
borderLeftStyle?: import("csstype").BorderLeftStyleProperty | [import("csstype").BorderLeftStyleProperty | undefined, import("csstype").BorderLeftStyleProperty | undefined] | [import("csstype").BorderLeftStyleProperty | undefined, import("csstype").BorderLeftStyleProperty | undefined, import("csstype").BorderLeftStyleProperty | undefined] | undefined;
|
|
297
|
-
borderLeftWidth?: import("csstype").BorderLeftWidthProperty<string | number> | [import("csstype").BorderLeftWidthProperty<string | number> | undefined, import("csstype").BorderLeftWidthProperty<string | number> | undefined] | [import("csstype").BorderLeftWidthProperty<string | number> | undefined, import("csstype").BorderLeftWidthProperty<string | number> | undefined, import("csstype").BorderLeftWidthProperty<string | number> | undefined] | undefined;
|
|
298
|
-
borderRightStyle?: import("csstype").BorderRightStyleProperty | [import("csstype").BorderRightStyleProperty | undefined, import("csstype").BorderRightStyleProperty | undefined] | [import("csstype").BorderRightStyleProperty | undefined, import("csstype").BorderRightStyleProperty | undefined, import("csstype").BorderRightStyleProperty | undefined] | undefined;
|
|
299
|
-
borderRightWidth?: import("csstype").BorderRightWidthProperty<string | number> | [import("csstype").BorderRightWidthProperty<string | number> | undefined, import("csstype").BorderRightWidthProperty<string | number> | undefined] | [import("csstype").BorderRightWidthProperty<string | number> | undefined, import("csstype").BorderRightWidthProperty<string | number> | undefined, import("csstype").BorderRightWidthProperty<string | number> | undefined] | undefined;
|
|
300
|
-
borderTopLeftRadius?: import("csstype").BorderTopLeftRadiusProperty<string | number> | [import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined, import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined] | [import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined, import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined, import("csstype").BorderTopLeftRadiusProperty<string | number> | undefined] | undefined;
|
|
301
|
-
borderTopRightRadius?: import("csstype").BorderTopRightRadiusProperty<string | number> | [import("csstype").BorderTopRightRadiusProperty<string | number> | undefined, import("csstype").BorderTopRightRadiusProperty<string | number> | undefined] | [import("csstype").BorderTopRightRadiusProperty<string | number> | undefined, import("csstype").BorderTopRightRadiusProperty<string | number> | undefined, import("csstype").BorderTopRightRadiusProperty<string | number> | undefined] | undefined;
|
|
302
|
-
borderTopStyle?: import("csstype").BorderTopStyleProperty | [import("csstype").BorderTopStyleProperty | undefined, import("csstype").BorderTopStyleProperty | undefined] | [import("csstype").BorderTopStyleProperty | undefined, import("csstype").BorderTopStyleProperty | undefined, import("csstype").BorderTopStyleProperty | undefined] | undefined;
|
|
303
|
-
borderTopWidth?: import("csstype").BorderTopWidthProperty<string | number> | [import("csstype").BorderTopWidthProperty<string | number> | undefined, import("csstype").BorderTopWidthProperty<string | number> | undefined] | [import("csstype").BorderTopWidthProperty<string | number> | undefined, import("csstype").BorderTopWidthProperty<string | number> | undefined, import("csstype").BorderTopWidthProperty<string | number> | undefined] | undefined;
|
|
304
|
-
boxSizing?: import("csstype").BoxSizingProperty | [import("csstype").BoxSizingProperty | undefined, import("csstype").BoxSizingProperty | undefined] | [import("csstype").BoxSizingProperty | undefined, import("csstype").BoxSizingProperty | undefined, import("csstype").BoxSizingProperty | undefined] | undefined;
|
|
305
|
-
justifyContent?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
306
|
-
marginBottom?: import("csstype").MarginBottomProperty<string | number> | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | undefined;
|
|
307
|
-
paddingBottom?: import("csstype").PaddingBottomProperty<string | number> | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | undefined;
|
|
308
|
-
textTransform?: import("csstype").TextTransformProperty | [import("csstype").TextTransformProperty | undefined, import("csstype").TextTransformProperty | undefined] | [import("csstype").TextTransformProperty | undefined, import("csstype").TextTransformProperty | undefined, import("csstype").TextTransformProperty | undefined] | undefined;
|
|
309
|
-
borderStyle?: string | [string | undefined, string | undefined] | [string | undefined, string | undefined, string | undefined] | undefined;
|
|
310
|
-
borderWidth?: import("csstype").BorderWidthProperty<string | number> | [import("csstype").BorderWidthProperty<string | number> | undefined, import("csstype").BorderWidthProperty<string | number> | undefined] | [import("csstype").BorderWidthProperty<string | number> | undefined, import("csstype").BorderWidthProperty<string | number> | undefined, import("csstype").BorderWidthProperty<string | number> | undefined] | undefined;
|
|
311
|
-
m?: import("csstype").MarginProperty<string | number> | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | [import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined, import("csstype").MarginProperty<string | number> | undefined] | undefined;
|
|
312
|
-
ml?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
313
|
-
mr?: import("csstype").MarginRightProperty<string | number> | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | [import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined, import("csstype").MarginRightProperty<string | number> | undefined] | undefined;
|
|
314
|
-
mt?: import("csstype").MarginTopProperty<string | number> | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | undefined;
|
|
315
|
-
mb?: import("csstype").MarginBottomProperty<string | number> | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | [import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined, import("csstype").MarginBottomProperty<string | number> | undefined] | undefined;
|
|
316
|
-
mx?: import("csstype").MarginLeftProperty<string | number> | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | [import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined, import("csstype").MarginLeftProperty<string | number> | undefined] | undefined;
|
|
317
|
-
my?: import("csstype").MarginTopProperty<string | number> | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | [import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined, import("csstype").MarginTopProperty<string | number> | undefined] | undefined;
|
|
318
|
-
pl?: import("csstype").PaddingLeftProperty<string | number> | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | undefined;
|
|
319
|
-
pr?: import("csstype").PaddingRightProperty<string | number> | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | [import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined, import("csstype").PaddingRightProperty<string | number> | undefined] | undefined;
|
|
320
|
-
pt?: import("csstype").PaddingTopProperty<string | number> | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | undefined;
|
|
321
|
-
pb?: import("csstype").PaddingBottomProperty<string | number> | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | [import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined, import("csstype").PaddingBottomProperty<string | number> | undefined] | undefined;
|
|
322
|
-
px?: import("csstype").PaddingLeftProperty<string | number> | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | undefined;
|
|
323
|
-
py?: import("csstype").PaddingTopProperty<string | number> | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | undefined;
|
|
324
|
-
borderbottomRightRadius?: ([never, never] | [never, never, never]) | undefined;
|
|
325
|
-
innerRef?: import("react").Ref<HTMLElement> | undefined;
|
|
326
|
-
}>;
|
|
327
|
-
export { PageHeader, PageContent };
|
|
1
|
+
import Page from './Page';
|
|
2
|
+
export { Page };
|
package/es/Page.js
CHANGED
|
@@ -1,7 +1,153 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { useHistory } from 'react-router-dom';
|
|
3
|
+
import { createStyledComponent, createComponent } from '@cloudflare/style-container';
|
|
4
|
+
import { Main, Header, Div } from '@cloudflare/elements';
|
|
5
|
+
import { Label } from '@cloudflare/component-label';
|
|
6
|
+
import { Trans } from '@cloudflare/intl-react';
|
|
7
|
+
const maxWidthByType = {
|
|
8
|
+
narrow: '64em',
|
|
9
|
+
wide: '79em',
|
|
10
|
+
unbounded: '100%'
|
|
11
|
+
};
|
|
12
|
+
const PageTitle = createComponent(({
|
|
13
|
+
theme
|
|
14
|
+
}) => ({
|
|
15
|
+
fontSize: theme.fontSizes[6],
|
|
16
|
+
marginTop: theme.space[0],
|
|
17
|
+
marginBottom: theme.space[0],
|
|
18
|
+
lineHeight: 1.25,
|
|
19
|
+
color: theme.colors.gray[1],
|
|
20
|
+
fontWeight: 600
|
|
21
|
+
}), 'h1');
|
|
22
|
+
PageTitle.displayName = 'Title';
|
|
23
|
+
const PageSubtitle = createComponent(({
|
|
24
|
+
theme
|
|
25
|
+
}) => ({
|
|
26
|
+
fontSize: theme.fontSizes[5],
|
|
27
|
+
marginBottom: theme.space[0],
|
|
28
|
+
lineHeight: 1.25,
|
|
29
|
+
color: theme.colors.gray[3],
|
|
30
|
+
fontWeight: 400
|
|
31
|
+
}), 'h2');
|
|
32
|
+
PageTitle.displayName = 'PageSubtitle';
|
|
33
|
+
const PageDescription = createComponent(({
|
|
34
|
+
theme
|
|
35
|
+
}) => ({
|
|
36
|
+
fontSize: theme.fontSizes[4],
|
|
37
|
+
marginBottom: theme.space[0],
|
|
38
|
+
lineHeight: 1.25,
|
|
39
|
+
color: theme.colors.gray[3],
|
|
40
|
+
fontWeight: 400
|
|
41
|
+
}), 'p');
|
|
42
|
+
PageDescription.displayName = 'PageDescription';
|
|
43
|
+
const PageSubtitleDescription = createComponent(({
|
|
44
|
+
theme
|
|
45
|
+
}) => ({
|
|
46
|
+
fontSize: theme.fontSizes[4],
|
|
47
|
+
marginBottom: theme.space[0],
|
|
48
|
+
lineHeight: 1.25,
|
|
49
|
+
color: theme.colors.gray[3],
|
|
50
|
+
fontWeight: 400
|
|
51
|
+
}), 'h2');
|
|
52
|
+
PageSubtitleDescription.displayName = 'PageSubtitleDescription'; // firstPage is used when dealing with focus. When navigating the dash, focus
|
|
53
|
+
// jumps to the page content, but not when the dash is initially loaded.
|
|
54
|
+
|
|
55
|
+
let firstPage = ''; // firstLoad is used to ensure focus is handled correctly if the user navigates
|
|
56
|
+
// back to the first page that was loaded.
|
|
57
|
+
|
|
58
|
+
let firstLoad = true; // Workaround for a bug where elements don't focus correctly.
|
|
59
|
+
|
|
60
|
+
const maxFocusAttempts = 10;
|
|
61
|
+
|
|
62
|
+
const focus = (el, attempt = 0) => {
|
|
63
|
+
el === null || el === void 0 ? void 0 : el.focus();
|
|
64
|
+
|
|
65
|
+
if (typeof document !== 'undefined' && document.activeElement !== el && attempt < maxFocusAttempts) {
|
|
66
|
+
setTimeout(() => focus(el, attempt + 1), 10);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const Page = ({
|
|
71
|
+
title,
|
|
72
|
+
subtitle,
|
|
73
|
+
description,
|
|
74
|
+
centerHeader,
|
|
75
|
+
beta,
|
|
76
|
+
testId,
|
|
77
|
+
className,
|
|
78
|
+
sidebar,
|
|
79
|
+
type = 'wide',
|
|
80
|
+
sidebarPosition = 'inside',
|
|
81
|
+
autofocus = true,
|
|
82
|
+
control,
|
|
83
|
+
children
|
|
84
|
+
}) => {
|
|
85
|
+
var _history$location;
|
|
86
|
+
|
|
87
|
+
const history = useHistory();
|
|
88
|
+
const skipTargetRef = useRef(null);
|
|
89
|
+
const path = history === null || history === void 0 ? void 0 : (_history$location = history.location) === null || _history$location === void 0 ? void 0 : _history$location.pathname;
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
// If autofocus is enabled, then focus will move to the title block when
|
|
92
|
+
// the page is navigated to (but not when the dash is first loaded)
|
|
93
|
+
if (autofocus) {
|
|
94
|
+
if (!firstPage) {
|
|
95
|
+
firstPage = path;
|
|
96
|
+
} else if (firstPage !== path || !firstLoad) {
|
|
97
|
+
focus(skipTargetRef.current);
|
|
98
|
+
firstLoad = false;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}, [path]);
|
|
102
|
+
const headerVisible = !!(title || subtitle || description);
|
|
103
|
+
let header = /*#__PURE__*/React.createElement(Header, {
|
|
104
|
+
mb: headerVisible ? 3 : 0,
|
|
105
|
+
textAlign: centerHeader ? 'center' : undefined
|
|
106
|
+
}, title && /*#__PURE__*/React.createElement(PageTitle, null, title, beta && /*#__PURE__*/React.createElement(Label, {
|
|
107
|
+
hue: "orange",
|
|
108
|
+
ml: 2,
|
|
109
|
+
verticalAlign: "middle"
|
|
110
|
+
}, /*#__PURE__*/React.createElement(Trans, {
|
|
111
|
+
_: "Beta",
|
|
112
|
+
id: "common.beta"
|
|
113
|
+
}))), subtitle && /*#__PURE__*/React.createElement(PageSubtitle, null, subtitle), description && (subtitle ? /*#__PURE__*/React.createElement(PageDescription, null, description) : /*#__PURE__*/React.createElement(PageSubtitleDescription, null, description)));
|
|
114
|
+
|
|
115
|
+
if (control) {
|
|
116
|
+
header = /*#__PURE__*/React.createElement(Div, {
|
|
117
|
+
display: ['block', 'flex'],
|
|
118
|
+
justifyContent: "space-between"
|
|
119
|
+
}, header, control);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const sidebarInside = sidebarPosition === 'inside';
|
|
123
|
+
const width = type === 'unbounded' ? '100%' : '90%';
|
|
124
|
+
return /*#__PURE__*/React.createElement(Main, {
|
|
125
|
+
"data-testid": testId,
|
|
126
|
+
className: className,
|
|
127
|
+
display: sidebar && sidebarInside ? undefined : 'flex'
|
|
128
|
+
}, /*#__PURE__*/React.createElement(Div, {
|
|
129
|
+
ml: "auto",
|
|
130
|
+
mr: sidebar && !sidebarInside ? 0 : 'auto',
|
|
131
|
+
display: sidebar ? ['block', 'block', 'flex'] : undefined,
|
|
132
|
+
width: ['100%', width, width],
|
|
133
|
+
maxWidth: maxWidthByType[type] || maxWidthByType.narrow
|
|
134
|
+
}, /*#__PURE__*/React.createElement(Div, {
|
|
135
|
+
width: sidebar && sidebarInside ? [1, 1, 2 / 3] : undefined,
|
|
136
|
+
pr: sidebar && sidebarInside ? [0, 0, 3] : undefined,
|
|
137
|
+
mt: 0
|
|
138
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
139
|
+
id: "skipTarget",
|
|
140
|
+
ref: skipTargetRef,
|
|
141
|
+
tabIndex: -1
|
|
142
|
+
}), header, children), sidebar && sidebarInside && /*#__PURE__*/React.createElement(Div, {
|
|
143
|
+
width: [1, 1, 1 / 3],
|
|
144
|
+
pl: [0, 0, 3],
|
|
145
|
+
pt: [4, 4, 0]
|
|
146
|
+
}, sidebar)), !sidebarInside && sidebar);
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
Page.displayName = 'Page';
|
|
150
|
+
export default createStyledComponent(() => ({
|
|
3
151
|
py: 4,
|
|
4
152
|
minHeight: 411
|
|
5
|
-
}),
|
|
6
|
-
Page.displayName = 'Page';
|
|
7
|
-
export default Page;
|
|
153
|
+
}), Page);
|
package/es/index.js
CHANGED