@atlaskit/primitives 0.4.0 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8e03331eb8b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8e03331eb8b) - Introduce 'as' prop to Inline and Stack so the resulting element can be controlled.
8
+
3
9
  ## 0.4.0
4
10
 
5
11
  ### Minor Changes
@@ -14,16 +14,15 @@ var _excluded = ["as", "children", "color", "backgroundColor", "shadow", "border
14
14
  _excluded2 = ["style", "className"];
15
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
- // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
18
- // Remove links that the component does not have (such as usage). If there are no links remove them all.
19
17
  /**
20
18
  * __Box__
21
19
  *
22
- * A box {description}.
20
+ * A Box is a primitive component that has the design decisions of the Atlassian Design System baked in.
21
+ * Renders a `div` by default.
23
22
  *
24
- * - [Examples](https://atlassian.design/components/{packageName}/examples)
25
- * - [Code](https://atlassian.design/components/{packageName}/code)
26
- * - [Usage](https://atlassian.design/components/{packageName}/usage)
23
+ * - [Examples](https://atlassian.design/components/primitives/box/examples)
24
+ * - [Code](https://atlassian.design/components/primitives/box/code)
25
+ * - [Usage](https://atlassian.design/components/primitives/box/usage)
27
26
  */
28
27
  var Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
29
28
  var as = _ref.as,
@@ -184,7 +184,8 @@ var Separator = function Separator(_ref) {
184
184
  *
185
185
  */
186
186
  var Inline = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
187
- var alignInline = _ref2.alignInline,
187
+ var as = _ref2.as,
188
+ alignInline = _ref2.alignInline,
188
189
  alignItems = _ref2.alignBlock,
189
190
  _ref2$shouldWrap = _ref2.shouldWrap,
190
191
  shouldWrap = _ref2$shouldWrap === void 0 ? false : _ref2$shouldWrap,
@@ -195,6 +196,7 @@ var Inline = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(
195
196
  separator = _ref2.separator,
196
197
  testId = _ref2.testId,
197
198
  rawChildren = _ref2.children;
199
+ var Component = as || 'div';
198
200
  var separatorComponent = typeof separator === 'string' ? (0, _react2.jsx)(Separator, null, separator) : separator;
199
201
  var children = separatorComponent ? _react.Children.toArray(rawChildren).filter(Boolean).map(function (child, index) {
200
202
  return (0, _react2.jsx)(_react.Fragment, {
@@ -202,7 +204,7 @@ var Inline = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(
202
204
  }, separator && index > 0 ? separatorComponent : null, child);
203
205
  }) : rawChildren;
204
206
  var justifyContent = spread || alignInline;
205
- return (0, _react2.jsx)("div", {
207
+ return (0, _react2.jsx)(Component, {
206
208
  css: [baseStyles, space && spaceMap[space], justifyContent && justifyContentMap[justifyContent], grow && flexGrowMap[grow], alignItems && alignItemsMap[alignItems], shouldWrap && flexWrapStyles, rowSpace && rowSpaceMap[rowSpace]],
207
209
  "data-testid": testId,
208
210
  ref: ref
@@ -120,15 +120,17 @@ var baseStyles = (0, _react2.css)({
120
120
  *
121
121
  */
122
122
  var Stack = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
123
- var alignItems = _ref.alignInline,
123
+ var as = _ref.as,
124
+ alignItems = _ref.alignInline,
124
125
  alignBlock = _ref.alignBlock,
125
126
  spread = _ref.spread,
126
127
  grow = _ref.grow,
127
128
  space = _ref.space,
128
129
  children = _ref.children,
129
130
  testId = _ref.testId;
131
+ var Component = as || 'div';
130
132
  var justifyContent = spread || alignBlock;
131
- return (0, _react2.jsx)("div", {
133
+ return (0, _react2.jsx)(Component, {
132
134
  css: [baseStyles, space && spaceMap[space], alignItems && alignItemsMap[alignItems], grow && flexGrowMap[grow], justifyContent && justifyContentMap[justifyContent]],
133
135
  "data-testid": testId,
134
136
  ref: ref
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,16 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef } from 'react';
3
3
  import { BaseBox } from './internal/base-box.partial';
4
- // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
5
- // Remove links that the component does not have (such as usage). If there are no links remove them all.
6
4
  /**
7
5
  * __Box__
8
6
  *
9
- * A box {description}.
7
+ * A Box is a primitive component that has the design decisions of the Atlassian Design System baked in.
8
+ * Renders a `div` by default.
10
9
  *
11
- * - [Examples](https://atlassian.design/components/{packageName}/examples)
12
- * - [Code](https://atlassian.design/components/{packageName}/code)
13
- * - [Usage](https://atlassian.design/components/{packageName}/usage)
10
+ * - [Examples](https://atlassian.design/components/primitives/box/examples)
11
+ * - [Code](https://atlassian.design/components/primitives/box/code)
12
+ * - [Usage](https://atlassian.design/components/primitives/box/usage)
14
13
  */
15
14
  const Box = /*#__PURE__*/forwardRef(({
16
15
  as,
@@ -176,6 +176,7 @@ const Separator = ({
176
176
  *
177
177
  */
178
178
  const Inline = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
179
+ as,
179
180
  alignInline,
180
181
  alignBlock: alignItems,
181
182
  shouldWrap = false,
@@ -187,6 +188,7 @@ const Inline = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
187
188
  testId,
188
189
  children: rawChildren
189
190
  }, ref) => {
191
+ const Component = as || 'div';
190
192
  const separatorComponent = typeof separator === 'string' ? jsx(Separator, null, separator) : separator;
191
193
  const children = separatorComponent ? Children.toArray(rawChildren).filter(Boolean).map((child, index) => {
192
194
  return jsx(Fragment, {
@@ -194,7 +196,7 @@ const Inline = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
194
196
  }, separator && index > 0 ? separatorComponent : null, child);
195
197
  }) : rawChildren;
196
198
  const justifyContent = spread || alignInline;
197
- return jsx("div", {
199
+ return jsx(Component, {
198
200
  css: [baseStyles, space && spaceMap[space], justifyContent && justifyContentMap[justifyContent], grow && flexGrowMap[grow], alignItems && alignItemsMap[alignItems], shouldWrap && flexWrapStyles, rowSpace && rowSpaceMap[rowSpace]],
199
201
  "data-testid": testId,
200
202
  ref: ref
@@ -113,6 +113,7 @@ const baseStyles = css({
113
113
  *
114
114
  */
115
115
  const Stack = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
116
+ as,
116
117
  alignInline: alignItems,
117
118
  alignBlock,
118
119
  spread,
@@ -121,8 +122,9 @@ const Stack = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
121
122
  children,
122
123
  testId
123
124
  }, ref) => {
125
+ const Component = as || 'div';
124
126
  const justifyContent = spread || alignBlock;
125
- return jsx("div", {
127
+ return jsx(Component, {
126
128
  css: [baseStyles, space && spaceMap[space], alignItems && alignItemsMap[alignItems], grow && flexGrowMap[grow], justifyContent && justifyContentMap[justifyContent]],
127
129
  "data-testid": testId,
128
130
  ref: ref
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -4,16 +4,15 @@ var _excluded = ["as", "children", "color", "backgroundColor", "shadow", "border
4
4
  _excluded2 = ["style", "className"];
5
5
  import React, { forwardRef } from 'react';
6
6
  import { BaseBox } from './internal/base-box.partial';
7
- // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
8
- // Remove links that the component does not have (such as usage). If there are no links remove them all.
9
7
  /**
10
8
  * __Box__
11
9
  *
12
- * A box {description}.
10
+ * A Box is a primitive component that has the design decisions of the Atlassian Design System baked in.
11
+ * Renders a `div` by default.
13
12
  *
14
- * - [Examples](https://atlassian.design/components/{packageName}/examples)
15
- * - [Code](https://atlassian.design/components/{packageName}/code)
16
- * - [Usage](https://atlassian.design/components/{packageName}/usage)
13
+ * - [Examples](https://atlassian.design/components/primitives/box/examples)
14
+ * - [Code](https://atlassian.design/components/primitives/box/code)
15
+ * - [Usage](https://atlassian.design/components/primitives/box/usage)
17
16
  */
18
17
  var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
19
18
  var as = _ref.as,
@@ -177,7 +177,8 @@ var Separator = function Separator(_ref) {
177
177
  *
178
178
  */
179
179
  var Inline = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2, ref) {
180
- var alignInline = _ref2.alignInline,
180
+ var as = _ref2.as,
181
+ alignInline = _ref2.alignInline,
181
182
  alignItems = _ref2.alignBlock,
182
183
  _ref2$shouldWrap = _ref2.shouldWrap,
183
184
  shouldWrap = _ref2$shouldWrap === void 0 ? false : _ref2$shouldWrap,
@@ -188,6 +189,7 @@ var Inline = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2, ref) {
188
189
  separator = _ref2.separator,
189
190
  testId = _ref2.testId,
190
191
  rawChildren = _ref2.children;
192
+ var Component = as || 'div';
191
193
  var separatorComponent = typeof separator === 'string' ? jsx(Separator, null, separator) : separator;
192
194
  var children = separatorComponent ? Children.toArray(rawChildren).filter(Boolean).map(function (child, index) {
193
195
  return jsx(Fragment, {
@@ -195,7 +197,7 @@ var Inline = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2, ref) {
195
197
  }, separator && index > 0 ? separatorComponent : null, child);
196
198
  }) : rawChildren;
197
199
  var justifyContent = spread || alignInline;
198
- return jsx("div", {
200
+ return jsx(Component, {
199
201
  css: [baseStyles, space && spaceMap[space], justifyContent && justifyContentMap[justifyContent], grow && flexGrowMap[grow], alignItems && alignItemsMap[alignItems], shouldWrap && flexWrapStyles, rowSpace && rowSpaceMap[rowSpace]],
200
202
  "data-testid": testId,
201
203
  ref: ref
@@ -113,15 +113,17 @@ var baseStyles = css({
113
113
  *
114
114
  */
115
115
  var Stack = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
116
- var alignItems = _ref.alignInline,
116
+ var as = _ref.as,
117
+ alignItems = _ref.alignInline,
117
118
  alignBlock = _ref.alignBlock,
118
119
  spread = _ref.spread,
119
120
  grow = _ref.grow,
120
121
  space = _ref.space,
121
122
  children = _ref.children,
122
123
  testId = _ref.testId;
124
+ var Component = as || 'div';
123
125
  var justifyContent = spread || alignBlock;
124
- return jsx("div", {
126
+ return jsx(Component, {
125
127
  css: [baseStyles, space && spaceMap[space], alignItems && alignItemsMap[alignItems], grow && flexGrowMap[grow], justifyContent && justifyContentMap[justifyContent]],
126
128
  "data-testid": testId,
127
129
  ref: ref
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -7,11 +7,12 @@ declare type BoxComponent<T extends ElementType = 'div'> = (<T extends ElementTy
7
7
  /**
8
8
  * __Box__
9
9
  *
10
- * A box {description}.
10
+ * A Box is a primitive component that has the design decisions of the Atlassian Design System baked in.
11
+ * Renders a `div` by default.
11
12
  *
12
- * - [Examples](https://atlassian.design/components/{packageName}/examples)
13
- * - [Code](https://atlassian.design/components/{packageName}/code)
14
- * - [Usage](https://atlassian.design/components/{packageName}/usage)
13
+ * - [Examples](https://atlassian.design/components/primitives/box/examples)
14
+ * - [Code](https://atlassian.design/components/primitives/box/code)
15
+ * - [Usage](https://atlassian.design/components/primitives/box/usage)
15
16
  */
16
17
  declare const Box: BoxComponent;
17
18
  export default Box;
@@ -1,6 +1,10 @@
1
1
  /** @jsx jsx */
2
- import { ReactNode } from 'react';
3
- export interface InlineProps {
2
+ import { ComponentPropsWithRef, ElementType, ReactNode } from 'react';
3
+ export interface InlineProps<T extends ElementType = 'div'> {
4
+ /**
5
+ * The DOM element to render as the Inline. Defaults to `div`.
6
+ */
7
+ as?: 'div' | 'span' | 'ul' | 'ol';
4
8
  /**
5
9
  * Used to align children along the main axis.
6
10
  */
@@ -42,6 +46,7 @@ export interface InlineProps {
42
46
  * Elements to be rendered inside the Stack.
43
47
  */
44
48
  children: ReactNode;
49
+ ref?: ComponentPropsWithRef<T>['ref'];
45
50
  }
46
51
  export declare type AlignInline = 'start' | 'center' | 'end';
47
52
  export declare type AlignBlock = 'start' | 'center' | 'end' | 'baseline';
@@ -104,5 +109,5 @@ export declare type RowSpace = keyof typeof rowSpaceMap;
104
109
  * ```
105
110
  *
106
111
  */
107
- declare const Inline: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<InlineProps & import("react").RefAttributes<HTMLDivElement>>>;
112
+ declare const Inline: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Pick<InlineProps<ElementType<any>>, "space" | "separator" | "as" | "children" | "testId" | "alignInline" | "alignBlock" | "shouldWrap" | "spread" | "grow" | "rowSpace"> & import("react").RefAttributes<any>>>;
108
113
  export default Inline;
@@ -8,7 +8,7 @@ declare type BaseBoxPropsFoundation<T extends ElementType> = {
8
8
  /**
9
9
  * The DOM element to render as the Box. Defaults to `div`.
10
10
  */
11
- as?: 'div' | 'span';
11
+ as?: 'div' | 'span' | 'li';
12
12
  /**
13
13
  * The HTML className attribute.
14
14
  *
@@ -1,6 +1,10 @@
1
1
  /** @jsx jsx */
2
- import { ReactNode } from 'react';
3
- export interface StackProps {
2
+ import { ComponentPropsWithRef, ElementType, ReactNode } from 'react';
3
+ export interface StackProps<T extends ElementType = 'div'> {
4
+ /**
5
+ * The DOM element to render as the Stack. Defaults to `div`.
6
+ */
7
+ as?: 'div' | 'span' | 'ul' | 'ol';
4
8
  /**
5
9
  * Used to align children along the main axis.
6
10
  */
@@ -29,6 +33,7 @@ export interface StackProps {
29
33
  * Elements to be rendered inside the Stack.
30
34
  */
31
35
  children: ReactNode;
36
+ ref?: ComponentPropsWithRef<T>['ref'];
32
37
  }
33
38
  export declare type AlignInline = 'start' | 'center' | 'end';
34
39
  export declare type AlignBlock = 'start' | 'center' | 'end';
@@ -73,5 +78,5 @@ export declare type Space = keyof typeof spaceMap;
73
78
  * ```
74
79
  *
75
80
  */
76
- declare const Stack: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLDivElement>>>;
81
+ declare const Stack: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Pick<StackProps<ElementType<any>>, "space" | "as" | "children" | "testId" | "alignInline" | "alignBlock" | "spread" | "grow"> & import("react").RefAttributes<any>>>;
77
82
  export default Stack;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
package/report.api.md CHANGED
@@ -130,7 +130,7 @@ type BaseBoxProps<T extends ElementType = 'div'> = Omit<
130
130
 
131
131
  // @public (undocumented)
132
132
  type BaseBoxPropsFoundation<T extends ElementType> = {
133
- as?: 'div' | 'span';
133
+ as?: 'div' | 'li' | 'span';
134
134
  className?: string;
135
135
  children?: ReactNode;
136
136
  color?: TextColor;
@@ -356,15 +356,34 @@ const heightMap: {
356
356
 
357
357
  // @public
358
358
  export const Inline: MemoExoticComponent<
359
- ForwardRefExoticComponent<InlineProps & RefAttributes<HTMLDivElement>>
359
+ ForwardRefExoticComponent<
360
+ Pick<
361
+ InlineProps<ElementType<any>>,
362
+ | 'alignBlock'
363
+ | 'alignInline'
364
+ | 'as'
365
+ | 'children'
366
+ | 'grow'
367
+ | 'rowSpace'
368
+ | 'separator'
369
+ | 'shouldWrap'
370
+ | 'space'
371
+ | 'spread'
372
+ | 'testId'
373
+ > &
374
+ RefAttributes<any>
375
+ >
360
376
  >;
361
377
 
362
378
  // @public (undocumented)
363
- export interface InlineProps {
379
+ export interface InlineProps<T extends ElementType = 'div'> {
364
380
  alignBlock?: AlignBlock;
365
381
  alignInline?: AlignInline;
382
+ as?: 'div' | 'ol' | 'span' | 'ul';
366
383
  children: ReactNode;
367
384
  grow?: Grow;
385
+ // (undocumented)
386
+ ref?: ComponentPropsWithRef<T>['ref'];
368
387
  rowSpace?: RowSpace;
369
388
  separator?: string;
370
389
  shouldWrap?: boolean;
@@ -566,15 +585,31 @@ type Spread_2 = 'space-between';
566
585
 
567
586
  // @public
568
587
  export const Stack: MemoExoticComponent<
569
- ForwardRefExoticComponent<StackProps & RefAttributes<HTMLDivElement>>
588
+ ForwardRefExoticComponent<
589
+ Pick<
590
+ StackProps<ElementType<any>>,
591
+ | 'alignBlock'
592
+ | 'alignInline'
593
+ | 'as'
594
+ | 'children'
595
+ | 'grow'
596
+ | 'space'
597
+ | 'spread'
598
+ | 'testId'
599
+ > &
600
+ RefAttributes<any>
601
+ >
570
602
  >;
571
603
 
572
604
  // @public (undocumented)
573
- export interface StackProps {
605
+ export interface StackProps<T extends ElementType = 'div'> {
574
606
  alignBlock?: AlignBlock_2;
575
607
  alignInline?: AlignInline_2;
608
+ as?: 'div' | 'ol' | 'span' | 'ul';
576
609
  children: ReactNode;
577
610
  grow?: Grow_2;
611
+ // (undocumented)
612
+ ref?: ComponentPropsWithRef<T>['ref'];
578
613
  space?: Space_2;
579
614
  spread?: Spread_2;
580
615
  testId?: string;
@@ -114,7 +114,7 @@ type BaseBoxProps<T extends ElementType = 'div'> = Omit<ComponentPropsWithoutRef
114
114
 
115
115
  // @public (undocumented)
116
116
  type BaseBoxPropsFoundation<T extends ElementType> = {
117
- as?: 'div' | 'span';
117
+ as?: 'div' | 'li' | 'span';
118
118
  className?: string;
119
119
  children?: ReactNode;
120
120
  color?: TextColor;
@@ -293,14 +293,17 @@ const heightMap: {
293
293
  };
294
294
 
295
295
  // @public
296
- export const Inline: MemoExoticComponent<ForwardRefExoticComponent<InlineProps & RefAttributes<HTMLDivElement>>>;
296
+ export const Inline: MemoExoticComponent<ForwardRefExoticComponent<Pick<InlineProps<ElementType<any>>, "alignBlock" | "alignInline" | "as" | "children" | "grow" | "rowSpace" | "separator" | "shouldWrap" | "space" | "spread" | "testId"> & RefAttributes<any>>>;
297
297
 
298
298
  // @public (undocumented)
299
- export interface InlineProps {
299
+ export interface InlineProps<T extends ElementType = 'div'> {
300
300
  alignBlock?: AlignBlock;
301
301
  alignInline?: AlignInline;
302
+ as?: 'div' | 'ol' | 'span' | 'ul';
302
303
  children: ReactNode;
303
304
  grow?: Grow;
305
+ // (undocumented)
306
+ ref?: ComponentPropsWithRef<T>['ref'];
304
307
  rowSpace?: RowSpace;
305
308
  separator?: string;
306
309
  shouldWrap?: boolean;
@@ -501,14 +504,17 @@ type Spread = 'space-between';
501
504
  type Spread_2 = 'space-between';
502
505
 
503
506
  // @public
504
- export const Stack: MemoExoticComponent<ForwardRefExoticComponent<StackProps & RefAttributes<HTMLDivElement>>>;
507
+ export const Stack: MemoExoticComponent<ForwardRefExoticComponent<Pick<StackProps<ElementType<any>>, "alignBlock" | "alignInline" | "as" | "children" | "grow" | "space" | "spread" | "testId"> & RefAttributes<any>>>;
505
508
 
506
509
  // @public (undocumented)
507
- export interface StackProps {
510
+ export interface StackProps<T extends ElementType = 'div'> {
508
511
  alignBlock?: AlignBlock_2;
509
512
  alignInline?: AlignInline_2;
513
+ as?: 'div' | 'ol' | 'span' | 'ul';
510
514
  children: ReactNode;
511
515
  grow?: Grow_2;
516
+ // (undocumented)
517
+ ref?: ComponentPropsWithRef<T>['ref'];
512
518
  space?: Space_2;
513
519
  spread?: Spread_2;
514
520
  testId?: string;