@atlaskit/primitives 19.0.0 → 19.0.2

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 (105) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/codemods/compiled-fork-stage1/transform.tsx +178 -17
  3. package/components/flex/package.json +17 -0
  4. package/constellation/pressable/usage.mdx +2 -0
  5. package/dist/cjs/compiled/components/anchor.js +1 -1
  6. package/dist/cjs/compiled/components/box.compiled.css +1 -1
  7. package/dist/cjs/compiled/components/box.js +3 -3
  8. package/dist/cjs/compiled/components/pressable.js +1 -1
  9. package/dist/cjs/compiled/components/text.js +2 -0
  10. package/dist/cjs/components/anchor.js +1 -1
  11. package/dist/cjs/components/box.js +4 -2
  12. package/dist/cjs/components/pressable.js +1 -1
  13. package/dist/cjs/responsive/build-media-query-css.js +14 -71
  14. package/dist/cjs/responsive/constants.js +2 -0
  15. package/dist/cjs/responsive/hide.js +4 -3
  16. package/dist/cjs/responsive/media-helper.js +8 -37
  17. package/dist/cjs/responsive/media.js +31 -0
  18. package/dist/cjs/responsive/show.js +4 -3
  19. package/dist/cjs/responsive/unsafe-build-above-media-query-css.js +43 -0
  20. package/dist/cjs/responsive/unsafe-build-below-media-query-css.js +45 -0
  21. package/dist/cjs/utils/has-text-ancestor-context.js +1 -0
  22. package/dist/cjs/utils/surface-context.js +13 -0
  23. package/dist/cjs/utils/surface-provider.js +10 -10
  24. package/dist/cjs/xcss/style-maps.partial.js +27 -7
  25. package/dist/cjs/xcss/xcss.js +2 -0
  26. package/dist/es2019/compiled/components/anchor.js +1 -1
  27. package/dist/es2019/compiled/components/box.compiled.css +1 -1
  28. package/dist/es2019/compiled/components/box.js +2 -2
  29. package/dist/es2019/compiled/components/pressable.js +1 -1
  30. package/dist/es2019/compiled/components/text.js +2 -0
  31. package/dist/es2019/components/anchor.js +1 -1
  32. package/dist/es2019/components/box.js +3 -1
  33. package/dist/es2019/components/pressable.js +1 -1
  34. package/dist/es2019/responsive/build-media-query-css.js +2 -75
  35. package/dist/es2019/responsive/constants.js +2 -0
  36. package/dist/es2019/responsive/hide.js +2 -1
  37. package/dist/es2019/responsive/media-helper.js +3 -37
  38. package/dist/es2019/responsive/media.js +25 -0
  39. package/dist/es2019/responsive/show.js +2 -1
  40. package/dist/es2019/responsive/unsafe-build-above-media-query-css.js +38 -0
  41. package/dist/es2019/responsive/unsafe-build-below-media-query-css.js +42 -0
  42. package/dist/es2019/utils/has-text-ancestor-context.js +1 -0
  43. package/dist/es2019/utils/surface-context.js +7 -0
  44. package/dist/es2019/utils/surface-provider.js +4 -9
  45. package/dist/es2019/xcss/style-maps.partial.js +27 -7
  46. package/dist/es2019/xcss/xcss.js +2 -0
  47. package/dist/esm/compiled/components/anchor.js +1 -1
  48. package/dist/esm/compiled/components/box.compiled.css +1 -1
  49. package/dist/esm/compiled/components/box.js +2 -2
  50. package/dist/esm/compiled/components/pressable.js +1 -1
  51. package/dist/esm/compiled/components/text.js +2 -0
  52. package/dist/esm/components/anchor.js +1 -1
  53. package/dist/esm/components/box.js +3 -1
  54. package/dist/esm/components/pressable.js +1 -1
  55. package/dist/esm/responsive/build-media-query-css.js +2 -68
  56. package/dist/esm/responsive/constants.js +2 -0
  57. package/dist/esm/responsive/hide.js +2 -1
  58. package/dist/esm/responsive/media-helper.js +3 -37
  59. package/dist/esm/responsive/media.js +25 -0
  60. package/dist/esm/responsive/show.js +2 -1
  61. package/dist/esm/responsive/unsafe-build-above-media-query-css.js +37 -0
  62. package/dist/esm/responsive/unsafe-build-below-media-query-css.js +39 -0
  63. package/dist/esm/utils/has-text-ancestor-context.js +1 -0
  64. package/dist/esm/utils/surface-context.js +7 -0
  65. package/dist/esm/utils/surface-provider.js +4 -9
  66. package/dist/esm/xcss/style-maps.partial.js +27 -7
  67. package/dist/esm/xcss/xcss.js +2 -0
  68. package/dist/types/responsive/build-media-query-css.d.ts +2 -63
  69. package/dist/types/responsive/media-helper.d.ts +1 -35
  70. package/dist/types/responsive/media.d.ts +25 -0
  71. package/dist/types/responsive/types.d.ts +1 -1
  72. package/dist/types/responsive/unsafe-build-above-media-query-css.d.ts +33 -0
  73. package/dist/types/responsive/unsafe-build-below-media-query-css.d.ts +32 -0
  74. package/dist/types/utils/surface-context.d.ts +8 -0
  75. package/dist/types/utils/surface-provider.d.ts +1 -7
  76. package/dist/types/utils/types.d.ts +1 -1
  77. package/dist/types/xcss/style-maps.partial.d.ts +26 -6
  78. package/dist/types-ts4.5/responsive/build-media-query-css.d.ts +2 -63
  79. package/dist/types-ts4.5/responsive/media-helper.d.ts +1 -35
  80. package/dist/types-ts4.5/responsive/media.d.ts +25 -0
  81. package/dist/types-ts4.5/responsive/types.d.ts +1 -1
  82. package/dist/types-ts4.5/responsive/unsafe-build-above-media-query-css.d.ts +33 -0
  83. package/dist/types-ts4.5/responsive/unsafe-build-below-media-query-css.d.ts +32 -0
  84. package/dist/types-ts4.5/utils/surface-context.d.ts +8 -0
  85. package/dist/types-ts4.5/utils/surface-provider.d.ts +1 -7
  86. package/dist/types-ts4.5/utils/types.d.ts +1 -1
  87. package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +26 -6
  88. package/package.json +21 -45
  89. package/primitives.docs.tsx +359 -356
  90. package/scripts/capitalize.tsx +2 -0
  91. package/scripts/color-codegen-template.tsx +3 -6
  92. package/scripts/compose.tsx +4 -0
  93. package/scripts/elevation-codegen-template.tsx +3 -6
  94. package/scripts/generate-type-defs.tsx +12 -0
  95. package/scripts/inverse-color-map-template.tsx +4 -1
  96. package/scripts/is-accent.tsx +1 -0
  97. package/scripts/is-hovered.tsx +1 -0
  98. package/scripts/is-pressed.tsx +1 -0
  99. package/scripts/pick.tsx +4 -0
  100. package/scripts/shape-codegen-template.tsx +3 -1
  101. package/scripts/spacing-codegen-template.tsx +2 -1
  102. package/scripts/text-codegen-template.tsx +3 -1
  103. package/scripts/typography-codegen-template.tsx +3 -1
  104. package/scripts/utils.tsx +7 -25
  105. package/offerings.json +0 -298
@@ -1,393 +1,396 @@
1
1
  import path from 'path';
2
2
 
3
- import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';
3
+ import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
4
4
 
5
- const documentation: ComponentStructuredContentSource[] = [
6
- {
7
- name: 'Anchor',
8
- description: 'A primitive Anchor component for navigation links with compiled styling support.',
9
- status: 'general-availability',
10
- import: {
5
+ const documentation: StructuredContentSource = {
6
+ components: [
7
+ {
11
8
  name: 'Anchor',
12
- package: '@atlaskit/primitives/compiled',
13
- type: 'named',
14
- packagePath: path.resolve(__dirname),
15
- packageJson: require('./package.json'),
16
- },
17
- usageGuidelines: [
18
- 'Use for navigation links to other pages or sections',
19
- 'Leverage compiled styling for performance',
20
- 'Use appropriate link styling and states',
21
- 'Consider link behavior and target attributes',
22
- ],
23
- contentGuidelines: [
24
- 'Use clear, descriptive link text',
25
- 'Maintain consistent link styling',
26
- 'Consider link context and destination',
27
- ],
28
- accessibilityGuidelines: [
29
- 'Provide clear link text that describes the destination',
30
- 'Use appropriate ARIA attributes for links',
31
- 'Ensure keyboard navigation support',
32
- 'Provide clear visual indicators for link state',
33
- 'Use descriptive link text for screen readers',
34
- ],
35
- examples: [
36
- {
9
+ description:
10
+ 'A primitive Anchor component for navigation links with compiled styling support.',
11
+ status: 'general-availability',
12
+ import: {
37
13
  name: 'Anchor',
38
- description: 'Anchor example',
39
- source: path.resolve(__dirname, './examples/ai/anchor.tsx'),
14
+ package: '@atlaskit/primitives/compiled',
15
+ type: 'named',
16
+ packagePath: path.resolve(__dirname),
17
+ packageJson: require('./package.json'),
40
18
  },
41
- ],
42
- keywords: ['anchor', 'link', 'navigation', 'href', 'url', 'primitive', 'compiled'],
43
- categories: ['primitive'],
44
- },
45
- {
46
- name: 'Bleed',
47
- description:
48
- 'A primitive Bleed component for extending content beyond container boundaries with compiled styling support.',
49
- status: 'general-availability',
50
- import: {
51
- name: 'Bleed',
52
- package: '@atlaskit/primitives/compiled',
53
- type: 'named',
54
- packagePath: path.resolve(__dirname),
55
- packageJson: require('./package.json'),
19
+ usageGuidelines: [
20
+ 'Use for navigation links to other pages or sections',
21
+ 'Leverage compiled styling for performance',
22
+ 'Use appropriate link styling and states',
23
+ 'Consider link behavior and target attributes',
24
+ ],
25
+ contentGuidelines: [
26
+ 'Use clear, descriptive link text',
27
+ 'Maintain consistent link styling',
28
+ 'Consider link context and destination',
29
+ ],
30
+ accessibilityGuidelines: [
31
+ 'Provide clear link text that describes the destination',
32
+ 'Use appropriate ARIA attributes for links',
33
+ 'Ensure keyboard navigation support',
34
+ 'Provide clear visual indicators for link state',
35
+ 'Use descriptive link text for screen readers',
36
+ ],
37
+ examples: [
38
+ {
39
+ name: 'Anchor',
40
+ description: 'Anchor example',
41
+ source: path.resolve(__dirname, './examples/ai/anchor.tsx'),
42
+ },
43
+ ],
44
+ keywords: ['anchor', 'link', 'navigation', 'href', 'url', 'primitive', 'compiled'],
45
+ categories: ['primitive'],
56
46
  },
57
- usageGuidelines: [
58
- 'Use for extending content beyond container margins',
59
- 'Leverage compiled styling for performance',
60
- 'Use appropriate bleed directions and amounts',
61
- 'Consider responsive behavior and container constraints',
62
- ],
63
- contentGuidelines: [
64
- 'Use for appropriate layout bleeding',
65
- 'Maintain consistent bleeding patterns',
66
- 'Consider content hierarchy and visual flow',
67
- ],
68
- examples: [
69
- {
47
+ {
48
+ name: 'Bleed',
49
+ description:
50
+ 'A primitive Bleed component for extending content beyond container boundaries with compiled styling support.',
51
+ status: 'general-availability',
52
+ import: {
70
53
  name: 'Bleed',
71
- description: 'Bleed example',
72
- source: path.resolve(__dirname, './examples/ai/bleed.tsx'),
54
+ package: '@atlaskit/primitives/compiled',
55
+ type: 'named',
56
+ packagePath: path.resolve(__dirname),
57
+ packageJson: require('./package.json'),
73
58
  },
74
- ],
75
- keywords: ['bleed', 'layout', 'margin', 'spacing', 'edge', 'primitive', 'compiled'],
76
- categories: ['primitive'],
77
- },
78
- {
79
- name: 'Box',
80
- description:
81
- 'A primitive Box component for layout and container purposes with compiled styling support.',
82
- status: 'general-availability',
83
- import: {
84
- name: 'Box',
85
- package: '@atlaskit/primitives/compiled',
86
- type: 'named',
87
- packagePath: path.resolve(__dirname),
88
- packageJson: require('./package.json'),
59
+ usageGuidelines: [
60
+ 'Use for extending content beyond container margins',
61
+ 'Leverage compiled styling for performance',
62
+ 'Use appropriate bleed directions and amounts',
63
+ 'Consider responsive behavior and container constraints',
64
+ ],
65
+ contentGuidelines: [
66
+ 'Use for appropriate layout bleeding',
67
+ 'Maintain consistent bleeding patterns',
68
+ 'Consider content hierarchy and visual flow',
69
+ ],
70
+ examples: [
71
+ {
72
+ name: 'Bleed',
73
+ description: 'Bleed example',
74
+ source: path.resolve(__dirname, './examples/ai/bleed.tsx'),
75
+ },
76
+ ],
77
+ keywords: ['bleed', 'layout', 'margin', 'spacing', 'edge', 'primitive', 'compiled'],
78
+ categories: ['primitive'],
89
79
  },
90
- usageGuidelines: [
91
- 'Use for basic layout and container needs',
92
- 'Leverage compiled styling for performance',
93
- 'Use appropriate spacing and layout props',
94
- 'Consider semantic HTML when possible',
95
- ],
96
- contentGuidelines: [
97
- 'Use for appropriate layout purposes',
98
- 'Maintain consistent spacing and layout patterns',
99
- 'Consider accessibility and semantic structure',
100
- ],
101
- examples: [
102
- {
80
+ {
81
+ name: 'Box',
82
+ description:
83
+ 'A primitive Box component for layout and container purposes with compiled styling support.',
84
+ status: 'general-availability',
85
+ import: {
103
86
  name: 'Box',
104
- description: 'Box example',
105
- source: path.resolve(__dirname, './examples/ai/box.tsx'),
87
+ package: '@atlaskit/primitives/compiled',
88
+ type: 'named',
89
+ packagePath: path.resolve(__dirname),
90
+ packageJson: require('./package.json'),
106
91
  },
107
- ],
108
- keywords: ['box', 'container', 'div', 'layout', 'primitive', 'compiled'],
109
- categories: ['primitive'],
110
- },
111
- {
112
- name: 'Flex',
113
- description: 'A primitive Flex component for flexbox layout with compiled styling support.',
114
- status: 'open-beta',
115
- import: {
116
- name: 'Flex',
117
- package: '@atlaskit/primitives/compiled',
118
- type: 'named',
119
- packagePath: path.resolve(__dirname),
120
- packageJson: require('./package.json'),
92
+ usageGuidelines: [
93
+ 'Use for basic layout and container needs',
94
+ 'Leverage compiled styling for performance',
95
+ 'Use appropriate spacing and layout props',
96
+ 'Consider semantic HTML when possible',
97
+ ],
98
+ contentGuidelines: [
99
+ 'Use for appropriate layout purposes',
100
+ 'Maintain consistent spacing and layout patterns',
101
+ 'Consider accessibility and semantic structure',
102
+ ],
103
+ examples: [
104
+ {
105
+ name: 'Box',
106
+ description: 'Box example',
107
+ source: path.resolve(__dirname, './examples/ai/box.tsx'),
108
+ },
109
+ ],
110
+ keywords: ['box', 'container', 'div', 'layout', 'primitive', 'compiled'],
111
+ categories: ['primitive'],
121
112
  },
122
- usageGuidelines: [
123
- 'Use for flexbox layout needs',
124
- 'Leverage compiled styling for performance',
125
- 'Use appropriate flex properties and alignment',
126
- 'Consider responsive behavior',
127
- ],
128
- contentGuidelines: [
129
- 'Use for appropriate flex layout',
130
- 'Maintain consistent flex patterns',
131
- 'Consider content alignment and distribution',
132
- ],
133
- examples: [
134
- {
113
+ {
114
+ name: 'Flex',
115
+ description: 'A primitive Flex component for flexbox layout with compiled styling support.',
116
+ status: 'open-beta',
117
+ import: {
135
118
  name: 'Flex',
136
- description: 'Flex example',
137
- source: path.resolve(__dirname, './examples/ai/flex.tsx'),
119
+ package: '@atlaskit/primitives/compiled',
120
+ type: 'named',
121
+ packagePath: path.resolve(__dirname),
122
+ packageJson: require('./package.json'),
138
123
  },
139
- ],
140
- keywords: ['flex', 'layout', 'flexbox', 'alignment', 'primitive', 'compiled'],
141
- categories: ['primitive'],
142
- },
143
- {
144
- name: 'Focusable',
145
- description:
146
- 'A primitive Focusable component for keyboard navigation and focus management with compiled styling support.',
147
- status: 'general-availability',
148
- import: {
149
- name: 'Focusable',
150
- package: '@atlaskit/primitives/compiled',
151
- type: 'named',
152
- packagePath: path.resolve(__dirname),
153
- packageJson: require('./package.json'),
124
+ usageGuidelines: [
125
+ 'Use for flexbox layout needs',
126
+ 'Leverage compiled styling for performance',
127
+ 'Use appropriate flex properties and alignment',
128
+ 'Consider responsive behavior',
129
+ ],
130
+ contentGuidelines: [
131
+ 'Use for appropriate flex layout',
132
+ 'Maintain consistent flex patterns',
133
+ 'Consider content alignment and distribution',
134
+ ],
135
+ examples: [
136
+ {
137
+ name: 'Flex',
138
+ description: 'Flex example',
139
+ source: path.resolve(__dirname, './examples/ai/flex.tsx'),
140
+ },
141
+ ],
142
+ keywords: ['flex', 'layout', 'flexbox', 'alignment', 'primitive', 'compiled'],
143
+ categories: ['primitive'],
154
144
  },
155
- usageGuidelines: [
156
- 'Use for elements that need keyboard focus',
157
- 'Leverage compiled styling for performance',
158
- 'Use appropriate focus management',
159
- 'Consider keyboard navigation patterns',
160
- ],
161
- contentGuidelines: [
162
- 'Use for appropriate focusable content',
163
- 'Maintain consistent focus patterns',
164
- 'Consider keyboard navigation flow',
165
- ],
166
- accessibilityGuidelines: [
167
- 'Provide clear focus indicators',
168
- 'Use appropriate tab order and navigation',
169
- 'Ensure keyboard accessibility',
170
- 'Provide clear visual feedback for focus state',
171
- 'Use appropriate ARIA attributes',
172
- ],
173
- examples: [
174
- {
145
+ {
146
+ name: 'Focusable',
147
+ description:
148
+ 'A primitive Focusable component for keyboard navigation and focus management with compiled styling support.',
149
+ status: 'general-availability',
150
+ import: {
175
151
  name: 'Focusable',
176
- description: 'Focusable example',
177
- source: path.resolve(__dirname, './examples/ai/focusable.tsx'),
152
+ package: '@atlaskit/primitives/compiled',
153
+ type: 'named',
154
+ packagePath: path.resolve(__dirname),
155
+ packageJson: require('./package.json'),
178
156
  },
179
- ],
180
- keywords: [
181
- 'focusable',
182
- 'focus',
183
- 'keyboard',
184
- 'navigation',
185
- 'accessibility',
186
- 'primitive',
187
- 'compiled',
188
- ],
189
- categories: ['primitive'],
190
- },
191
- {
192
- name: 'Grid',
193
- description: 'A primitive Grid component for CSS Grid layout with compiled styling support.',
194
- status: 'open-beta',
195
- import: {
196
- name: 'Grid',
197
- package: '@atlaskit/primitives/compiled',
198
- type: 'named',
199
- packagePath: path.resolve(__dirname),
200
- packageJson: require('./package.json'),
157
+ usageGuidelines: [
158
+ 'Use for elements that need keyboard focus',
159
+ 'Leverage compiled styling for performance',
160
+ 'Use appropriate focus management',
161
+ 'Consider keyboard navigation patterns',
162
+ ],
163
+ contentGuidelines: [
164
+ 'Use for appropriate focusable content',
165
+ 'Maintain consistent focus patterns',
166
+ 'Consider keyboard navigation flow',
167
+ ],
168
+ accessibilityGuidelines: [
169
+ 'Provide clear focus indicators',
170
+ 'Use appropriate tab order and navigation',
171
+ 'Ensure keyboard accessibility',
172
+ 'Provide clear visual feedback for focus state',
173
+ 'Use appropriate ARIA attributes',
174
+ ],
175
+ examples: [
176
+ {
177
+ name: 'Focusable',
178
+ description: 'Focusable example',
179
+ source: path.resolve(__dirname, './examples/ai/focusable.tsx'),
180
+ },
181
+ ],
182
+ keywords: [
183
+ 'focusable',
184
+ 'focus',
185
+ 'keyboard',
186
+ 'navigation',
187
+ 'accessibility',
188
+ 'primitive',
189
+ 'compiled',
190
+ ],
191
+ categories: ['primitive'],
201
192
  },
202
- usageGuidelines: [
203
- 'Use for CSS Grid layout needs',
204
- 'Leverage compiled styling for performance',
205
- 'Use appropriate grid properties and alignment',
206
- 'Consider responsive behavior',
207
- ],
208
- contentGuidelines: [
209
- 'Use for appropriate grid layout',
210
- 'Maintain consistent grid patterns',
211
- 'Consider content alignment and distribution',
212
- ],
213
- examples: [
214
- {
193
+ {
194
+ name: 'Grid',
195
+ description: 'A primitive Grid component for CSS Grid layout with compiled styling support.',
196
+ status: 'open-beta',
197
+ import: {
215
198
  name: 'Grid',
216
- description: 'Grid example',
217
- source: path.resolve(__dirname, './examples/ai/grid.tsx'),
199
+ package: '@atlaskit/primitives/compiled',
200
+ type: 'named',
201
+ packagePath: path.resolve(__dirname),
202
+ packageJson: require('./package.json'),
218
203
  },
219
- ],
220
- keywords: ['grid', 'layout', 'css-grid', 'alignment', 'primitive', 'compiled'],
221
- categories: ['primitive'],
222
- },
223
- {
224
- name: 'Inline',
225
- description: 'A primitive Inline component for horizontal layout with consistent spacing.',
226
- status: 'general-availability',
227
- import: {
228
- name: 'Inline',
229
- package: '@atlaskit/primitives/compiled',
230
- type: 'named',
231
- packagePath: path.resolve(__dirname),
232
- packageJson: require('./package.json'),
204
+ usageGuidelines: [
205
+ 'Use for CSS Grid layout needs',
206
+ 'Leverage compiled styling for performance',
207
+ 'Use appropriate grid properties and alignment',
208
+ 'Consider responsive behavior',
209
+ ],
210
+ contentGuidelines: [
211
+ 'Use for appropriate grid layout',
212
+ 'Maintain consistent grid patterns',
213
+ 'Consider content alignment and distribution',
214
+ ],
215
+ examples: [
216
+ {
217
+ name: 'Grid',
218
+ description: 'Grid example',
219
+ source: path.resolve(__dirname, './examples/ai/grid.tsx'),
220
+ },
221
+ ],
222
+ keywords: ['grid', 'layout', 'css-grid', 'alignment', 'primitive', 'compiled'],
223
+ categories: ['primitive'],
233
224
  },
234
- usageGuidelines: [
235
- 'Use for horizontal layout needs',
236
- 'Leverage compiled styling for performance',
237
- 'Use appropriate spacing and alignment props',
238
- 'Consider wrapping behavior',
239
- ],
240
- contentGuidelines: [
241
- 'Use for appropriate horizontal grouping',
242
- 'Maintain consistent spacing patterns',
243
- 'Consider content flow and readability',
244
- ],
245
- examples: [
246
- {
225
+ {
226
+ name: 'Inline',
227
+ description: 'A primitive Inline component for horizontal layout with consistent spacing.',
228
+ status: 'general-availability',
229
+ import: {
247
230
  name: 'Inline',
248
- description: 'Inline example',
249
- source: path.resolve(__dirname, './examples/ai/inline.tsx'),
231
+ package: '@atlaskit/primitives/compiled',
232
+ type: 'named',
233
+ packagePath: path.resolve(__dirname),
234
+ packageJson: require('./package.json'),
250
235
  },
251
- ],
252
- keywords: ['inline', 'layout', 'horizontal', 'spacing', 'primitive', 'compiled'],
253
- categories: ['primitive'],
254
- },
255
- {
256
- name: 'MetricText',
257
- description: 'A primitive Text component for typography with compiled styling support.',
258
- status: 'general-availability',
259
- import: {
260
- name: 'MetricText',
261
- package: '@atlaskit/primitives/compiled',
262
- type: 'named',
263
- packagePath: path.resolve(__dirname),
264
- packageJson: require('./package.json'),
236
+ usageGuidelines: [
237
+ 'Use for horizontal layout needs',
238
+ 'Leverage compiled styling for performance',
239
+ 'Use appropriate spacing and alignment props',
240
+ 'Consider wrapping behavior',
241
+ ],
242
+ contentGuidelines: [
243
+ 'Use for appropriate horizontal grouping',
244
+ 'Maintain consistent spacing patterns',
245
+ 'Consider content flow and readability',
246
+ ],
247
+ examples: [
248
+ {
249
+ name: 'Inline',
250
+ description: 'Inline example',
251
+ source: path.resolve(__dirname, './examples/ai/inline.tsx'),
252
+ },
253
+ ],
254
+ keywords: ['inline', 'layout', 'horizontal', 'spacing', 'primitive', 'compiled'],
255
+ categories: ['primitive'],
265
256
  },
266
- usageGuidelines: [
267
- 'Use for text content with consistent typography',
268
- 'Leverage compiled styling for performance',
269
- 'Use appropriate font size and weight props',
270
- 'Consider semantic HTML elements',
271
- ],
272
- contentGuidelines: [
273
- 'Use for appropriate text content',
274
- 'Maintain consistent typography patterns',
275
- 'Consider readability and hierarchy',
276
- ],
277
- examples: [
278
- {
279
- name: 'Metric Text',
280
- description: 'Metric Text example',
281
- source: path.resolve(__dirname, './examples/ai/metric-text.tsx'),
257
+ {
258
+ name: 'MetricText',
259
+ description: 'A primitive Text component for typography with compiled styling support.',
260
+ status: 'general-availability',
261
+ import: {
262
+ name: 'MetricText',
263
+ package: '@atlaskit/primitives/compiled',
264
+ type: 'named',
265
+ packagePath: path.resolve(__dirname),
266
+ packageJson: require('./package.json'),
282
267
  },
283
- ],
284
- keywords: ['text', 'typography', 'font', 'primitive', 'compiled'],
285
- categories: ['primitive'],
286
- },
287
- {
288
- name: 'Pressable',
289
- description:
290
- 'A primitive Pressable component for handling touch and click interactions with compiled styling support.',
291
- status: 'general-availability',
292
- import: {
293
- name: 'Pressable',
294
- package: '@atlaskit/primitives/compiled',
295
- type: 'named',
296
- packagePath: path.resolve(__dirname),
297
- packageJson: require('./package.json'),
268
+ usageGuidelines: [
269
+ 'Use for text content with consistent typography',
270
+ 'Leverage compiled styling for performance',
271
+ 'Use appropriate font size and weight props',
272
+ 'Consider semantic HTML elements',
273
+ ],
274
+ contentGuidelines: [
275
+ 'Use for appropriate text content',
276
+ 'Maintain consistent typography patterns',
277
+ 'Consider readability and hierarchy',
278
+ ],
279
+ examples: [
280
+ {
281
+ name: 'Metric Text',
282
+ description: 'Metric Text example',
283
+ source: path.resolve(__dirname, './examples/ai/metric-text.tsx'),
284
+ },
285
+ ],
286
+ keywords: ['text', 'typography', 'font', 'primitive', 'compiled'],
287
+ categories: ['primitive'],
298
288
  },
299
- usageGuidelines: [
300
- 'Use for interactive elements that need press feedback',
301
- 'Leverage compiled styling for performance',
302
- 'Use appropriate press states and feedback',
303
- 'Consider touch target accessibility',
304
- ],
305
- contentGuidelines: [
306
- 'Use for appropriate interactive content',
307
- 'Maintain consistent press patterns',
308
- 'Consider user interaction expectations',
309
- ],
310
- accessibilityGuidelines: [
311
- 'Provide clear visual feedback for press states',
312
- 'Ensure appropriate touch target sizes',
313
- 'Use appropriate ARIA attributes for interactive elements',
314
- 'Provide keyboard navigation support',
315
- ],
316
- examples: [
317
- {
289
+ {
290
+ name: 'Pressable',
291
+ description:
292
+ 'A primitive Pressable component for handling touch and click interactions with compiled styling support.',
293
+ status: 'general-availability',
294
+ import: {
318
295
  name: 'Pressable',
319
- description: 'Pressable example',
320
- source: path.resolve(__dirname, './examples/ai/pressable.tsx'),
296
+ package: '@atlaskit/primitives/compiled',
297
+ type: 'named',
298
+ packagePath: path.resolve(__dirname),
299
+ packageJson: require('./package.json'),
321
300
  },
322
- ],
323
- keywords: ['pressable', 'interaction', 'touch', 'click', 'primitive', 'compiled'],
324
- categories: ['primitive'],
325
- },
326
- {
327
- name: 'Stack',
328
- description:
329
- 'A primitive Stack component for vertical and horizontal layout with consistent spacing.',
330
- status: 'general-availability',
331
- import: {
332
- name: 'Stack',
333
- package: '@atlaskit/primitives/compiled',
334
- type: 'named',
335
- packagePath: path.resolve(__dirname),
336
- packageJson: require('./package.json'),
301
+ usageGuidelines: [
302
+ 'Use for interactive elements that need press feedback',
303
+ 'Leverage compiled styling for performance',
304
+ 'Use appropriate press states and feedback',
305
+ 'Consider touch target accessibility',
306
+ ],
307
+ contentGuidelines: [
308
+ 'Use for appropriate interactive content',
309
+ 'Maintain consistent press patterns',
310
+ 'Consider user interaction expectations',
311
+ ],
312
+ accessibilityGuidelines: [
313
+ 'Provide clear visual feedback for press states',
314
+ 'Ensure appropriate touch target sizes',
315
+ 'Use appropriate ARIA attributes for interactive elements',
316
+ 'Provide keyboard navigation support',
317
+ ],
318
+ examples: [
319
+ {
320
+ name: 'Pressable',
321
+ description: 'Pressable example',
322
+ source: path.resolve(__dirname, './examples/ai/pressable.tsx'),
323
+ },
324
+ ],
325
+ keywords: ['pressable', 'interaction', 'touch', 'click', 'primitive', 'compiled'],
326
+ categories: ['primitive'],
337
327
  },
338
- usageGuidelines: [
339
- 'Use for consistent vertical or horizontal layouts',
340
- 'Leverage compiled styling for performance',
341
- 'Use appropriate spacing and alignment props',
342
- 'Consider responsive behavior',
343
- ],
344
- contentGuidelines: [
345
- 'Use for appropriate layout grouping',
346
- 'Maintain consistent spacing patterns',
347
- 'Consider content hierarchy and flow',
348
- ],
349
- examples: [
350
- {
328
+ {
329
+ name: 'Stack',
330
+ description:
331
+ 'A primitive Stack component for vertical and horizontal layout with consistent spacing.',
332
+ status: 'general-availability',
333
+ import: {
351
334
  name: 'Stack',
352
- description: 'Stack example',
353
- source: path.resolve(__dirname, './examples/ai/stack.tsx'),
335
+ package: '@atlaskit/primitives/compiled',
336
+ type: 'named',
337
+ packagePath: path.resolve(__dirname),
338
+ packageJson: require('./package.json'),
354
339
  },
355
- ],
356
- keywords: ['stack', 'layout', 'vertical', 'horizontal', 'spacing', 'primitive', 'compiled'],
357
- categories: ['primitive'],
358
- },
359
- {
360
- name: 'Text',
361
- description: 'A primitive Text component for typography with compiled styling support.',
362
- status: 'general-availability',
363
- import: {
364
- name: 'Text',
365
- package: '@atlaskit/primitives/compiled',
366
- type: 'named',
367
- packagePath: path.resolve(__dirname),
368
- packageJson: require('./package.json'),
340
+ usageGuidelines: [
341
+ 'Use for consistent vertical or horizontal layouts',
342
+ 'Leverage compiled styling for performance',
343
+ 'Use appropriate spacing and alignment props',
344
+ 'Consider responsive behavior',
345
+ ],
346
+ contentGuidelines: [
347
+ 'Use for appropriate layout grouping',
348
+ 'Maintain consistent spacing patterns',
349
+ 'Consider content hierarchy and flow',
350
+ ],
351
+ examples: [
352
+ {
353
+ name: 'Stack',
354
+ description: 'Stack example',
355
+ source: path.resolve(__dirname, './examples/ai/stack.tsx'),
356
+ },
357
+ ],
358
+ keywords: ['stack', 'layout', 'vertical', 'horizontal', 'spacing', 'primitive', 'compiled'],
359
+ categories: ['primitive'],
369
360
  },
370
- usageGuidelines: [
371
- 'Use for text content with consistent typography',
372
- 'Leverage compiled styling for performance',
373
- 'Use appropriate font size and weight props',
374
- 'Consider semantic HTML elements',
375
- ],
376
- contentGuidelines: [
377
- 'Use for appropriate text content',
378
- 'Maintain consistent typography patterns',
379
- 'Consider readability and hierarchy',
380
- ],
381
- examples: [
382
- {
361
+ {
362
+ name: 'Text',
363
+ description: 'A primitive Text component for typography with compiled styling support.',
364
+ status: 'general-availability',
365
+ import: {
383
366
  name: 'Text',
384
- description: 'Text example',
385
- source: path.resolve(__dirname, './examples/ai/text.tsx'),
367
+ package: '@atlaskit/primitives/compiled',
368
+ type: 'named',
369
+ packagePath: path.resolve(__dirname),
370
+ packageJson: require('./package.json'),
386
371
  },
387
- ],
388
- keywords: ['text', 'typography', 'font', 'primitive', 'compiled'],
389
- categories: ['primitive'],
390
- },
391
- ];
372
+ usageGuidelines: [
373
+ 'Use for text content with consistent typography',
374
+ 'Leverage compiled styling for performance',
375
+ 'Use appropriate font size and weight props',
376
+ 'Consider semantic HTML elements',
377
+ ],
378
+ contentGuidelines: [
379
+ 'Use for appropriate text content',
380
+ 'Maintain consistent typography patterns',
381
+ 'Consider readability and hierarchy',
382
+ ],
383
+ examples: [
384
+ {
385
+ name: 'Text',
386
+ description: 'Text example',
387
+ source: path.resolve(__dirname, './examples/ai/text.tsx'),
388
+ },
389
+ ],
390
+ keywords: ['text', 'typography', 'font', 'primitive', 'compiled'],
391
+ categories: ['primitive'],
392
+ },
393
+ ],
394
+ };
392
395
 
393
396
  export default documentation;