@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
@@ -15,12 +15,13 @@ var _Image = _interopRequireDefault(require("../Image"));
15
15
  var _GridListImageItemModule = _interopRequireDefault(require("./GridListImageItem.module.css"));
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
  var _excluded = ["css", "imageComponent", "placeholder", "source", "selectionOverlay", "subComponents"];
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
- 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; }
20
- 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; }
21
- 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; }
22
- 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; }
23
- 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
+ /**
19
+ * Unstyled grid list image item components and behaviors to be customized by a theme or application.
20
+ *
21
+ * @module ui/GridListImageItem
22
+ * @exports GridListImageItem
23
+ * @deprecated Will be removed in 5.0.0. Use {@link ui/ImageItem} instead.
24
+ */
24
25
  /**
25
26
  * A basic grid list image item without any behavior.
26
27
  *
@@ -29,6 +30,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
29
30
  * @ui
30
31
  * @public
31
32
  */
33
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
34
+ 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; }
35
+ 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 _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; }
37
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
38
+ 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); }
39
+ 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; }
40
+ 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; }
32
41
  var GridListImageItem = (0, _kind["default"])({
33
42
  name: 'ui:GridListImageItem',
34
43
  propTypes: /** @lends ui/GridListImageItem.GridListImageItem.prototype */{
@@ -80,7 +89,7 @@ var GridListImageItem = (0, _kind["default"])({
80
89
  */
81
90
  imageComponent: _propTypes["default"].component,
82
91
  /**
83
- * Placeholder image used while {@link ui/GridListImageItem.GridListImageItem#source|source}
92
+ * Placeholder image used while {@link ui/GridListImageItem.GridListImageItem.source|source}
84
93
  * is loaded.
85
94
  *
86
95
  * @type {String}
@@ -0,0 +1,107 @@
1
+ // Type definitions for ui/Group
2
+
3
+ import * as React from "react";
4
+ import { ForwardRefProps as ui_ForwardRef_ForwardRefProps } from "@enact/ui/ForwardRef";
5
+ import { ChangeableProps as ui_Changeable_ChangeableProps } from "@enact/ui/Changeable";
6
+
7
+ type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
8
+ type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
9
+
10
+ export interface GroupBaseProps {}
11
+ /**
12
+ * A stateless component that supports selection of its child items via configurable
13
+ properties and events.
14
+ */
15
+
16
+ export class GroupBase extends React.Component<
17
+ Merge<React.HTMLProps<HTMLElement>, GroupBaseProps>
18
+ > {}
19
+
20
+ export interface GroupProps
21
+ extends Omit<Merge<GroupBaseProps, GroupDecoratorProps>, "componentRef"> {
22
+ /**
23
+ * Component type to repeat. This can be a React component or a string describing a DOM
24
+ node (e.g. `'div'` )
25
+ */
26
+ childComponent: string | React.ComponentType;
27
+ /**
28
+ * An array of data to be mapped onto the `childComponent` .
29
+ *
30
+ * This supports two data types. If an array of strings is provided, the strings will be
31
+ used in the generated `childComponent` as the content (i.e. passed as `children` ). If
32
+ an array of objects is provided, each object will be spread onto the generated
33
+ `childComponent` with no interpretation. You'll be responsible for setting properties
34
+ like `disabled` , `className` , and setting the content using `children` .
35
+ *
36
+ * NOTE: When providing an array of objects be sure a unique `key` is assigned to each
37
+ item. for more
38
+ information.
39
+ */
40
+ children: string[] | { key: number | string; [propName: string]: any }[];
41
+ /**
42
+ * The property on each `childComponent` that receives the data in `children`
43
+ */
44
+ childProp?: string;
45
+ /**
46
+ * The name of the event that triggers activation.
47
+ */
48
+ childSelect?: string;
49
+ /**
50
+ * Called with a reference to the root component.
51
+ *
52
+ * When using , the `ref` prop is forwarded to this component
53
+ as `componentRef` .
54
+ */
55
+ componentRef?: object | Function;
56
+ /**
57
+ * The property on each `childComponent` that receives the index of the item
58
+ */
59
+ indexProp?: string;
60
+ /**
61
+ * An object containing properties to be passed to each child.
62
+ */
63
+ itemProps?: object;
64
+ /**
65
+ * Callback method to be invoked when an item is activated.
66
+ */
67
+ onSelect?: Function;
68
+ /**
69
+ * Selection mode for the group
70
+ * * `single` - Allows for 0 or 1 item to be selected. The selected item may be deselected.
71
+ * * `radio` - Allows for 0 or 1 item to be selected. The selected item may only be
72
+ deselected by selecting another item.
73
+ * * `multiple` - Allows 0 to _n_ items to be selected. Each item may be selected or
74
+ deselected.
75
+ */
76
+ select?: string;
77
+ /**
78
+ * The index(es) of the currently activated item.
79
+ */
80
+ selected?: number | Array<any>;
81
+ /**
82
+ * The key that will hold the value in the event passed to `onSelect` .
83
+ */
84
+ selectedEventProp?: string;
85
+ /**
86
+ * The name of the DOM property that represents the selected state.
87
+ */
88
+ selectedProp?: string;
89
+ }
90
+ /**
91
+ * A component that supports selection of its child items via configurable properties and
92
+ events.
93
+ *
94
+ * Selected item is managed by .
95
+ */
96
+
97
+ export class Group extends React.Component<
98
+ Merge<React.HTMLProps<HTMLElement>, GroupProps>
99
+ > {}
100
+
101
+ export interface GroupDecoratorProps
102
+ extends Merge<ui_ForwardRef_ForwardRefProps, ui_Changeable_ChangeableProps> {}
103
+ export function GroupDecorator<P>(
104
+ Component: React.ComponentType<P> | string
105
+ ): React.ComponentType<P & GroupDecoratorProps>;
106
+
107
+ export default Group;
package/Group/Group.js CHANGED
@@ -21,12 +21,15 @@ var _Repeater = _interopRequireDefault(require("../Repeater"));
21
21
  var _GroupItem = require("./GroupItem");
22
22
  var _jsxRuntime = require("react/jsx-runtime");
23
23
  var _excluded = ["componentRef"];
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
- 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; }
26
- 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; }
27
- 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; }
28
- 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; }
29
- 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; }
24
+ /**
25
+ * Provides a component that renders a group of components given a set of data.
26
+ *
27
+ * @module ui/Group
28
+ * @exports Group
29
+ * @exports GroupBase
30
+ * @exports GroupDecorator
31
+ * @exports GroupItem
32
+ */
30
33
  /**
31
34
  * A stateless component that supports selection of its child items via configurable
32
35
  * properties and events.
@@ -36,6 +39,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
36
39
  * @ui
37
40
  * @public
38
41
  */
42
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
43
+ 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; }
44
+ 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; }
45
+ 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; }
46
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
47
+ 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); }
48
+ 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; }
49
+ 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; }
39
50
  var GroupBase = (0, _kind["default"])({
40
51
  name: 'Group',
41
52
  propTypes: /** @lends ui/Group.Group.prototype */{
@@ -13,16 +13,22 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
13
13
  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; }
14
14
  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; }
15
15
  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; }
16
- 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; }
17
- /**
18
- * Pick the `GroupItem`-specific props into a {@link /developer-guide/glossary/#private|private} `itemProps` key to be extracted by
19
- * `GroupItem` before passing the remaining on to the repeated `childComponent`
20
- *
21
- * @function
22
- * @param {Object} props `Group` props
23
- * @returns {Object} `GroupItem` props
24
- * @private
25
- */
16
+ 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; }
17
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
18
+ 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
+ * Exports the {@link ui/Group.GroupItem} and {@link ui/Group.GroupItemBase}
20
+ * components as well as the `pickGroupItemProps` method. The default export is {@link ui/Group.GroupItem}.
21
+ * `GroupItem` is stateless and is the same as `GroupItemBase`.
22
+ * NOTE: not jsdoc on purpose.
23
+ */ /**
24
+ * Pick the `GroupItem`-specific props into a {@link /developer-guide/glossary/#private|private} `itemProps` key to be extracted by
25
+ * `GroupItem` before passing the remaining on to the repeated `childComponent`
26
+ *
27
+ * @function
28
+ * @param {Object} props `Group` props
29
+ * @returns {Object} `GroupItem` props
30
+ * @private
31
+ */
26
32
  var pickGroupItemProps = function pickGroupItemProps(props) {
27
33
  return {
28
34
  $$GroupItem: {
@@ -0,0 +1,89 @@
1
+ // Type definitions for ui/Heading
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 HeadingBaseProps {}
10
+ /**
11
+ * A labeled Heading component.
12
+ */
13
+
14
+ export class HeadingBase extends React.Component<
15
+ Merge<React.HTMLProps<HTMLElement>, HeadingBaseProps>
16
+ > {}
17
+
18
+ export interface HeadingProps
19
+ extends Omit<Merge<HeadingBaseProps, HeadingDecoratorProps>, "componentRef"> {
20
+ /**
21
+ * The text for the label of the Heading.
22
+ */
23
+ children?: React.ReactNode;
24
+ /**
25
+ * Called with a reference to the root component.
26
+ *
27
+ * When using , the `ref` prop is forwarded to this component
28
+ as `componentRef` .
29
+ */
30
+ componentRef?: object | Function;
31
+ /**
32
+ * Customizes the component by mapping the supplied collection of CSS class names to the
33
+ corresponding internal elements and states of this component.
34
+ *
35
+ * The following classes are supported:
36
+ * * `heading` - The root component class
37
+ * * `title` - Applied when `size` is set to "title"
38
+ * * `subtitle` - Applied when `size` is set to "subtitle"
39
+ * * `large` - Applied when `size` is set to "large"
40
+ * * `medium` - Applied when `size` is set to "medium"
41
+ * * `small` - Applied when `size` is set to "small"
42
+ * * `tiny` - Applied when `size` is set to "tiny"
43
+ * * `largeSpacing` - Applied when `spacing` is set to "large"
44
+ * * `mediumSpacing` - Applied when `spacing` is set to "medium"
45
+ * * `smallSpacing` - Applied when `spacing` is set to "small"
46
+ * * `noneSpacing` - Applied when `spacing` is set to "none"
47
+ */
48
+ css?: object;
49
+ /**
50
+ * Set the size of this component.
51
+ * * `'title'` and `'subtitle'` are generally considered to be used only once on a given screen.
52
+ * * `'large'` , `'medium'` , `'small'` , and `'tiny'` are typically used as section headings
53
+ for content on a screen, starting with `'large'` for the first tier of information
54
+ followed by `'medium'` for the next, and so fourth.
55
+ *
56
+ * If the `spacing` prop is not set (defaulting to "auto"), these values automatically set
57
+ the spacing to the correlated names.
58
+ */
59
+ size?: "title" | "subtitle" | "large" | "medium" | "small" | "tiny";
60
+ /**
61
+ * The size of the spacing around the Heading.
62
+ *
63
+ * These have no built-in measurements, as they are intended to be defined by the theme
64
+ consuming this UI element. The values correlate with customizable classes made available
65
+ by this component's `css` prop.
66
+ *
67
+ * Allowed values include:
68
+ * * `'auto'` (default) - Lets this value be based on the `size` prop for automatic usage.
69
+ * * `'large'` - Specifically assign the `'large'` spacing.
70
+ * * `'medium'` - Specifically assign the `'medium'` spacing.
71
+ * * `'small'` - Specifically assign the `'small'` spacing.
72
+ * * `'none'` - No spacing at all. Neighboring elements will directly touch the Heading.
73
+ */
74
+ spacing?: "auto" | "large" | "medium" | "small" | "none";
75
+ }
76
+ /**
77
+ * A labeled Heading component.
78
+ */
79
+
80
+ export class Heading extends React.Component<
81
+ Merge<React.HTMLProps<HTMLElement>, HeadingProps>
82
+ > {}
83
+
84
+ export interface HeadingDecoratorProps extends ui_ForwardRef_ForwardRefProps {}
85
+ export function HeadingDecorator<P>(
86
+ Component: React.ComponentType<P> | string
87
+ ): React.ComponentType<P & HeadingDecoratorProps>;
88
+
89
+ export default Heading;
@@ -17,15 +17,28 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
17
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; }
18
18
  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; }
19
19
  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; }
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; }
21
- /**
22
- * A labeled Heading component.
23
- *
24
- * @class HeadingBase
25
- * @memberof ui/Heading
26
- * @ui
27
- * @public
28
- */
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); } /**
23
+ * A component for instantiating a section of content with a title.
24
+ *
25
+ * @example
26
+ * <Heading spacing="none">
27
+ * A Content Section Heading
28
+ * </Heading>
29
+ *
30
+ * @module ui/Heading
31
+ * @exports Heading
32
+ * @exports HeadingBase
33
+ * @exports HeadingDecorator
34
+ */ /**
35
+ * A labeled Heading component.
36
+ *
37
+ * @class HeadingBase
38
+ * @memberof ui/Heading
39
+ * @ui
40
+ * @public
41
+ */
29
42
  var HeadingBase = (0, _kind["default"])({
30
43
  name: 'ui:Heading',
31
44
  propTypes: /** @lends ui/Heading.Heading.prototype */{
package/Icon/Icon.d.ts ADDED
@@ -0,0 +1,88 @@
1
+ // Type definitions for ui/Icon
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 IconBaseProps {
10
+ /**
11
+ * The icon content.
12
+ *
13
+ * May be specified as either:
14
+ * * A string that represents an icon from the ,
15
+ * * An HTML entity string, Unicode reference or hex value (in the form '0x...'),
16
+ * * A URL specifying path to an icon image, or
17
+ * * An object representing a resolution independent resource (See ).
18
+ */
19
+ children?: string | object;
20
+ /**
21
+ * Called with a reference to the root component.
22
+ *
23
+ * When using , the `ref` prop is forwarded to this component
24
+ as `componentRef` .
25
+ */
26
+ componentRef?: object | Function;
27
+ /**
28
+ * Customizes the component by mapping the supplied collection of CSS class names to the
29
+ corresponding internal elements and states of this component.
30
+ *
31
+ * The following classes are supported:
32
+ * * `icon` - The root component class
33
+ * * `dingbat` - Applied when the value of is not
34
+ found in
35
+ * * `large` - Applied when `size` prop is `'large'`
36
+ * * `pressed` - Applied when `pressed` prop is `true`
37
+ * * `small` - Applied when `size` prop is `'small'`
38
+ */
39
+ css?: object;
40
+ /**
41
+ * Flip the icon horizontally, vertically or both.
42
+ */
43
+ flip?: "both" | "horizontal" | "vertical";
44
+ /**
45
+ * The full list (hash) of supported icons.
46
+ *
47
+ * The keys of this hash are the unique names of each icon. The values are the unicode
48
+ characters to insert in the icon. These will typically map to glyphs in your icon-font.
49
+ The format of the keys can be character, glyph, or entity reference that correctly
50
+ renders in a React + JSX string.
51
+ */
52
+ iconList?: object;
53
+ /**
54
+ * Applies the `pressed` CSS class.
55
+ */
56
+ pressed?: boolean;
57
+ /**
58
+ * The size of the button.
59
+ *
60
+ * Applies the CSS class which can be customized by
61
+ .
62
+ */
63
+ size?: string;
64
+ }
65
+ /**
66
+ * A basic icon component structure without any behaviors applied to it.
67
+ */
68
+
69
+ export class IconBase extends React.Component<
70
+ Merge<React.HTMLProps<HTMLElement>, IconBaseProps>
71
+ > {}
72
+
73
+ export interface IconDecoratorProps extends ui_ForwardRef_ForwardRefProps {}
74
+ export function IconDecorator<P>(
75
+ Component: React.ComponentType<P> | string
76
+ ): React.ComponentType<P & IconDecoratorProps>;
77
+
78
+ export interface IconProps
79
+ extends Omit<Merge<IconBaseProps, IconDecoratorProps>, "componentRef"> {}
80
+ /**
81
+ * An Icon component.
82
+ */
83
+
84
+ export class Icon extends React.Component<
85
+ Merge<React.HTMLProps<HTMLElement>, IconProps>
86
+ > {}
87
+
88
+ export default Icon;
package/Icon/Icon.js CHANGED
@@ -14,12 +14,13 @@ var _ForwardRef = _interopRequireDefault(require("../ForwardRef"));
14
14
  var _IconModule = _interopRequireDefault(require("./Icon.module.css"));
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
16
  var _excluded = ["componentRef", "iconProps"];
17
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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
- 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; }
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
- 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; }
17
+ /**
18
+ * An unstyled icon component to be customized by a theme or application.
19
+ *
20
+ * @module ui/Icon
21
+ * @exports Icon
22
+ * @exports IconDecorator
23
+ */
23
24
  /**
24
25
  * Merges consumer styles with the image `src` resolved through the resolution independence module.
25
26
  *
@@ -30,6 +31,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
30
31
  * @returns {Object} Original style object with backgroundImage updated
31
32
  * @private
32
33
  */
34
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
+ 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; }
36
+ 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; }
37
+ 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; }
38
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
39
+ 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); }
40
+ 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; }
41
+ 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; }
33
42
  var mergeStyle = function mergeStyle(style, src) {
34
43
  var updated = Object.assign({}, style);
35
44
  var source = _resolution["default"].selectSrc(src);
@@ -0,0 +1,115 @@
1
+ // Type definitions for ui/IconButton
2
+
3
+ import * as React from "react";
4
+ import { ForwardRefProps as ui_ForwardRef_ForwardRefProps } from "@enact/ui/ForwardRef";
5
+ import { TouchableProps as ui_Touchable_TouchableProps } from "@enact/ui/Touchable";
6
+
7
+ type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
8
+ type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
9
+
10
+ export interface IconButtonBaseProps {
11
+ /**
12
+ * This is the root component used to render the button and will receive all props except
13
+ `icon` .
14
+ */
15
+ buttonComponent: React.ComponentType | JSX.Element;
16
+ /**
17
+ * The component used to render the .
18
+ *
19
+ * This component will receive the `flip` and `size` property set on the `IconButton` as well as the
20
+ `icon` class to customize its styling.
21
+ */
22
+ iconComponent: React.ComponentType;
23
+ /**
24
+ * Additional children that follow the icon.
25
+ *
26
+ * If `icon` isn't specified but `children` is, `children` is used as the icon's value.
27
+ */
28
+ children?: React.ReactNode;
29
+ /**
30
+ * Called with a reference to the root component.
31
+ *
32
+ * When using , the `ref` prop is forwarded to this
33
+ component as `componentRef` .
34
+ */
35
+ componentRef?: object | Function;
36
+ /**
37
+ * Customizes the component by mapping the supplied collection of CSS class names to the
38
+ corresponding internal elements and states of this component.
39
+ *
40
+ * The following classes are supported:
41
+ * * `iconButton` - The root component class
42
+ * * `icon` - The class
43
+ * * `large` - Applied when `size` prop is `'large'`
44
+ * * `small` - Applied when `size` prop is `'small'`
45
+ * * `pressed` - Applied when `pressed` prop is `true`
46
+ */
47
+ css?: object;
48
+ /**
49
+ * Disables IconButton.
50
+ *
51
+ * When `true` , the button is shown as disabled and does not generate
52
+ `onClick` .
53
+ */
54
+ disabled?: boolean;
55
+ /**
56
+ * Flip the icon horizontally, vertically or both.
57
+ */
58
+ flip?: "both" | "horizontal" | "vertical";
59
+ /**
60
+ * The icon displayed within the IconButton.
61
+ *
62
+ * If not specified, `children` is used as the icon value instead.
63
+ */
64
+ icon?: string;
65
+ /**
66
+ * Applies the `pressed` CSS class.
67
+ */
68
+ pressed?: boolean;
69
+ /**
70
+ * Applies the `selected` CSS class.
71
+ */
72
+ selected?: boolean;
73
+ /**
74
+ * The size of the button.
75
+ *
76
+ * Applies the CSS class which can be customized by
77
+ .
78
+ */
79
+ size?: string;
80
+ }
81
+ /**
82
+ * A ui-styled button without any behavior.
83
+ */
84
+
85
+ export class IconButtonBase extends React.Component<
86
+ Merge<React.HTMLProps<HTMLElement>, IconButtonBaseProps>
87
+ > {}
88
+
89
+ export interface IconButtonDecoratorProps
90
+ extends Merge<ui_ForwardRef_ForwardRefProps, ui_Touchable_TouchableProps> {}
91
+ export function IconButtonDecorator<P>(
92
+ Component: React.ComponentType<P> | string
93
+ ): React.ComponentType<P & IconButtonDecoratorProps>;
94
+
95
+ export interface IconButtonProps
96
+ extends Omit<
97
+ Merge<IconButtonBaseProps, IconButtonDecoratorProps>,
98
+ "componentRef"
99
+ > {}
100
+ /**
101
+ * A minimally styled, but interactive, Button ready for customization by a theme.
102
+ *
103
+ * Example:
104
+ * ```
105
+ <IconButton size="small">
106
+ plus
107
+ </IconButton>
108
+ ```
109
+ */
110
+
111
+ export class IconButton extends React.Component<
112
+ Merge<React.HTMLProps<HTMLElement>, IconButtonProps>
113
+ > {}
114
+
115
+ export default IconButton;