@enact/ui 4.5.2 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AnnounceDecorator/Announce.js +1 -40
- package/AnnounceDecorator/AnnounceDecorator.js +3 -21
- package/AnnounceDecorator/tests/Announce-specs.js +2 -7
- package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +2 -6
- package/AnnounceDecorator/tests/useAnnounce-specs.js +8 -19
- package/AnnounceDecorator/useAnnounce.js +0 -6
- package/BodyText/BodyText.js +8 -28
- package/BodyText/tests/BodyText-specs.js +0 -19
- package/Button/Button.js +33 -63
- package/Button/tests/Button-specs.js +0 -26
- package/CHANGELOG.md +45 -0
- package/Cancelable/Cancelable.js +8 -47
- package/Cancelable/cancelHandler.js +5 -12
- package/Cancelable/modalHandler.js +3 -11
- package/Cancelable/tests/Cancelable-specs.js +3 -57
- package/Changeable/Changeable.js +2 -34
- package/Changeable/tests/Changeable-specs.js +20 -66
- package/ComponentOverride/ComponentOverride.js +1 -13
- package/FloatingLayer/FloatingLayer.js +17 -73
- package/FloatingLayer/FloatingLayerContainer.js +0 -15
- package/FloatingLayer/FloatingLayerDecorator.js +4 -17
- package/FloatingLayer/Scrim.js +9 -53
- package/FloatingLayer/index.js +0 -4
- package/FloatingLayer/package.json +3 -0
- package/FloatingLayer/tests/FloatingLayer-specs.js +8 -22
- package/FloatingLayer/tests/Scrim-specs.js +0 -9
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +0 -13
- package/FloatingLayer/useFloatingLayer.js +3 -14
- package/FloatingLayer/useFloatingLayerDecorator.js +3 -11
- package/ForwardRef/ForwardRef.js +1 -10
- package/GridListImageItem/GridListImageItem.js +18 -51
- package/Group/Group.js +5 -36
- package/Group/GroupItem.js +16 -33
- package/Group/tests/Group-specs.js +0 -32
- package/Heading/Heading.js +8 -36
- package/Heading/tests/Heading-specs.js +81 -14
- package/Icon/Icon.js +19 -53
- package/Icon/tests/Icon-specs.js +0 -22
- package/IconButton/IconButton.js +24 -57
- package/IconButton/tests/IconButton-specs.js +0 -7
- package/Image/Image.js +17 -46
- package/Image/tests/Image-specs.js +0 -14
- package/ImageItem/ImageItem.js +18 -47
- package/ImageItem/tests/ImageItem-specs.js +0 -25
- package/Item/Item.js +9 -33
- package/Item/tests/Item-specs.js +0 -24
- package/LabeledIcon/LabeledIcon.js +22 -53
- package/LabeledIcon/tests/LabeledIcon-specs.js +0 -14
- package/Layout/Cell.js +18 -44
- package/Layout/Layout.js +23 -46
- package/Layout/tests/Layout-specs.js +10 -39
- package/Marquee/MarqueeBase.js +29 -63
- package/Marquee/MarqueeController.js +11 -72
- package/Marquee/MarqueeDecorator.js +70 -196
- package/Marquee/index.js +1 -5
- package/Marquee/tests/Marquee-specs.js +295 -87
- package/Measurable/Measurable.js +12 -34
- package/Measurable/tests/Measurable-specs.js +115 -0
- package/Media/Media.js +15 -65
- package/Media/tests/Media-specs.js +168 -0
- package/Placeholder/PlaceholderControllerDecorator.js +7 -43
- package/Placeholder/PlaceholderDecorator.js +7 -38
- package/Placeholder/index.js +1 -5
- package/Placeholder/tests/PlaceholderControllerDecorator-specs.js +25 -0
- package/Placeholder/tests/PlaceholderDecorator-specs.js +28 -0
- package/ProgressBar/ProgressBar.js +14 -45
- package/ProgressBar/tests/ProgressBar-specs.js +0 -17
- package/RadioDecorator/RadioControllerDecorator.js +7 -29
- package/RadioDecorator/RadioDecorator.js +9 -42
- package/RadioDecorator/tests/RadioDecorator-specs.js +12 -49
- package/Repeater/Repeater.js +9 -33
- package/Repeater/tests/Repeater-specs.js +0 -38
- package/Resizable/Resizable.js +9 -37
- package/Resizable/tests/Resizable-specs.js +34 -0
- package/Routable/Link.js +11 -47
- package/Routable/Routable.js +12 -35
- package/Routable/Route.js +0 -6
- package/Routable/Router.js +15 -58
- package/Routable/tests/Routable-specs.js +7 -33
- package/Routable/tests/Router-specs.js +18 -44
- package/Routable/useLink.js +4 -8
- package/Routable/util.js +18 -24
- package/Scrollable/ScrollAnimator.js +49 -65
- package/Scrollable/ScrollThumb.js +2 -13
- package/Scrollable/Scrollable.js +180 -387
- package/Scrollable/ScrollableNative.js +189 -392
- package/Scrollable/Scrollbar.js +30 -102
- package/Scroller/Scroller.js +15 -39
- package/Scroller/ScrollerBasic.js +34 -89
- package/Scroller/UiScrollerBase.js +37 -84
- package/Scroller/tests/Scroller-specs.js +56 -0
- package/Skinnable/Skinnable.js +11 -38
- package/Skinnable/tests/Skinnable-specs.js +3 -74
- package/Skinnable/tests/useSkins-specs.js +1 -13
- package/Skinnable/tests/util-specs.js +0 -14
- package/Skinnable/useSkins.js +8 -15
- package/Skinnable/util.js +9 -20
- package/Slider/Knob.js +5 -24
- package/Slider/PositionDecorator.js +16 -54
- package/Slider/Slider.js +29 -67
- package/Slider/tests/Slider-specs.js +94 -7
- package/Slider/utils.js +0 -2
- package/SlotItem/SlotItem.js +23 -45
- package/SlotItem/tests/SlotItem-specs.js +0 -5
- package/Slottable/Slottable.js +4 -12
- package/Slottable/tests/Slottable-specs.js +19 -46
- package/Slottable/tests/useSlots-specs.js +27 -65
- package/Slottable/useSlots.js +8 -33
- package/Spinner/Spinner.js +16 -43
- package/Spinner/tests/Spinner-specs.js +0 -15
- package/ToggleIcon/ToggleIcon.js +10 -36
- package/ToggleIcon/tests/ToggleIcon-specs.js +0 -16
- package/ToggleItem/ToggleItem.js +24 -57
- package/ToggleItem/tests/ToggleItem-specs.js +0 -30
- package/Toggleable/Toggle.js +1 -15
- package/Toggleable/Toggleable.js +12 -45
- package/Toggleable/tests/Toggleable-specs.js +28 -96
- package/Toggleable/useToggle.js +3 -19
- package/Touchable/ClickAllow.js +5 -14
- package/Touchable/Drag.js +16 -54
- package/Touchable/Flick.js +11 -42
- package/Touchable/Hold.js +21 -68
- package/Touchable/Pinch.js +185 -0
- package/Touchable/Touch.js +71 -76
- package/Touchable/Touchable.js +95 -75
- package/Touchable/config.js +27 -24
- package/Touchable/tests/Touchable-specs.js +360 -119
- package/Touchable/tests/useTouch-specs.js +6 -80
- package/Touchable/useTouch.js +57 -65
- package/Transition/Transition.js +37 -118
- package/Transition/tests/Transition-specs.js +20 -60
- package/ViewManager/Arranger.js +10 -22
- package/ViewManager/TransitionGroup.js +32 -107
- package/ViewManager/View.js +35 -91
- package/ViewManager/ViewManager.js +20 -84
- package/ViewManager/tests/View-specs.js +0 -17
- package/ViewManager/tests/ViewManager-specs.js +236 -305
- package/ViewManager/tests/test-utils.js +0 -8
- package/VirtualList/UiVirtualListBase.js +265 -409
- package/VirtualList/VirtualList.js +29 -69
- package/VirtualList/VirtualListBase.js +0 -3
- package/VirtualList/VirtualListBasic.js +273 -431
- package/VirtualList/tests/VirtualGridList-native-specs.js +161 -0
- package/VirtualList/tests/VirtualGridList-specs.js +614 -0
- package/VirtualList/tests/VirtualList-native-specs.js +152 -0
- package/VirtualList/tests/VirtualList-specs.js +423 -95
- package/internal/IdProvider/IdProvider.js +7 -21
- package/internal/IdProvider/Provider.js +4 -17
- package/internal/IdProvider/tests/IdProvider-specs.js +44 -0
- package/internal/IdProvider/tests/useId-specs.js +6 -20
- package/internal/IdProvider/useId.js +0 -6
- package/internal/Pure/Pure.js +3 -30
- package/internal/Pure/tests/Pure-specs.js +88 -0
- package/internal/localized-fonts/localized-fonts.js +33 -62
- package/internal/localized-fonts/tests/localized-fonts-specs.js +33 -0
- package/internal/selection/selection.js +1 -6
- package/internal/selection/tests/selection-specs.js +6 -4
- package/internal/validators/tests/validators-specs.js +80 -0
- package/internal/validators/validators.js +14 -34
- package/package.json +9 -3
- package/resolution/ResolutionDecorator.js +4 -40
- package/resolution/index.js +0 -7
- package/resolution/resolution.js +42 -80
- package/resolution/tests/ResolutionDecorator-specs.js +4 -11
- package/resolution/tests/resolution-specs.js +2 -2
- package/useControlledState/tests/useControlledState-specs.js +15 -46
- package/useControlledState/useControlledState.js +11 -22
- package/useScroll/ScrollAnimator.js +49 -65
- package/useScroll/Scrollbar.js +22 -58
- package/useScroll/ScrollbarTrack.js +3 -19
- package/useScroll/useScroll.js +267 -454
- package/useScroll/utilDOM.js +8 -14
- package/useScroll/utilEvent.js +0 -4
- package/AnnounceDecorator/AnnounceDecorator.d.ts +0 -64
- package/BodyText/BodyText.d.ts +0 -66
- package/Button/Button.d.ts +0 -125
- package/Cancelable/Cancelable.d.ts +0 -64
- package/Changeable/Changeable.d.ts +0 -54
- package/ComponentOverride/ComponentOverride.d.ts +0 -52
- package/ForwardRef/ForwardRef.d.ts +0 -22
- package/GridListImageItem/GridListImageItem.d.ts +0 -85
- package/Group/Group.d.ts +0 -107
- package/Heading/Heading.d.ts +0 -90
- package/Icon/Icon.d.ts +0 -88
- package/IconButton/IconButton.d.ts +0 -115
- package/Image/Image.d.ts +0 -113
- package/ImageItem/ImageItem.d.ts +0 -83
- package/Item/Item.d.ts +0 -64
- package/LabeledIcon/LabeledIcon.d.ts +0 -130
- package/Layout/Layout.d.ts +0 -247
- package/Marquee/index.d.ts +0 -258
- package/Measurable/Measurable.d.ts +0 -26
- package/Media/Media.d.ts +0 -99
- package/Placeholder/index.d.ts +0 -53
- package/ProgressBar/ProgressBar.d.ts +0 -92
- package/RadioDecorator/RadioDecorator.d.ts +0 -35
- package/Repeater/Repeater.d.ts +0 -83
- package/Resizable/Resizable.d.ts +0 -31
- package/Routable/Routable.d.ts +0 -148
- package/Scrollable/Scrollable.d.ts +0 -0
- package/Scroller/Scroller.d.ts +0 -276
- package/Skinnable/Skinnable.d.ts +0 -94
- package/Slider/Slider.d.ts +0 -202
- package/SlotItem/SlotItem.d.ts +0 -118
- package/Slottable/Slottable.d.ts +0 -22
- package/Spinner/Spinner.d.ts +0 -95
- package/ToggleIcon/ToggleIcon.d.ts +0 -90
- package/ToggleItem/ToggleItem.d.ts +0 -134
- package/Toggleable/Toggleable.d.ts +0 -103
- package/Touchable/Touchable.d.ts +0 -175
- package/Transition/Transition.d.ts +0 -196
- package/ViewManager/ViewManager.d.ts +0 -191
- package/VirtualList/VirtualList.d.ts +0 -530
- package/index.d.ts +0 -0
- package/internal/IdProvider/IdProvider.d.ts +0 -0
- package/internal/Pure/Pure.d.ts +0 -0
- package/internal/localized-fonts/localized-fonts.d.ts +0 -53
- package/internal/selection/selection.d.ts +0 -0
- package/internal/validators/validators.d.ts +0 -0
- package/resolution/index.d.ts +0 -187
- package/useControlledState/useControlledState.d.ts +0 -0
- package/useScroll/useScroll.d.ts +0 -0
package/Group/Group.d.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
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/Heading/Heading.d.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
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
|
-
*
|
|
54
|
-
* for content on a screen, starting with `'large'` for the first tier of information
|
|
55
|
-
followed by `'medium'` for the next, and so fourth.
|
|
56
|
-
*
|
|
57
|
-
* If the `spacing` prop is not set (defaulting to "auto"), these values automatically set
|
|
58
|
-
the spacing to the correlated names.
|
|
59
|
-
*/
|
|
60
|
-
size?: "title" | "subtitle" | "large" | "medium" | "small" | "tiny";
|
|
61
|
-
/**
|
|
62
|
-
* The size of the spacing around the Heading.
|
|
63
|
-
*
|
|
64
|
-
* These have no built-in measurements, as they are intended to be defined by the theme
|
|
65
|
-
consuming this UI element. The values correlate with customizable classes made available
|
|
66
|
-
by this component's `css` prop.
|
|
67
|
-
*
|
|
68
|
-
* Allowed values include:
|
|
69
|
-
* * `'auto'` (default) - Lets this value be based on the `size` prop for automatic usage.
|
|
70
|
-
* * `'large'` - Specifically assign the `'large'` spacing.
|
|
71
|
-
* * `'medium'` - Specifically assign the `'medium'` spacing.
|
|
72
|
-
* * `'small'` - Specifically assign the `'small'` spacing.
|
|
73
|
-
* * `'none'` - No spacing at all. Neighboring elements will directly touch the Heading.
|
|
74
|
-
*/
|
|
75
|
-
spacing?: "auto" | "large" | "medium" | "small" | "none";
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* A labeled Heading component.
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
export class Heading extends React.Component<
|
|
82
|
-
Merge<React.HTMLProps<HTMLElement>, HeadingProps>
|
|
83
|
-
> {}
|
|
84
|
-
|
|
85
|
-
export interface HeadingDecoratorProps extends ui_ForwardRef_ForwardRefProps {}
|
|
86
|
-
export function HeadingDecorator<P>(
|
|
87
|
-
Component: React.ComponentType<P> | string
|
|
88
|
-
): React.ComponentType<P & HeadingDecoratorProps>;
|
|
89
|
-
|
|
90
|
-
export default Heading;
|
package/Icon/Icon.d.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
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 [iconList] ,
|
|
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 [ `icon` ] is not
|
|
34
|
-
found in [iconList]
|
|
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
|
-
[theming] .
|
|
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;
|
|
@@ -1,115 +0,0 @@
|
|
|
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 [icon] .
|
|
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 [icon component] 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` [events] .
|
|
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
|
-
[theming] .
|
|
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;
|
package/Image/Image.d.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
// Type definitions for ui/Image
|
|
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 ImageBaseProps {
|
|
10
|
-
/**
|
|
11
|
-
* String value for the alt attribute of the image.
|
|
12
|
-
*/
|
|
13
|
-
alt?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Node for the children of an `Image` . Useful for overlays.
|
|
16
|
-
*/
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
/**
|
|
19
|
-
* Called with a reference to the root component.
|
|
20
|
-
*
|
|
21
|
-
* When using , the `ref` prop is forwarded to this component
|
|
22
|
-
as `componentRef` .
|
|
23
|
-
*/
|
|
24
|
-
componentRef?: object | Function;
|
|
25
|
-
/**
|
|
26
|
-
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
27
|
-
corresponding internal elements and states of this component.
|
|
28
|
-
*
|
|
29
|
-
* The following classes are supported:
|
|
30
|
-
* * `image` - The root component class
|
|
31
|
-
* * `fit` - Applied when `sizing` prop is `fit`
|
|
32
|
-
* * `fill` - Applied when `sizing` prop is `fill`
|
|
33
|
-
*/
|
|
34
|
-
css?: object;
|
|
35
|
-
/**
|
|
36
|
-
* Called if the image has an error.
|
|
37
|
-
*/
|
|
38
|
-
onError?: Function;
|
|
39
|
-
/**
|
|
40
|
-
* Called once the image is loaded.
|
|
41
|
-
*/
|
|
42
|
-
onLoad?: Function;
|
|
43
|
-
/**
|
|
44
|
-
* A placeholder image to be displayed before the image is loaded.
|
|
45
|
-
*
|
|
46
|
-
* For performance purposes, it should be pre-loaded or be a data url. If `src` is
|
|
47
|
-
unset, this value will be used as the `background-image` .
|
|
48
|
-
*/
|
|
49
|
-
placeholder?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Used to set the `background-size` of an `Image` .
|
|
52
|
-
* * `'fill'` - sets `background-size: cover`
|
|
53
|
-
* * `'fit'` - sets `background-size: contain`
|
|
54
|
-
* * `'none'` - uses the image's natural size
|
|
55
|
-
*/
|
|
56
|
-
sizing?: string;
|
|
57
|
-
/**
|
|
58
|
-
* String value or Object of values used to determine which image will appear on
|
|
59
|
-
a specific screenSize.
|
|
60
|
-
*/
|
|
61
|
-
src?: string | object;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* A basic image component designed to display images conditionally based on screen size.
|
|
65
|
-
*
|
|
66
|
-
* This component does not have a default size, therefore the image will not show unless a size is
|
|
67
|
-
specified using a CSS `className` or inline `style` .
|
|
68
|
-
*
|
|
69
|
-
* Example:
|
|
70
|
-
* ```
|
|
71
|
-
const src = {
|
|
72
|
-
'hd': 'http://lorempixel.com/64/64/city/1/',
|
|
73
|
-
'fhd': 'http://lorempixel.com/128/128/city/1/',
|
|
74
|
-
'uhd': 'http://lorempixel.com/256/256/city/1/'
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
<Image className={css.myImage} src={src} sizing="fill" />
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
* `ui/Image` is based on the `div` element, but it uses `img` to provide `onError` and `onLoad`
|
|
81
|
-
events. The image that you see on screen is a `background-image` from the `div` element, not the
|
|
82
|
-
`img` element.
|
|
83
|
-
*
|
|
84
|
-
* If you need a naturally sized image, you can use the native `<img>` element instead.
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
export class ImageBase extends React.Component<
|
|
88
|
-
Merge<React.HTMLProps<HTMLElement>, ImageBaseProps>
|
|
89
|
-
> {}
|
|
90
|
-
|
|
91
|
-
export interface ImageProps
|
|
92
|
-
extends Omit<Merge<ImageBaseProps, ImageDecoratorProps>, "componentRef"> {
|
|
93
|
-
/**
|
|
94
|
-
* The aria-label for the image.
|
|
95
|
-
*
|
|
96
|
-
* If unset, it defaults to the value of `alt` .
|
|
97
|
-
*/
|
|
98
|
-
"aria-label"?: string;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* A minimally styled Image ready for customization by a theme.
|
|
102
|
-
*/
|
|
103
|
-
|
|
104
|
-
export class Image extends React.Component<
|
|
105
|
-
Merge<React.HTMLProps<HTMLElement>, ImageProps>
|
|
106
|
-
> {}
|
|
107
|
-
|
|
108
|
-
export interface ImageDecoratorProps extends ui_ForwardRef_ForwardRefProps {}
|
|
109
|
-
export function ImageDecorator<P>(
|
|
110
|
-
Component: React.ComponentType<P> | string
|
|
111
|
-
): React.ComponentType<P & ImageDecoratorProps>;
|
|
112
|
-
|
|
113
|
-
export default Image;
|
package/ImageItem/ImageItem.d.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// Type definitions for ui/ImageItem
|
|
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 ImageItemBaseProps {
|
|
10
|
-
/**
|
|
11
|
-
* The caption displayed with the image.
|
|
12
|
-
*/
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
/**
|
|
15
|
-
* Called with a reference to the root component.
|
|
16
|
-
*
|
|
17
|
-
* When using , the `ref` prop is forwarded to this component
|
|
18
|
-
as `componentRef` .
|
|
19
|
-
*/
|
|
20
|
-
componentRef?: object | Function;
|
|
21
|
-
/**
|
|
22
|
-
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
23
|
-
corresponding internal elements and states of this component.
|
|
24
|
-
*
|
|
25
|
-
* The following classes are supported:
|
|
26
|
-
* * `imageItem` - The root component class
|
|
27
|
-
* * `caption` - The caption component class
|
|
28
|
-
* * `horizontal` - Applied when `orientation="horizontal"
|
|
29
|
-
* * `image` - The image component class
|
|
30
|
-
* * `selected` - Applied when `selected` prop is `true`
|
|
31
|
-
* * `vertical` - Applied when `orientation="vertical"
|
|
32
|
-
*/
|
|
33
|
-
css?: object;
|
|
34
|
-
/**
|
|
35
|
-
* The component used to render the image component.
|
|
36
|
-
*/
|
|
37
|
-
imageComponent?: React.ComponentType | JSX.Element;
|
|
38
|
-
/**
|
|
39
|
-
* The layout orientation of the component.
|
|
40
|
-
*/
|
|
41
|
-
orientation?: "horizontal" | "vertical";
|
|
42
|
-
/**
|
|
43
|
-
* A placeholder image to be displayed before the image is loaded.
|
|
44
|
-
*/
|
|
45
|
-
placeholder?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Applies a selected visual effect to the image.
|
|
48
|
-
*/
|
|
49
|
-
selected?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* String value or Object of values used to determine which image will appear on a specific
|
|
52
|
-
screenSize.
|
|
53
|
-
*/
|
|
54
|
-
src?: string | object;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* A basic image item without any behavior.
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
export class ImageItemBase extends React.Component<
|
|
61
|
-
Merge<React.HTMLProps<HTMLElement>, ImageItemBaseProps>
|
|
62
|
-
> {}
|
|
63
|
-
|
|
64
|
-
export interface ImageItemDecoratorProps
|
|
65
|
-
extends ui_ForwardRef_ForwardRefProps {}
|
|
66
|
-
export function ImageItemDecorator<P>(
|
|
67
|
-
Component: React.ComponentType<P> | string
|
|
68
|
-
): React.ComponentType<P & ImageItemDecoratorProps>;
|
|
69
|
-
|
|
70
|
-
export interface ImageItemProps
|
|
71
|
-
extends Omit<
|
|
72
|
-
Merge<ImageItemBaseProps, ImageItemDecoratorProps>,
|
|
73
|
-
"componentRef"
|
|
74
|
-
> {}
|
|
75
|
-
/**
|
|
76
|
-
* A minimally styled ImageItem ready for customization by a theme.
|
|
77
|
-
*/
|
|
78
|
-
|
|
79
|
-
export class ImageItem extends React.Component<
|
|
80
|
-
Merge<React.HTMLProps<HTMLElement>, ImageItemProps>
|
|
81
|
-
> {}
|
|
82
|
-
|
|
83
|
-
export default ImageItem;
|
package/Item/Item.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// Type definitions for ui/Item
|
|
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 ItemBaseProps {
|
|
11
|
-
/**
|
|
12
|
-
* The node to be displayed as the main content of the item.
|
|
13
|
-
*/
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
* The type of component to use to render the item. May be a DOM node name (e.g 'div',
|
|
17
|
-
'span', etc.) or a custom component.
|
|
18
|
-
*/
|
|
19
|
-
component?: string | React.ComponentType;
|
|
20
|
-
/**
|
|
21
|
-
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
22
|
-
corresponding internal elements and states of this component.
|
|
23
|
-
*
|
|
24
|
-
* The following classes are supported:
|
|
25
|
-
* * `item` - The root class name
|
|
26
|
-
* * `inline` - Applied when `inline` prop is true
|
|
27
|
-
*/
|
|
28
|
-
css?: object;
|
|
29
|
-
/**
|
|
30
|
-
* Applies a disabled state to the item.
|
|
31
|
-
*/
|
|
32
|
-
disabled?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Applies inline styling to the item.
|
|
35
|
-
*/
|
|
36
|
-
inline?: boolean;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* A basic list item component structure without any behaviors applied to it.
|
|
40
|
-
*
|
|
41
|
-
* It also has support for overlay to place things before and after the main content.
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
export class ItemBase extends React.Component<
|
|
45
|
-
Merge<React.HTMLProps<HTMLElement>, ItemBaseProps>
|
|
46
|
-
> {}
|
|
47
|
-
|
|
48
|
-
export interface ItemDecoratorProps
|
|
49
|
-
extends Merge<ui_ForwardRef_ForwardRefProps, ui_Touchable_TouchableProps> {}
|
|
50
|
-
export function ItemDecorator<P>(
|
|
51
|
-
Component: React.ComponentType<P> | string
|
|
52
|
-
): React.ComponentType<P & ItemDecoratorProps>;
|
|
53
|
-
|
|
54
|
-
export interface ItemProps
|
|
55
|
-
extends Omit<Merge<ItemBaseProps, ItemDecoratorProps>, "componentRef"> {}
|
|
56
|
-
/**
|
|
57
|
-
* A minimally-styled ready-to-use list item component with touch support.
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
export class Item extends React.Component<
|
|
61
|
-
Merge<React.HTMLProps<HTMLElement>, ItemProps>
|
|
62
|
-
> {}
|
|
63
|
-
|
|
64
|
-
export default Item;
|