@atlaskit/ds-explorations 5.0.2 → 5.0.4

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.
@@ -1,467 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { Fragment, type ReactNode, useContext } from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx } from '@emotion/react';
9
-
10
- import { token } from '@atlaskit/tokens';
11
-
12
- import { SurfaceContext } from './surface-provider';
13
- import { type BasePrimitiveProps } from './types';
14
-
15
- const baseStyles = css({
16
- position: 'absolute',
17
- inset: 0,
18
- borderRadius: 'inherit',
19
- cursor: 'pointer',
20
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
21
- '~ *': {
22
- position: 'relative',
23
- pointerEvents: 'none',
24
- },
25
- });
26
-
27
- interface InteractionSurfaceProps extends BasePrimitiveProps {
28
- children: ReactNode;
29
- appearance?: InteractionBackgroundColor;
30
- }
31
-
32
- /**
33
- *
34
- * @example
35
- * ```js
36
- * // a minimal icon button
37
- * <Pressable>
38
- * <InteractionSurface>
39
- * <WarningIcon label="icon button" />
40
- * </InteractionSurface>
41
- * </Pressable>
42
- * ```
43
- */
44
- const InteractionSurface = ({ appearance, children, testId }: InteractionSurfaceProps) => {
45
- const defaultSurface = useContext(SurfaceContext);
46
- let surface = (appearance || defaultSurface) as InteractionBackgroundColor;
47
-
48
- // This case will occur if the Box has not set a bg color and the ancestor surface
49
- // is an elevation. An alternative would be to throw an error here as it may be better
50
- // to ensure correct predictable behaviour based on user specification.
51
- if (!(surface in backgroundActiveColorMap)) {
52
- surface = 'neutral';
53
- }
54
- return (
55
- <Fragment>
56
- <span
57
- data-testid={testId}
58
- css={[
59
- baseStyles,
60
- surface && backgroundHoverColorMap[surface],
61
- surface && backgroundActiveColorMap[surface],
62
- ]}
63
- />
64
- {children}
65
- </Fragment>
66
- );
67
- };
68
-
69
- export default InteractionSurface;
70
-
71
- /**
72
- * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
73
- * @codegen <<SignedSource::a54b247f1230147faee26c36789b9f6d>>
74
- * @codegenId interactions
75
- * @codegenCommand yarn codegen-styles
76
- * @codegenParams ["background"]
77
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::d227fb20aa75533eb903b15ddcb61e67>>
78
- */
79
- const backgroundActiveColorMap = {
80
- 'accent.lime.subtlest': css({
81
- '&:active': { backgroundColor: token('color.background.accent.lime.subtlest.pressed') },
82
- }),
83
- 'accent.lime.subtler': css({
84
- '&:active': { backgroundColor: token('color.background.accent.lime.subtler.pressed') },
85
- }),
86
- 'accent.lime.subtle': css({
87
- '&:active': { backgroundColor: token('color.background.accent.lime.subtle.pressed') },
88
- }),
89
- 'accent.lime.bolder': css({
90
- '&:active': { backgroundColor: token('color.background.accent.lime.bolder.pressed') },
91
- }),
92
- 'accent.red.subtlest': css({
93
- '&:active': { backgroundColor: token('color.background.accent.red.subtlest.pressed') },
94
- }),
95
- 'accent.red.subtler': css({
96
- '&:active': { backgroundColor: token('color.background.accent.red.subtler.pressed') },
97
- }),
98
- 'accent.red.subtle': css({
99
- '&:active': { backgroundColor: token('color.background.accent.red.subtle.pressed') },
100
- }),
101
- 'accent.red.bolder': css({
102
- '&:active': { backgroundColor: token('color.background.accent.red.bolder.pressed') },
103
- }),
104
- 'accent.orange.subtlest': css({
105
- '&:active': { backgroundColor: token('color.background.accent.orange.subtlest.pressed') },
106
- }),
107
- 'accent.orange.subtler': css({
108
- '&:active': { backgroundColor: token('color.background.accent.orange.subtler.pressed') },
109
- }),
110
- 'accent.orange.subtle': css({
111
- '&:active': { backgroundColor: token('color.background.accent.orange.subtle.pressed') },
112
- }),
113
- 'accent.orange.bolder': css({
114
- '&:active': { backgroundColor: token('color.background.accent.orange.bolder.pressed') },
115
- }),
116
- 'accent.yellow.subtlest': css({
117
- '&:active': { backgroundColor: token('color.background.accent.yellow.subtlest.pressed') },
118
- }),
119
- 'accent.yellow.subtler': css({
120
- '&:active': { backgroundColor: token('color.background.accent.yellow.subtler.pressed') },
121
- }),
122
- 'accent.yellow.subtle': css({
123
- '&:active': { backgroundColor: token('color.background.accent.yellow.subtle.pressed') },
124
- }),
125
- 'accent.yellow.bolder': css({
126
- '&:active': { backgroundColor: token('color.background.accent.yellow.bolder.pressed') },
127
- }),
128
- 'accent.green.subtlest': css({
129
- '&:active': { backgroundColor: token('color.background.accent.green.subtlest.pressed') },
130
- }),
131
- 'accent.green.subtler': css({
132
- '&:active': { backgroundColor: token('color.background.accent.green.subtler.pressed') },
133
- }),
134
- 'accent.green.subtle': css({
135
- '&:active': { backgroundColor: token('color.background.accent.green.subtle.pressed') },
136
- }),
137
- 'accent.green.bolder': css({
138
- '&:active': { backgroundColor: token('color.background.accent.green.bolder.pressed') },
139
- }),
140
- 'accent.teal.subtlest': css({
141
- '&:active': { backgroundColor: token('color.background.accent.teal.subtlest.pressed') },
142
- }),
143
- 'accent.teal.subtler': css({
144
- '&:active': { backgroundColor: token('color.background.accent.teal.subtler.pressed') },
145
- }),
146
- 'accent.teal.subtle': css({
147
- '&:active': { backgroundColor: token('color.background.accent.teal.subtle.pressed') },
148
- }),
149
- 'accent.teal.bolder': css({
150
- '&:active': { backgroundColor: token('color.background.accent.teal.bolder.pressed') },
151
- }),
152
- 'accent.blue.subtlest': css({
153
- '&:active': { backgroundColor: token('color.background.accent.blue.subtlest.pressed') },
154
- }),
155
- 'accent.blue.subtler': css({
156
- '&:active': { backgroundColor: token('color.background.accent.blue.subtler.pressed') },
157
- }),
158
- 'accent.blue.subtle': css({
159
- '&:active': { backgroundColor: token('color.background.accent.blue.subtle.pressed') },
160
- }),
161
- 'accent.blue.bolder': css({
162
- '&:active': { backgroundColor: token('color.background.accent.blue.bolder.pressed') },
163
- }),
164
- 'accent.purple.subtlest': css({
165
- '&:active': { backgroundColor: token('color.background.accent.purple.subtlest.pressed') },
166
- }),
167
- 'accent.purple.subtler': css({
168
- '&:active': { backgroundColor: token('color.background.accent.purple.subtler.pressed') },
169
- }),
170
- 'accent.purple.subtle': css({
171
- '&:active': { backgroundColor: token('color.background.accent.purple.subtle.pressed') },
172
- }),
173
- 'accent.purple.bolder': css({
174
- '&:active': { backgroundColor: token('color.background.accent.purple.bolder.pressed') },
175
- }),
176
- 'accent.magenta.subtlest': css({
177
- '&:active': { backgroundColor: token('color.background.accent.magenta.subtlest.pressed') },
178
- }),
179
- 'accent.magenta.subtler': css({
180
- '&:active': { backgroundColor: token('color.background.accent.magenta.subtler.pressed') },
181
- }),
182
- 'accent.magenta.subtle': css({
183
- '&:active': { backgroundColor: token('color.background.accent.magenta.subtle.pressed') },
184
- }),
185
- 'accent.magenta.bolder': css({
186
- '&:active': { backgroundColor: token('color.background.accent.magenta.bolder.pressed') },
187
- }),
188
- 'accent.gray.subtlest': css({
189
- '&:active': { backgroundColor: token('color.background.accent.gray.subtlest.pressed') },
190
- }),
191
- 'accent.gray.subtler': css({
192
- '&:active': { backgroundColor: token('color.background.accent.gray.subtler.pressed') },
193
- }),
194
- 'accent.gray.subtle': css({
195
- '&:active': { backgroundColor: token('color.background.accent.gray.subtle.pressed') },
196
- }),
197
- 'accent.gray.bolder': css({
198
- '&:active': { backgroundColor: token('color.background.accent.gray.bolder.pressed') },
199
- }),
200
- input: css({
201
- '&:active': { backgroundColor: token('color.background.input.pressed') },
202
- }),
203
- 'inverse.subtle': css({
204
- '&:active': { backgroundColor: token('color.background.inverse.subtle.pressed') },
205
- }),
206
- neutral: css({
207
- '&:active': { backgroundColor: token('color.background.neutral.pressed') },
208
- }),
209
- 'neutral.subtle': css({
210
- '&:active': { backgroundColor: token('color.background.neutral.subtle.pressed') },
211
- }),
212
- 'neutral.bold': css({
213
- '&:active': { backgroundColor: token('color.background.neutral.bold.pressed') },
214
- }),
215
- selected: css({
216
- '&:active': { backgroundColor: token('color.background.selected.pressed') },
217
- }),
218
- 'selected.bold': css({
219
- '&:active': { backgroundColor: token('color.background.selected.bold.pressed') },
220
- }),
221
- 'brand.subtlest': css({
222
- '&:active': { backgroundColor: token('color.background.brand.subtlest.pressed') },
223
- }),
224
- 'brand.bold': css({
225
- '&:active': { backgroundColor: token('color.background.brand.bold.pressed') },
226
- }),
227
- 'brand.boldest': css({
228
- '&:active': { backgroundColor: token('color.background.brand.boldest.pressed') },
229
- }),
230
- danger: css({
231
- '&:active': { backgroundColor: token('color.background.danger.pressed') },
232
- }),
233
- 'danger.bold': css({
234
- '&:active': { backgroundColor: token('color.background.danger.bold.pressed') },
235
- }),
236
- warning: css({
237
- '&:active': { backgroundColor: token('color.background.warning.pressed') },
238
- }),
239
- 'warning.bold': css({
240
- '&:active': { backgroundColor: token('color.background.warning.bold.pressed') },
241
- }),
242
- success: css({
243
- '&:active': { backgroundColor: token('color.background.success.pressed') },
244
- }),
245
- 'success.bold': css({
246
- '&:active': { backgroundColor: token('color.background.success.bold.pressed') },
247
- }),
248
- discovery: css({
249
- '&:active': { backgroundColor: token('color.background.discovery.pressed') },
250
- }),
251
- 'discovery.bold': css({
252
- '&:active': { backgroundColor: token('color.background.discovery.bold.pressed') },
253
- }),
254
- information: css({
255
- '&:active': { backgroundColor: token('color.background.information.pressed') },
256
- }),
257
- 'information.bold': css({
258
- '&:active': { backgroundColor: token('color.background.information.bold.pressed') },
259
- }),
260
- 'elevation.surface': css({
261
- '&:active': { backgroundColor: token('elevation.surface.pressed') },
262
- }),
263
- 'elevation.surface.overlay': css({
264
- '&:active': { backgroundColor: token('elevation.surface.overlay.pressed') },
265
- }),
266
- 'elevation.surface.raised': css({
267
- '&:active': { backgroundColor: token('elevation.surface.raised.pressed') },
268
- }),
269
- };
270
-
271
- const backgroundHoverColorMap = {
272
- 'accent.lime.subtlest': css({
273
- '&:hover': { backgroundColor: token('color.background.accent.lime.subtlest.hovered') },
274
- }),
275
- 'accent.lime.subtler': css({
276
- '&:hover': { backgroundColor: token('color.background.accent.lime.subtler.hovered') },
277
- }),
278
- 'accent.lime.subtle': css({
279
- '&:hover': { backgroundColor: token('color.background.accent.lime.subtle.hovered') },
280
- }),
281
- 'accent.lime.bolder': css({
282
- '&:hover': { backgroundColor: token('color.background.accent.lime.bolder.hovered') },
283
- }),
284
- 'accent.red.subtlest': css({
285
- '&:hover': { backgroundColor: token('color.background.accent.red.subtlest.hovered') },
286
- }),
287
- 'accent.red.subtler': css({
288
- '&:hover': { backgroundColor: token('color.background.accent.red.subtler.hovered') },
289
- }),
290
- 'accent.red.subtle': css({
291
- '&:hover': { backgroundColor: token('color.background.accent.red.subtle.hovered') },
292
- }),
293
- 'accent.red.bolder': css({
294
- '&:hover': { backgroundColor: token('color.background.accent.red.bolder.hovered') },
295
- }),
296
- 'accent.orange.subtlest': css({
297
- '&:hover': { backgroundColor: token('color.background.accent.orange.subtlest.hovered') },
298
- }),
299
- 'accent.orange.subtler': css({
300
- '&:hover': { backgroundColor: token('color.background.accent.orange.subtler.hovered') },
301
- }),
302
- 'accent.orange.subtle': css({
303
- '&:hover': { backgroundColor: token('color.background.accent.orange.subtle.hovered') },
304
- }),
305
- 'accent.orange.bolder': css({
306
- '&:hover': { backgroundColor: token('color.background.accent.orange.bolder.hovered') },
307
- }),
308
- 'accent.yellow.subtlest': css({
309
- '&:hover': { backgroundColor: token('color.background.accent.yellow.subtlest.hovered') },
310
- }),
311
- 'accent.yellow.subtler': css({
312
- '&:hover': { backgroundColor: token('color.background.accent.yellow.subtler.hovered') },
313
- }),
314
- 'accent.yellow.subtle': css({
315
- '&:hover': { backgroundColor: token('color.background.accent.yellow.subtle.hovered') },
316
- }),
317
- 'accent.yellow.bolder': css({
318
- '&:hover': { backgroundColor: token('color.background.accent.yellow.bolder.hovered') },
319
- }),
320
- 'accent.green.subtlest': css({
321
- '&:hover': { backgroundColor: token('color.background.accent.green.subtlest.hovered') },
322
- }),
323
- 'accent.green.subtler': css({
324
- '&:hover': { backgroundColor: token('color.background.accent.green.subtler.hovered') },
325
- }),
326
- 'accent.green.subtle': css({
327
- '&:hover': { backgroundColor: token('color.background.accent.green.subtle.hovered') },
328
- }),
329
- 'accent.green.bolder': css({
330
- '&:hover': { backgroundColor: token('color.background.accent.green.bolder.hovered') },
331
- }),
332
- 'accent.teal.subtlest': css({
333
- '&:hover': { backgroundColor: token('color.background.accent.teal.subtlest.hovered') },
334
- }),
335
- 'accent.teal.subtler': css({
336
- '&:hover': { backgroundColor: token('color.background.accent.teal.subtler.hovered') },
337
- }),
338
- 'accent.teal.subtle': css({
339
- '&:hover': { backgroundColor: token('color.background.accent.teal.subtle.hovered') },
340
- }),
341
- 'accent.teal.bolder': css({
342
- '&:hover': { backgroundColor: token('color.background.accent.teal.bolder.hovered') },
343
- }),
344
- 'accent.blue.subtlest': css({
345
- '&:hover': { backgroundColor: token('color.background.accent.blue.subtlest.hovered') },
346
- }),
347
- 'accent.blue.subtler': css({
348
- '&:hover': { backgroundColor: token('color.background.accent.blue.subtler.hovered') },
349
- }),
350
- 'accent.blue.subtle': css({
351
- '&:hover': { backgroundColor: token('color.background.accent.blue.subtle.hovered') },
352
- }),
353
- 'accent.blue.bolder': css({
354
- '&:hover': { backgroundColor: token('color.background.accent.blue.bolder.hovered') },
355
- }),
356
- 'accent.purple.subtlest': css({
357
- '&:hover': { backgroundColor: token('color.background.accent.purple.subtlest.hovered') },
358
- }),
359
- 'accent.purple.subtler': css({
360
- '&:hover': { backgroundColor: token('color.background.accent.purple.subtler.hovered') },
361
- }),
362
- 'accent.purple.subtle': css({
363
- '&:hover': { backgroundColor: token('color.background.accent.purple.subtle.hovered') },
364
- }),
365
- 'accent.purple.bolder': css({
366
- '&:hover': { backgroundColor: token('color.background.accent.purple.bolder.hovered') },
367
- }),
368
- 'accent.magenta.subtlest': css({
369
- '&:hover': { backgroundColor: token('color.background.accent.magenta.subtlest.hovered') },
370
- }),
371
- 'accent.magenta.subtler': css({
372
- '&:hover': { backgroundColor: token('color.background.accent.magenta.subtler.hovered') },
373
- }),
374
- 'accent.magenta.subtle': css({
375
- '&:hover': { backgroundColor: token('color.background.accent.magenta.subtle.hovered') },
376
- }),
377
- 'accent.magenta.bolder': css({
378
- '&:hover': { backgroundColor: token('color.background.accent.magenta.bolder.hovered') },
379
- }),
380
- 'accent.gray.subtlest': css({
381
- '&:hover': { backgroundColor: token('color.background.accent.gray.subtlest.hovered') },
382
- }),
383
- 'accent.gray.subtler': css({
384
- '&:hover': { backgroundColor: token('color.background.accent.gray.subtler.hovered') },
385
- }),
386
- 'accent.gray.subtle': css({
387
- '&:hover': { backgroundColor: token('color.background.accent.gray.subtle.hovered') },
388
- }),
389
- 'accent.gray.bolder': css({
390
- '&:hover': { backgroundColor: token('color.background.accent.gray.bolder.hovered') },
391
- }),
392
- input: css({
393
- '&:hover': { backgroundColor: token('color.background.input.hovered') },
394
- }),
395
- 'inverse.subtle': css({
396
- '&:hover': { backgroundColor: token('color.background.inverse.subtle.hovered') },
397
- }),
398
- neutral: css({
399
- '&:hover': { backgroundColor: token('color.background.neutral.hovered') },
400
- }),
401
- 'neutral.subtle': css({
402
- '&:hover': { backgroundColor: token('color.background.neutral.subtle.hovered') },
403
- }),
404
- 'neutral.bold': css({
405
- '&:hover': { backgroundColor: token('color.background.neutral.bold.hovered') },
406
- }),
407
- selected: css({
408
- '&:hover': { backgroundColor: token('color.background.selected.hovered') },
409
- }),
410
- 'selected.bold': css({
411
- '&:hover': { backgroundColor: token('color.background.selected.bold.hovered') },
412
- }),
413
- 'brand.subtlest': css({
414
- '&:hover': { backgroundColor: token('color.background.brand.subtlest.hovered') },
415
- }),
416
- 'brand.bold': css({
417
- '&:hover': { backgroundColor: token('color.background.brand.bold.hovered') },
418
- }),
419
- 'brand.boldest': css({
420
- '&:hover': { backgroundColor: token('color.background.brand.boldest.hovered') },
421
- }),
422
- danger: css({
423
- '&:hover': { backgroundColor: token('color.background.danger.hovered') },
424
- }),
425
- 'danger.bold': css({
426
- '&:hover': { backgroundColor: token('color.background.danger.bold.hovered') },
427
- }),
428
- warning: css({
429
- '&:hover': { backgroundColor: token('color.background.warning.hovered') },
430
- }),
431
- 'warning.bold': css({
432
- '&:hover': { backgroundColor: token('color.background.warning.bold.hovered') },
433
- }),
434
- success: css({
435
- '&:hover': { backgroundColor: token('color.background.success.hovered') },
436
- }),
437
- 'success.bold': css({
438
- '&:hover': { backgroundColor: token('color.background.success.bold.hovered') },
439
- }),
440
- discovery: css({
441
- '&:hover': { backgroundColor: token('color.background.discovery.hovered') },
442
- }),
443
- 'discovery.bold': css({
444
- '&:hover': { backgroundColor: token('color.background.discovery.bold.hovered') },
445
- }),
446
- information: css({
447
- '&:hover': { backgroundColor: token('color.background.information.hovered') },
448
- }),
449
- 'information.bold': css({
450
- '&:hover': { backgroundColor: token('color.background.information.bold.hovered') },
451
- }),
452
- 'elevation.surface': css({
453
- '&:hover': { backgroundColor: token('elevation.surface.hovered') },
454
- }),
455
- 'elevation.surface.overlay': css({
456
- '&:hover': { backgroundColor: token('elevation.surface.overlay.hovered') },
457
- }),
458
- 'elevation.surface.raised': css({
459
- '&:hover': { backgroundColor: token('elevation.surface.raised.hovered') },
460
- }),
461
- };
462
-
463
- type InteractionBackgroundColor = keyof typeof backgroundHoverColorMap;
464
-
465
- /**
466
- * @codegenEnd
467
- */
@@ -1,21 +0,0 @@
1
- import { createContext, useContext } from 'react';
2
-
3
- /**
4
- * __Surface context__
5
- *
6
- * A surface context provides context information on the current background (if set).
7
- */
8
- export const SurfaceContext = createContext<any>('elevation.surface');
9
-
10
- /**
11
- * __useSurface__
12
- *
13
- * Return the current surface. If no parent sets a surface color it falls back to the default surface.
14
- *
15
- * @see SurfaceContext
16
- */
17
- export const useSurface = () => {
18
- return useContext(SurfaceContext);
19
- };
20
-
21
- SurfaceContext.displayName = 'SurfaceProvider';
@@ -1,15 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
-
3
- export interface BasePrimitiveProps {
4
- /**
5
- * A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
6
- */
7
- testId?: string;
8
-
9
- /**
10
- * Inline styles to be applied to the primitive.
11
- * Marked as "unsafe" because any CSS properties can be provided here without any extra control or validation, including those that would be better managed by the primitive itself via props.
12
- * Effectively equivalent to the standard `style` prop but marked with a special name so we can rationalise its usage IN THE FUTURE.
13
- */
14
- UNSAFE_style?: CSSProperties;
15
- }
package/src/constants.tsx DELETED
@@ -1,13 +0,0 @@
1
- export const LAYERS = {
2
- card: 100,
3
- navigation: 200,
4
- dialog: 300,
5
- layer: 400,
6
- blanket: 500,
7
- modal: 510,
8
- flag: 600,
9
- spotlight: 700,
10
- tooltip: 800,
11
- } as const;
12
-
13
- export type Layer = keyof typeof LAYERS;
package/src/index.tsx DELETED
@@ -1 +0,0 @@
1
- export { default as UNSAFE_InteractionSurface } from './components/interaction-surface.partial';
@@ -1,38 +0,0 @@
1
- /**
2
- * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- *
4
- * The color map is used to map a background color token to a matching text color that will meet contrast.
5
- *
6
- * @codegen <<SignedSource::e6f777f074b5270687bb9285d5876240>>
7
- * @codegenCommand yarn codegen-styles
8
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::d227fb20aa75533eb903b15ddcb61e67>>
9
- */
10
- export default {
11
- 'neutral.bold': 'inverse',
12
- 'neutral.bold.hovered': 'inverse',
13
- 'neutral.bold.pressed': 'inverse',
14
- 'selected.bold': 'inverse',
15
- 'selected.bold.hovered': 'inverse',
16
- 'selected.bold.pressed': 'inverse',
17
- 'brand.bold': 'inverse',
18
- 'brand.bold.hovered': 'inverse',
19
- 'brand.bold.pressed': 'inverse',
20
- 'brand.boldest': 'inverse',
21
- 'brand.boldest.hovered': 'inverse',
22
- 'brand.boldest.pressed': 'inverse',
23
- 'danger.bold': 'inverse',
24
- 'danger.bold.hovered': 'inverse',
25
- 'danger.bold.pressed': 'inverse',
26
- 'warning.bold': 'warning.inverse',
27
- 'warning.bold.hovered': 'warning.inverse',
28
- 'warning.bold.pressed': 'warning.inverse',
29
- 'success.bold': 'inverse',
30
- 'success.bold.hovered': 'inverse',
31
- 'success.bold.pressed': 'inverse',
32
- 'discovery.bold': 'inverse',
33
- 'discovery.bold.hovered': 'inverse',
34
- 'discovery.bold.pressed': 'inverse',
35
- 'information.bold': 'inverse',
36
- 'information.bold.hovered': 'inverse',
37
- 'information.bold.pressed': 'inverse',
38
- } as const;
@@ -1,34 +0,0 @@
1
- /**
2
- * Adapted straight from react-mui, with a small change.
3
- * @see https://www.unpkg.com/browse/react-gui@0.2.1/src/modules/getAccessibilityElementWithSideEffect.js
4
- */
5
- const roleToElementType = {
6
- article: 'article',
7
- banner: 'header',
8
- blockquote: 'blockquote',
9
- button: 'button',
10
- code: 'code',
11
- complementary: 'aside',
12
- contentinfo: 'footer',
13
- deletion: 'del',
14
- emphasis: 'em',
15
- figure: 'figure',
16
- insertion: 'ins',
17
- form: 'form',
18
- link: 'a',
19
- list: 'ul',
20
- listitem: 'li',
21
- main: 'main',
22
- navigation: 'nav',
23
- region: 'section',
24
- strong: 'strong',
25
- presentation: 'div',
26
- group: 'fieldset',
27
- } as const;
28
-
29
- type RoleMap = typeof roleToElementType;
30
-
31
- export type Role = keyof RoleMap;
32
- export type SupportedElements = RoleMap[Role] & keyof JSX.IntrinsicElements;
33
-
34
- export default roleToElementType;
package/tsconfig.app.json DELETED
@@ -1,45 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.base.json",
3
- "include": ["./src/**/*.ts", "./src/**/*.tsx"],
4
- "exclude": [
5
- "**/docs/**/*",
6
- "**/__tests__/**/*",
7
- "**/vr-tests/**/*",
8
- "**/__perf__/**/*",
9
- "**/*.test.*",
10
- "**/test.*",
11
- "**/test-*",
12
- "**/examples.ts",
13
- "**/examples.tsx",
14
- "**/examples/*.ts",
15
- "**/examples/*.tsx",
16
- "**/examples/**/*.ts",
17
- "**/examples/**/*.tsx",
18
- "**/storybook/**/*",
19
- "**/constellation/**/*",
20
- ".storybook/*",
21
- "./__fixtures__/**/*",
22
- "./__generated__/**/*",
23
- "./mocks/**/*",
24
- "./__mocks__/**/*",
25
- "**/mock.*",
26
- "**/codemods/**/*.ts",
27
- "**/codemods/**/*.tsx"
28
- ],
29
- "compilerOptions": {
30
- "composite": true,
31
- "outDir": "../../../tsDist/@atlaskit__ds-explorations/app"
32
- },
33
- "references": [
34
- {
35
- "path": "../../../build/formatting/tsconfig.app.json"
36
- },
37
- {
38
- "path": "../tokens/tsconfig.app.json"
39
- },
40
- {
41
- "path": "../codegen/tsconfig.app.json"
42
- }
43
- ],
44
- "files": []
45
- }