@primer/components 30.3.0-rc.2010c7d4 → 31.0.0-rc.15aa0a10
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/.eslintrc.json +2 -1
- package/.storybook/preview.js +4 -4
- package/CHANGELOG.md +12 -2
- package/codemods/deprecateUtilityComponents.js +1 -1
- package/contributor-docs/adrs/adr-003-prop-norms.md +72 -0
- package/dist/browser.esm.js +798 -794
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +801 -797
- package/dist/browser.umd.js.map +1 -1
- package/docs/content/Autocomplete.mdx +627 -0
- package/docs/content/TextInputTokens.mdx +89 -0
- package/docs/content/getting-started.md +1 -1
- package/docs/content/overriding-styles.mdx +7 -6
- package/docs/content/theming.md +5 -5
- package/docs/package-lock.json +288 -511
- package/docs/package.json +1 -1
- package/docs/src/@primer/gatsby-theme-doctocat/components/hero.js +14 -12
- package/docs/src/@primer/gatsby-theme-doctocat/nav.yml +2 -0
- package/docs/src/@primer/gatsby-theme-doctocat/primer-components-hero.svg +7 -7
- package/lib/ActionList/Item.js +1 -1
- package/lib/AnchoredOverlay/AnchoredOverlay.d.ts +2 -1
- package/lib/AnchoredOverlay/AnchoredOverlay.js +11 -3
- package/lib/Autocomplete/Autocomplete.d.ts +304 -0
- package/lib/Autocomplete/Autocomplete.js +145 -0
- package/lib/Autocomplete/AutocompleteContext.d.ts +17 -0
- package/lib/Autocomplete/AutocompleteContext.js +11 -0
- package/lib/Autocomplete/AutocompleteInput.d.ts +292 -0
- package/lib/Autocomplete/AutocompleteInput.js +157 -0
- package/lib/Autocomplete/AutocompleteMenu.d.ts +72 -0
- package/lib/Autocomplete/AutocompleteMenu.js +224 -0
- package/lib/Autocomplete/AutocompleteOverlay.d.ts +20 -0
- package/lib/Autocomplete/AutocompleteOverlay.js +80 -0
- package/lib/Autocomplete/index.d.ts +2 -0
- package/lib/Autocomplete/index.js +15 -0
- package/lib/BaseStyles.js +1 -1
- package/lib/BorderBox.js +1 -1
- package/lib/Button/ButtonInvisible.js +1 -1
- package/lib/Caret.js +2 -2
- package/lib/Dialog.js +1 -1
- package/lib/FilteredActionList/FilteredActionList.js +5 -31
- package/lib/Flash.js +16 -16
- package/lib/Label.js +1 -1
- package/lib/Overlay.d.ts +1 -0
- package/lib/Overlay.js +3 -1
- package/lib/ProgressBar.js +1 -1
- package/lib/StateLabel.js +13 -19
- package/lib/Token/_RemoveTokenButton.js +1 -1
- package/lib/__tests__/Autocomplete.test.d.ts +1 -0
- package/lib/__tests__/Autocomplete.test.js +528 -0
- package/lib/__tests__/BorderBox.test.js +1 -1
- package/lib/__tests__/CircleOcticon.test.js +1 -1
- package/lib/__tests__/CounterLabel.test.js +4 -4
- package/lib/__tests__/Flash.test.js +4 -4
- package/lib/__tests__/Link.test.js +1 -1
- package/lib/__tests__/behaviors/scrollIntoViewingArea.test.d.ts +1 -0
- package/lib/__tests__/behaviors/scrollIntoViewingArea.test.js +226 -0
- package/lib/behaviors/scrollIntoViewingArea.d.ts +1 -0
- package/lib/behaviors/scrollIntoViewingArea.js +39 -0
- package/lib/hooks/useOpenAndCloseFocus.d.ts +2 -1
- package/lib/hooks/useOpenAndCloseFocus.js +7 -2
- package/lib/hooks/useOverlay.d.ts +2 -1
- package/lib/hooks/useOverlay.js +4 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -0
- package/lib/stories/Autocomplete.stories.js +608 -0
- package/lib/stories/Dialog.stories.js +3 -3
- package/lib/stories/IssueLabelToken.stories.js +1 -1
- package/lib/stories/ProfileToken.stories.js +1 -1
- package/lib/theme-preval.js +370 -3100
- package/lib/utils/testing.d.ts +50 -493
- package/lib/utils/types/MandateProps.d.ts +3 -0
- package/lib/utils/types/MandateProps.js +1 -0
- package/lib/utils/types/index.d.ts +1 -0
- package/lib/utils/types/index.js +13 -0
- package/lib-esm/ActionList/Item.js +1 -1
- package/lib-esm/AnchoredOverlay/AnchoredOverlay.d.ts +2 -1
- package/lib-esm/AnchoredOverlay/AnchoredOverlay.js +11 -3
- package/lib-esm/Autocomplete/Autocomplete.d.ts +304 -0
- package/lib-esm/Autocomplete/Autocomplete.js +123 -0
- package/lib-esm/Autocomplete/AutocompleteContext.d.ts +17 -0
- package/lib-esm/Autocomplete/AutocompleteContext.js +2 -0
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +292 -0
- package/lib-esm/Autocomplete/AutocompleteInput.js +138 -0
- package/lib-esm/Autocomplete/AutocompleteMenu.d.ts +72 -0
- package/lib-esm/Autocomplete/AutocompleteMenu.js +205 -0
- package/lib-esm/Autocomplete/AutocompleteOverlay.d.ts +20 -0
- package/lib-esm/Autocomplete/AutocompleteOverlay.js +62 -0
- package/lib-esm/Autocomplete/index.d.ts +2 -0
- package/lib-esm/Autocomplete/index.js +1 -0
- package/lib-esm/BaseStyles.js +1 -1
- package/lib-esm/BorderBox.js +1 -1
- package/lib-esm/Button/ButtonInvisible.js +1 -1
- package/lib-esm/Caret.js +2 -2
- package/lib-esm/Dialog.js +1 -1
- package/lib-esm/FilteredActionList/FilteredActionList.js +3 -31
- package/lib-esm/Flash.js +16 -16
- package/lib-esm/Label.js +1 -1
- package/lib-esm/Overlay.d.ts +1 -0
- package/lib-esm/Overlay.js +3 -1
- package/lib-esm/ProgressBar.js +1 -1
- package/lib-esm/StateLabel.js +13 -19
- package/lib-esm/Token/_RemoveTokenButton.js +1 -1
- package/lib-esm/__tests__/Autocomplete.test.d.ts +1 -0
- package/lib-esm/__tests__/Autocomplete.test.js +494 -0
- package/lib-esm/__tests__/BorderBox.test.js +1 -1
- package/lib-esm/__tests__/CircleOcticon.test.js +1 -1
- package/lib-esm/__tests__/CounterLabel.test.js +4 -4
- package/lib-esm/__tests__/Flash.test.js +4 -4
- package/lib-esm/__tests__/Link.test.js +1 -1
- package/lib-esm/__tests__/behaviors/scrollIntoViewingArea.test.d.ts +1 -0
- package/lib-esm/__tests__/behaviors/scrollIntoViewingArea.test.js +224 -0
- package/lib-esm/behaviors/scrollIntoViewingArea.d.ts +1 -0
- package/lib-esm/behaviors/scrollIntoViewingArea.js +30 -0
- package/lib-esm/hooks/useOpenAndCloseFocus.d.ts +2 -1
- package/lib-esm/hooks/useOpenAndCloseFocus.js +7 -2
- package/lib-esm/hooks/useOverlay.d.ts +2 -1
- package/lib-esm/hooks/useOverlay.js +4 -2
- package/lib-esm/index.d.ts +2 -0
- package/lib-esm/index.js +1 -0
- package/lib-esm/stories/Autocomplete.stories.js +549 -0
- package/lib-esm/stories/Dialog.stories.js +3 -3
- package/lib-esm/stories/IssueLabelToken.stories.js +1 -1
- package/lib-esm/stories/ProfileToken.stories.js +1 -1
- package/lib-esm/theme-preval.js +370 -3100
- package/lib-esm/utils/testing.d.ts +50 -493
- package/lib-esm/utils/types/MandateProps.d.ts +3 -0
- package/lib-esm/utils/types/MandateProps.js +1 -0
- package/lib-esm/utils/types/index.d.ts +1 -0
- package/lib-esm/utils/types/index.js +2 -1
- package/package-lock.json +11 -8
- package/package.json +3 -3
- package/src/ActionList/Item.tsx +1 -1
- package/src/AnchoredOverlay/AnchoredOverlay.tsx +14 -3
- package/src/Autocomplete/Autocomplete.tsx +103 -0
- package/src/Autocomplete/AutocompleteContext.tsx +19 -0
- package/src/Autocomplete/AutocompleteInput.tsx +179 -0
- package/src/Autocomplete/AutocompleteMenu.tsx +341 -0
- package/src/Autocomplete/AutocompleteOverlay.tsx +68 -0
- package/src/Autocomplete/index.ts +2 -0
- package/src/BaseStyles.tsx +1 -1
- package/src/BorderBox.tsx +1 -1
- package/src/Button/ButtonInvisible.tsx +7 -2
- package/src/Caret.tsx +2 -2
- package/src/Dialog.tsx +1 -1
- package/src/FilteredActionList/FilteredActionList.tsx +10 -25
- package/src/Flash.tsx +16 -16
- package/src/Label.tsx +1 -1
- package/src/Overlay.tsx +4 -1
- package/src/ProgressBar.tsx +1 -1
- package/src/StateLabel.tsx +12 -20
- package/src/Token/_RemoveTokenButton.tsx +4 -2
- package/src/__tests__/Autocomplete.test.tsx +444 -0
- package/src/__tests__/BorderBox.test.tsx +1 -1
- package/src/__tests__/CircleOcticon.test.tsx +1 -1
- package/src/__tests__/CounterLabel.test.tsx +4 -4
- package/src/__tests__/Flash.test.tsx +4 -4
- package/src/__tests__/Link.test.tsx +1 -1
- package/src/__tests__/__snapshots__/AnchoredOverlay.test.tsx.snap +3 -3
- package/src/__tests__/__snapshots__/Autocomplete.test.tsx.snap +3414 -0
- package/src/__tests__/__snapshots__/Button.test.tsx.snap +9 -1
- package/src/__tests__/__snapshots__/ConfirmationDialog.test.tsx.snap +1 -1
- package/src/__tests__/__snapshots__/SelectPanel.test.tsx.snap +1 -1
- package/src/__tests__/__snapshots__/StateLabel.test.tsx.snap +0 -21
- package/src/__tests__/__snapshots__/TextInputWithTokens.test.tsx.snap +16 -16
- package/src/__tests__/__snapshots__/Token.test.tsx.snap +34 -34
- package/src/__tests__/behaviors/scrollIntoViewingArea.test.ts +195 -0
- package/src/behaviors/scrollIntoViewingArea.ts +27 -0
- package/src/hooks/useOpenAndCloseFocus.ts +7 -2
- package/src/hooks/useOverlay.tsx +4 -2
- package/src/index.ts +2 -0
- package/src/stories/Autocomplete.stories.tsx +572 -0
- package/src/stories/Dialog.stories.tsx +3 -3
- package/src/stories/IssueLabelToken.stories.tsx +1 -1
- package/src/stories/ProfileToken.stories.tsx +1 -1
- package/src/utils/types/MandateProps.ts +19 -0
- package/src/utils/types/index.ts +1 -0
- package/stats.html +1 -1
- package/docs/src/@primer/gatsby-theme-doctocat/components/live-code.js +0 -84
- package/docs/src/@primer/gatsby-theme-doctocat/components/nav-dropdown.js +0 -48
- package/docs/src/@primer/gatsby-theme-doctocat/components/wrap-page-element.js +0 -25
package/lib/utils/testing.d.ts
CHANGED
@@ -54,471 +54,13 @@ export declare function render(component: React.ReactElement, theme?: {
|
|
54
54
|
};
|
55
55
|
space: string[];
|
56
56
|
colorSchemes: Record<"light" | "light_protanopia" | "dark" | "dark_dimmed" | "dark_high_contrast" | "dark_protanopia", Record<"colors" | "shadows", Partial<{
|
57
|
-
|
58
|
-
|
59
|
-
white: string;
|
60
|
-
gray: string[];
|
61
|
-
blue: string[];
|
62
|
-
green: string[];
|
63
|
-
yellow: string[];
|
64
|
-
orange: string[];
|
65
|
-
red: string[];
|
66
|
-
purple: string[];
|
67
|
-
pink: string[];
|
68
|
-
};
|
69
|
-
text: {
|
70
|
-
primary: string;
|
71
|
-
secondary: string;
|
72
|
-
tertiary: string;
|
73
|
-
placeholder: string;
|
74
|
-
disabled: string;
|
75
|
-
inverse: string;
|
76
|
-
link: string;
|
77
|
-
danger: string;
|
78
|
-
success: string;
|
79
|
-
warning: string;
|
80
|
-
white: string;
|
81
|
-
};
|
82
|
-
icon: {
|
83
|
-
primary: string;
|
84
|
-
secondary: string;
|
85
|
-
tertiary: string;
|
86
|
-
info: string;
|
87
|
-
danger: string;
|
88
|
-
success: string;
|
89
|
-
warning: string;
|
90
|
-
};
|
91
|
-
border: {
|
92
|
-
primary: string;
|
93
|
-
secondary: string;
|
94
|
-
tertiary: string;
|
95
|
-
overlay: string;
|
96
|
-
inverse: string;
|
97
|
-
info: string;
|
98
|
-
danger: string;
|
99
|
-
success: string;
|
100
|
-
warning: string;
|
101
|
-
default: string;
|
102
|
-
muted: string;
|
103
|
-
subtle: string;
|
104
|
-
};
|
105
|
-
bg: {
|
106
|
-
canvas: string;
|
107
|
-
canvasMobile: string;
|
108
|
-
canvasInverse: string;
|
109
|
-
canvasInset: string;
|
57
|
+
canvasDefaultTransparent: string;
|
58
|
+
marketingIcon: {
|
110
59
|
primary: string;
|
111
60
|
secondary: string;
|
112
|
-
tertiary: string;
|
113
|
-
overlay: string;
|
114
|
-
backdrop: string;
|
115
|
-
info: string;
|
116
|
-
infoInverse: string;
|
117
|
-
danger: string;
|
118
|
-
dangerInverse: string;
|
119
|
-
success: string;
|
120
|
-
successInverse: string;
|
121
|
-
warning: string;
|
122
|
-
warningInverse: string;
|
123
|
-
};
|
124
|
-
shadow: {
|
125
|
-
highlight: string;
|
126
|
-
inset: string;
|
127
|
-
small: string;
|
128
|
-
medium: string;
|
129
|
-
large: string;
|
130
|
-
extraLarge: string;
|
131
|
-
};
|
132
|
-
state: {
|
133
|
-
hover: {
|
134
|
-
primaryBg: string;
|
135
|
-
primaryBorder: string;
|
136
|
-
primaryText: string;
|
137
|
-
primaryIcon: string;
|
138
|
-
secondaryBg: string;
|
139
|
-
secondaryBorder: string;
|
140
|
-
};
|
141
|
-
selected: {
|
142
|
-
primaryBg: string;
|
143
|
-
primaryBorder: string;
|
144
|
-
primaryText: string;
|
145
|
-
primaryIcon: string;
|
146
|
-
};
|
147
|
-
focus: {
|
148
|
-
border: string;
|
149
|
-
shadow: string;
|
150
|
-
};
|
151
|
-
};
|
152
|
-
fade: {
|
153
|
-
fg10: string;
|
154
|
-
fg15: string;
|
155
|
-
fg30: string;
|
156
|
-
fg50: string;
|
157
|
-
fg70: string;
|
158
|
-
fg85: string;
|
159
|
-
black10: string;
|
160
|
-
black15: string;
|
161
|
-
black30: string;
|
162
|
-
black50: string;
|
163
|
-
black70: string;
|
164
|
-
black85: string;
|
165
|
-
white10: string;
|
166
|
-
white15: string;
|
167
|
-
white30: string;
|
168
|
-
white50: string;
|
169
|
-
white70: string;
|
170
|
-
white85: string;
|
171
|
-
};
|
172
|
-
alert: {
|
173
|
-
info: {
|
174
|
-
text: string;
|
175
|
-
icon: string;
|
176
|
-
bg: string;
|
177
|
-
border: string;
|
178
|
-
};
|
179
|
-
warn: {
|
180
|
-
text: string;
|
181
|
-
icon: string;
|
182
|
-
bg: string;
|
183
|
-
border: string;
|
184
|
-
};
|
185
|
-
error: {
|
186
|
-
text: string;
|
187
|
-
icon: string;
|
188
|
-
bg: string;
|
189
|
-
border: string;
|
190
|
-
};
|
191
|
-
success: {
|
192
|
-
text: string;
|
193
|
-
icon: string;
|
194
|
-
bg: string;
|
195
|
-
border: string;
|
196
|
-
};
|
197
|
-
};
|
198
|
-
autocomplete: {
|
199
|
-
shadow: string;
|
200
|
-
rowBorder: string;
|
201
|
-
};
|
202
|
-
blankslate: {
|
203
|
-
icon: string;
|
204
|
-
};
|
205
|
-
counter: {
|
206
|
-
text: string;
|
207
|
-
bg: string;
|
208
|
-
primary: {
|
209
|
-
text: string;
|
210
|
-
bg: string;
|
211
|
-
};
|
212
|
-
secondary: {
|
213
|
-
text: string;
|
214
|
-
bg: string;
|
215
|
-
};
|
216
|
-
};
|
217
|
-
box: {
|
218
|
-
blueBorder: string;
|
219
|
-
rowYellowBg: string;
|
220
|
-
rowBlueBg: string;
|
221
|
-
headerBlueBg: string;
|
222
|
-
headerBlueBorder: string;
|
223
|
-
borderInfo: string;
|
224
|
-
bgInfo: string;
|
225
|
-
borderWarning: string;
|
226
|
-
bgWarning: string;
|
227
|
-
};
|
228
|
-
branchName: {
|
229
|
-
text: string;
|
230
|
-
icon: string;
|
231
|
-
bg: string;
|
232
|
-
link: {
|
233
|
-
text: string;
|
234
|
-
icon: string;
|
235
|
-
bg: string;
|
236
|
-
};
|
237
|
-
};
|
238
|
-
markdown: {
|
239
|
-
codeBg: string;
|
240
|
-
frameBorder: string;
|
241
|
-
blockquoteBorder: string;
|
242
|
-
tableBorder: string;
|
243
|
-
tableTrBorder: string;
|
244
|
-
};
|
245
|
-
filterItem: {
|
246
|
-
barBg: string;
|
247
|
-
};
|
248
|
-
hiddenTextExpander: {
|
249
|
-
bg: string;
|
250
|
-
bgHover: string;
|
251
|
-
};
|
252
|
-
dragAndDrop: {
|
253
|
-
border: string;
|
254
|
-
};
|
255
|
-
uploadEnabled: {
|
256
|
-
border: string;
|
257
|
-
borderFocused: string;
|
258
|
-
};
|
259
|
-
previewableCommentForm: {
|
260
|
-
border: string;
|
261
|
-
};
|
262
|
-
verifiedBadge: {
|
263
|
-
text: string;
|
264
|
-
bg: string;
|
265
|
-
border: string;
|
266
|
-
};
|
267
|
-
socialCount: {
|
268
|
-
bg: string;
|
269
|
-
};
|
270
|
-
tooltip: {
|
271
|
-
text: string;
|
272
|
-
bg: string;
|
273
|
-
};
|
274
|
-
filesExplorerIcon: string;
|
275
|
-
hlAuthorBg: string;
|
276
|
-
hlAuthorBorder: string;
|
277
|
-
logoSubdued: string;
|
278
|
-
discussionBorder: string;
|
279
|
-
discussionBgSuccess: string;
|
280
|
-
actionsWorkflowTableStickyBg: string;
|
281
|
-
repoLanguageColorBorder: string;
|
282
|
-
codeSelectionBg: string;
|
283
|
-
highlight: {
|
284
|
-
text: string;
|
285
|
-
bg: string;
|
286
|
-
};
|
287
|
-
blob: {
|
288
|
-
lineHighlightBg: string;
|
289
|
-
lineHighlightBorder: string;
|
290
|
-
};
|
291
|
-
topicTag: {
|
292
|
-
text: string;
|
293
|
-
bg: string;
|
294
|
-
hoverBg: string;
|
295
|
-
activeBg: string;
|
296
|
-
border: string;
|
297
|
-
};
|
298
|
-
footerInvertocat: {
|
299
|
-
octicon: string;
|
300
|
-
octiconHover: string;
|
301
|
-
};
|
302
|
-
dropdown: {
|
303
|
-
shadow: string;
|
304
|
-
};
|
305
|
-
label: {
|
306
|
-
border: string;
|
307
|
-
primary: {
|
308
|
-
text: string;
|
309
|
-
border: string;
|
310
|
-
};
|
311
|
-
secondary: {
|
312
|
-
text: string;
|
313
|
-
border: string;
|
314
|
-
};
|
315
|
-
info: {
|
316
|
-
text: string;
|
317
|
-
border: string;
|
318
|
-
};
|
319
|
-
success: {
|
320
|
-
text: string;
|
321
|
-
border: string;
|
322
|
-
};
|
323
|
-
warning: {
|
324
|
-
text: string;
|
325
|
-
border: string;
|
326
|
-
};
|
327
|
-
danger: {
|
328
|
-
text: string;
|
329
|
-
border: string;
|
330
|
-
};
|
331
|
-
orange: {
|
332
|
-
text: string;
|
333
|
-
border: string;
|
334
|
-
};
|
335
|
-
};
|
336
|
-
input: {
|
337
|
-
bg: string;
|
338
|
-
contrastBg: string;
|
339
|
-
border: string;
|
340
|
-
shadow: string;
|
341
|
-
disabledBorder: string;
|
342
|
-
warningBorder: string;
|
343
|
-
errorBorder: string;
|
344
|
-
tooltip: {
|
345
|
-
success: {
|
346
|
-
text: string;
|
347
|
-
bg: string;
|
348
|
-
border: string;
|
349
|
-
};
|
350
|
-
warning: {
|
351
|
-
text: string;
|
352
|
-
bg: string;
|
353
|
-
border: string;
|
354
|
-
};
|
355
|
-
error: {
|
356
|
-
text: string;
|
357
|
-
bg: string;
|
358
|
-
border: string;
|
359
|
-
};
|
360
|
-
};
|
361
|
-
disabledBg: string;
|
362
|
-
};
|
363
|
-
toast: {
|
364
|
-
text: string;
|
365
|
-
bg: string;
|
366
|
-
border: string;
|
367
|
-
shadow: string;
|
368
|
-
icon: string;
|
369
|
-
iconBg: string;
|
370
|
-
iconBorder: string;
|
371
|
-
success: {
|
372
|
-
text: string;
|
373
|
-
border: string;
|
374
|
-
icon: string;
|
375
|
-
iconBg: string;
|
376
|
-
iconBorder: string;
|
377
|
-
};
|
378
|
-
warning: {
|
379
|
-
text: string;
|
380
|
-
border: string;
|
381
|
-
icon: string;
|
382
|
-
iconBg: string;
|
383
|
-
iconBorder: string;
|
384
|
-
};
|
385
|
-
danger: {
|
386
|
-
text: string;
|
387
|
-
border: string;
|
388
|
-
icon: string;
|
389
|
-
iconBg: string;
|
390
|
-
iconBorder: string;
|
391
|
-
};
|
392
|
-
loading: {
|
393
|
-
text: string;
|
394
|
-
border: string;
|
395
|
-
icon: string;
|
396
|
-
iconBg: string;
|
397
|
-
iconBorder: string;
|
398
|
-
};
|
399
|
-
};
|
400
|
-
timeline: {
|
401
|
-
text: string;
|
402
|
-
badgeSuccessBorder: string;
|
403
|
-
targetBadgeBorder: string;
|
404
|
-
targetBadgeShadow: string;
|
405
|
-
badgeBg: string;
|
406
|
-
};
|
407
|
-
diffstat: {
|
408
|
-
neutralBg: string;
|
409
|
-
neutralBorder: string;
|
410
|
-
deletionBorder: string;
|
411
|
-
additionBorder: string;
|
412
|
-
deletionBg: string;
|
413
|
-
additionBg: string;
|
414
|
-
};
|
415
|
-
diff: {
|
416
|
-
addition: {
|
417
|
-
text: string;
|
418
|
-
bg: string;
|
419
|
-
border: string;
|
420
|
-
};
|
421
|
-
deletion: {
|
422
|
-
text: string;
|
423
|
-
bg: string;
|
424
|
-
border: string;
|
425
|
-
};
|
426
|
-
change: {
|
427
|
-
text: string;
|
428
|
-
bg: string;
|
429
|
-
border: string;
|
430
|
-
};
|
431
|
-
};
|
432
|
-
mergeBox: {
|
433
|
-
successIconBg: string;
|
434
|
-
successIconText: string;
|
435
|
-
successIconBorder: string;
|
436
|
-
successIndicatorBg: string;
|
437
|
-
successIndicatorBorder: string;
|
438
|
-
mergedIconBg: string;
|
439
|
-
mergedIconText: string;
|
440
|
-
mergedIconBorder: string;
|
441
|
-
mergedBoxBorder: string;
|
442
|
-
neutralIconBg: string;
|
443
|
-
neutralIconText: string;
|
444
|
-
neutralIconBorder: string;
|
445
|
-
neutralIndicatorBg: string;
|
446
|
-
neutralIndicatorBorder: string;
|
447
|
-
warningIconBg: string;
|
448
|
-
warningIconText: string;
|
449
|
-
warningIconBorder: string;
|
450
|
-
warningBoxBorder: string;
|
451
|
-
warningMergeHighlight: string;
|
452
|
-
errorIconBg: string;
|
453
|
-
errorIconText: string;
|
454
|
-
errorIconBorder: string;
|
455
|
-
errorIndicatorBg: string;
|
456
|
-
errorIndicatorBorder: string;
|
457
|
-
};
|
458
|
-
underlinenav: {
|
459
|
-
border: string;
|
460
|
-
borderHover: string;
|
461
|
-
borderActive: string;
|
462
|
-
text: string;
|
463
|
-
textHover: string;
|
464
|
-
textActive: string;
|
465
|
-
icon: string;
|
466
|
-
iconHover: string;
|
467
|
-
iconActive: string;
|
468
|
-
counterText: string;
|
469
|
-
counterBg: string;
|
470
|
-
};
|
471
|
-
selectMenu: {
|
472
|
-
borderSecondary: string;
|
473
|
-
shadow: string;
|
474
|
-
backdropBg: string;
|
475
|
-
backdropBorder: string;
|
476
|
-
tapHighlight: string;
|
477
|
-
tapFocusBg: string;
|
478
|
-
};
|
479
|
-
sidenav: {
|
480
|
-
borderActive: string;
|
481
|
-
selectedBg: string;
|
482
|
-
};
|
483
|
-
menu: {
|
484
|
-
headingText: string;
|
485
|
-
borderActive: string;
|
486
|
-
bgActive: string;
|
487
|
-
};
|
488
|
-
project: {
|
489
|
-
cardBg: string;
|
490
|
-
headerBg: string;
|
491
|
-
sidebarBg: string;
|
492
|
-
gradientIn: string;
|
493
|
-
gradientOut: string;
|
494
|
-
};
|
495
|
-
prState: {
|
496
|
-
draft: {
|
497
|
-
text: string;
|
498
|
-
bg: string;
|
499
|
-
border: string;
|
500
|
-
};
|
501
|
-
open: {
|
502
|
-
text: string;
|
503
|
-
bg: string;
|
504
|
-
border: string;
|
505
|
-
};
|
506
|
-
merged: {
|
507
|
-
text: string;
|
508
|
-
bg: string;
|
509
|
-
border: string;
|
510
|
-
};
|
511
|
-
closed: {
|
512
|
-
text: string;
|
513
|
-
bg: string;
|
514
|
-
border: string;
|
515
|
-
};
|
516
61
|
};
|
517
62
|
diffBlob: {
|
518
|
-
numText: string;
|
519
|
-
numHoverText: string;
|
520
63
|
addition: {
|
521
|
-
numHoverText: string;
|
522
64
|
numText: string;
|
523
65
|
fg: string;
|
524
66
|
numBg: string;
|
@@ -526,7 +68,6 @@ export declare function render(component: React.ReactElement, theme?: {
|
|
526
68
|
wordBg: string;
|
527
69
|
};
|
528
70
|
deletion: {
|
529
|
-
numHoverText: string;
|
530
71
|
numText: string;
|
531
72
|
fg: string;
|
532
73
|
numBg: string;
|
@@ -534,45 +75,17 @@ export declare function render(component: React.ReactElement, theme?: {
|
|
534
75
|
wordBg: string;
|
535
76
|
};
|
536
77
|
hunk: {
|
537
|
-
text: string;
|
538
78
|
numBg: string;
|
539
|
-
lineBg: string;
|
540
79
|
};
|
541
|
-
emptyBlockBg: string;
|
542
|
-
selectedLineHighlightBg: string;
|
543
|
-
selectedLineHighlightBorder: string;
|
544
80
|
expander: {
|
545
|
-
hoverIcon: string;
|
546
|
-
hoverBg: string;
|
547
81
|
icon: string;
|
548
82
|
};
|
549
|
-
commentButton: {
|
550
|
-
icon: string;
|
551
|
-
bg: string;
|
552
|
-
gradientBg: string;
|
553
|
-
};
|
554
83
|
selectedLineHighlightMixBlendMode: string;
|
555
84
|
};
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
icon: string;
|
561
|
-
inputBg: string;
|
562
|
-
inputBorder: string;
|
563
|
-
inputIcon: string;
|
564
|
-
inputPlaceholder: string;
|
565
|
-
};
|
566
|
-
introShelf: {
|
567
|
-
gradientLeft: string;
|
568
|
-
gradientRight: string;
|
569
|
-
gradientIn: string;
|
570
|
-
gradientOut: string;
|
571
|
-
};
|
572
|
-
canvasDefaultTransparent: string;
|
573
|
-
marketingIcon: {
|
574
|
-
primary: string;
|
575
|
-
secondary: string;
|
85
|
+
diffstat: {
|
86
|
+
deletionBorder: string;
|
87
|
+
additionBorder: string;
|
88
|
+
additionBg: string;
|
576
89
|
};
|
577
90
|
searchKeyword: {
|
578
91
|
hl: string;
|
@@ -711,6 +224,12 @@ export declare function render(component: React.ReactElement, theme?: {
|
|
711
224
|
cyanBright: string;
|
712
225
|
};
|
713
226
|
};
|
227
|
+
project: {
|
228
|
+
headerBg: string;
|
229
|
+
sidebarBg: string;
|
230
|
+
gradientIn: string;
|
231
|
+
gradientOut: string;
|
232
|
+
};
|
714
233
|
mktg: {
|
715
234
|
success: string;
|
716
235
|
info: string;
|
@@ -783,6 +302,14 @@ export declare function render(component: React.ReactElement, theme?: {
|
|
783
302
|
stackFadeMore: string;
|
784
303
|
childShadow: string;
|
785
304
|
};
|
305
|
+
topicTag: {
|
306
|
+
border: string;
|
307
|
+
};
|
308
|
+
selectMenu: {
|
309
|
+
backdropBorder: string;
|
310
|
+
tapHighlight: string;
|
311
|
+
tapFocusBg: string;
|
312
|
+
};
|
786
313
|
overlay: {
|
787
314
|
shadow: string;
|
788
315
|
};
|
@@ -795,6 +322,18 @@ export declare function render(component: React.ReactElement, theme?: {
|
|
795
322
|
bg: string;
|
796
323
|
border: string;
|
797
324
|
};
|
325
|
+
sidenav: {
|
326
|
+
selectedBg: string;
|
327
|
+
};
|
328
|
+
menu: {
|
329
|
+
bgActive: string;
|
330
|
+
};
|
331
|
+
input: {
|
332
|
+
disabledBg: string;
|
333
|
+
};
|
334
|
+
timeline: {
|
335
|
+
badgeBg: string;
|
336
|
+
};
|
798
337
|
ansi: {
|
799
338
|
black: string;
|
800
339
|
blackBright: string;
|
@@ -891,6 +430,10 @@ export declare function render(component: React.ReactElement, theme?: {
|
|
891
430
|
hoverIcon: string;
|
892
431
|
};
|
893
432
|
};
|
433
|
+
underlinenav: {
|
434
|
+
icon: string;
|
435
|
+
borderHover: string;
|
436
|
+
};
|
894
437
|
fg: {
|
895
438
|
default: string;
|
896
439
|
muted: string;
|
@@ -903,6 +446,17 @@ export declare function render(component: React.ReactElement, theme?: {
|
|
903
446
|
inset: string;
|
904
447
|
subtle: string;
|
905
448
|
};
|
449
|
+
border: {
|
450
|
+
default: string;
|
451
|
+
muted: string;
|
452
|
+
subtle: string;
|
453
|
+
};
|
454
|
+
shadow: {
|
455
|
+
small: string;
|
456
|
+
medium: string;
|
457
|
+
large: string;
|
458
|
+
extraLarge: string;
|
459
|
+
};
|
906
460
|
neutral: {
|
907
461
|
emphasisPlus: string;
|
908
462
|
emphasis: string;
|
@@ -952,6 +506,9 @@ export declare function render(component: React.ReactElement, theme?: {
|
|
952
506
|
subtle: string;
|
953
507
|
};
|
954
508
|
primer: {
|
509
|
+
fg: {
|
510
|
+
disabled: string;
|
511
|
+
};
|
955
512
|
canvas: {
|
956
513
|
backdrop: string;
|
957
514
|
sticky: string;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";
|
package/lib/utils/types/index.js
CHANGED
@@ -54,4 +54,17 @@ Object.keys(_Merge).forEach(function (key) {
|
|
54
54
|
return _Merge[key];
|
55
55
|
}
|
56
56
|
});
|
57
|
+
});
|
58
|
+
|
59
|
+
var _MandateProps = require("./MandateProps");
|
60
|
+
|
61
|
+
Object.keys(_MandateProps).forEach(function (key) {
|
62
|
+
if (key === "default" || key === "__esModule") return;
|
63
|
+
if (key in exports && exports[key] === _MandateProps[key]) return;
|
64
|
+
Object.defineProperty(exports, key, {
|
65
|
+
enumerable: true,
|
66
|
+
get: function () {
|
67
|
+
return _MandateProps[key];
|
68
|
+
}
|
69
|
+
});
|
57
70
|
});
|
@@ -225,7 +225,7 @@ export const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
225
225
|
readOnly: true,
|
226
226
|
"aria-readonly": "false"
|
227
227
|
})) : selected && /*#__PURE__*/React.createElement(CheckIcon, {
|
228
|
-
fill: theme === null || theme === void 0 ? void 0 : theme.colors.
|
228
|
+
fill: theme === null || theme === void 0 ? void 0 : theme.colors.fg.default
|
229
229
|
})), LeadingVisual && /*#__PURE__*/React.createElement(LeadingVisualContainer, {
|
230
230
|
variant: variant,
|
231
231
|
disabled: disabled
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
2
2
|
import { OverlayProps } from '../Overlay';
|
3
3
|
import { FocusTrapHookSettings } from '../hooks/useFocusTrap';
|
4
4
|
import { FocusZoneHookSettings } from '../hooks/useFocusZone';
|
5
|
+
import { PositionSettings } from '../behaviors/anchoredPosition';
|
5
6
|
interface AnchoredOverlayPropsWithAnchor {
|
6
7
|
/**
|
7
8
|
* A custom function component used to render the anchor element.
|
@@ -52,7 +53,7 @@ interface AnchoredOverlayBaseProps extends Pick<OverlayProps, 'height' | 'width'
|
|
52
53
|
*/
|
53
54
|
focusZoneSettings?: Partial<FocusZoneHookSettings>;
|
54
55
|
}
|
55
|
-
export declare type AnchoredOverlayProps = AnchoredOverlayBaseProps & (AnchoredOverlayPropsWithAnchor | AnchoredOverlayPropsWithoutAnchor)
|
56
|
+
export declare type AnchoredOverlayProps = AnchoredOverlayBaseProps & (AnchoredOverlayPropsWithAnchor | AnchoredOverlayPropsWithoutAnchor) & Partial<Pick<PositionSettings, 'align' | 'side'>>;
|
56
57
|
/**
|
57
58
|
* An `AnchoredOverlay` provides an anchor that will open a floating overlay positioned relative to the anchor.
|
58
59
|
* The overlay can be opened and navigated using keyboard or mouse.
|
@@ -22,7 +22,9 @@ export const AnchoredOverlay = ({
|
|
22
22
|
width,
|
23
23
|
overlayProps,
|
24
24
|
focusTrapSettings,
|
25
|
-
focusZoneSettings
|
25
|
+
focusZoneSettings,
|
26
|
+
side,
|
27
|
+
align
|
26
28
|
}) => {
|
27
29
|
const anchorRef = useProvidedRefOrCreate(externalAnchorRef);
|
28
30
|
const [overlayRef, updateOverlayRef] = useRenderForcingRef();
|
@@ -52,7 +54,9 @@ export const AnchoredOverlay = ({
|
|
52
54
|
position
|
53
55
|
} = useAnchoredPosition({
|
54
56
|
anchorElementRef: anchorRef,
|
55
|
-
floatingElementRef: overlayRef
|
57
|
+
floatingElementRef: overlayRef,
|
58
|
+
side,
|
59
|
+
align
|
56
60
|
}, [overlayRef.current]);
|
57
61
|
useEffect(() => {
|
58
62
|
// ensure overlay ref gets cleared when closed, so position can reset between closing/re-opening
|
@@ -93,4 +97,8 @@ export const AnchoredOverlay = ({
|
|
93
97
|
anchorSide: position === null || position === void 0 ? void 0 : position.anchorSide
|
94
98
|
}, overlayProps), children) : null);
|
95
99
|
};
|
96
|
-
AnchoredOverlay.displayName = 'AnchoredOverlay';
|
100
|
+
AnchoredOverlay.displayName = 'AnchoredOverlay';
|
101
|
+
AnchoredOverlay.defaultProps = {
|
102
|
+
side: 'outside-bottom',
|
103
|
+
align: 'start'
|
104
|
+
};
|