@enact/ui 4.7.8 → 4.7.10

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 (145) hide show
  1. package/AnnounceDecorator/Announce.js +6 -8
  2. package/AnnounceDecorator/AnnounceDecorator.js +6 -8
  3. package/AnnounceDecorator/useAnnounce.js +1 -2
  4. package/BodyText/BodyText.js +8 -12
  5. package/BodyText/tests/BodyText-specs.js +2 -2
  6. package/Button/Button.js +22 -26
  7. package/CHANGELOG.md +20 -0
  8. package/Cancelable/Cancelable.js +18 -20
  9. package/Cancelable/cancelHandler.js +4 -7
  10. package/Cancelable/modalHandler.js +3 -5
  11. package/Cancelable/tests/Cancelable-specs.js +4 -4
  12. package/Changeable/Changeable.js +18 -20
  13. package/ComponentOverride/ComponentOverride.js +7 -9
  14. package/FloatingLayer/FloatingLayer.js +16 -19
  15. package/FloatingLayer/FloatingLayerContainer.js +4 -6
  16. package/FloatingLayer/FloatingLayerDecorator.js +6 -8
  17. package/FloatingLayer/Scrim.js +6 -8
  18. package/FloatingLayer/index.js +1 -2
  19. package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +4 -4
  20. package/FloatingLayer/useFloatingLayer.js +2 -3
  21. package/FloatingLayer/useFloatingLayerDecorator.js +2 -4
  22. package/ForwardRef/ForwardRef.js +16 -18
  23. package/GridListImageItem/GridListImageItem.js +6 -8
  24. package/Group/Group.js +8 -12
  25. package/Group/GroupItem.js +21 -25
  26. package/Group/tests/Group-specs.js +2 -2
  27. package/Heading/Heading.js +27 -31
  28. package/Icon/Icon.js +8 -12
  29. package/Icon/tests/Icon-specs.js +2 -2
  30. package/IconButton/IconButton.js +8 -12
  31. package/Image/Image.js +8 -12
  32. package/Image/tests/Image-specs.js +2 -2
  33. package/ImageItem/ImageItem.js +8 -12
  34. package/ImageItem/tests/ImageItem-specs.js +6 -6
  35. package/Item/Item.js +8 -12
  36. package/LabeledIcon/LabeledIcon.js +8 -12
  37. package/Layout/Cell.js +9 -14
  38. package/Layout/Layout.js +162 -168
  39. package/Layout/tests/Layout-specs.js +7 -7
  40. package/Marquee/MarqueeBase.js +6 -8
  41. package/Marquee/MarqueeController.js +7 -11
  42. package/Marquee/MarqueeDecorator.js +6 -8
  43. package/Marquee/index.js +2 -4
  44. package/Marquee/tests/Marquee-specs.js +4 -19
  45. package/Measurable/Measurable.js +20 -25
  46. package/Measurable/tests/Measurable-specs.js +6 -6
  47. package/Media/Media.js +37 -41
  48. package/Placeholder/PlaceholderControllerDecorator.js +13 -16
  49. package/Placeholder/PlaceholderDecorator.js +12 -14
  50. package/Placeholder/index.js +1 -2
  51. package/ProgressBar/ProgressBar.js +20 -25
  52. package/README.md +1 -1
  53. package/RadioDecorator/RadioControllerDecorator.js +7 -10
  54. package/RadioDecorator/RadioDecorator.js +18 -20
  55. package/Repeater/Repeater.js +20 -23
  56. package/Repeater/tests/Repeater-specs.js +6 -6
  57. package/Resizable/Resizable.js +16 -18
  58. package/Resizable/ResizeContext.js +1 -2
  59. package/Resizable/tests/Resizable-specs.js +2 -2
  60. package/Resizable/tests/useResize-specs.js +4 -4
  61. package/Resizable/useResize.js +4 -4
  62. package/Routable/Link.js +8 -12
  63. package/Routable/Routable.js +20 -22
  64. package/Routable/Route.js +2 -4
  65. package/Routable/Router.js +8 -11
  66. package/Routable/tests/Routable-specs.js +5 -5
  67. package/Routable/useLink.js +1 -2
  68. package/Routable/util.js +7 -12
  69. package/Scrollable/ScrollAnimator.js +4 -6
  70. package/Scrollable/ScrollThumb.js +13 -15
  71. package/Scrollable/Scrollable.js +18 -22
  72. package/Scrollable/ScrollableNative.js +10 -15
  73. package/Scrollable/Scrollbar.js +7 -10
  74. package/Scroller/Scroller.js +13 -15
  75. package/Scroller/ScrollerBasic.js +13 -15
  76. package/Scroller/UiScrollerBase.js +16 -18
  77. package/Skinnable/Skinnable.js +6 -8
  78. package/Skinnable/tests/Skinnable-specs.js +4 -4
  79. package/Skinnable/tests/useSkins-specs.js +4 -4
  80. package/Skinnable/useSkins.js +1 -2
  81. package/Skinnable/util.js +2 -4
  82. package/Slider/Knob.js +6 -8
  83. package/Slider/PositionDecorator.js +6 -8
  84. package/Slider/Slider.js +24 -27
  85. package/Slider/utils.js +2 -3
  86. package/SlotItem/SlotItem.js +8 -12
  87. package/Slottable/Slottable.js +19 -21
  88. package/Slottable/useSlots.js +5 -6
  89. package/Spinner/Spinner.js +8 -12
  90. package/ToggleIcon/ToggleIcon.js +8 -12
  91. package/ToggleItem/ToggleItem.js +8 -12
  92. package/ToggleItem/tests/ToggleItem-specs.js +6 -6
  93. package/Toggleable/Toggle.js +6 -8
  94. package/Toggleable/Toggleable.js +19 -22
  95. package/Toggleable/useToggle.js +2 -2
  96. package/Touchable/ClickAllow.js +4 -6
  97. package/Touchable/Drag.js +8 -12
  98. package/Touchable/Flick.js +8 -12
  99. package/Touchable/Hold.js +8 -12
  100. package/Touchable/Pinch.js +8 -12
  101. package/Touchable/Touch.js +4 -6
  102. package/Touchable/Touchable.js +6 -8
  103. package/Touchable/config.js +9 -14
  104. package/Touchable/state.js +2 -3
  105. package/Touchable/tests/useTouch-specs.js +4 -4
  106. package/Touchable/useTouch.js +7 -7
  107. package/Transition/Transition.js +23 -26
  108. package/Transition/tests/Transition-specs.js +7 -7
  109. package/ViewManager/Arranger.js +15 -22
  110. package/ViewManager/TransitionGroup.js +8 -9
  111. package/ViewManager/View.js +9 -12
  112. package/ViewManager/ViewManager.js +10 -14
  113. package/ViewManager/tests/ViewManager-specs.js +2 -3
  114. package/ViewManager/tests/test-utils.js +2 -3
  115. package/VirtualList/UiVirtualListBase.js +7 -10
  116. package/VirtualList/VirtualList.js +17 -20
  117. package/VirtualList/VirtualListBase.js +1 -2
  118. package/VirtualList/VirtualListBasic.js +8 -12
  119. package/VirtualList/tests/VirtualGridList-native-specs.js +4 -4
  120. package/VirtualList/tests/VirtualGridList-specs.js +4 -4
  121. package/VirtualList/tests/VirtualList-native-specs.js +4 -4
  122. package/VirtualList/tests/VirtualList-specs.js +4 -4
  123. package/internal/IdProvider/IdProvider.js +11 -13
  124. package/internal/IdProvider/Provider.js +4 -6
  125. package/internal/IdProvider/tests/IdProvider-specs.js +4 -4
  126. package/internal/IdProvider/tests/useId-specs.js +4 -4
  127. package/internal/IdProvider/useId.js +3 -4
  128. package/internal/Pure/Pure.js +16 -18
  129. package/internal/Pure/tests/Pure-specs.js +4 -4
  130. package/internal/localized-fonts/localized-fonts.js +1 -1
  131. package/internal/localized-fonts/tests/localized-fonts-specs.js +0 -1
  132. package/internal/selection/selection.js +3 -5
  133. package/internal/validators/validators.js +6 -11
  134. package/package.json +3 -3
  135. package/resolution/ResolutionDecorator.js +15 -17
  136. package/resolution/index.js +3 -4
  137. package/resolution/resolution.js +2 -5
  138. package/useControlledState/tests/useControlledState-specs.js +1 -1
  139. package/useControlledState/useControlledState.js +2 -3
  140. package/useScroll/ScrollAnimator.js +4 -6
  141. package/useScroll/Scrollbar.js +7 -10
  142. package/useScroll/ScrollbarTrack.js +6 -8
  143. package/useScroll/useScroll.js +10 -17
  144. package/useScroll/utilDOM.js +2 -4
  145. package/useScroll/utilEvent.js +2 -4
package/Layout/Layout.js CHANGED
@@ -33,164 +33,164 @@ var _excluded = ["component", "componentRef"];
33
33
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
34
34
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
35
35
  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; }
36
- 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; }
37
- 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; }
36
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
37
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
38
38
  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; }
39
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
40
- 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); } /**
41
- * A convenient tool for laying-out content using `Layout`, `Cell`, `Row`, and `Column`.
42
- *
43
- * Layout is a powerful and versatile tool used for arranging content on the screen. On a conceptual
44
- * level, it mixes the best parts of HTML tables wtih the best parts of HTML framesets, both of
45
- * which were largely abandoned for their drawbacks, ignoring their strengths. A `Layout` is simply
46
- * a container for `Cell`, the only "legal" child. Conversely, `Cell` may only be used in a
47
- * `Layout`. Cells in a Layout can either be positioned next to each other (horizontally) or
48
- * above/below each other (vertically) in what we refer to as a {@link ui/Layout.Row|Row} or
49
- * {@link ui/Layout.Column|Column}, respectively.
50
- *
51
- * The `Row` and `Column` layout presets describe the direction of layout for their children. This
52
- * can sometimes cause confusion. A `Row` of children naturally forms a _layout_ whose children can
53
- * have the _appearance_ of columns. To keep things clear, think about the layout rather than the
54
- * what the children themselves represent.
55
- *
56
- * `Layout` is an implementation of flex-box, but with built-in rails, properties, and features to
57
- * help avoid common problems with flex-box; things like content overflowing, sizing quirks, and
58
- * positioning problems regarding content of unknown or undefined dimension.
59
- *
60
- * The following scenarios are some common cases where `Layout` can truly help out. A quality of
61
- * `Cell` you'll see below is that when a `Cell` has no defined size, it automatically sizes to fill
62
- * any remaining space in the `Layout`. If there are multiple auto-sizing `Cell` components, they
63
- * share the space, subdividing it equally among themselves. It's great to leverage this and only
64
- * apply sizes to `Cell`s which must have defined sizes. `shrink` is one of the ways you can impose
65
- * size guidelines on a `Cell`. It automatically fits the size of the Cell to the size of its
66
- * content.
67
- *
68
- * A row of cells where the last one should always attach to the right side, regardless of the size
69
- * of the main "content" cell:
70
- * ```
71
- * ┌───────┬─┐
72
- * │Main │R│
73
- * └───────┴─┘
74
- * ```
75
- *
76
- * ```
77
- * <Row>
78
- * <Cell>Main Content</Cell>
79
- * <Cell shrink>Right Side</Cell>
80
- * </Row>
81
- * ```
82
- *
83
- * A "two-column" layout with equal sized cells using `Row`:
84
- * ```
85
- * ┌────┬────┐
86
- * │L │R │
87
- * └────┴────┘
88
- * ```
89
- *
90
- * ```
91
- * <Row style={{height: '100%'}}>
92
- * <Cell>Left Column</Cell>
93
- * <Cell>Right Column</Cell>
94
- * </Row>
95
- * ```
96
- * *Remember:* The cells of the `Row` are the columns in our layout. It's likely that in a complex
97
- * layout `Column` would be used inside the left and right cells to arrange the components, as in
98
- * the example below.
99
- *
100
- * A full-height sidebar with a header and body to the right:
101
- * ```
102
- * ┌──┬──────┐
103
- * │S │HEADER│
104
- * │ ├──────┤
105
- * │ │Body │
106
- * │ │ │
107
- * └──┴──────┘
108
- * ```
109
- *
110
- * ```
111
- * <Row style={{height: '100%'}}>
112
- * <Cell size="20%">Sidebar</Cell>
113
- * <Cell>
114
- * <Column>
115
- * <Cell size={90} component="header">
116
- * <h1>HEADER</h1>
117
- * </Cell>
118
- * <Cell>
119
- * <p>Body area</p>
120
- * </Cell>
121
- * </Column>
122
- * </Cell>
123
- * </Row>
124
- * ```
125
- * *Note:* Here, we've set the height of `Row` so it fills the height of the screen, allowing the
126
- * Sidebar Cell and content Cell to stretch from the top to the bottom. We've also leveraged the
127
- * `component` prop on the header cell, which tells `Cell` to render itself as a "header" HTML tag
128
- * rather than its usual "div" tag.
129
- *
130
- * The example below produces a layout like the following:
131
- * ```
132
- * ┌─┬─────┬─┐
133
- * │o│Item │o│
134
- * └─┴─────┴─┘
135
- * ```
136
- *
137
- * You'll notice the use of some special classes in the example: `"debug layout"`. Adding these on
138
- * any element in your DOM hierarchy will enable borders in Layout and Cell to help visualize what
139
- * is happening in the layout. They automatically change color the deeper in the stack they go.
140
- *
141
- * @example
142
- * <Layout className="debug layout">
143
- * <Cell shrink>
144
- * <button>First</button>
145
- * </Cell>
146
- * <Cell>
147
- * <div>A div with some long text in it</div>
148
- * </Cell>
149
- * <Cell shrink>
150
- * <button>Last</button>
151
- * </Cell>
152
- * </Layout>
153
- *
154
- * @module ui/Layout
155
- * @exports Cell
156
- * @exports CellBase
157
- * @exports CellDecorator
158
- * @exports Column
159
- * @exports Layout
160
- * @exports LayoutBase
161
- * @exports LayoutDecorator
162
- * @exports Row
163
- */ /**
164
- * A container for `Cell`s.
165
- *
166
- * A stateless component that acts as a containing area for {@link ui/Layout.Cell|Cells} to be
167
- * positioned in a row or a column (horizontally or vertically, respectively. It supports an
168
- * {@link ui/Layout.LayoutBase.orientation|orientation} property for laying-out its contents
169
- * (`Cells`) in an organized, readable way.
170
- *
171
- * Example:
172
- * ```
173
- * import Input from '@enact/moonstone/Input';
174
- * import css from './LayoutExample.less';
175
- * ...
176
- * <fieldset>
177
- * <Layout align="center">
178
- * <Cell component="label" size="40%" className={css.label} shrink>First Name</Cell>
179
- * <Cell component={Input} placeholder="First" className={css.input} />
180
- * </Layout>
181
- * <Layout align="center">
182
- * <Cell component="label" size="40%" className={css.label} shrink>Last Name</Cell>
183
- * <Cell component={Input} placeholder="Last" className={css.input} />
184
- * </Layout>
185
- * </fieldset>
186
- * ```
187
- *
188
- * @class LayoutBase
189
- * @ui
190
- * @memberof ui/Layout
191
- * @public
192
- */
193
- var LayoutBase = (0, _kind["default"])({
39
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
40
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
41
+ * A convenient tool for laying-out content using `Layout`, `Cell`, `Row`, and `Column`.
42
+ *
43
+ * Layout is a powerful and versatile tool used for arranging content on the screen. On a conceptual
44
+ * level, it mixes the best parts of HTML tables wtih the best parts of HTML framesets, both of
45
+ * which were largely abandoned for their drawbacks, ignoring their strengths. A `Layout` is simply
46
+ * a container for `Cell`, the only "legal" child. Conversely, `Cell` may only be used in a
47
+ * `Layout`. Cells in a Layout can either be positioned next to each other (horizontally) or
48
+ * above/below each other (vertically) in what we refer to as a {@link ui/Layout.Row|Row} or
49
+ * {@link ui/Layout.Column|Column}, respectively.
50
+ *
51
+ * The `Row` and `Column` layout presets describe the direction of layout for their children. This
52
+ * can sometimes cause confusion. A `Row` of children naturally forms a _layout_ whose children can
53
+ * have the _appearance_ of columns. To keep things clear, think about the layout rather than the
54
+ * what the children themselves represent.
55
+ *
56
+ * `Layout` is an implementation of flex-box, but with built-in rails, properties, and features to
57
+ * help avoid common problems with flex-box; things like content overflowing, sizing quirks, and
58
+ * positioning problems regarding content of unknown or undefined dimension.
59
+ *
60
+ * The following scenarios are some common cases where `Layout` can truly help out. A quality of
61
+ * `Cell` you'll see below is that when a `Cell` has no defined size, it automatically sizes to fill
62
+ * any remaining space in the `Layout`. If there are multiple auto-sizing `Cell` components, they
63
+ * share the space, subdividing it equally among themselves. It's great to leverage this and only
64
+ * apply sizes to `Cell`s which must have defined sizes. `shrink` is one of the ways you can impose
65
+ * size guidelines on a `Cell`. It automatically fits the size of the Cell to the size of its
66
+ * content.
67
+ *
68
+ * A row of cells where the last one should always attach to the right side, regardless of the size
69
+ * of the main "content" cell:
70
+ * ```
71
+ * ┌───────┬─┐
72
+ * │Main │R│
73
+ * └───────┴─┘
74
+ * ```
75
+ *
76
+ * ```
77
+ * <Row>
78
+ * <Cell>Main Content</Cell>
79
+ * <Cell shrink>Right Side</Cell>
80
+ * </Row>
81
+ * ```
82
+ *
83
+ * A "two-column" layout with equal sized cells using `Row`:
84
+ * ```
85
+ * ┌────┬────┐
86
+ * │L │R │
87
+ * └────┴────┘
88
+ * ```
89
+ *
90
+ * ```
91
+ * <Row style={{height: '100%'}}>
92
+ * <Cell>Left Column</Cell>
93
+ * <Cell>Right Column</Cell>
94
+ * </Row>
95
+ * ```
96
+ * *Remember:* The cells of the `Row` are the columns in our layout. It's likely that in a complex
97
+ * layout `Column` would be used inside the left and right cells to arrange the components, as in
98
+ * the example below.
99
+ *
100
+ * A full-height sidebar with a header and body to the right:
101
+ * ```
102
+ * ┌──┬──────┐
103
+ * │S │HEADER│
104
+ * │ ├──────┤
105
+ * │ │Body │
106
+ * │ │ │
107
+ * └──┴──────┘
108
+ * ```
109
+ *
110
+ * ```
111
+ * <Row style={{height: '100%'}}>
112
+ * <Cell size="20%">Sidebar</Cell>
113
+ * <Cell>
114
+ * <Column>
115
+ * <Cell size={90} component="header">
116
+ * <h1>HEADER</h1>
117
+ * </Cell>
118
+ * <Cell>
119
+ * <p>Body area</p>
120
+ * </Cell>
121
+ * </Column>
122
+ * </Cell>
123
+ * </Row>
124
+ * ```
125
+ * *Note:* Here, we've set the height of `Row` so it fills the height of the screen, allowing the
126
+ * Sidebar Cell and content Cell to stretch from the top to the bottom. We've also leveraged the
127
+ * `component` prop on the header cell, which tells `Cell` to render itself as a "header" HTML tag
128
+ * rather than its usual "div" tag.
129
+ *
130
+ * The example below produces a layout like the following:
131
+ * ```
132
+ * ┌─┬─────┬─┐
133
+ * │o│Item │o│
134
+ * └─┴─────┴─┘
135
+ * ```
136
+ *
137
+ * You'll notice the use of some special classes in the example: `"debug layout"`. Adding these on
138
+ * any element in your DOM hierarchy will enable borders in Layout and Cell to help visualize what
139
+ * is happening in the layout. They automatically change color the deeper in the stack they go.
140
+ *
141
+ * @example
142
+ * <Layout className="debug layout">
143
+ * <Cell shrink>
144
+ * <button>First</button>
145
+ * </Cell>
146
+ * <Cell>
147
+ * <div>A div with some long text in it</div>
148
+ * </Cell>
149
+ * <Cell shrink>
150
+ * <button>Last</button>
151
+ * </Cell>
152
+ * </Layout>
153
+ *
154
+ * @module ui/Layout
155
+ * @exports Cell
156
+ * @exports CellBase
157
+ * @exports CellDecorator
158
+ * @exports Column
159
+ * @exports Layout
160
+ * @exports LayoutBase
161
+ * @exports LayoutDecorator
162
+ * @exports Row
163
+ */ /**
164
+ * A container for `Cell`s.
165
+ *
166
+ * A stateless component that acts as a containing area for {@link ui/Layout.Cell|Cells} to be
167
+ * positioned in a row or a column (horizontally or vertically, respectively. It supports an
168
+ * {@link ui/Layout.LayoutBase.orientation|orientation} property for laying-out its contents
169
+ * (`Cells`) in an organized, readable way.
170
+ *
171
+ * Example:
172
+ * ```
173
+ * import Input from '@enact/moonstone/Input';
174
+ * import css from './LayoutExample.less';
175
+ * ...
176
+ * <fieldset>
177
+ * <Layout align="center">
178
+ * <Cell component="label" size="40%" className={css.label} shrink>First Name</Cell>
179
+ * <Cell component={Input} placeholder="First" className={css.input} />
180
+ * </Layout>
181
+ * <Layout align="center">
182
+ * <Cell component="label" size="40%" className={css.label} shrink>Last Name</Cell>
183
+ * <Cell component={Input} placeholder="Last" className={css.input} />
184
+ * </Layout>
185
+ * </fieldset>
186
+ * ```
187
+ *
188
+ * @class LayoutBase
189
+ * @ui
190
+ * @memberof ui/Layout
191
+ * @public
192
+ */
193
+ var LayoutBase = exports.LayoutBase = (0, _kind["default"])({
194
194
  name: 'LayoutBase',
195
195
  propTypes: /** @lends ui/Layout.LayoutBase.prototype */{
196
196
  /**
@@ -349,8 +349,7 @@ var LayoutBase = (0, _kind["default"])({
349
349
  * @mixes ui/ForwardRef.ForwardRef
350
350
  * @public
351
351
  */
352
- exports.LayoutBase = LayoutBase;
353
- var LayoutDecorator = (0, _ForwardRef["default"])({
352
+ var LayoutDecorator = exports.LayoutDecorator = (0, _ForwardRef["default"])({
354
353
  prop: 'componentRef'
355
354
  });
356
355
 
@@ -387,8 +386,7 @@ var LayoutDecorator = (0, _ForwardRef["default"])({
387
386
  * @ui
388
387
  * @public
389
388
  */
390
- exports.LayoutDecorator = LayoutDecorator;
391
- var Layout = LayoutDecorator(LayoutBase);
389
+ var Layout = exports.Layout = LayoutDecorator(LayoutBase);
392
390
 
393
391
  /**
394
392
  * Shorthand for `<Layout orientation="vertical">`, which positions its
@@ -408,13 +406,11 @@ var Layout = LayoutDecorator(LayoutBase);
408
406
  * @ui
409
407
  * @public
410
408
  */
411
- exports.Layout = Layout;
412
- var Column = LayoutDecorator(function (props) {
409
+ var Column = exports.Column = LayoutDecorator(function (props) {
413
410
  return LayoutBase.inline(_objectSpread(_objectSpread({}, props), {}, {
414
411
  orientation: 'vertical'
415
412
  }));
416
413
  });
417
- exports.Column = Column;
418
414
  Column.displayName = 'Column';
419
415
 
420
416
  /**
@@ -433,12 +429,10 @@ Column.displayName = 'Column';
433
429
  * @ui
434
430
  * @public
435
431
  */
436
- var Row = LayoutDecorator(function (props) {
432
+ var Row = exports.Row = LayoutDecorator(function (props) {
437
433
  return LayoutBase.inline(_objectSpread(_objectSpread({}, props), {}, {
438
434
  orientation: 'horizontal'
439
435
  }));
440
436
  });
441
- exports.Row = Row;
442
437
  Row.displayName = 'Row';
443
- var _default = Layout;
444
- exports["default"] = _default;
438
+ var _default = exports["default"] = Layout;
@@ -4,18 +4,18 @@ require("@testing-library/jest-dom");
4
4
  var _react = require("@testing-library/react");
5
5
  var _Layout = _interopRequireWildcard(require("../Layout"));
6
6
  var _jsxRuntime = require("react/jsx-runtime");
7
- 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); }
8
- 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; }
9
- 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; }
10
- 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; }
7
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
8
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
9
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
11
  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; }
12
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
- 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); }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
13
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
14
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
15
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
16
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
17
17
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
18
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
18
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
19
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
20
  describe('Layout Specs', function () {
21
21
  var layoutPropAlign = [['baseline', 'baseline'], ['center', 'center'], ['end', 'flex-end'], ['start', 'flex-start']];
@@ -13,11 +13,11 @@ var _MarqueeModule = _interopRequireDefault(require("./Marquee.module.css"));
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  var _excluded = ["applyOffset", "children", "clientClassName", "clientRef", "clientStyle", "css", "duplicate", "onMarqueeComplete", "rtl"];
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
- 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; }
17
- 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; }
16
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
18
  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; }
19
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
20
- 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); }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
20
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21
21
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
22
22
  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; }
23
23
  var isEventSource = function isEventSource(ev) {
@@ -34,7 +34,7 @@ var isEventSource = function isEventSource(ev) {
34
34
  * @ui
35
35
  * @public
36
36
  */
37
- var MarqueeBase = (0, _kind["default"])({
37
+ var MarqueeBase = exports.MarqueeBase = (0, _kind["default"])({
38
38
  name: 'ui:Marquee',
39
39
  propTypes: /** @lends ui/Marquee.MarqueeBase.prototype */{
40
40
  /**
@@ -285,6 +285,4 @@ var MarqueeBase = (0, _kind["default"])({
285
285
  }));
286
286
  }
287
287
  });
288
- exports.MarqueeBase = MarqueeBase;
289
- var _default = MarqueeBase;
290
- exports["default"] = _default;
288
+ var _default = exports["default"] = MarqueeBase;