@atlaskit/primitives 12.2.7 → 13.1.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.
Files changed (150) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/anchor/package.json +3 -1
  3. package/box/package.json +3 -1
  4. package/compiled/package.json +17 -0
  5. package/dist/cjs/compiled/components/anchor.compiled.css +12 -0
  6. package/dist/cjs/compiled/components/anchor.js +130 -0
  7. package/dist/cjs/compiled/components/bleed.compiled.css +11 -0
  8. package/dist/cjs/compiled/components/bleed.js +49 -0
  9. package/dist/cjs/compiled/components/box.compiled.css +266 -0
  10. package/dist/cjs/compiled/components/box.js +367 -0
  11. package/dist/cjs/compiled/components/flex.compiled.css +46 -0
  12. package/dist/cjs/compiled/components/flex.js +119 -0
  13. package/dist/cjs/compiled/components/grid.compiled.css +54 -0
  14. package/dist/cjs/compiled/components/grid.js +129 -0
  15. package/dist/cjs/compiled/components/inline.compiled.css +8 -0
  16. package/dist/cjs/compiled/components/inline.js +83 -0
  17. package/dist/cjs/compiled/components/internal/surface-provider.js +25 -0
  18. package/dist/cjs/compiled/components/internal/types.js +1 -0
  19. package/dist/cjs/compiled/components/pressable.compiled.css +13 -0
  20. package/dist/cjs/compiled/components/pressable.js +87 -0
  21. package/dist/cjs/compiled/components/stack.compiled.css +3 -0
  22. package/dist/cjs/compiled/components/stack.js +64 -0
  23. package/dist/cjs/compiled/components/text.compiled.css +60 -0
  24. package/dist/cjs/compiled/components/text.js +177 -0
  25. package/dist/cjs/compiled/components/types.js +5 -0
  26. package/dist/cjs/compiled/index.js +83 -0
  27. package/dist/cjs/compiled/responsive/hide.compiled.css +11 -0
  28. package/dist/cjs/compiled/responsive/hide.js +46 -0
  29. package/dist/cjs/compiled/responsive/index.js +33 -0
  30. package/dist/cjs/compiled/responsive/media-helper.js +42 -0
  31. package/dist/cjs/compiled/responsive/show.compiled.css +11 -0
  32. package/dist/cjs/compiled/responsive/show.js +47 -0
  33. package/dist/cjs/compiled/responsive/types.js +5 -0
  34. package/dist/cjs/compiled/responsive/use-media-query.js +77 -0
  35. package/dist/cjs/components/anchor.js +1 -1
  36. package/dist/cjs/components/pressable.js +1 -1
  37. package/dist/cjs/index.js +0 -6
  38. package/dist/es2019/compiled/components/anchor.compiled.css +12 -0
  39. package/dist/es2019/compiled/components/anchor.js +117 -0
  40. package/dist/es2019/compiled/components/bleed.compiled.css +11 -0
  41. package/dist/es2019/compiled/components/bleed.js +43 -0
  42. package/dist/es2019/compiled/components/box.compiled.css +266 -0
  43. package/dist/es2019/compiled/components/box.js +351 -0
  44. package/dist/es2019/compiled/components/flex.compiled.css +46 -0
  45. package/dist/es2019/compiled/components/flex.js +110 -0
  46. package/dist/es2019/compiled/components/grid.compiled.css +54 -0
  47. package/dist/es2019/compiled/components/grid.js +121 -0
  48. package/dist/es2019/compiled/components/inline.compiled.css +8 -0
  49. package/dist/es2019/compiled/components/inline.js +71 -0
  50. package/dist/es2019/compiled/components/internal/surface-provider.js +19 -0
  51. package/dist/es2019/compiled/components/internal/types.js +0 -0
  52. package/dist/es2019/compiled/components/pressable.compiled.css +13 -0
  53. package/dist/es2019/compiled/components/pressable.js +75 -0
  54. package/dist/es2019/compiled/components/stack.compiled.css +3 -0
  55. package/dist/es2019/compiled/components/stack.js +54 -0
  56. package/dist/es2019/compiled/components/text.compiled.css +60 -0
  57. package/dist/es2019/compiled/components/text.js +164 -0
  58. package/dist/es2019/compiled/components/types.js +1 -0
  59. package/dist/es2019/compiled/index.js +13 -0
  60. package/dist/es2019/compiled/responsive/hide.compiled.css +11 -0
  61. package/dist/es2019/compiled/responsive/hide.js +37 -0
  62. package/dist/es2019/compiled/responsive/index.js +4 -0
  63. package/dist/es2019/compiled/responsive/media-helper.js +36 -0
  64. package/dist/es2019/compiled/responsive/show.compiled.css +11 -0
  65. package/dist/es2019/compiled/responsive/show.js +38 -0
  66. package/dist/es2019/compiled/responsive/types.js +1 -0
  67. package/dist/es2019/compiled/responsive/use-media-query.js +71 -0
  68. package/dist/es2019/components/anchor.js +1 -1
  69. package/dist/es2019/components/pressable.js +1 -1
  70. package/dist/es2019/index.js +1 -1
  71. package/dist/esm/compiled/components/anchor.compiled.css +12 -0
  72. package/dist/esm/compiled/components/anchor.js +120 -0
  73. package/dist/esm/compiled/components/bleed.compiled.css +11 -0
  74. package/dist/esm/compiled/components/bleed.js +42 -0
  75. package/dist/esm/compiled/components/box.compiled.css +266 -0
  76. package/dist/esm/compiled/components/box.js +358 -0
  77. package/dist/esm/compiled/components/flex.compiled.css +46 -0
  78. package/dist/esm/compiled/components/flex.js +110 -0
  79. package/dist/esm/compiled/components/grid.compiled.css +54 -0
  80. package/dist/esm/compiled/components/grid.js +120 -0
  81. package/dist/esm/compiled/components/inline.compiled.css +8 -0
  82. package/dist/esm/compiled/components/inline.js +73 -0
  83. package/dist/esm/compiled/components/internal/surface-provider.js +19 -0
  84. package/dist/esm/compiled/components/internal/types.js +0 -0
  85. package/dist/esm/compiled/components/pressable.compiled.css +13 -0
  86. package/dist/esm/compiled/components/pressable.js +77 -0
  87. package/dist/esm/compiled/components/stack.compiled.css +3 -0
  88. package/dist/esm/compiled/components/stack.js +54 -0
  89. package/dist/esm/compiled/components/text.compiled.css +60 -0
  90. package/dist/esm/compiled/components/text.js +167 -0
  91. package/dist/esm/compiled/components/types.js +1 -0
  92. package/dist/esm/compiled/index.js +13 -0
  93. package/dist/esm/compiled/responsive/hide.compiled.css +11 -0
  94. package/dist/esm/compiled/responsive/hide.js +37 -0
  95. package/dist/esm/compiled/responsive/index.js +4 -0
  96. package/dist/esm/compiled/responsive/media-helper.js +36 -0
  97. package/dist/esm/compiled/responsive/show.compiled.css +11 -0
  98. package/dist/esm/compiled/responsive/show.js +38 -0
  99. package/dist/esm/compiled/responsive/types.js +1 -0
  100. package/dist/esm/compiled/responsive/use-media-query.js +71 -0
  101. package/dist/esm/components/anchor.js +1 -1
  102. package/dist/esm/components/pressable.js +1 -1
  103. package/dist/esm/index.js +1 -1
  104. package/dist/types/compiled/components/anchor.d.ts +63 -0
  105. package/dist/types/compiled/components/bleed.d.ts +34 -0
  106. package/dist/types/compiled/components/box.d.ts +105 -0
  107. package/dist/types/compiled/components/flex.d.ts +111 -0
  108. package/dist/types/compiled/components/grid.d.ts +131 -0
  109. package/dist/types/compiled/components/inline.d.ts +116 -0
  110. package/dist/types/compiled/components/internal/surface-provider.d.ts +16 -0
  111. package/dist/types/compiled/components/internal/types.d.ts +5 -0
  112. package/dist/types/compiled/components/pressable.d.ts +49 -0
  113. package/dist/types/compiled/components/stack.d.ts +90 -0
  114. package/dist/types/compiled/components/text.d.ts +91 -0
  115. package/dist/types/compiled/components/types.d.ts +45 -0
  116. package/dist/types/compiled/index.d.ts +12 -0
  117. package/dist/types/compiled/responsive/hide.d.ts +39 -0
  118. package/dist/types/compiled/responsive/index.d.ts +5 -0
  119. package/dist/types/compiled/responsive/media-helper.d.ts +35 -0
  120. package/dist/types/compiled/responsive/show.d.ts +39 -0
  121. package/dist/types/compiled/responsive/types.d.ts +10 -0
  122. package/dist/types/compiled/responsive/use-media-query.d.ts +23 -0
  123. package/dist/types/index.d.ts +1 -1
  124. package/dist/types-ts4.5/compiled/components/anchor.d.ts +63 -0
  125. package/dist/types-ts4.5/compiled/components/bleed.d.ts +34 -0
  126. package/dist/types-ts4.5/compiled/components/box.d.ts +105 -0
  127. package/dist/types-ts4.5/compiled/components/flex.d.ts +111 -0
  128. package/dist/types-ts4.5/compiled/components/grid.d.ts +131 -0
  129. package/dist/types-ts4.5/compiled/components/inline.d.ts +116 -0
  130. package/dist/types-ts4.5/compiled/components/internal/surface-provider.d.ts +16 -0
  131. package/dist/types-ts4.5/compiled/components/internal/types.d.ts +5 -0
  132. package/dist/types-ts4.5/compiled/components/pressable.d.ts +49 -0
  133. package/dist/types-ts4.5/compiled/components/stack.d.ts +90 -0
  134. package/dist/types-ts4.5/compiled/components/text.d.ts +96 -0
  135. package/dist/types-ts4.5/compiled/components/types.d.ts +45 -0
  136. package/dist/types-ts4.5/compiled/index.d.ts +12 -0
  137. package/dist/types-ts4.5/compiled/responsive/hide.d.ts +39 -0
  138. package/dist/types-ts4.5/compiled/responsive/index.d.ts +5 -0
  139. package/dist/types-ts4.5/compiled/responsive/media-helper.d.ts +35 -0
  140. package/dist/types-ts4.5/compiled/responsive/show.d.ts +39 -0
  141. package/dist/types-ts4.5/compiled/responsive/types.d.ts +10 -0
  142. package/dist/types-ts4.5/compiled/responsive/use-media-query.d.ts +23 -0
  143. package/dist/types-ts4.5/index.d.ts +1 -1
  144. package/inline/package.json +3 -1
  145. package/package.json +8 -4
  146. package/pressable/package.json +3 -1
  147. package/responsive/package.json +3 -1
  148. package/stack/package.json +3 -1
  149. package/text/package.json +3 -1
  150. package/.eslintrc.js +0 -3
@@ -0,0 +1,46 @@
1
+ ._1bah1b1v{justify-content:space-around}
2
+ ._1bah1fhb{justify-content:stretch}
3
+ ._1bah1h6o{justify-content:center}
4
+ ._1bah1yb4{justify-content:space-between}
5
+ ._1bahh9n0{justify-content:end}
6
+ ._1bahitcz{justify-content:space-evenly}
7
+ ._1bahv2br{justify-content:start}
8
+ ._1e0c1txw{display:flex}
9
+ ._1n261g80{flex-wrap:wrap}
10
+ ._1n261q9c{flex-wrap:nowrap}
11
+ ._1p5712x7{row-gap:var(--ds-space-075,6px)}
12
+ ._1p571b66{row-gap:var(--ds-space-050,4px)}
13
+ ._1p571ejb{row-gap:var(--ds-space-300,24px)}
14
+ ._1p571epz{row-gap:var(--ds-space-1000,5pc)}
15
+ ._1p571jfw{row-gap:var(--ds-space-500,40px)}
16
+ ._1p57oahv{row-gap:var(--ds-space-600,3pc)}
17
+ ._1p57pxbi{row-gap:var(--ds-space-200,1pc)}
18
+ ._1p57u2gc{row-gap:var(--ds-space-100,8px)}
19
+ ._1p57utpp{row-gap:var(--ds-space-150,9pt)}
20
+ ._1p57v47k{row-gap:var(--ds-space-250,20px)}
21
+ ._1p57v77o{row-gap:var(--ds-space-025,2px)}
22
+ ._1p57xncg{row-gap:var(--ds-space-800,4pc)}
23
+ ._1p57xy5q{row-gap:var(--ds-space-400,2pc)}
24
+ ._1p57ze3t{row-gap:var(--ds-space-0,0)}
25
+ ._2lx21bp4{flex-direction:column}
26
+ ._2lx2vrvc{flex-direction:row}
27
+ ._4cvr1fhb{align-items:stretch}
28
+ ._4cvr1h6o{align-items:center}
29
+ ._4cvr1q9y{align-items:baseline}
30
+ ._4cvrh9n0{align-items:end}
31
+ ._4cvrv2br{align-items:start}
32
+ ._gy1p12x7{column-gap:var(--ds-space-075,6px)}
33
+ ._gy1p1b66{column-gap:var(--ds-space-050,4px)}
34
+ ._gy1p1ejb{column-gap:var(--ds-space-300,24px)}
35
+ ._gy1p1epz{column-gap:var(--ds-space-1000,5pc)}
36
+ ._gy1p1jfw{column-gap:var(--ds-space-500,40px)}
37
+ ._gy1poahv{column-gap:var(--ds-space-600,3pc)}
38
+ ._gy1ppxbi{column-gap:var(--ds-space-200,1pc)}
39
+ ._gy1pu2gc{column-gap:var(--ds-space-100,8px)}
40
+ ._gy1putpp{column-gap:var(--ds-space-150,9pt)}
41
+ ._gy1pv47k{column-gap:var(--ds-space-250,20px)}
42
+ ._gy1pv77o{column-gap:var(--ds-space-025,2px)}
43
+ ._gy1pxncg{column-gap:var(--ds-space-800,4pc)}
44
+ ._gy1pxy5q{column-gap:var(--ds-space-400,2pc)}
45
+ ._gy1pze3t{column-gap:var(--ds-space-0,0)}
46
+ ._vchhusvi{box-sizing:border-box}
@@ -0,0 +1,110 @@
1
+ /* flex.tsx generated by @compiled/babel-plugin v0.32.2 */
2
+ import "./flex.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { forwardRef, memo } from 'react';
6
+ const rowGapMap = {
7
+ 'space.0': "_1p57ze3t",
8
+ 'space.025': "_1p57v77o",
9
+ 'space.050': "_1p571b66",
10
+ 'space.075': "_1p5712x7",
11
+ 'space.100': "_1p57u2gc",
12
+ 'space.150': "_1p57utpp",
13
+ 'space.200': "_1p57pxbi",
14
+ 'space.250': "_1p57v47k",
15
+ 'space.300': "_1p571ejb",
16
+ 'space.400': "_1p57xy5q",
17
+ 'space.500': "_1p571jfw",
18
+ 'space.600': "_1p57oahv",
19
+ 'space.800': "_1p57xncg",
20
+ 'space.1000': "_1p571epz"
21
+ };
22
+ const columnGapMap = {
23
+ 'space.0': "_gy1pze3t",
24
+ 'space.025': "_gy1pv77o",
25
+ 'space.050': "_gy1p1b66",
26
+ 'space.075': "_gy1p12x7",
27
+ 'space.100': "_gy1pu2gc",
28
+ 'space.150': "_gy1putpp",
29
+ 'space.200': "_gy1ppxbi",
30
+ 'space.250': "_gy1pv47k",
31
+ 'space.300': "_gy1p1ejb",
32
+ 'space.400': "_gy1pxy5q",
33
+ 'space.500': "_gy1p1jfw",
34
+ 'space.600': "_gy1poahv",
35
+ 'space.800': "_gy1pxncg",
36
+ 'space.1000': "_gy1p1epz"
37
+ };
38
+ const justifyContentMap = {
39
+ start: "_1bahv2br",
40
+ center: "_1bah1h6o",
41
+ end: "_1bahh9n0",
42
+ 'space-between': "_1bah1yb4",
43
+ 'space-around': "_1bah1b1v",
44
+ 'space-evenly': "_1bahitcz",
45
+ stretch: "_1bah1fhb"
46
+ };
47
+ const flexDirectionMap = {
48
+ column: "_2lx21bp4",
49
+ row: "_2lx2vrvc"
50
+ };
51
+ const flexWrapMap = {
52
+ wrap: "_1n261g80",
53
+ nowrap: "_1n261q9c"
54
+ };
55
+ const alignItemsMap = {
56
+ start: "_4cvrv2br",
57
+ center: "_4cvr1h6o",
58
+ baseline: "_4cvr1q9y",
59
+ end: "_4cvrh9n0",
60
+ stretch: "_4cvr1fhb"
61
+ };
62
+ const styles = {
63
+ root: "_1e0c1txw _vchhusvi"
64
+ };
65
+
66
+ /**
67
+ * __Flex__
68
+ *
69
+ * `Flex` is a primitive component that implements the CSS Flexbox API.
70
+ *
71
+ * - [Examples](https://atlassian.design/components/primitives/flex/examples)
72
+ * - [Code](https://atlassian.design/components/primitives/flex/code)
73
+ *
74
+ * @example
75
+ * ```tsx
76
+ * import { Flex, Box } from '@atlaskit/primitives'
77
+ *
78
+ * const Component = () => (
79
+ * <Flex direction="column">
80
+ * <Box padding="space.100" backgroundColor="neutral"></Box>
81
+ * <Box padding="space.100" backgroundColor="neutral"></Box>
82
+ * </Flex>
83
+ * )
84
+ * ```
85
+ */
86
+ const Flex = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
87
+ as: Component = 'div',
88
+ role,
89
+ alignItems,
90
+ justifyContent,
91
+ gap,
92
+ columnGap,
93
+ rowGap,
94
+ children,
95
+ testId,
96
+ direction,
97
+ wrap,
98
+ xcss
99
+ }, ref) => {
100
+ return /*#__PURE__*/React.createElement(Component, {
101
+ role: role
102
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
103
+ ,
104
+ className: ax([styles.root, gap && columnGapMap[gap], columnGap && columnGapMap[columnGap], gap && rowGapMap[gap], rowGap && rowGapMap[rowGap], alignItems && alignItemsMap[alignItems], direction && flexDirectionMap[direction], justifyContent && justifyContentMap[justifyContent], wrap && flexWrapMap[wrap], xcss]),
105
+ "data-testid": testId,
106
+ ref: ref
107
+ }, children);
108
+ }));
109
+ Flex.displayName = 'Flex';
110
+ export default Flex;
@@ -0,0 +1,54 @@
1
+ ._1bah1b1v{justify-content:space-around}
2
+ ._1bah1fhb{justify-content:stretch}
3
+ ._1bah1h6o{justify-content:center}
4
+ ._1bah1yb4{justify-content:space-between}
5
+ ._1bahh9n0{justify-content:end}
6
+ ._1bahitcz{justify-content:space-evenly}
7
+ ._1bahv2br{justify-content:start}
8
+ ._1e0c11p5{display:grid}
9
+ ._1p5712x7{row-gap:var(--ds-space-075,6px)}
10
+ ._1p571b66{row-gap:var(--ds-space-050,4px)}
11
+ ._1p571ejb{row-gap:var(--ds-space-300,24px)}
12
+ ._1p571epz{row-gap:var(--ds-space-1000,5pc)}
13
+ ._1p571jfw{row-gap:var(--ds-space-500,40px)}
14
+ ._1p57oahv{row-gap:var(--ds-space-600,3pc)}
15
+ ._1p57pxbi{row-gap:var(--ds-space-200,1pc)}
16
+ ._1p57u2gc{row-gap:var(--ds-space-100,8px)}
17
+ ._1p57utpp{row-gap:var(--ds-space-150,9pt)}
18
+ ._1p57v47k{row-gap:var(--ds-space-250,20px)}
19
+ ._1p57v77o{row-gap:var(--ds-space-025,2px)}
20
+ ._1p57xncg{row-gap:var(--ds-space-800,4pc)}
21
+ ._1p57xy5q{row-gap:var(--ds-space-400,2pc)}
22
+ ._1p57ze3t{row-gap:var(--ds-space-0,0)}
23
+ ._4cvr1fhb{align-items:stretch}
24
+ ._4cvr1h6o{align-items:center}
25
+ ._4cvr1q9y{align-items:baseline}
26
+ ._4cvrh9n0{align-items:end}
27
+ ._4cvrv2br{align-items:start}
28
+ ._ae4v1b1v{align-content:space-around}
29
+ ._ae4v1fhb{align-content:stretch}
30
+ ._ae4v1h6o{align-content:center}
31
+ ._ae4v1yb4{align-content:space-between}
32
+ ._ae4vh9n0{align-content:end}
33
+ ._ae4vitcz{align-content:space-evenly}
34
+ ._ae4vv2br{align-content:start}
35
+ ._gy1p12x7{column-gap:var(--ds-space-075,6px)}
36
+ ._gy1p1b66{column-gap:var(--ds-space-050,4px)}
37
+ ._gy1p1ejb{column-gap:var(--ds-space-300,24px)}
38
+ ._gy1p1epz{column-gap:var(--ds-space-1000,5pc)}
39
+ ._gy1p1jfw{column-gap:var(--ds-space-500,40px)}
40
+ ._gy1poahv{column-gap:var(--ds-space-600,3pc)}
41
+ ._gy1ppxbi{column-gap:var(--ds-space-200,1pc)}
42
+ ._gy1pu2gc{column-gap:var(--ds-space-100,8px)}
43
+ ._gy1putpp{column-gap:var(--ds-space-150,9pt)}
44
+ ._gy1pv47k{column-gap:var(--ds-space-250,20px)}
45
+ ._gy1pv77o{column-gap:var(--ds-space-025,2px)}
46
+ ._gy1pxncg{column-gap:var(--ds-space-800,4pc)}
47
+ ._gy1pxy5q{column-gap:var(--ds-space-400,2pc)}
48
+ ._gy1pze3t{column-gap:var(--ds-space-0,0)}
49
+ ._vchhusvi{box-sizing:border-box}
50
+ ._wij218l3{grid-auto-flow:dense}
51
+ ._wij21bp4{grid-auto-flow:column}
52
+ ._wij2adhi{grid-auto-flow:column dense}
53
+ ._wij2j5tq{grid-auto-flow:row dense}
54
+ ._wij2vrvc{grid-auto-flow:row}
@@ -0,0 +1,121 @@
1
+ /* grid.tsx generated by @compiled/babel-plugin v0.32.2 */
2
+ import "./grid.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { forwardRef, memo } from 'react';
6
+ const rowGapMap = {
7
+ 'space.0': "_1p57ze3t",
8
+ 'space.025': "_1p57v77o",
9
+ 'space.050': "_1p571b66",
10
+ 'space.075': "_1p5712x7",
11
+ 'space.100': "_1p57u2gc",
12
+ 'space.150': "_1p57utpp",
13
+ 'space.200': "_1p57pxbi",
14
+ 'space.250': "_1p57v47k",
15
+ 'space.300': "_1p571ejb",
16
+ 'space.400': "_1p57xy5q",
17
+ 'space.500': "_1p571jfw",
18
+ 'space.600': "_1p57oahv",
19
+ 'space.800': "_1p57xncg",
20
+ 'space.1000': "_1p571epz"
21
+ };
22
+ const columnGapMap = {
23
+ 'space.0': "_gy1pze3t",
24
+ 'space.025': "_gy1pv77o",
25
+ 'space.050': "_gy1p1b66",
26
+ 'space.075': "_gy1p12x7",
27
+ 'space.100': "_gy1pu2gc",
28
+ 'space.150': "_gy1putpp",
29
+ 'space.200': "_gy1ppxbi",
30
+ 'space.250': "_gy1pv47k",
31
+ 'space.300': "_gy1p1ejb",
32
+ 'space.400': "_gy1pxy5q",
33
+ 'space.500': "_gy1p1jfw",
34
+ 'space.600': "_gy1poahv",
35
+ 'space.800': "_gy1pxncg",
36
+ 'space.1000': "_gy1p1epz"
37
+ };
38
+ const justifyContentMap = {
39
+ start: "_1bahv2br",
40
+ center: "_1bah1h6o",
41
+ end: "_1bahh9n0",
42
+ 'space-between': "_1bah1yb4",
43
+ 'space-around': "_1bah1b1v",
44
+ 'space-evenly': "_1bahitcz",
45
+ stretch: "_1bah1fhb"
46
+ };
47
+ const alignContentMap = {
48
+ start: "_ae4vv2br",
49
+ center: "_ae4v1h6o",
50
+ end: "_ae4vh9n0",
51
+ 'space-between': "_ae4v1yb4",
52
+ 'space-around': "_ae4v1b1v",
53
+ 'space-evenly': "_ae4vitcz",
54
+ stretch: "_ae4v1fhb"
55
+ };
56
+ const alignItemsMap = {
57
+ start: "_4cvrv2br",
58
+ center: "_4cvr1h6o",
59
+ baseline: "_4cvr1q9y",
60
+ end: "_4cvrh9n0",
61
+ stretch: "_4cvr1fhb"
62
+ };
63
+ const baseStyles = {
64
+ root: "_1e0c11p5 _vchhusvi"
65
+ };
66
+ const gridAutoFlowMap = {
67
+ row: "_wij2vrvc",
68
+ column: "_wij21bp4",
69
+ dense: "_wij218l3",
70
+ 'row dense': "_wij2j5tq",
71
+ 'column dense': "_wij2adhi"
72
+ };
73
+
74
+ /**
75
+ * __Grid__
76
+ *
77
+ * `Grid` is a primitive component that implements the CSS Grid API.
78
+ *
79
+ * - [Examples](https://atlassian.design/components/primitives/grid/examples)
80
+ * - [Code](https://atlassian.design/components/primitives/grid/code)
81
+ *
82
+ * @example
83
+ * ```tsx
84
+ * import { Grid, Box } from '@atlaskit/primitives'
85
+ *
86
+ * const Component = () => (
87
+ * <Grid gap="space.100" gridColumns="1fr 1fr">
88
+ * <Box padding="space.100" backgroundColor="neutral"></Box>
89
+ * <Box padding="space.100" backgroundColor="neutral"></Box>
90
+ * </Grid>
91
+ * )
92
+ * ```
93
+ */
94
+ const Grid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
95
+ as,
96
+ alignItems,
97
+ alignContent,
98
+ justifyContent,
99
+ gap,
100
+ columnGap,
101
+ rowGap,
102
+ children,
103
+ id,
104
+ role,
105
+ testId,
106
+ autoFlow,
107
+ xcss
108
+ }, ref) => {
109
+ const Component = as || 'div';
110
+ return /*#__PURE__*/React.createElement(Component, {
111
+ id: id,
112
+ role: role
113
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- TODO: Allow pass-through from `props.xcss`
114
+ ,
115
+ className: ax([baseStyles.root, gap && columnGapMap[gap], columnGap && columnGapMap[columnGap], gap && rowGapMap[gap], rowGap && rowGapMap[rowGap], alignItems && alignItemsMap[alignItems], alignContent && alignContentMap[alignContent], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow], xcss]),
116
+ "data-testid": testId,
117
+ ref: ref
118
+ }, children);
119
+ }));
120
+ Grid.displayName = 'Grid';
121
+ export default Grid;
@@ -0,0 +1,8 @@
1
+
2
+ ._195g1i6y{margin-inline:var(--ds-space-negative-025,-2px)}
3
+ ._1mouze3t{margin-block:var(--ds-space-0,0)}._16jlidpf{flex-grow:0}
4
+ ._16jlkb7n{flex-grow:1}
5
+ ._1bsb1osq{width:100%}
6
+ ._lcxvglyw{pointer-events:none}
7
+ ._syazjjyb{color:var(--ds-text-subtle,#42526e)}
8
+ ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
@@ -0,0 +1,71 @@
1
+ /* inline.tsx generated by @compiled/babel-plugin v0.32.2 */
2
+ import "./inline.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { Children, forwardRef, Fragment, memo } from 'react';
6
+ import { cx } from '@atlaskit/css';
7
+ import Flex from './flex';
8
+ const styles = {
9
+ separator: "_syazjjyb _1mouze3t _195g1i6y _lcxvglyw _uiztglyw",
10
+ hug: "_16jlidpf",
11
+ fill: "_1bsb1osq _16jlkb7n"
12
+ };
13
+ const Separator = ({
14
+ children
15
+ }) => /*#__PURE__*/React.createElement("span", {
16
+ className: ax([styles.separator])
17
+ }, children);
18
+
19
+ /**
20
+ * __Inline__
21
+ *
22
+ * Inline is a primitive component based on CSS Flexbox that manages the horizontal layout of direct children.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * <Inline>
27
+ * <Box padding="space.100" backgroundColor="neutral"></Box>
28
+ * <Box padding="space.100" backgroundColor="neutral"></Box>
29
+ * </Inline>
30
+ * ```
31
+ *
32
+ */
33
+ const Inline = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
34
+ as,
35
+ alignInline,
36
+ alignBlock: alignItems = 'start',
37
+ shouldWrap = false,
38
+ spread,
39
+ grow,
40
+ space,
41
+ rowSpace,
42
+ separator,
43
+ xcss,
44
+ testId,
45
+ role,
46
+ children: rawChildren
47
+ }, ref) => {
48
+ const separatorComponent = typeof separator === 'string' ? /*#__PURE__*/React.createElement(Separator, null, separator) : separator;
49
+ const children = separatorComponent ? Children.toArray(rawChildren).filter(Boolean).map((child, index) => {
50
+ return /*#__PURE__*/React.createElement(Fragment, {
51
+ key: index
52
+ }, separator && index > 0 ? separatorComponent : null, child);
53
+ }) : rawChildren;
54
+ return /*#__PURE__*/React.createElement(Flex, {
55
+ as: as,
56
+ role: role,
57
+ alignItems: alignItems,
58
+ justifyContent: spread || alignInline,
59
+ direction: "row",
60
+ gap: space,
61
+ rowGap: rowSpace,
62
+ wrap: shouldWrap ? 'wrap' : undefined,
63
+ xcss: cx(grow === 'hug' && styles.hug, grow === 'fill' && styles.fill,
64
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- TODO: We need to handle pass-through `xcss` => `xcss` here.
65
+ xcss),
66
+ testId: testId,
67
+ ref: ref
68
+ }, children);
69
+ }));
70
+ Inline.displayName = 'Inline';
71
+ export default Inline;
@@ -0,0 +1,19 @@
1
+ import { createContext, useContext } from 'react';
2
+ /**
3
+ * __Surface context__
4
+ *
5
+ * A surface context provides context information on the current background (if set).
6
+ */
7
+ export const SurfaceContext = /*#__PURE__*/createContext('elevation.surface');
8
+
9
+ /**
10
+ * __useSurface__
11
+ *
12
+ * Return the current surface. If no parent sets a surface color it falls back to the default surface.
13
+ *
14
+ * @see SurfaceContext
15
+ */
16
+ export const useSurface = () => {
17
+ return useContext(SurfaceContext);
18
+ };
19
+ SurfaceContext.displayName = 'SurfaceProvider';
@@ -0,0 +1,13 @@
1
+ ._19itglyw{border:none}
2
+ ._80om13gf{cursor:not-allowed}
3
+ ._80omtlke{cursor:pointer}
4
+ ._r06hglyw{-webkit-appearance:none;appearance:none}
5
+ ._vchhusvi{box-sizing:border-box}
6
+ ._ymio1r31:focus:not(:focus-visible){outline-color:currentColor}
7
+ ._ypr0glyw:focus:not(:focus-visible){outline-style:none}
8
+ ._zcxs1o36:focus:not(:focus-visible){outline-width:medium}
9
+ ._1bg4v77o:focus, ._1ah3v77o:focus-visible{outline-offset:var(--ds-space-025,2px)}
10
+ ._1hvw1bk5:focus, ._128m1bk5:focus-visible{outline-width:var(--ds-border-width-outline,2px)}
11
+ ._49pcnqa1:focus, ._ra3xnqa1:focus-visible{outline-style:solid}
12
+ ._nt751p6i:focus, ._mizu1p6i:focus-visible{outline-color:var(--ds-border-focused,#388bff)}
13
+ @media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._qa7m1r31:focus-visible{outline-color:currentColor}._1cvmnqa1:focus-visible{outline-style:solid}._4davt94y:focus-visible{outline-width:1px}}
@@ -0,0 +1,75 @@
1
+ /* pressable.tsx generated by @compiled/babel-plugin v0.32.2 */
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import "./pressable.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
+ import { forwardRef, useCallback, useContext } from 'react';
7
+ import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
8
+ import noop from '@atlaskit/ds-lib/noop';
9
+ import InteractionContext from '@atlaskit/interaction-context';
10
+ const styles = {
11
+ root: "_vchhusvi _r06hglyw _19itglyw _80omtlke",
12
+ disabled: "_80om13gf",
13
+ focusRing: "_ymio1r31 _ypr0glyw _zcxs1o36 _nt751p6i _mizu1p6i _1bg4v77o _1ah3v77o _49pcnqa1 _ra3xnqa1 _1hvw1bk5 _128m1bk5 _qa7m1r31 _1cvmnqa1 _4davt94y"
14
+ };
15
+
16
+ /**
17
+ * __Pressable__
18
+ *
19
+ * A primitive for building custom buttons.
20
+ *
21
+ * - [Examples](https://atlassian.design/components/primitives/pressable/examples)
22
+ * - [Code](https://atlassian.design/components/primitives/pressable/code)
23
+ * - [Usage](https://atlassian.design/components/primitives/pressable/usage)
24
+ */
25
+ const Pressable = /*#__PURE__*/forwardRef(({
26
+ children,
27
+ isDisabled,
28
+ type = 'button',
29
+ onClick: providedOnClick = noop,
30
+ interactionName,
31
+ componentName,
32
+ analyticsContext,
33
+ style,
34
+ testId,
35
+ xcss,
36
+ ...htmlAttributes
37
+ }, ref) => {
38
+ const interactionContext = useContext(InteractionContext);
39
+ const handleClick = useCallback((e, analyticsEvent) => {
40
+ interactionContext && interactionContext.tracePress(interactionName, e.timeStamp);
41
+ providedOnClick(e, analyticsEvent);
42
+ }, [providedOnClick, interactionContext, interactionName]);
43
+ const onClick = usePlatformLeafEventHandler({
44
+ fn: handleClick,
45
+ action: 'clicked',
46
+ componentName: componentName || 'Pressable',
47
+ packageName: "@atlaskit/primitives",
48
+ packageVersion: "13.1.0",
49
+ analyticsData: analyticsContext,
50
+ actionSubject: 'button'
51
+ });
52
+
53
+ // This is to remove className from safeHtmlAttributes
54
+ // @ts-expect-error className doesn't exist in the prop definition but we want to ensure it cannot be applied even if types are bypassed
55
+ const {
56
+ className: _spreadClass,
57
+ ...safeHtmlAttributes
58
+ } = htmlAttributes;
59
+ return /*#__PURE__*/React.createElement("button", _extends({
60
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- TODO: Allow pass-through from `props.xcss`
61
+ className: ax([styles.root, styles.focusRing, isDisabled && styles.disabled, xcss])
62
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- TODO: Properly type this and allow pass-through if we can determine the type
63
+ ,
64
+ style: style
65
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
66
+ }, safeHtmlAttributes, {
67
+ // eslint-disable-next-line react/button-has-type
68
+ type: type,
69
+ onClick: onClick,
70
+ disabled: isDisabled,
71
+ "data-testid": testId,
72
+ ref: ref
73
+ }), children);
74
+ });
75
+ export default Pressable;
@@ -0,0 +1,3 @@
1
+ ._16jlidpf{flex-grow:0}
2
+ ._16jlkb7n{flex-grow:1}
3
+ ._1bsb1osq{width:100%}
@@ -0,0 +1,54 @@
1
+ /* stack.tsx generated by @compiled/babel-plugin v0.32.2 */
2
+ import "./stack.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { forwardRef, memo } from 'react';
6
+ import { cx } from '@atlaskit/css';
7
+ import Flex from './flex';
8
+ const styles = {
9
+ hug: "_16jlidpf",
10
+ fill: "_1bsb1osq _16jlkb7n"
11
+ };
12
+
13
+ /**
14
+ * __Stack__
15
+ *
16
+ * Stack is a primitive component based on flexbox that manages the block layout of direct children.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Stack>
21
+ * <Box padding="space.100" backgroundColor="neutral"></Box>
22
+ * <Box padding="space.100" backgroundColor="neutral"></Box>
23
+ * </Stack>
24
+ * ```
25
+ *
26
+ */
27
+ const Stack = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
28
+ as,
29
+ alignInline: alignItems,
30
+ alignBlock = 'stretch',
31
+ spread,
32
+ grow,
33
+ space,
34
+ children,
35
+ testId,
36
+ xcss,
37
+ role
38
+ }, ref) => {
39
+ return /*#__PURE__*/React.createElement(Flex, {
40
+ as: as,
41
+ role: role,
42
+ gap: space,
43
+ direction: "column",
44
+ alignItems: alignItems,
45
+ justifyContent: spread || alignBlock,
46
+ xcss: cx(grow === 'hug' && styles.hug, grow === 'fill' && styles.fill,
47
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- TODO: We need to handle pass-through `xcss` => `xcss` here.
48
+ xcss),
49
+ testId: testId,
50
+ ref: ref
51
+ }, children);
52
+ }));
53
+ Stack.displayName = 'Stack';
54
+ export default Stack;
@@ -0,0 +1,60 @@
1
+ ._11c81doa{font:var(--ds-font-body-large,normal 400 1pc/24px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
2
+ ._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
3
+ ._11c81vlj{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
4
+ ._11c8qk37{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
5
+ ._18m915vq{overflow-y:hidden}
6
+ ._18u0idpf{margin-left:0}
7
+ ._19pkidpf{margin-top:0}
8
+ ._1e0ccj1k{display:-webkit-box}
9
+ ._1i4qfg65{overflow-wrap:anywhere}
10
+ ._1nmz9jpi{word-break:break-all}
11
+ ._1reo15vq{overflow-x:hidden}
12
+ ._2hwxidpf{margin-right:0}
13
+ ._k48p1pd9{font-weight:var(--ds-font-weight-semibold,600)}
14
+ ._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
15
+ ._k48p8n31{font-weight:bold}
16
+ ._k48pi7a9{font-weight:var(--ds-font-weight-regular,400)}
17
+ ._k48pmoej{font-weight:var(--ds-font-weight-bold,700)}
18
+ ._otyridpf{margin-bottom:0}
19
+ ._sudp1e54{-webkit-box-orient:vertical}
20
+ ._syaz10m5{color:var(--ds-text-accent-purple,#5e4db2)}
21
+ ._syaz12v7{color:var(--ds-text-accent-teal-bolder,#164555)}
22
+ ._syaz131l{color:var(--ds-text-subtlest,#626f86)}
23
+ ._syaz14q2{color:var(--ds-link,#0c66e4)}
24
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
25
+ ._syaz16c2{color:var(--ds-link-pressed,#05c)}
26
+ ._syaz17qg{color:var(--ds-text-accent-teal,#206a83)}
27
+ ._syaz1dyx{color:var(--ds-text-accent-gray,#44546f)}
28
+ ._syaz1e6v{color:var(--ds-text-brand,#0c66e4)}
29
+ ._syaz1fxt{color:var(--ds-text,#172b4d)}
30
+ ._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
31
+ ._syaz1ik3{color:var(--ds-text-accent-lime-bolder,#37471f)}
32
+ ._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
33
+ ._syaz1q28{color:var(--ds-text-accent-orange,#a54800)}
34
+ ._syaz1qur{color:var(--ds-text-accent-magenta-bolder,#50253f)}
35
+ ._syaz1s8m{color:var(--ds-text-accent-magenta,#943d73)}
36
+ ._syaz1tco{color:var(--ds-text-accent-lime,#4c6b1f)}
37
+ ._syaz1tmw{color:var(--ds-text-danger,#ae2e24)}
38
+ ._syaz1vps{color:var(--ds-text-accent-orange-bolder,#702e00)}
39
+ ._syaz1x9z{color:var(--ds-text-accent-gray-bolder,#091e42)}
40
+ ._syaz1y78{color:var(--ds-text-accent-green-bolder,#164b35)}
41
+ ._syaz2ibx{color:var(--ds-text-accent-purple-bolder,#352c63)}
42
+ ._syaz9lu1{color:var(--ds-text-accent-red,#ae2e24)}
43
+ ._syazal3n{color:var(--ds-text-warning-inverse,#172b4d)}
44
+ ._syazaqb7{color:var(--ds-text-selected,#0c66e4)}
45
+ ._syaze0os{color:var(--ds-text-information,#05c)}
46
+ ._syazekll{color:var(--ds-text-accent-yellow-bolder,#533f04)}
47
+ ._syazfb2s{color:var(--ds-text-accent-yellow,#7f5f01)}
48
+ ._syazg3x0{color:var(--ds-link-visited-pressed,#352c63)}
49
+ ._syazh55r{color:var(--ds-text-accent-green,#216e4e)}
50
+ ._syazhwvp{color:var(--ds-text-accent-red-bolder,#5d1f1a)}
51
+ ._syazpnps{color:var(--ds-text-accent-blue,#05c)}
52
+ ._syazsc1o{color:var(--ds-text-accent-blue-bolder,#09326c)}
53
+ ._syazw7te{color:var(--ds-link-visited,#5e4db2)}
54
+ ._syazwx40{color:var(--ds-text-warning,#a54800)}
55
+ ._syazy73q{color:var(--ds-text-success,#216e4e)}
56
+ ._syazzjem{color:var(--ds-text-discovery,#5e4db2)}
57
+ ._y3gn1h6o{text-align:center}
58
+ ._y3gnh9n0{text-align:end}
59
+ ._y3gnv2br{text-align:start}
60
+ ._zg8l1m30{font-style:italic}