@enact/ui 4.6.1 → 4.7.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 (168) hide show
  1. package/AnnounceDecorator/Announce.js +27 -15
  2. package/AnnounceDecorator/AnnounceDecorator.d.ts +64 -0
  3. package/AnnounceDecorator/AnnounceDecorator.js +15 -6
  4. package/AnnounceDecorator/useAnnounce.js +1 -2
  5. package/BodyText/BodyText.d.ts +66 -0
  6. package/BodyText/BodyText.js +14 -6
  7. package/Button/Button.d.ts +125 -0
  8. package/Button/Button.js +18 -10
  9. package/CHANGELOG.md +14 -0
  10. package/Cancelable/Cancelable.d.ts +64 -0
  11. package/Cancelable/Cancelable.js +17 -9
  12. package/Cancelable/tests/Cancelable-specs.js +3 -1
  13. package/Changeable/Changeable.d.ts +54 -0
  14. package/Changeable/Changeable.js +15 -9
  15. package/ComponentOverride/ComponentOverride.d.ts +52 -0
  16. package/ComponentOverride/ComponentOverride.js +18 -5
  17. package/FloatingLayer/FloatingLayer.js +14 -13
  18. package/FloatingLayer/FloatingLayerContainer.js +3 -1
  19. package/FloatingLayer/FloatingLayerDecorator.js +11 -6
  20. package/FloatingLayer/Scrim.js +4 -2
  21. package/FloatingLayer/index.d.ts +100 -0
  22. package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +3 -1
  23. package/FloatingLayer/useFloatingLayer.js +2 -2
  24. package/ForwardRef/ForwardRef.d.ts +22 -0
  25. package/ForwardRef/ForwardRef.js +13 -7
  26. package/GridListImageItem/GridListImageItem.d.ts +85 -0
  27. package/GridListImageItem/GridListImageItem.js +16 -7
  28. package/Group/Group.d.ts +107 -0
  29. package/Group/Group.js +17 -6
  30. package/Group/GroupItem.js +16 -10
  31. package/Heading/Heading.d.ts +89 -0
  32. package/Heading/Heading.js +22 -9
  33. package/Icon/Icon.d.ts +88 -0
  34. package/Icon/Icon.js +15 -6
  35. package/IconButton/IconButton.d.ts +115 -0
  36. package/IconButton/IconButton.js +26 -11
  37. package/Image/Image.d.ts +113 -0
  38. package/Image/Image.js +16 -6
  39. package/ImageItem/ImageItem.d.ts +83 -0
  40. package/ImageItem/ImageItem.js +12 -2
  41. package/ImageItem/tests/ImageItem-specs.js +3 -1
  42. package/Item/Item.d.ts +64 -0
  43. package/Item/Item.js +17 -7
  44. package/LabeledIcon/LabeledIcon.d.ts +130 -0
  45. package/LabeledIcon/LabeledIcon.js +16 -6
  46. package/Layout/Cell.js +30 -5
  47. package/Layout/Layout.d.ts +284 -0
  48. package/Layout/Layout.js +181 -36
  49. package/Layout/Layout.module.css +8 -0
  50. package/Layout/tests/Layout-specs.js +44 -3
  51. package/Marquee/MarqueeBase.js +3 -1
  52. package/Marquee/MarqueeController.js +54 -2
  53. package/Marquee/MarqueeDecorator.js +44 -4
  54. package/Marquee/index.d.ts +258 -0
  55. package/Marquee/tests/Marquee-specs.js +3 -1
  56. package/Measurable/Measurable.d.ts +26 -0
  57. package/Measurable/Measurable.js +16 -10
  58. package/Measurable/tests/Measurable-specs.js +8 -6
  59. package/Media/Media.d.ts +99 -0
  60. package/Media/Media.js +36 -27
  61. package/Placeholder/PlaceholderControllerDecorator.js +13 -10
  62. package/Placeholder/PlaceholderDecorator.js +11 -10
  63. package/Placeholder/index.d.ts +53 -0
  64. package/ProgressBar/ProgressBar.d.ts +92 -0
  65. package/ProgressBar/ProgressBar.js +14 -1
  66. package/README.md +1 -1
  67. package/RadioDecorator/RadioControllerDecorator.js +4 -2
  68. package/RadioDecorator/RadioDecorator.d.ts +35 -0
  69. package/RadioDecorator/RadioDecorator.js +17 -9
  70. package/Repeater/Repeater.d.ts +82 -0
  71. package/Repeater/Repeater.js +16 -10
  72. package/Repeater/tests/Repeater-specs.js +3 -1
  73. package/Resizable/Resizable.d.ts +31 -0
  74. package/Resizable/Resizable.js +16 -10
  75. package/Routable/Link.js +12 -10
  76. package/Routable/Routable.d.ts +148 -0
  77. package/Routable/Routable.js +17 -8
  78. package/Routable/Router.js +14 -12
  79. package/Routable/tests/Routable-specs.js +5 -3
  80. package/Scrollable/ScrollAnimator.js +3 -1
  81. package/Scrollable/ScrollThumb.js +10 -9
  82. package/Scrollable/Scrollable.d.ts +0 -0
  83. package/Scrollable/Scrollable.js +27 -3
  84. package/Scrollable/ScrollableNative.js +16 -2
  85. package/Scrollable/Scrollbar.js +4 -2
  86. package/Scroller/Scroller.d.ts +276 -0
  87. package/Scroller/Scroller.js +10 -1
  88. package/Scroller/ScrollerBasic.js +12 -11
  89. package/Scroller/UiScrollerBase.js +15 -14
  90. package/Skinnable/Skinnable.d.ts +94 -0
  91. package/Skinnable/Skinnable.js +20 -6
  92. package/Skinnable/tests/Skinnable-specs.js +3 -1
  93. package/Skinnable/tests/useSkins-specs.js +3 -1
  94. package/Skinnable/useSkins.js +1 -2
  95. package/Slider/Knob.js +8 -6
  96. package/Slider/PositionDecorator.js +4 -2
  97. package/Slider/Slider.d.ts +202 -0
  98. package/Slider/Slider.js +18 -9
  99. package/SlotItem/SlotItem.d.ts +118 -0
  100. package/SlotItem/SlotItem.js +20 -6
  101. package/Slottable/Slottable.d.ts +22 -0
  102. package/Slottable/Slottable.js +16 -8
  103. package/Slottable/useSlots.js +3 -1
  104. package/Spinner/Spinner.d.ts +95 -0
  105. package/Spinner/Spinner.js +24 -7
  106. package/ToggleIcon/ToggleIcon.d.ts +90 -0
  107. package/ToggleIcon/ToggleIcon.js +21 -7
  108. package/ToggleItem/ToggleItem.d.ts +132 -0
  109. package/ToggleItem/ToggleItem.js +17 -2
  110. package/ToggleItem/tests/ToggleItem-specs.js +3 -1
  111. package/Toggleable/Toggle.js +4 -2
  112. package/Toggleable/Toggleable.d.ts +103 -0
  113. package/Toggleable/Toggleable.js +13 -7
  114. package/Toggleable/useToggle.js +1 -2
  115. package/Touchable/ClickAllow.js +3 -1
  116. package/Touchable/Drag.js +6 -3
  117. package/Touchable/Flick.js +6 -2
  118. package/Touchable/Hold.js +6 -2
  119. package/Touchable/Pinch.js +6 -3
  120. package/Touchable/Touch.js +6 -4
  121. package/Touchable/Touchable.d.ts +217 -0
  122. package/Touchable/Touchable.js +10 -1
  123. package/Touchable/config.js +3 -1
  124. package/Touchable/tests/useTouch-specs.js +3 -1
  125. package/Touchable/useTouch.js +5 -4
  126. package/Transition/Transition.d.ts +194 -0
  127. package/Transition/Transition.js +22 -4
  128. package/Transition/tests/Transition-specs.js +5 -3
  129. package/ViewManager/Arranger.js +6 -1
  130. package/ViewManager/TransitionGroup.js +8 -5
  131. package/ViewManager/View.js +7 -4
  132. package/ViewManager/ViewManager.d.ts +191 -0
  133. package/ViewManager/ViewManager.js +29 -11
  134. package/ViewManager/tests/ViewManager-specs.js +47 -1
  135. package/VirtualList/UiVirtualListBase.js +9 -3
  136. package/VirtualList/VirtualList.d.ts +528 -0
  137. package/VirtualList/VirtualList.js +13 -1
  138. package/VirtualList/VirtualListBasic.js +9 -3
  139. package/VirtualList/tests/VirtualGridList-native-specs.js +3 -1
  140. package/VirtualList/tests/VirtualGridList-specs.js +3 -1
  141. package/VirtualList/tests/VirtualList-native-specs.js +3 -1
  142. package/VirtualList/tests/VirtualList-specs.js +3 -1
  143. package/index.d.ts +0 -0
  144. package/internal/IdProvider/IdProvider.d.ts +0 -0
  145. package/internal/IdProvider/IdProvider.js +8 -7
  146. package/internal/IdProvider/Provider.js +3 -1
  147. package/internal/IdProvider/tests/IdProvider-specs.js +3 -1
  148. package/internal/IdProvider/tests/useId-specs.js +4 -3
  149. package/internal/IdProvider/useId.js +0 -1
  150. package/internal/Pure/Pure.d.ts +0 -0
  151. package/internal/Pure/Pure.js +15 -9
  152. package/internal/Pure/tests/Pure-specs.js +4 -2
  153. package/internal/localized-fonts/localized-fonts.d.ts +53 -0
  154. package/internal/localized-fonts/localized-fonts.js +2 -2
  155. package/internal/selection/selection.d.ts +0 -0
  156. package/internal/validators/validators.d.ts +0 -0
  157. package/package.json +2 -2
  158. package/resolution/ResolutionDecorator.js +40 -9
  159. package/resolution/index.d.ts +187 -0
  160. package/resolution/resolution.js +23 -7
  161. package/useControlledState/tests/useControlledState-specs.js +2 -2
  162. package/useControlledState/useControlledState.d.ts +0 -0
  163. package/useControlledState/useControlledState.js +2 -2
  164. package/useScroll/ScrollAnimator.js +3 -1
  165. package/useScroll/Scrollbar.js +6 -4
  166. package/useScroll/ScrollbarTrack.js +8 -6
  167. package/useScroll/useScroll.d.ts +0 -0
  168. package/useScroll/useScroll.js +80 -52
package/Layout/Cell.js CHANGED
@@ -17,7 +17,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
17
17
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
18
18
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
19
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
22
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
21
23
  var toFlexAlign = function toFlexAlign(align) {
22
24
  return align === 'end' && 'flex-end' || align === 'start' && 'flex-start' || align;
23
25
  };
@@ -75,13 +77,27 @@ var CellBase = (0, _kind["default"])({
75
77
  * @public
76
78
  */
77
79
  componentRef: _propTypes["default"].ref,
80
+ /**
81
+ * Sizes `Cell` to its container.
82
+ *
83
+ * A `grow`able cell will expand to its maximum size, according to the remaining space of the
84
+ * container. This is used when you want to grow the size of this Cell so that it fills the
85
+ * container. See the {@link ui/Layout.CellBase.size|size} property for more details.
86
+ *
87
+ * When combined with {@link ui/Layout.CellBase.shrink|shrink}, `shrink` prop takes precedence over
88
+ * `grow` prop and `grow` prop is simply ignored.
89
+ *
90
+ * @type {Boolean}
91
+ * @public
92
+ */
93
+ grow: _propTypes2["default"].bool,
78
94
  /**
79
95
  * Sizes `Cell` to its contents.
80
96
  *
81
97
  * A `shrink`able cell will contract to its minimum size, according to the dimensions of its
82
98
  * contents. This is used when you want the size of this Cell's content to influence the
83
99
  * dimensions of this cell. `shrink` will not allow the contents of the Layout to be pushed
84
- * beyond its boundaries (overflowing). See the {@link ui/Layout.Cell#size|size} property
100
+ * beyond its boundaries (overflowing). See the {@link ui/Layout.CellBase.size|size} property
85
101
  * for more details.
86
102
  *
87
103
  * @type {Boolean}
@@ -92,13 +108,19 @@ var CellBase = (0, _kind["default"])({
92
108
  /**
93
109
  * Sets the desired size of the Cell using any valid CSS measurement value.
94
110
  *
95
- * When used in conjunction with {@link ui/Layout.Cell#shrink|shrink}, the size will be
111
+ * When used in conjunction with {@link ui/Layout.CellBase.shrink|shrink}, the size will be
96
112
  * the maximum size, shrinking as necessary, to fit the content.
97
113
  *
114
+ * When used in conjunction with {@link ui/Layout.CellBase.grow|grow}, the size will be the
115
+ * minimunm size, growing as necessary, to fit the container.
116
+ *
98
117
  * E.g.
99
118
  * * `size="400px"` -> cell will be 400px, regardless of the dimensions of your content
100
119
  * * `size="400px" shrink` -> cell will be 400px if your content is greater than 400px,
101
120
  * and will match your contents size if it's smaller
121
+ * * `size="400px" grow` -> cell will be 400px if the container has no remaining space.
122
+ * Cell can grow larger than `size` to fill the container if there is remaining space
123
+ * in the container.
102
124
  *
103
125
  * This accepts any valid CSS measurement value string. If a numeric value is used, it will
104
126
  * be treated as a pixel value and converted to a
@@ -120,12 +142,14 @@ var CellBase = (0, _kind["default"])({
120
142
  },
121
143
  computed: {
122
144
  className: function className(_ref) {
123
- var shrink = _ref.shrink,
145
+ var grow = _ref.grow,
146
+ shrink = _ref.shrink,
124
147
  size = _ref.size,
125
148
  styler = _ref.styler;
126
149
  return styler.append({
127
150
  shrink: shrink,
128
- grow: !shrink && !size
151
+ grow: !shrink && (grow || !size),
152
+ size: size
129
153
  });
130
154
  },
131
155
  style: function style(_ref2) {
@@ -155,6 +179,7 @@ var CellBase = (0, _kind["default"])({
155
179
  componentRef = _ref3.componentRef,
156
180
  rest = _objectWithoutProperties(_ref3, _excluded);
157
181
  delete rest.align;
182
+ delete rest.grow;
158
183
  delete rest.shrink;
159
184
  delete rest.size;
160
185
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, _objectSpread({
@@ -0,0 +1,284 @@
1
+ // Type definitions for ui/Layout
2
+
3
+ import * as React from "react";
4
+ import { ForwardRefProps as ui_ForwardRef_ForwardRefProps } from "@enact/ui/ForwardRef";
5
+
6
+ type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
7
+ type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
8
+
9
+ export interface CellBaseProps {
10
+ /**
11
+ * The alignment of `Cell` .
12
+ *
13
+ * Aligns this `Cell` vertically in the case of a horizontal layout or
14
+ horizontally in the case of a vertical layout. `"start"` , `"center"` and
15
+ `"end"` are the most commonly used, although all values of `align-self` are supported.
16
+ `"start"` refers to the top in a horizontal layout, and left in a vertical LTR layout
17
+ `"end"` refers to the bottom in a horizontal layout, and right in a vertical LTR layout
18
+ `"start"` and `"end"` reverse places when in a vertical layout in a RTL locale.
19
+ */
20
+ align?: string;
21
+ /**
22
+ * Any valid that should be positioned in this `Cell` .
23
+ */
24
+ children?: Any;
25
+ /**
26
+ * The type of component to use to render as the `Cell` . May be a DOM node name (e.g 'div',
27
+ 'span', etc.) or a custom component.
28
+ */
29
+ component?: string | React.ComponentType;
30
+ /**
31
+ * Called with a reference to the root component.
32
+ *
33
+ * When using , the `ref` prop is forwarded to this component
34
+ as `componentRef` .
35
+ */
36
+ componentRef?: object | Function;
37
+ /**
38
+ * Sizes `Cell` to its container.
39
+ *
40
+ * A `grow` able cell will expand to its maximum size, according to the remaining space of the
41
+ container. This is used when you want to grow the size of this Cell so that it fills the
42
+ container. See the property for more details.
43
+ *
44
+ * When combined with , `shrink` prop takes precedence over
45
+ `grow` prop and `grow` prop is simply ignored.
46
+ */
47
+ grow?: boolean;
48
+ /**
49
+ * Sizes `Cell` to its contents.
50
+ *
51
+ * A `shrink` able cell will contract to its minimum size, according to the dimensions of its
52
+ contents. This is used when you want the size of this Cell's content to influence the
53
+ dimensions of this cell. `shrink` will not allow the contents of the Layout to be pushed
54
+ beyond its boundaries (overflowing). See the property
55
+ for more details.
56
+ */
57
+ shrink?: boolean;
58
+ /**
59
+ * Sets the desired size of the Cell using any valid CSS measurement value.
60
+ *
61
+ * When used in conjunction with , the size will be
62
+ the maximum size, shrinking as necessary, to fit the content.
63
+ *
64
+ * When used in conjunction with , the size will be the
65
+ minimunm size, growing as necessary, to fit the container.
66
+ *
67
+ * E.g.
68
+ * * `size="400px"` -> cell will be 400px, regardless of the dimensions of your content
69
+ * * `size="400px" shrink` -> cell will be 400px if your content is greater than 400px,
70
+ and will match your contents size if it's smaller
71
+ * * `size="400px" grow` -> cell will be 400px if the container has no remaining space.
72
+ Cell can grow larger than `size` to fill the container if there is remaining space
73
+ in the container.
74
+ *
75
+ * This accepts any valid CSS measurement value string. If a numeric value is used, it will
76
+ be treated as a pixel value and converted to a
77
+ based on the rules of
78
+ .
79
+ */
80
+ size?: string | number;
81
+ }
82
+ /**
83
+ * A stateless component that provides a space for your content in a
84
+ , without applied.
85
+ */
86
+
87
+ export class CellBase extends React.Component<
88
+ Merge<React.HTMLProps<HTMLElement>, CellBaseProps>
89
+ > {}
90
+
91
+ export interface LayoutBaseProps {
92
+ /**
93
+ * The alignment of children.
94
+ *
95
+ * Aligns the children vertically in the case of a horizontal
96
+ layout or horizontally in the case of a vertical layout. `"start"` , `"center"` and
97
+ `"end"` are the most commonly used, although all values of `align-items` are supported.
98
+ `"start"` refers to the top in a horizontal layout, and left in a vertical LTR layout
99
+ `"end"` refers to the bottom in a horizontal layout, and right in a vertical LTR layout
100
+ `"start"` and `"end"` reverse places when in a vertical layout in a RTL locale.
101
+ This includes support shorthand for combining `align-items` and `justify-content` into
102
+ a single property, separated by a space, in that order. This allows you to specify both
103
+ the horizontal and vertical alignment in one property, separated by a space.
104
+ *
105
+ * For example, `align="center space-between"` means `align-items: center` and
106
+ `justify-content: space-between` for each. `justify-content` property can be used to
107
+ align the Cells on the main axis and adjust gaps among the Cells. To declare the
108
+ `justify-content` property only, just add a heading space for `align` prop string like
109
+ `align=" space-between"` . The default value for `align-items` is `stretch` . It can be
110
+ also used for `align` prop like `align="stretch space-between"` . All values of
111
+ `justify-content` are supported, like `start` , `end` , `center` , `space-between` ,
112
+ `space-around` , and `space-evenly` .
113
+ * ```
114
+ <Layout align="center space-around">
115
+ <Cell>Left Column</Cell>
116
+ <Cell>Right Column</Cell>
117
+ </Layout>
118
+ ```
119
+ ```
120
+ <Layout align=" space-between">
121
+ <Cell>Left Column</Cell>
122
+ <Cell>Right Column</Cell>
123
+ </Layout>
124
+ ```
125
+ */
126
+ align?: string;
127
+ /**
128
+ * Only components are supported as children.
129
+ */
130
+ children?: Cell | Cell[];
131
+ /**
132
+ * The type of component to use to render as the `Layout` . May be a DOM node name (e.g 'div',
133
+ 'span', etc.) or a custom component.
134
+ */
135
+ component?: string | React.ComponentType;
136
+ /**
137
+ * Called with a reference to the root component.
138
+ *
139
+ * When using , the `ref` prop is forwarded to this component
140
+ as `componentRef` .
141
+ */
142
+ componentRef?: object | Function;
143
+ /**
144
+ * Allows this `Layout` to have following siblings drawn on the same line as itself
145
+ instead of carving out the entire horizontal space for itself.
146
+ */
147
+ inline?: boolean;
148
+ /**
149
+ * The orientation of the `Layout` , i.e. how the children are
150
+ positioned on the screen. Must be either `'horizontal'` or `'vertical'` .
151
+ */
152
+ orientation?: string;
153
+ /**
154
+ * Sets the Layout's `flex-wrap` values.
155
+ *
156
+ * Determines how a Layout handles its cells if there are more than fit in the available
157
+ space. This works like a normal `Boolean` prop, but also accepts strings for customization
158
+ beyond the basic on/off support. In addition to `true` and `false` , the following strings
159
+ are supported: 'wrap', 'nowrap', 'reverse'. 'reverse' performs standard line wrapping but
160
+ additional lines are placed above/before the preceding line instead of below/after.
161
+ */
162
+ wrap?: boolean | string;
163
+ }
164
+ /**
165
+ * A container for `Cell` s.
166
+ *
167
+ * A stateless component that acts as a containing area for to be
168
+ positioned in a row or a column (horizontally or vertically, respectively. It supports an
169
+ property for laying-out its contents
170
+ ( `Cells` ) in an organized, readable way.
171
+ *
172
+ * Example:
173
+ * ```
174
+ import Input from '@enact/moonstone/Input';
175
+ import css from './LayoutExample.less';
176
+ ...
177
+ <fieldset>
178
+ <Layout align="center">
179
+ <Cell component="label" size="40%" className={css.label} shrink>First Name</Cell>
180
+ <Cell component={Input} placeholder="First" className={css.input} />
181
+ </Layout>
182
+ <Layout align="center">
183
+ <Cell component="label" size="40%" className={css.label} shrink>Last Name</Cell>
184
+ <Cell component={Input} placeholder="Last" className={css.input} />
185
+ </Layout>
186
+ </fieldset>
187
+ ```
188
+ */
189
+
190
+ export class LayoutBase extends React.Component<
191
+ Merge<React.HTMLProps<HTMLElement>, LayoutBaseProps>
192
+ > {}
193
+
194
+ export interface CellDecoratorProps extends ui_ForwardRef_ForwardRefProps {}
195
+ export function CellDecorator<P>(
196
+ Component: React.ComponentType<P> | string
197
+ ): React.ComponentType<P & CellDecoratorProps>;
198
+
199
+ export interface CellProps
200
+ extends Omit<Merge<CellBaseProps, CellDecoratorProps>, "componentRef"> {}
201
+ /**
202
+ * A stateless component that provides a space for your content in a
203
+ .
204
+ */
205
+
206
+ export class Cell extends React.Component<
207
+ Merge<React.HTMLProps<HTMLElement>, CellProps>
208
+ > {}
209
+
210
+ export interface LayoutDecoratorProps extends ui_ForwardRef_ForwardRefProps {}
211
+ export function LayoutDecorator<P>(
212
+ Component: React.ComponentType<P> | string
213
+ ): React.ComponentType<P & LayoutDecoratorProps>;
214
+
215
+ export interface LayoutProps
216
+ extends Omit<
217
+ Merge<LayoutBaseProps, ui_ForwardRef_ForwardRefProps>,
218
+ "componentRef"
219
+ > {}
220
+ /**
221
+ * A container for `Cell` s.
222
+ *
223
+ * A stateless component that acts as a containing area for to be
224
+ positioned in a row or a column (horizontally or vertically, respectively. It supports an
225
+ property for laying-out its contents
226
+ ( `Cells` ) in an organized, readable way.
227
+ *
228
+ * Example:
229
+ * ```
230
+ import Input from '@enact/moonstone/Input';
231
+ import css from './LayoutExample.less';
232
+ ...
233
+ <fieldset>
234
+ <Layout align="center">
235
+ <Cell component="label" size="40%" className={css.label} shrink>First Name</Cell>
236
+ <Cell component={Input} placeholder="First" className={css.input} />
237
+ </Layout>
238
+ <Layout align="center">
239
+ <Cell component="label" size="40%" className={css.label} shrink>Last Name</Cell>
240
+ <Cell component={Input} placeholder="Last" className={css.input} />
241
+ </Layout>
242
+ </fieldset>
243
+ ```
244
+ */
245
+
246
+ export class Layout extends React.Component<
247
+ Merge<React.HTMLProps<HTMLElement>, LayoutProps>
248
+ > {}
249
+
250
+ export interface ColumnProps
251
+ extends Merge<LayoutProps, ui_ForwardRef_ForwardRefProps> {}
252
+ /**
253
+ * Shorthand for `<Layout orientation="vertical">` , which positions its
254
+ vertically.
255
+ * ```
256
+ ┌────┐
257
+ ├────┤
258
+ ├────┤
259
+ ├────┤
260
+ └────┘
261
+ ```
262
+ */
263
+
264
+ export class Column extends React.Component<
265
+ Merge<React.HTMLProps<HTMLElement>, ColumnProps>
266
+ > {}
267
+
268
+ export interface RowProps
269
+ extends Merge<LayoutProps, ui_ForwardRef_ForwardRefProps> {}
270
+ /**
271
+ * Shorthand for `<Layout orientation="horizontal">` , which positions its
272
+ horizontally.
273
+ * ```
274
+ ┌─┬─┬─┬─┐
275
+ │ │ │ │ │
276
+ └─┴─┴─┴─┘
277
+ ```
278
+ */
279
+
280
+ export class Row extends React.Component<
281
+ Merge<React.HTMLProps<HTMLElement>, RowProps>
282
+ > {}
283
+
284
+ export default Layout;