@atlaskit/primitives 11.0.2 → 11.1.1

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/constellation/anchor/code.mdx +5 -3
  3. package/constellation/anchor/examples.mdx +1 -2
  4. package/constellation/anchor/images/anchor-01a-do.png +0 -0
  5. package/constellation/anchor/images/anchor-01b-dont.png +0 -0
  6. package/constellation/anchor/images/anchor-02a-do.png +0 -0
  7. package/constellation/anchor/images/anchor-02b-dont.png +0 -0
  8. package/constellation/anchor/usage.mdx +61 -99
  9. package/constellation/box/code.mdx +3 -0
  10. package/constellation/pressable/code.mdx +5 -3
  11. package/constellation/pressable/usage.mdx +6 -4
  12. package/constellation/responsive/01-show/code.mdx +5 -3
  13. package/constellation/responsive/02-hide/code.mdx +5 -3
  14. package/dist/cjs/components/anchor.js +2 -6
  15. package/dist/cjs/components/bleed.js +1 -1
  16. package/dist/cjs/components/box.js +1 -1
  17. package/dist/cjs/components/flex.js +1 -1
  18. package/dist/cjs/components/grid.js +1 -1
  19. package/dist/cjs/components/inline.js +1 -1
  20. package/dist/cjs/components/pressable.js +2 -2
  21. package/dist/cjs/components/stack.js +1 -1
  22. package/dist/cjs/components/text.js +1 -1
  23. package/dist/cjs/responsive/hide.js +1 -1
  24. package/dist/cjs/responsive/show.js +1 -1
  25. package/dist/es2019/components/anchor.js +2 -6
  26. package/dist/es2019/components/bleed.js +1 -1
  27. package/dist/es2019/components/box.js +1 -1
  28. package/dist/es2019/components/flex.js +1 -1
  29. package/dist/es2019/components/grid.js +1 -1
  30. package/dist/es2019/components/inline.js +1 -1
  31. package/dist/es2019/components/pressable.js +2 -2
  32. package/dist/es2019/components/stack.js +1 -1
  33. package/dist/es2019/components/text.js +1 -1
  34. package/dist/es2019/responsive/hide.js +1 -1
  35. package/dist/es2019/responsive/show.js +1 -1
  36. package/dist/esm/components/anchor.js +2 -6
  37. package/dist/esm/components/bleed.js +1 -1
  38. package/dist/esm/components/box.js +1 -1
  39. package/dist/esm/components/flex.js +1 -1
  40. package/dist/esm/components/grid.js +1 -1
  41. package/dist/esm/components/inline.js +1 -1
  42. package/dist/esm/components/pressable.js +2 -2
  43. package/dist/esm/components/stack.js +1 -1
  44. package/dist/esm/components/text.js +1 -1
  45. package/dist/esm/responsive/hide.js +1 -1
  46. package/dist/esm/responsive/show.js +1 -1
  47. package/dist/types/components/anchor.d.ts +1 -5
  48. package/dist/types/components/bleed.d.ts +1 -1
  49. package/dist/types/components/box.d.ts +1 -1
  50. package/dist/types/components/flex.d.ts +3 -3
  51. package/dist/types/components/grid.d.ts +1 -1
  52. package/dist/types/components/inline.d.ts +3 -3
  53. package/dist/types/components/pressable.d.ts +1 -1
  54. package/dist/types/components/stack.d.ts +3 -3
  55. package/dist/types/components/text.d.ts +1 -1
  56. package/dist/types/responsive/hide.d.ts +1 -1
  57. package/dist/types/responsive/show.d.ts +1 -1
  58. package/dist/types-ts4.5/components/anchor.d.ts +1 -5
  59. package/dist/types-ts4.5/components/bleed.d.ts +1 -1
  60. package/dist/types-ts4.5/components/box.d.ts +1 -1
  61. package/dist/types-ts4.5/components/flex.d.ts +3 -3
  62. package/dist/types-ts4.5/components/grid.d.ts +1 -1
  63. package/dist/types-ts4.5/components/inline.d.ts +3 -3
  64. package/dist/types-ts4.5/components/pressable.d.ts +1 -1
  65. package/dist/types-ts4.5/components/stack.d.ts +3 -3
  66. package/dist/types-ts4.5/components/text.d.ts +1 -1
  67. package/dist/types-ts4.5/responsive/hide.d.ts +1 -1
  68. package/dist/types-ts4.5/responsive/show.d.ts +1 -1
  69. package/package.json +4 -10
  70. package/extract-react-types/anchor-props.tsx +0 -120
  71. package/extract-react-types/bleed-props.tsx +0 -29
  72. package/extract-react-types/box-props.tsx +0 -89
  73. package/extract-react-types/flex-props.tsx +0 -80
  74. package/extract-react-types/grid-props.tsx +0 -102
  75. package/extract-react-types/hide-props.tsx +0 -48
  76. package/extract-react-types/inline-props.tsx +0 -89
  77. package/extract-react-types/pressable-props.tsx +0 -115
  78. package/extract-react-types/show-props.tsx +0 -48
  79. package/extract-react-types/stack-props.tsx +0 -73
@@ -1,48 +0,0 @@
1
- import { type ReactNode } from 'react';
2
-
3
- import { type Breakpoint } from '../src/responsive/types';
4
-
5
- type As =
6
- | 'article'
7
- | 'aside'
8
- | 'dialog'
9
- | 'div'
10
- | 'footer'
11
- | 'header'
12
- | 'li'
13
- | 'main'
14
- | 'nav'
15
- | 'ol'
16
- | 'section'
17
- | 'span'
18
- | 'ul';
19
-
20
- type ResponsiveShowProps = {
21
- /**
22
- * The DOM element to render as the Box. Defaults to `div`.
23
- */
24
- as?: As;
25
-
26
- /**
27
- * Elements to be rendered inside the primitive.
28
- */
29
- children: ReactNode;
30
-
31
- /**
32
- * Apply CSS to show this specifically **above** this breakpoint.
33
- * The smallest breakpoint is not included as it would always be shown and this would not be performant.
34
- *
35
- * @important do not mix `above` and `below` (TypeScript should prevent this)
36
- */
37
- above?: Exclude<Breakpoint, 'xxs'>;
38
-
39
- /**
40
- * Apply CSS to show this specifically **below** this breakpoint.
41
- * The smallest breakpoint is not included as it would never be shown and this would not be performant.
42
- *
43
- * @important do not mix `above` and `below` (TypeScript should prevent this)
44
- */
45
- below?: Exclude<Breakpoint, 'xxs'>;
46
- };
47
-
48
- export default function Show(_: ResponsiveShowProps) {}
@@ -1,73 +0,0 @@
1
- import { type ElementType, type ReactNode } from 'react';
2
-
3
- import type {
4
- AlignBlock,
5
- AlignInline,
6
- BasePrimitiveProps,
7
- Grow,
8
- Spread,
9
- } from '../src/components/types';
10
-
11
- type Space =
12
- | 'space.0'
13
- | 'space.025'
14
- | 'space.050'
15
- | 'space.075'
16
- | 'space.100'
17
- | 'space.150'
18
- | 'space.200'
19
- | 'space.250'
20
- | 'space.300'
21
- | 'space.400'
22
- | 'space.500'
23
- | 'space.600'
24
- | 'space.800'
25
- | 'space.1000';
26
-
27
- type StackProps<T extends ElementType = 'div'> = {
28
- /**
29
- * The DOM element to render as the Stack. Defaults to `div`.
30
- */
31
- as?: 'div' | 'span' | 'ul' | 'ol';
32
- /**
33
- * Used to align children along the main axis.
34
- */
35
- alignBlock?: Exclude<AlignBlock, 'baseline'>;
36
-
37
- /**
38
- * Used to align children along the cross axis.
39
- */
40
- alignInline?: AlignInline;
41
-
42
- /**
43
- * Used to distribute the children along the main axis.
44
- */
45
- spread?: Spread;
46
-
47
- /**
48
- * Used to set whether the container should grow to fill the available space.
49
- */
50
- grow?: Grow;
51
-
52
- /**
53
- * Represents the space between each child.
54
- */
55
- space?: Space;
56
-
57
- /**
58
- * A unique string that appears as data attribute data-testid in the rendered code, serving as a hook for automated tests.
59
- */
60
- testId?: string;
61
-
62
- /**
63
- * Elements to be rendered inside the Stack.
64
- */
65
- children: ReactNode;
66
-
67
- /**
68
- * Forwarded ref element
69
- */
70
- ref?: React.ComponentPropsWithRef<T>['ref'];
71
- } & BasePrimitiveProps;
72
-
73
- export default function Stack(_: StackProps) {}