@enact/ui 4.6.1 → 4.6.2

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 (163) hide show
  1. package/AnnounceDecorator/Announce.js +4 -2
  2. package/AnnounceDecorator/AnnounceDecorator.d.ts +64 -0
  3. package/AnnounceDecorator/AnnounceDecorator.js +3 -1
  4. package/BodyText/BodyText.d.ts +66 -0
  5. package/BodyText/BodyText.js +3 -1
  6. package/Button/Button.d.ts +125 -0
  7. package/Button/Button.js +3 -1
  8. package/CHANGELOG.md +4 -0
  9. package/Cancelable/Cancelable.d.ts +64 -0
  10. package/Cancelable/Cancelable.js +4 -2
  11. package/Cancelable/tests/Cancelable-specs.js +3 -1
  12. package/Changeable/Changeable.d.ts +54 -0
  13. package/Changeable/Changeable.js +4 -2
  14. package/ComponentOverride/ComponentOverride.d.ts +52 -0
  15. package/ComponentOverride/ComponentOverride.js +3 -1
  16. package/FloatingLayer/FloatingLayer.js +4 -2
  17. package/FloatingLayer/FloatingLayerContainer.js +3 -1
  18. package/FloatingLayer/FloatingLayerDecorator.js +3 -1
  19. package/FloatingLayer/Scrim.js +4 -2
  20. package/FloatingLayer/index.d.ts +100 -0
  21. package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +3 -1
  22. package/FloatingLayer/useFloatingLayer.js +2 -2
  23. package/ForwardRef/ForwardRef.d.ts +22 -0
  24. package/ForwardRef/ForwardRef.js +3 -1
  25. package/GridListImageItem/GridListImageItem.d.ts +85 -0
  26. package/GridListImageItem/GridListImageItem.js +3 -1
  27. package/Group/Group.d.ts +107 -0
  28. package/Group/Group.js +3 -1
  29. package/Group/GroupItem.js +3 -1
  30. package/Heading/Heading.d.ts +89 -0
  31. package/Heading/Heading.js +3 -1
  32. package/Icon/Icon.d.ts +88 -0
  33. package/Icon/Icon.js +3 -1
  34. package/IconButton/IconButton.d.ts +115 -0
  35. package/IconButton/IconButton.js +4 -2
  36. package/Image/Image.d.ts +113 -0
  37. package/Image/Image.js +3 -1
  38. package/ImageItem/ImageItem.d.ts +83 -0
  39. package/ImageItem/ImageItem.js +3 -1
  40. package/ImageItem/tests/ImageItem-specs.js +3 -1
  41. package/Item/Item.d.ts +64 -0
  42. package/Item/Item.js +3 -1
  43. package/LabeledIcon/LabeledIcon.d.ts +130 -0
  44. package/LabeledIcon/LabeledIcon.js +3 -1
  45. package/Layout/Cell.js +3 -1
  46. package/Layout/Layout.d.ts +267 -0
  47. package/Layout/Layout.js +28 -5
  48. package/Layout/tests/Layout-specs.js +5 -3
  49. package/Marquee/MarqueeBase.js +3 -1
  50. package/Marquee/MarqueeController.js +4 -2
  51. package/Marquee/MarqueeDecorator.js +4 -2
  52. package/Marquee/index.d.ts +258 -0
  53. package/Marquee/tests/Marquee-specs.js +3 -1
  54. package/Measurable/Measurable.d.ts +26 -0
  55. package/Measurable/Measurable.js +5 -3
  56. package/Measurable/tests/Measurable-specs.js +8 -6
  57. package/Media/Media.d.ts +99 -0
  58. package/Media/Media.js +6 -4
  59. package/Placeholder/PlaceholderControllerDecorator.js +4 -2
  60. package/Placeholder/PlaceholderDecorator.js +4 -2
  61. package/Placeholder/index.d.ts +53 -0
  62. package/ProgressBar/ProgressBar.d.ts +92 -0
  63. package/ProgressBar/ProgressBar.js +3 -1
  64. package/README.md +1 -1
  65. package/RadioDecorator/RadioControllerDecorator.js +4 -2
  66. package/RadioDecorator/RadioDecorator.d.ts +35 -0
  67. package/RadioDecorator/RadioDecorator.js +4 -2
  68. package/Repeater/Repeater.d.ts +82 -0
  69. package/Repeater/Repeater.js +3 -1
  70. package/Repeater/tests/Repeater-specs.js +3 -1
  71. package/Resizable/Resizable.d.ts +31 -0
  72. package/Resizable/Resizable.js +4 -2
  73. package/Routable/Link.js +4 -2
  74. package/Routable/Routable.d.ts +148 -0
  75. package/Routable/Routable.js +3 -1
  76. package/Routable/Router.js +4 -2
  77. package/Routable/tests/Routable-specs.js +5 -3
  78. package/Scrollable/ScrollAnimator.js +3 -1
  79. package/Scrollable/ScrollThumb.js +3 -1
  80. package/Scrollable/Scrollable.d.ts +0 -0
  81. package/Scrollable/Scrollable.js +4 -2
  82. package/Scrollable/ScrollableNative.js +4 -2
  83. package/Scrollable/Scrollbar.js +4 -2
  84. package/Scroller/Scroller.d.ts +276 -0
  85. package/Scroller/Scroller.js +3 -1
  86. package/Scroller/ScrollerBasic.js +4 -2
  87. package/Scroller/UiScrollerBase.js +4 -2
  88. package/Skinnable/Skinnable.d.ts +94 -0
  89. package/Skinnable/Skinnable.js +3 -1
  90. package/Skinnable/tests/Skinnable-specs.js +3 -1
  91. package/Skinnable/tests/useSkins-specs.js +3 -1
  92. package/Slider/Knob.js +3 -1
  93. package/Slider/PositionDecorator.js +4 -2
  94. package/Slider/Slider.d.ts +202 -0
  95. package/Slider/Slider.js +3 -1
  96. package/SlotItem/SlotItem.d.ts +118 -0
  97. package/SlotItem/SlotItem.js +3 -1
  98. package/Slottable/Slottable.d.ts +22 -0
  99. package/Slottable/Slottable.js +3 -1
  100. package/Slottable/useSlots.js +3 -1
  101. package/Spinner/Spinner.d.ts +95 -0
  102. package/Spinner/Spinner.js +3 -1
  103. package/ToggleIcon/ToggleIcon.d.ts +90 -0
  104. package/ToggleIcon/ToggleIcon.js +3 -1
  105. package/ToggleItem/ToggleItem.d.ts +132 -0
  106. package/ToggleItem/ToggleItem.js +3 -1
  107. package/ToggleItem/tests/ToggleItem-specs.js +3 -1
  108. package/Toggleable/Toggle.js +4 -2
  109. package/Toggleable/Toggleable.d.ts +103 -0
  110. package/Toggleable/Toggleable.js +3 -1
  111. package/Toggleable/useToggle.js +1 -1
  112. package/Touchable/ClickAllow.js +3 -1
  113. package/Touchable/Drag.js +4 -2
  114. package/Touchable/Flick.js +4 -2
  115. package/Touchable/Hold.js +4 -2
  116. package/Touchable/Pinch.js +4 -2
  117. package/Touchable/Touch.js +3 -1
  118. package/Touchable/Touchable.d.ts +217 -0
  119. package/Touchable/Touchable.js +3 -1
  120. package/Touchable/config.js +3 -1
  121. package/Touchable/tests/useTouch-specs.js +3 -1
  122. package/Touchable/useTouch.js +5 -3
  123. package/Transition/Transition.d.ts +194 -0
  124. package/Transition/Transition.js +4 -2
  125. package/Transition/tests/Transition-specs.js +5 -3
  126. package/ViewManager/Arranger.js +3 -1
  127. package/ViewManager/TransitionGroup.js +3 -1
  128. package/ViewManager/View.js +4 -2
  129. package/ViewManager/ViewManager.d.ts +191 -0
  130. package/ViewManager/ViewManager.js +4 -2
  131. package/ViewManager/tests/ViewManager-specs.js +3 -1
  132. package/VirtualList/UiVirtualListBase.js +5 -3
  133. package/VirtualList/VirtualList.d.ts +528 -0
  134. package/VirtualList/VirtualList.js +3 -1
  135. package/VirtualList/VirtualListBasic.js +5 -3
  136. package/VirtualList/tests/VirtualGridList-native-specs.js +3 -1
  137. package/VirtualList/tests/VirtualGridList-specs.js +3 -1
  138. package/VirtualList/tests/VirtualList-native-specs.js +3 -1
  139. package/VirtualList/tests/VirtualList-specs.js +3 -1
  140. package/index.d.ts +0 -0
  141. package/internal/IdProvider/IdProvider.d.ts +0 -0
  142. package/internal/IdProvider/IdProvider.js +3 -1
  143. package/internal/IdProvider/Provider.js +3 -1
  144. package/internal/IdProvider/tests/IdProvider-specs.js +3 -1
  145. package/internal/IdProvider/tests/useId-specs.js +4 -3
  146. package/internal/Pure/Pure.d.ts +0 -0
  147. package/internal/Pure/Pure.js +4 -2
  148. package/internal/Pure/tests/Pure-specs.js +4 -2
  149. package/internal/localized-fonts/localized-fonts.d.ts +53 -0
  150. package/internal/localized-fonts/localized-fonts.js +2 -2
  151. package/internal/selection/selection.d.ts +0 -0
  152. package/internal/validators/validators.d.ts +0 -0
  153. package/package.json +2 -2
  154. package/resolution/ResolutionDecorator.js +4 -2
  155. package/resolution/index.d.ts +187 -0
  156. package/useControlledState/tests/useControlledState-specs.js +2 -2
  157. package/useControlledState/useControlledState.d.ts +0 -0
  158. package/useControlledState/useControlledState.js +2 -2
  159. package/useScroll/ScrollAnimator.js +3 -1
  160. package/useScroll/Scrollbar.js +6 -4
  161. package/useScroll/ScrollbarTrack.js +3 -1
  162. package/useScroll/useScroll.d.ts +0 -0
  163. package/useScroll/useScroll.js +64 -52
@@ -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;
@@ -22,10 +22,12 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
22
22
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
23
23
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
24
24
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
25
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
25
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
26
26
  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; }
27
27
  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; }
28
- 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 _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; }
29
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
30
+ 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); }
29
31
  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; }
30
32
  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; }
31
33
  /**
@@ -0,0 +1,113 @@
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/Image/Image.js CHANGED
@@ -17,7 +17,9 @@ var _excluded = ["alt", "aria-label", "bgImage", "children", "componentRef", "cs
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
18
18
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
19
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
22
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
21
23
  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
24
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
23
25
  /**
@@ -0,0 +1,83 @@
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;
@@ -19,7 +19,9 @@ var _excluded = ["imageComponent"],
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
20
  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; }
21
21
  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; }
22
- 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 _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; }
23
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
24
+ 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
25
  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; }
24
26
  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; }
25
27
  // Adapts ComponentOverride to work within Cell since both use the component prop
@@ -8,7 +8,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
8
8
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
9
9
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
10
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
11
- 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; }
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
12
14
  var src = {
13
15
  'hd': 'http://lorempixel.com/64/64/city/1/',
14
16
  'fhd': 'http://lorempixel.com/128/128/city/1/',
package/Item/Item.d.ts ADDED
@@ -0,0 +1,64 @@
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;
package/Item/Item.js CHANGED
@@ -16,7 +16,9 @@ var _excluded = ["component", "componentRef", "disabled", "children"];
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
17
  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; }
18
18
  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; }
19
- 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; }
19
+ 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; }
20
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
21
+ 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); }
20
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; }
21
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; }
22
24
  /**
@@ -0,0 +1,130 @@
1
+ // Type definitions for ui/LabeledIcon
2
+
3
+ import * as React from "react";
4
+ import { SlottableProps as ui_Slottable_SlottableProps } from "@enact/ui/Slottable";
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 LabeledIconBaseProps {
10
+ /**
11
+ * The label.
12
+ *
13
+ * This accepts strings, DOM, and Components, if you need more elaborate features. It may be
14
+ positioned using `labelPosition` .
15
+ */
16
+ children?: React.ReactNode;
17
+ /**
18
+ * Called with a reference to the root component.
19
+ *
20
+ * When using , the `ref` prop is forwarded to this
21
+ component as `componentRef` .
22
+ */
23
+ componentRef?: object | Function;
24
+ /**
25
+ * Customizes the component by mapping the supplied collection of CSS class names to the
26
+ corresponding internal elements and states of this component.
27
+ *
28
+ * The following classes are supported:
29
+ * * `labeledIcon` - The root component class
30
+ * * `icon` - The icon component class
31
+ * * `iconCell` - Applied to the `iconComponent` directly, like `.icon` . If `icon` in a
32
+ React component, this class is applied to the container of the icon,
33
+ rather than the icon itself.
34
+ * * `label` - The label component class
35
+ * * `inline` - Applied when the inline prop is set
36
+ * * `above` - Applied when the labelPosition prop is set to above
37
+ * * `after` - Applied when the labelPosition prop is set to after
38
+ * * `before` - Applied when the labelPosition prop is set to before
39
+ * * `below` - Applied when the labelPosition prop is set to below
40
+ * * `left` - Applied when the labelPosition prop is set to left
41
+ * * `right` - Applied when the labelPosition prop is set to right
42
+ */
43
+ css?: object;
44
+ /**
45
+ * Disables the component and becomes non-interactive.
46
+ */
47
+ disabled?: boolean;
48
+ /**
49
+ * Flip the icon horizontally, vertically or both.
50
+ */
51
+ flip?: "both" | "horizontal" | "vertical";
52
+ /**
53
+ * The icon.
54
+ *
55
+ * This will be passed as `children` to the `iconComponent` , unless you supply a React
56
+ element (like JSX) to this prop, directly or via the `<icon>` slot.
57
+ */
58
+ icon?: string | JSX.Element | React.ComponentType;
59
+ /**
60
+ * The component used to render the `icon` .
61
+ *
62
+ * This will receive the `icon` prop as `children` and should handle it appropriately. This
63
+ prop is ignored in the case of a component being passed into the `icon` prop. It will
64
+ also receive the `flip` and `size` props as set on the component.
65
+ */
66
+ iconComponent?: React.ComponentType;
67
+ /**
68
+ * Enables this component to be used in an "inline" context.
69
+ *
70
+ * This is useful for when you have several of these components in a row and are not using a
71
+ or flex-box configuration.
72
+ */
73
+ inline?: boolean;
74
+ /**
75
+ * The position of the label in relation to the icon element.
76
+ *
77
+ * Allowed values include:
78
+ * * 'below' (default),
79
+ * * 'above',
80
+ * * 'left',
81
+ * * 'right',
82
+ * * 'before', and
83
+ * * 'after'.
84
+ *
85
+ * The 'before' and 'after' values automatically swap sides when in an RTL locale context.
86
+ */
87
+ labelPosition?: "above" | "after" | "before" | "below" | "left" | "right";
88
+ /**
89
+ * The size of the icon.
90
+ *
91
+ * Applies the CSS class which can be customized by
92
+ .
93
+ */
94
+ size?: string;
95
+ }
96
+ /**
97
+ * An icon component with a label.
98
+ */
99
+
100
+ export class LabeledIconBase extends React.Component<
101
+ Merge<React.HTMLProps<HTMLElement>, LabeledIconBaseProps>
102
+ > {}
103
+
104
+ export interface LabeledIconDecoratorProps
105
+ extends ui_Slottable_SlottableProps {}
106
+ export function LabeledIconDecorator<P>(
107
+ Component: React.ComponentType<P> | string
108
+ ): React.ComponentType<P & LabeledIconDecoratorProps>;
109
+
110
+ export interface LabeledIconProps
111
+ extends Omit<
112
+ Merge<LabeledIconBaseProps, LabeledIconDecoratorProps>,
113
+ "componentRef"
114
+ > {}
115
+ /**
116
+ * An icon component with a label without any behaviors applied to it.
117
+ *
118
+ * Usage:
119
+ * ```
120
+ <LabeledIcon icon="star" labelPosition="after">
121
+ Favorite
122
+ </LabeledIcon>
123
+ ```
124
+ */
125
+
126
+ export class LabeledIcon extends React.Component<
127
+ Merge<React.HTMLProps<HTMLElement>, LabeledIconProps>
128
+ > {}
129
+
130
+ export default LabeledIcon;
@@ -19,7 +19,9 @@ var _excluded = ["css", "children", "componentRef", "disabled", "flip", "icon",
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
20
  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; }
21
21
  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; }
22
- 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 _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; }
23
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
24
+ 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
25
  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; }
24
26
  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; }
25
27
  /**
package/Layout/Cell.js CHANGED
@@ -17,7 +17,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
17
17
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
18
18
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
19
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
22
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
21
23
  var toFlexAlign = function toFlexAlign(align) {
22
24
  return align === 'end' && 'flex-end' || align === 'start' && 'flex-start' || align;
23
25
  };