@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.
- package/AnnounceDecorator/Announce.js +27 -15
- package/AnnounceDecorator/AnnounceDecorator.d.ts +64 -0
- package/AnnounceDecorator/AnnounceDecorator.js +15 -6
- package/AnnounceDecorator/useAnnounce.js +1 -2
- package/BodyText/BodyText.d.ts +66 -0
- package/BodyText/BodyText.js +14 -6
- package/Button/Button.d.ts +125 -0
- package/Button/Button.js +18 -10
- package/CHANGELOG.md +14 -0
- package/Cancelable/Cancelable.d.ts +64 -0
- package/Cancelable/Cancelable.js +17 -9
- package/Cancelable/tests/Cancelable-specs.js +3 -1
- package/Changeable/Changeable.d.ts +54 -0
- package/Changeable/Changeable.js +15 -9
- package/ComponentOverride/ComponentOverride.d.ts +52 -0
- package/ComponentOverride/ComponentOverride.js +18 -5
- package/FloatingLayer/FloatingLayer.js +14 -13
- package/FloatingLayer/FloatingLayerContainer.js +3 -1
- package/FloatingLayer/FloatingLayerDecorator.js +11 -6
- package/FloatingLayer/Scrim.js +4 -2
- package/FloatingLayer/index.d.ts +100 -0
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +3 -1
- package/FloatingLayer/useFloatingLayer.js +2 -2
- package/ForwardRef/ForwardRef.d.ts +22 -0
- package/ForwardRef/ForwardRef.js +13 -7
- package/GridListImageItem/GridListImageItem.d.ts +85 -0
- package/GridListImageItem/GridListImageItem.js +16 -7
- package/Group/Group.d.ts +107 -0
- package/Group/Group.js +17 -6
- package/Group/GroupItem.js +16 -10
- package/Heading/Heading.d.ts +89 -0
- package/Heading/Heading.js +22 -9
- package/Icon/Icon.d.ts +88 -0
- package/Icon/Icon.js +15 -6
- package/IconButton/IconButton.d.ts +115 -0
- package/IconButton/IconButton.js +26 -11
- package/Image/Image.d.ts +113 -0
- package/Image/Image.js +16 -6
- package/ImageItem/ImageItem.d.ts +83 -0
- package/ImageItem/ImageItem.js +12 -2
- package/ImageItem/tests/ImageItem-specs.js +3 -1
- package/Item/Item.d.ts +64 -0
- package/Item/Item.js +17 -7
- package/LabeledIcon/LabeledIcon.d.ts +130 -0
- package/LabeledIcon/LabeledIcon.js +16 -6
- package/Layout/Cell.js +30 -5
- package/Layout/Layout.d.ts +284 -0
- package/Layout/Layout.js +181 -36
- package/Layout/Layout.module.css +8 -0
- package/Layout/tests/Layout-specs.js +44 -3
- package/Marquee/MarqueeBase.js +3 -1
- package/Marquee/MarqueeController.js +54 -2
- package/Marquee/MarqueeDecorator.js +44 -4
- package/Marquee/index.d.ts +258 -0
- package/Marquee/tests/Marquee-specs.js +3 -1
- package/Measurable/Measurable.d.ts +26 -0
- package/Measurable/Measurable.js +16 -10
- package/Measurable/tests/Measurable-specs.js +8 -6
- package/Media/Media.d.ts +99 -0
- package/Media/Media.js +36 -27
- package/Placeholder/PlaceholderControllerDecorator.js +13 -10
- package/Placeholder/PlaceholderDecorator.js +11 -10
- package/Placeholder/index.d.ts +53 -0
- package/ProgressBar/ProgressBar.d.ts +92 -0
- package/ProgressBar/ProgressBar.js +14 -1
- package/README.md +1 -1
- package/RadioDecorator/RadioControllerDecorator.js +4 -2
- package/RadioDecorator/RadioDecorator.d.ts +35 -0
- package/RadioDecorator/RadioDecorator.js +17 -9
- package/Repeater/Repeater.d.ts +82 -0
- package/Repeater/Repeater.js +16 -10
- package/Repeater/tests/Repeater-specs.js +3 -1
- package/Resizable/Resizable.d.ts +31 -0
- package/Resizable/Resizable.js +16 -10
- package/Routable/Link.js +12 -10
- package/Routable/Routable.d.ts +148 -0
- package/Routable/Routable.js +17 -8
- package/Routable/Router.js +14 -12
- package/Routable/tests/Routable-specs.js +5 -3
- package/Scrollable/ScrollAnimator.js +3 -1
- package/Scrollable/ScrollThumb.js +10 -9
- package/Scrollable/Scrollable.d.ts +0 -0
- package/Scrollable/Scrollable.js +27 -3
- package/Scrollable/ScrollableNative.js +16 -2
- package/Scrollable/Scrollbar.js +4 -2
- package/Scroller/Scroller.d.ts +276 -0
- package/Scroller/Scroller.js +10 -1
- package/Scroller/ScrollerBasic.js +12 -11
- package/Scroller/UiScrollerBase.js +15 -14
- package/Skinnable/Skinnable.d.ts +94 -0
- package/Skinnable/Skinnable.js +20 -6
- package/Skinnable/tests/Skinnable-specs.js +3 -1
- package/Skinnable/tests/useSkins-specs.js +3 -1
- package/Skinnable/useSkins.js +1 -2
- package/Slider/Knob.js +8 -6
- package/Slider/PositionDecorator.js +4 -2
- package/Slider/Slider.d.ts +202 -0
- package/Slider/Slider.js +18 -9
- package/SlotItem/SlotItem.d.ts +118 -0
- package/SlotItem/SlotItem.js +20 -6
- package/Slottable/Slottable.d.ts +22 -0
- package/Slottable/Slottable.js +16 -8
- package/Slottable/useSlots.js +3 -1
- package/Spinner/Spinner.d.ts +95 -0
- package/Spinner/Spinner.js +24 -7
- package/ToggleIcon/ToggleIcon.d.ts +90 -0
- package/ToggleIcon/ToggleIcon.js +21 -7
- package/ToggleItem/ToggleItem.d.ts +132 -0
- package/ToggleItem/ToggleItem.js +17 -2
- package/ToggleItem/tests/ToggleItem-specs.js +3 -1
- package/Toggleable/Toggle.js +4 -2
- package/Toggleable/Toggleable.d.ts +103 -0
- package/Toggleable/Toggleable.js +13 -7
- package/Toggleable/useToggle.js +1 -2
- package/Touchable/ClickAllow.js +3 -1
- package/Touchable/Drag.js +6 -3
- package/Touchable/Flick.js +6 -2
- package/Touchable/Hold.js +6 -2
- package/Touchable/Pinch.js +6 -3
- package/Touchable/Touch.js +6 -4
- package/Touchable/Touchable.d.ts +217 -0
- package/Touchable/Touchable.js +10 -1
- package/Touchable/config.js +3 -1
- package/Touchable/tests/useTouch-specs.js +3 -1
- package/Touchable/useTouch.js +5 -4
- package/Transition/Transition.d.ts +194 -0
- package/Transition/Transition.js +22 -4
- package/Transition/tests/Transition-specs.js +5 -3
- package/ViewManager/Arranger.js +6 -1
- package/ViewManager/TransitionGroup.js +8 -5
- package/ViewManager/View.js +7 -4
- package/ViewManager/ViewManager.d.ts +191 -0
- package/ViewManager/ViewManager.js +29 -11
- package/ViewManager/tests/ViewManager-specs.js +47 -1
- package/VirtualList/UiVirtualListBase.js +9 -3
- package/VirtualList/VirtualList.d.ts +528 -0
- package/VirtualList/VirtualList.js +13 -1
- package/VirtualList/VirtualListBasic.js +9 -3
- package/VirtualList/tests/VirtualGridList-native-specs.js +3 -1
- package/VirtualList/tests/VirtualGridList-specs.js +3 -1
- package/VirtualList/tests/VirtualList-native-specs.js +3 -1
- package/VirtualList/tests/VirtualList-specs.js +3 -1
- package/index.d.ts +0 -0
- package/internal/IdProvider/IdProvider.d.ts +0 -0
- package/internal/IdProvider/IdProvider.js +8 -7
- package/internal/IdProvider/Provider.js +3 -1
- package/internal/IdProvider/tests/IdProvider-specs.js +3 -1
- package/internal/IdProvider/tests/useId-specs.js +4 -3
- package/internal/IdProvider/useId.js +0 -1
- package/internal/Pure/Pure.d.ts +0 -0
- package/internal/Pure/Pure.js +15 -9
- package/internal/Pure/tests/Pure-specs.js +4 -2
- package/internal/localized-fonts/localized-fonts.d.ts +53 -0
- package/internal/localized-fonts/localized-fonts.js +2 -2
- package/internal/selection/selection.d.ts +0 -0
- package/internal/validators/validators.d.ts +0 -0
- package/package.json +2 -2
- package/resolution/ResolutionDecorator.js +40 -9
- package/resolution/index.d.ts +187 -0
- package/resolution/resolution.js +23 -7
- package/useControlledState/tests/useControlledState-specs.js +2 -2
- package/useControlledState/useControlledState.d.ts +0 -0
- package/useControlledState/useControlledState.js +2 -2
- package/useScroll/ScrollAnimator.js +3 -1
- package/useScroll/Scrollbar.js +6 -4
- package/useScroll/ScrollbarTrack.js +8 -6
- package/useScroll/useScroll.d.ts +0 -0
- 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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
92
|
+
* Placeholder image used while {@link ui/GridListImageItem.GridListImageItem.source|source}
|
|
84
93
|
* is loaded.
|
|
85
94
|
*
|
|
86
95
|
* @type {String}
|
package/Group/Group.d.ts
ADDED
|
@@ -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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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 */{
|
package/Group/GroupItem.js
CHANGED
|
@@ -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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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;
|
package/Heading/Heading.js
CHANGED
|
@@ -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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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;
|