@enact/limestone 1.10.1 → 1.10.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.
- package/.github/PULL_REQUEST_TEMPLATE.md +1 -0
- package/ActionGuide/ActionGuide.d.ts +1 -1
- package/ActionGuide/ActionGuide.module.css +3 -0
- package/Alert/Alert.d.ts +9 -0
- package/Alert/Alert.js +63 -21
- package/Alert/Alert.module.css +41 -9
- package/Alert/AlertImage.module.css +5 -1
- package/Alert/tests/Alert-specs.js +6 -2
- package/BodyText/BodyText.d.ts +1 -1
- package/BodyText/BodyText.js +14 -9
- package/BodyText/BodyText.module.css +1 -1
- package/Button/Button.d.ts +3 -3
- package/Button/Button.module.css +14 -28
- package/CHANGELOG.md +48 -1
- package/Card/Card.d.ts +81 -9
- package/Card/Card.js +321 -84
- package/Card/Card.module.css +171 -20
- package/Card/tests/Card-specs.js +100 -0
- package/Checkbox/Checkbox.d.ts +2 -2
- package/Checkbox/Checkbox.module.css +2 -9
- package/CheckboxItem/CheckboxItem.d.ts +8 -1
- package/CheckboxItem/CheckboxItem.js +39 -12
- package/CheckboxItem/CheckboxItem.module.css +228 -4
- package/Chips/Chip.module.css +2 -2
- package/ContextualMenuDecorator/ContextualMenuDecorator.d.ts +2 -2
- package/ContextualPopupDecorator/ContextualPopup.module.css +1 -1
- package/ContextualPopupDecorator/ContextualPopupDecorator.js +2 -4
- package/ContextualPopupDecorator/tests/ContextualPopupDecorator-specs.js +39 -2
- package/Dropdown/Dropdown.d.ts +2 -2
- package/Dropdown/Dropdown.module.css +7 -7
- package/FixedPopupPanels/FixedPopupPanels.d.ts +2 -2
- package/FlexiblePopupPanels/FlexiblePopupPanels.module.css +15 -3
- package/FlexiblePopupPanels/index.d.ts +2 -2
- package/FormCheckboxItem/FormCheckboxItem.d.ts +1 -1
- package/FormCheckboxItem/FormCheckboxItem.js +1 -0
- package/FormCheckboxItem/FormCheckboxItem.module.css +1 -1
- package/Heading/Heading.d.ts +2 -2
- package/Icon/Icon.d.ts +22 -1
- package/Icon/Icon.js +21 -0
- package/Icon/IconList.js +43 -1
- package/IconItem/IconItem.d.ts +2 -2
- package/IconItem/IconItem.module.css +11 -14
- package/Image/Image.d.ts +1 -1
- package/Image/Image.module.css +1 -1
- package/ImageItem/ImageItem.d.ts +2 -2
- package/ImageItem/ImageItem.js +3 -16
- package/ImageItem/ImageItem.module.css +105 -97
- package/ImageItem/tests/ImageItem-specs.js +6 -5
- package/Input/Input.module.css +8 -7
- package/Input/InputField.module.css +4 -4
- package/Input/index.d.ts +1 -1
- package/Input/tests/Input-specs.js +2 -2
- package/Input/tests/InputField-specs.js +1 -1
- package/Item/Item.d.ts +2 -2
- package/Item/Item.module.css +27 -15
- package/KeyGuide/KeyGuide.d.ts +2 -2
- package/MediaOverlay/MediaOverlay.d.ts +2 -2
- package/MediaOverlay/MediaOverlay.module.css +2 -5
- package/MediaPlayer/MediaSlider.module.css +1 -0
- package/MediaPlayer/Times.module.css +1 -1
- package/MediaPlayer/index.d.ts +2 -2
- package/PageViews/PageViews.module.css +2 -1
- package/Panels/Header.module.css +40 -28
- package/Panels/Panel.module.css +1 -1
- package/Panels/index.d.ts +1 -1
- package/Picker/Picker.d.ts +1 -1
- package/Popup/Popup.module.css +4 -1
- package/PopupTabLayout/PopupTabLayout.d.ts +6 -6
- package/PopupTabLayout/PopupTabLayout.module.css +6 -6
- package/ProgressBar/ProgressBar.d.ts +1 -1
- package/ProgressBar/ProgressBar.module.css +12 -12
- package/ProgressBar/ProgressBarTooltip.module.css +7 -7
- package/ProgressButton/ProgressButton.d.ts +2 -2
- package/QuickGuidePanels/QuickGuidePanels.module.css +1 -1
- package/RadioItem/RadioItem.d.ts +1 -1
- package/RadioItem/RadioItem.module.css +18 -20
- package/Scroller/Scroller.d.ts +12 -0
- package/Scroller/Scroller.js +15 -0
- package/Scroller/tests/Scroller-specs.js +29 -0
- package/Scroller/useThemeScroller.js +22 -2
- package/Slider/Slider.d.ts +1 -1
- package/Slider/Slider.module.css +539 -300
- package/Spinner/Spinner.d.ts +1 -1
- package/Spinner/Spinner.module.css +2 -2
- package/Steps/Steps.d.ts +1 -1
- package/Steps/Steps.js +12 -6
- package/Steps/Steps.module.css +16 -2
- package/Switch/Switch.module.css +2 -5
- package/SwitchItem/SwitchItem.d.ts +1 -1
- package/TabLayout/RefocusDecorator.js +1 -1
- package/TabLayout/TabGroup.module.css +12 -6
- package/TabLayout/TabLayout.js +4 -0
- package/ThemeDecorator/ThemeDecorator.d.ts +1 -1
- package/ThemeDecorator/ThemeDecorator.module.css +22 -1
- package/TooltipDecorator/Tooltip.js +68 -7
- package/TooltipDecorator/Tooltip.module.css +40 -23
- package/TooltipDecorator/TooltipDecorator.d.ts +52 -0
- package/TooltipDecorator/TooltipDecorator.js +42 -0
- package/TooltipDecorator/TooltipLabel.js +67 -14
- package/TooltipDecorator/tests/TooltipDecorator-specs.js +46 -0
- package/TooltipDecorator/useTooltip.js +14 -2
- package/VideoPlayer/MediaTitle.module.css +1 -1
- package/VirtualList/VirtualList.d.ts +24 -0
- package/VirtualList/VirtualList.js +30 -0
- package/VirtualList/tests/stickTo-specs.js +115 -0
- package/VirtualList/tests/useEvent-specs.js +39 -0
- package/VirtualList/useEvent.js +45 -10
- package/VirtualList/useThemeVirtualList.js +20 -2
- package/WizardPanels/WizardPanels.module.css +1 -1
- package/fonts/Limestone_Icons.ttf +0 -0
- package/internal/DateComponentPicker/DateComponentPicker.module.css +3 -3
- package/internal/Picker/Picker.js +8 -10
- package/internal/Picker/Picker.module.css +74 -141
- package/package.json +11 -14
- package/styles/color-mixins.less +4 -60
- package/styles/colors-game.less +5 -5
- package/styles/colors.less +9 -10
- package/styles/mixins.less +0 -46
- package/styles/motion-mixins.less +16 -7
- package/styles/motions.less +2 -2
- package/styles/variables.less +71 -46
- package/useScroll/useScroll.js +3 -1
package/Spinner/Spinner.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Type definitions for limestone/Spinner
|
|
2
2
|
|
|
3
|
-
import { SkinnableProps as limestone_Skinnable_SkinnableProps } from "limestone/Skinnable";
|
|
3
|
+
import { SkinnableProps as limestone_Skinnable_SkinnableProps } from "@enact/limestone/Skinnable";
|
|
4
4
|
import { SpinnerBaseProps as ui_Spinner_SpinnerBaseProps } from "@enact/ui/Spinner";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
.spinner {
|
|
55
|
-
line-height: 1.
|
|
55
|
+
line-height: 1.34em;
|
|
56
56
|
vertical-align: middle;
|
|
57
57
|
}
|
|
58
58
|
.spinner .bg {
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
align-content: center;
|
|
127
127
|
height: 2.75rem;
|
|
128
128
|
font-weight: var(--primitive-font-weight-semibold);
|
|
129
|
-
line-height: 1.
|
|
129
|
+
line-height: 1.34em;
|
|
130
130
|
max-width: 14.5rem;
|
|
131
131
|
}
|
|
132
132
|
:global(.enact-locale-non-latin) .spinner .client {
|
package/Steps/Steps.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Type definitions for limestone/Steps
|
|
2
2
|
|
|
3
|
-
import { SkinnableProps as limestone_Skinnable_SkinnableProps } from "limestone/Skinnable";
|
|
3
|
+
import { SkinnableProps as limestone_Skinnable_SkinnableProps } from "@enact/limestone/Skinnable";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
|
|
6
6
|
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
package/Steps/Steps.js
CHANGED
|
@@ -255,14 +255,20 @@ var StepsBase = exports.StepsBase = (0, _kind["default"])({
|
|
|
255
255
|
children: children
|
|
256
256
|
};
|
|
257
257
|
});
|
|
258
|
+
},
|
|
259
|
+
className: function className(_ref4) {
|
|
260
|
+
var _className = _ref4.className,
|
|
261
|
+
css = _ref4.css,
|
|
262
|
+
highlightCurrentOnly = _ref4.highlightCurrentOnly;
|
|
263
|
+
return (0, _classnames["default"])(_className, _defineProperty({}, css.highlightCurrentOnly, highlightCurrentOnly));
|
|
258
264
|
}
|
|
259
265
|
},
|
|
260
|
-
render: function render(
|
|
261
|
-
var css =
|
|
262
|
-
iconComponent =
|
|
263
|
-
size =
|
|
264
|
-
steps =
|
|
265
|
-
rest = _objectWithoutProperties(
|
|
266
|
+
render: function render(_ref5) {
|
|
267
|
+
var css = _ref5.css,
|
|
268
|
+
iconComponent = _ref5.iconComponent,
|
|
269
|
+
size = _ref5.size,
|
|
270
|
+
steps = _ref5.steps,
|
|
271
|
+
rest = _objectWithoutProperties(_ref5, _excluded2);
|
|
266
272
|
delete rest.current;
|
|
267
273
|
delete rest.currentIcon;
|
|
268
274
|
delete rest.futureIcon;
|
package/Steps/Steps.module.css
CHANGED
|
@@ -17,16 +17,30 @@
|
|
|
17
17
|
.steps .step.future {
|
|
18
18
|
opacity: 1;
|
|
19
19
|
}
|
|
20
|
+
.steps.highlightCurrentOnly {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--primitive-spacing-24);
|
|
25
|
+
margin-top: var(--primitive-spacing-30);
|
|
26
|
+
}
|
|
20
27
|
.steps .pageIndicator {
|
|
21
28
|
width: 0.375rem;
|
|
22
29
|
height: 0.375rem;
|
|
23
|
-
margin: 0
|
|
30
|
+
margin: 0;
|
|
24
31
|
border-radius: var(--semantic-radius-full);
|
|
25
32
|
}
|
|
26
33
|
.steps .pageIndicator.current {
|
|
27
34
|
width: 0.5rem;
|
|
28
35
|
height: 0.5rem;
|
|
29
|
-
|
|
36
|
+
}
|
|
37
|
+
.steps:global(.largeText) .pageIndicator {
|
|
38
|
+
width: calc(0.375rem * 1.2);
|
|
39
|
+
height: calc(0.375rem * 1.2);
|
|
40
|
+
}
|
|
41
|
+
.steps:global(.largeText) .pageIndicator.current {
|
|
42
|
+
width: calc(0.5rem * 1.2);
|
|
43
|
+
height: calc(0.5rem * 1.2);
|
|
30
44
|
}
|
|
31
45
|
.steps:global(.neutral) .step:not(.pageIndicator).past {
|
|
32
46
|
color: var(--semantic-color-on-background-main);
|
package/Switch/Switch.module.css
CHANGED
|
@@ -34,8 +34,8 @@ Animations properties
|
|
|
34
34
|
--lime-bounce-motion-easing-function: var(--lime-default-motion-easing-function);
|
|
35
35
|
--lime-focus-in-motion-easing-function: var(--lime-EIO-motion-easing-function);
|
|
36
36
|
--lime-focus-out-motion-easing-function: var(--lime-EO-motion-easing-function);
|
|
37
|
-
--lime-press-motion-easing-function: var(--lime-
|
|
38
|
-
--lime-release-motion-easing-function: var(--lime-
|
|
37
|
+
--lime-press-motion-easing-function: var(--lime-EO-motion-easing-function);
|
|
38
|
+
--lime-release-motion-easing-function: var(--lime-EIO-motion-easing-function);
|
|
39
39
|
/* ---------------------------------------
|
|
40
40
|
Keyframes names
|
|
41
41
|
------------------------------------------ */
|
|
@@ -76,9 +76,6 @@ Keyframes
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
/* ---------------------------------------
|
|
79
|
-
Motion Variables
|
|
80
|
-
------------------------------------------ */
|
|
81
|
-
/* ---------------------------------------
|
|
82
79
|
Motion Mixins
|
|
83
80
|
------------------------------------------ */
|
|
84
81
|
.switch {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Type definitions for limestone/SwitchItem
|
|
2
2
|
|
|
3
3
|
import { ToggleableProps as ui_Toggleable_ToggleableProps } from "@enact/ui/Toggleable";
|
|
4
|
-
import { ItemProps as limestone_Item_ItemProps } from "limestone/Item";
|
|
4
|
+
import { ItemProps as limestone_Item_ItemProps } from "@enact/limestone/Item";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
|
|
7
7
|
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
@@ -40,7 +40,7 @@ var getNavigableFilter = exports.getNavigableFilter = function getNavigableFilte
|
|
|
40
40
|
};
|
|
41
41
|
function useScreenOrientation() {
|
|
42
42
|
var getOrientation = function getOrientation() {
|
|
43
|
-
return window.innerWidth > window.innerHeight ? 'landscape' : 'portrait';
|
|
43
|
+
return typeof window === 'object' && window.innerWidth > window.innerHeight ? 'landscape' : 'portrait';
|
|
44
44
|
};
|
|
45
45
|
var _useState = (0, _react.useState)(getOrientation()),
|
|
46
46
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
height: 2rem;
|
|
23
23
|
line-height: 1.25rem;
|
|
24
24
|
}
|
|
25
|
+
.tab.horizontal.button.small:global(.largeText) {
|
|
26
|
+
font-size: var(--primitive-font-size-58);
|
|
27
|
+
line-height: 1.45833rem;
|
|
28
|
+
}
|
|
25
29
|
.tab.vertical.button {
|
|
26
30
|
height: 3.25rem;
|
|
27
31
|
padding: var(--primitive-spacing-36) var(--primitive-spacing-48);
|
|
@@ -111,9 +115,16 @@
|
|
|
111
115
|
display: flex;
|
|
112
116
|
}
|
|
113
117
|
.tabGroup.horizontal {
|
|
118
|
+
border-radius: var(--primitive-radius-44);
|
|
114
119
|
margin-left: calc((1 - var(--scrollable)) * var(--offset));
|
|
115
120
|
padding: var(--primitive-spacing-12);
|
|
116
121
|
}
|
|
122
|
+
.tabGroup.horizontal.scrollable {
|
|
123
|
+
border-radius: 0;
|
|
124
|
+
}
|
|
125
|
+
.tabGroup.horizontal.scrollable .tabs {
|
|
126
|
+
padding: 0 var(--primitive-spacing-132);
|
|
127
|
+
}
|
|
117
128
|
.tabGroup.horizontal:not(.scrollable) {
|
|
118
129
|
width: var(--tabs-width);
|
|
119
130
|
}
|
|
@@ -122,6 +133,7 @@
|
|
|
122
133
|
width: calc(var(--tabs-width) - var(--scrollable) * var(--offset) * 2);
|
|
123
134
|
}
|
|
124
135
|
.tabGroup.vertical {
|
|
136
|
+
border-radius: var(--semantic-radius-container);
|
|
125
137
|
padding: var(--primitive-spacing-36);
|
|
126
138
|
}
|
|
127
139
|
.tabGroup.vertical.scrollable {
|
|
@@ -141,7 +153,6 @@
|
|
|
141
153
|
}
|
|
142
154
|
:global(.neutral) .tabGroup {
|
|
143
155
|
background-color: color(from var(--semantic-color-surface-default-group) srgb r g b / 0.1);
|
|
144
|
-
border-radius: var(--semantic-radius-container);
|
|
145
156
|
}
|
|
146
157
|
:global(.neutral) .tabGroup > :first-child {
|
|
147
158
|
background: transparent;
|
|
@@ -162,7 +173,6 @@
|
|
|
162
173
|
}
|
|
163
174
|
:global(.enact-a11y-high-contrast) :global(.neutral):global(.highContrast) .tabGroup {
|
|
164
175
|
background-color: color(from var(--semantic-color-surface-default-group) srgb r g b / 0.1);
|
|
165
|
-
border-radius: var(--semantic-radius-container);
|
|
166
176
|
}
|
|
167
177
|
:global(.enact-a11y-high-contrast) :global(.neutral):global(.highContrast) .tabGroup > :first-child {
|
|
168
178
|
background: transparent;
|
|
@@ -183,7 +193,6 @@
|
|
|
183
193
|
}
|
|
184
194
|
:global(.light) .tabGroup {
|
|
185
195
|
background-color: color(from var(--semantic-color-surface-default-group) srgb r g b / 0.1);
|
|
186
|
-
border-radius: var(--semantic-radius-container);
|
|
187
196
|
}
|
|
188
197
|
:global(.light) .tabGroup > :first-child {
|
|
189
198
|
background: transparent;
|
|
@@ -209,7 +218,6 @@
|
|
|
209
218
|
}
|
|
210
219
|
:global(.game) .tabGroup {
|
|
211
220
|
background-color: color(from var(--semantic-color-surface-default-group) srgb r g b / 0.1);
|
|
212
|
-
border-radius: var(--semantic-radius-container);
|
|
213
221
|
}
|
|
214
222
|
:global(.game) .tabGroup > :first-child {
|
|
215
223
|
background: transparent;
|
|
@@ -234,7 +242,6 @@
|
|
|
234
242
|
}
|
|
235
243
|
:global(.green) :global(.game) .tabGroup {
|
|
236
244
|
background-color: color(from var(--semantic-color-surface-default-group) srgb r g b / 0.1);
|
|
237
|
-
border-radius: var(--semantic-radius-container);
|
|
238
245
|
}
|
|
239
246
|
:global(.green) :global(.game) .tabGroup > :first-child {
|
|
240
247
|
background: transparent;
|
|
@@ -259,7 +266,6 @@
|
|
|
259
266
|
}
|
|
260
267
|
:global(.orange) :global(.game) .tabGroup {
|
|
261
268
|
background-color: color(from var(--semantic-color-surface-default-group) srgb r g b / 0.1);
|
|
262
|
-
border-radius: var(--semantic-radius-container);
|
|
263
269
|
}
|
|
264
270
|
:global(.orange) :global(.game) .tabGroup > :first-child {
|
|
265
271
|
background: transparent;
|
package/TabLayout/TabLayout.js
CHANGED
|
@@ -55,6 +55,8 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
55
55
|
* @exports Tab
|
|
56
56
|
*/
|
|
57
57
|
var MAX_TABS_BEFORE_VERTICAL_SCROLLING = 8;
|
|
58
|
+
var MAX_TABS_BEFORE_HORIZONTAL_SCROLLING = 6;
|
|
59
|
+
var MAX_TABS_BEFORE_HORIZONTAL_SCROLLING_SMALL = 7;
|
|
58
60
|
var TAB_SPACING = 48;
|
|
59
61
|
var TabLayoutContext = exports.TabLayoutContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
60
62
|
var TouchableCell = (0, _Touchable["default"])(_Layout.Cell);
|
|
@@ -81,6 +83,8 @@ var getHorizontalTabWidth = function getHorizontalTabWidth(dataSize, size, tabSi
|
|
|
81
83
|
};
|
|
82
84
|
var isHorizontalScrollableTabs = function isHorizontalScrollableTabs(dataSize, offset, size, tabSize) {
|
|
83
85
|
var _window;
|
|
86
|
+
if (size === 'large' && dataSize > MAX_TABS_BEFORE_HORIZONTAL_SCROLLING) return true;
|
|
87
|
+
if (size === 'small' && dataSize > MAX_TABS_BEFORE_HORIZONTAL_SCROLLING_SMALL) return true;
|
|
84
88
|
var totalTabsWidth = dataSize * getHorizontalTabWidth(dataSize, size, tabSize) + TAB_SPACING * (dataSize - 1) + 2 * offset;
|
|
85
89
|
return typeof window !== 'undefined' && (_window = window) !== null && _window !== void 0 && _window.innerWidth ? window.innerWidth < _resolution["default"].scale(totalTabsWidth) : false;
|
|
86
90
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { FloatingLayerDecoratorProps as ui_FloatingLayer_FloatingLayerDecoratorProps } from "@enact/ui/FloatingLayer";
|
|
4
4
|
import { ResolutionDecoratorProps as ui_resolution_ResolutionDecoratorProps } from "@enact/ui/resolution";
|
|
5
5
|
import { SpotlightRootDecoratorProps as spotlight_SpotlightRootDecorator_SpotlightRootDecoratorProps } from "@enact/spotlight/SpotlightRootDecorator";
|
|
6
|
-
import { SkinnableProps as limestone_Skinnable_SkinnableProps } from "limestone/Skinnable";
|
|
6
|
+
import { SkinnableProps as limestone_Skinnable_SkinnableProps } from "@enact/limestone/Skinnable";
|
|
7
7
|
|
|
8
8
|
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
9
9
|
type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
|
|
@@ -268,6 +268,27 @@
|
|
|
268
268
|
src: local("LG Smart UI NUMBER Bold"), local("LGSmartUINUMBER-Bold");
|
|
269
269
|
font-weight: 700;
|
|
270
270
|
}
|
|
271
|
+
/* ----- Limestone Title ------ */
|
|
272
|
+
@font-face {
|
|
273
|
+
font-family: "Limestone Title";
|
|
274
|
+
src: local("LGSmart UI 3.0 Title Regular"), local("LGSmartUI3.0Title-Regular"), local("LGSmart UI 3.0 Title");
|
|
275
|
+
font-weight: normal;
|
|
276
|
+
}
|
|
277
|
+
@font-face {
|
|
278
|
+
font-family: "Limestone Title";
|
|
279
|
+
src: local("LGSmart UI 3.0 Title Light"), local("LGSmartUI3.0Title-Light");
|
|
280
|
+
font-weight: normal;
|
|
281
|
+
}
|
|
282
|
+
@font-face {
|
|
283
|
+
font-family: "Limestone Title";
|
|
284
|
+
src: local("LGSmart UI 3.0 Title SemiBold"), local("LGSmartUI3.0Title-SemiBold");
|
|
285
|
+
font-weight: normal;
|
|
286
|
+
}
|
|
287
|
+
@font-face {
|
|
288
|
+
font-family: "Limestone Title";
|
|
289
|
+
src: local("LGSmart UI 3.0 Title Bold"), local("LGSmartUI3.0Title-Bold");
|
|
290
|
+
font-weight: normal;
|
|
291
|
+
}
|
|
271
292
|
/* ----- Manual Limestone Locale Fonts (Stacking onto "Limestone") ------ */
|
|
272
293
|
@font-face {
|
|
273
294
|
font-family: "Limestone";
|
|
@@ -1171,7 +1192,7 @@
|
|
|
1171
1192
|
.root {
|
|
1172
1193
|
font-family: "Limestone";
|
|
1173
1194
|
font-size: var(--primitive-font-size-60);
|
|
1174
|
-
line-height: 1.
|
|
1195
|
+
line-height: 1.34em;
|
|
1175
1196
|
font-weight: normal;
|
|
1176
1197
|
font-style: normal;
|
|
1177
1198
|
letter-spacing: normal;
|
|
@@ -8,12 +8,13 @@ exports.defaultArrowAnchor = defaultArrowAnchor;
|
|
|
8
8
|
exports.defaultDirection = defaultDirection;
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("@enact/core/internal/prop-types"));
|
|
10
10
|
var _kind = _interopRequireDefault(require("@enact/core/kind"));
|
|
11
|
+
var _usePublicClassNames = require("@enact/core/usePublicClassNames");
|
|
11
12
|
var _propTypes2 = _interopRequireDefault(require("prop-types"));
|
|
12
13
|
var _Skinnable = _interopRequireDefault(require("../Skinnable"));
|
|
13
14
|
var _TooltipLabel = _interopRequireDefault(require("./TooltipLabel"));
|
|
14
15
|
var _TooltipModule = _interopRequireDefault(require("./Tooltip.module.css"));
|
|
15
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
var _excluded = ["arrowAnchor", "children", "css", "tooltipRef", "width", "labelOffset", "marquee"];
|
|
17
|
+
var _excluded = ["arrowAnchor", "children", "css", "tooltipImage", "noArrow", "tooltipCss", "tooltipImageSize", "tooltipRef", "width", "labelOffset", "marquee"];
|
|
17
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
19
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
19
20
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
@@ -111,6 +112,13 @@ var TooltipBase = exports.TooltipBase = (0, _kind["default"])({
|
|
|
111
112
|
* @public
|
|
112
113
|
*/
|
|
113
114
|
marquee: _propTypes2["default"].bool,
|
|
115
|
+
/**
|
|
116
|
+
* `Tooltip` without the arrow.
|
|
117
|
+
*
|
|
118
|
+
* @type {Boolean}
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
noArrow: _propTypes2["default"].bool,
|
|
114
122
|
/**
|
|
115
123
|
* Style object for tooltip position.
|
|
116
124
|
*
|
|
@@ -134,6 +142,41 @@ var TooltipBase = exports.TooltipBase = (0, _kind["default"])({
|
|
|
134
142
|
* @public
|
|
135
143
|
*/
|
|
136
144
|
relative: _propTypes2["default"].bool,
|
|
145
|
+
/**
|
|
146
|
+
* Customizes the component by mapping the supplied collection of CSS class names to the
|
|
147
|
+
* corresponding internal elements and states of this component.
|
|
148
|
+
*
|
|
149
|
+
* The following classes are supported:
|
|
150
|
+
*
|
|
151
|
+
* * `tooltip` - The root class name
|
|
152
|
+
*
|
|
153
|
+
* @type {Object}
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
156
|
+
tooltipCss: _propTypes2["default"].object,
|
|
157
|
+
/**
|
|
158
|
+
* Source for the image.
|
|
159
|
+
* String value or Object of values used to determine which image will appear on
|
|
160
|
+
* a specific screenSize.
|
|
161
|
+
*
|
|
162
|
+
* @type {String|Object}
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
165
|
+
tooltipImage: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].object]),
|
|
166
|
+
/**
|
|
167
|
+
* The size of the image.
|
|
168
|
+
*
|
|
169
|
+
* The following properties should be provided:
|
|
170
|
+
* * `height` - The height of the image
|
|
171
|
+
* * `width` - The width of the image
|
|
172
|
+
*
|
|
173
|
+
* @type {Object}
|
|
174
|
+
* @public
|
|
175
|
+
*/
|
|
176
|
+
tooltipImageSize: _propTypes2["default"].shape({
|
|
177
|
+
height: _propTypes2["default"].number,
|
|
178
|
+
width: _propTypes2["default"].number
|
|
179
|
+
}),
|
|
137
180
|
/**
|
|
138
181
|
* Called when the tooltip mounts/unmounts, giving a reference to the DOM.
|
|
139
182
|
*
|
|
@@ -172,6 +215,7 @@ var TooltipBase = exports.TooltipBase = (0, _kind["default"])({
|
|
|
172
215
|
width: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string])
|
|
173
216
|
},
|
|
174
217
|
defaultProps: {
|
|
218
|
+
tooltipCss: {},
|
|
175
219
|
type: 'balloon',
|
|
176
220
|
labelOffset: 0
|
|
177
221
|
},
|
|
@@ -193,12 +237,15 @@ var TooltipBase = exports.TooltipBase = (0, _kind["default"])({
|
|
|
193
237
|
className: function className(_ref2) {
|
|
194
238
|
var direction = _ref2.direction,
|
|
195
239
|
arrowAnchor = _ref2.arrowAnchor,
|
|
240
|
+
noArrow = _ref2.noArrow,
|
|
196
241
|
relative = _ref2.relative,
|
|
242
|
+
tooltipCss = _ref2.tooltipCss,
|
|
197
243
|
type = _ref2.type,
|
|
198
244
|
styler = _ref2.styler;
|
|
199
|
-
return styler.append(direction || defaultDirection(type), "".concat(arrowAnchor || defaultArrowAnchor(type), "Arrow"), {
|
|
245
|
+
return styler.append(direction || defaultDirection(type), "".concat(arrowAnchor || defaultArrowAnchor(type), "Arrow"), tooltipCss.tooltip, {
|
|
200
246
|
relative: relative,
|
|
201
|
-
absolute: !relative
|
|
247
|
+
absolute: !relative,
|
|
248
|
+
noArrow: noArrow
|
|
202
249
|
}, type);
|
|
203
250
|
},
|
|
204
251
|
style: function style(_ref3) {
|
|
@@ -211,6 +258,10 @@ var TooltipBase = exports.TooltipBase = (0, _kind["default"])({
|
|
|
211
258
|
var arrowAnchor = _ref4.arrowAnchor,
|
|
212
259
|
children = _ref4.children,
|
|
213
260
|
css = _ref4.css,
|
|
261
|
+
tooltipImage = _ref4.tooltipImage,
|
|
262
|
+
noArrow = _ref4.noArrow,
|
|
263
|
+
tooltipCss = _ref4.tooltipCss,
|
|
264
|
+
tooltipImageSize = _ref4.tooltipImageSize,
|
|
214
265
|
tooltipRef = _ref4.tooltipRef,
|
|
215
266
|
width = _ref4.width,
|
|
216
267
|
labelOffset = _ref4.labelOffset,
|
|
@@ -221,18 +272,28 @@ var TooltipBase = exports.TooltipBase = (0, _kind["default"])({
|
|
|
221
272
|
delete rest.position;
|
|
222
273
|
delete rest.relative;
|
|
223
274
|
delete rest.type;
|
|
275
|
+
|
|
276
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
277
|
+
var mergedCss = (0, _usePublicClassNames.usePublicClassNames)({
|
|
278
|
+
componentCss: css,
|
|
279
|
+
customCss: tooltipCss,
|
|
280
|
+
publicClassNames: true
|
|
281
|
+
});
|
|
224
282
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, rest), {}, {
|
|
225
283
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
226
|
-
className:
|
|
284
|
+
className: mergedCss.tooltipAnchor,
|
|
227
285
|
ref: tooltipRef,
|
|
228
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
229
|
-
className:
|
|
286
|
+
children: [!noArrow && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
287
|
+
className: mergedCss.tooltipArrow
|
|
230
288
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipLabel["default"], {
|
|
231
|
-
className:
|
|
289
|
+
className: mergedCss.tooltipLabel,
|
|
290
|
+
tooltipImage: tooltipImage,
|
|
232
291
|
marquee: marquee,
|
|
292
|
+
noArrow: noArrow,
|
|
233
293
|
centered: arrowAnchor === 'center',
|
|
234
294
|
width: width,
|
|
235
295
|
style: labelOffset,
|
|
296
|
+
tooltipImageSize: tooltipImageSize,
|
|
236
297
|
children: children
|
|
237
298
|
})]
|
|
238
299
|
})
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
line-height: 1.5rem;
|
|
38
38
|
white-space: nowrap;
|
|
39
39
|
width: var(--lime-tooltip-label-width);
|
|
40
|
-
max-width: 25rem;
|
|
40
|
+
max-width: var(--lime-tooltip-label-width, 25rem);
|
|
41
41
|
padding: var(--primitive-spacing-12) var(--primitive-spacing-48);
|
|
42
42
|
border-radius: var(--semantic-radius-button);
|
|
43
43
|
}
|
|
@@ -53,6 +53,19 @@
|
|
|
53
53
|
:global(.enact-locale-right-to-left) .tooltip .tooltipLabel {
|
|
54
54
|
text-align: right;
|
|
55
55
|
}
|
|
56
|
+
.tooltip .tooltipLabel .tooltipImage {
|
|
57
|
+
margin: 0;
|
|
58
|
+
border-radius: var(--semantic-radius-button);
|
|
59
|
+
width: var(--lime-tooltip-image-width, 20rem);
|
|
60
|
+
height: var(--lime-tooltip-image-height, 11.25rem);
|
|
61
|
+
}
|
|
62
|
+
.tooltip .tooltipLabel.image {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
border-radius: var(--semantic-radius-container);
|
|
66
|
+
gap: var(--primitive-spacing-36);
|
|
67
|
+
padding: var(--primitive-spacing-60);
|
|
68
|
+
}
|
|
56
69
|
.tooltip .tooltipLabel.marquee {
|
|
57
70
|
max-width: var(--lime-tooltip-label-width, 12.5rem);
|
|
58
71
|
}
|
|
@@ -105,6 +118,8 @@
|
|
|
105
118
|
}
|
|
106
119
|
.tooltip.below.leftArrow .tooltipLabel {
|
|
107
120
|
text-align: right;
|
|
121
|
+
}
|
|
122
|
+
.tooltip.below.leftArrow .tooltipLabel:not(.noArrow) {
|
|
108
123
|
border-top-right-radius: 0;
|
|
109
124
|
}
|
|
110
125
|
.tooltip.below.centerArrow .tooltipArrow {
|
|
@@ -124,7 +139,7 @@
|
|
|
124
139
|
transform-origin: top left;
|
|
125
140
|
transform: rotate(45deg) skew(45deg, 0);
|
|
126
141
|
}
|
|
127
|
-
.tooltip.below.rightArrow .tooltipLabel {
|
|
142
|
+
.tooltip.below.rightArrow .tooltipLabel:not(.noArrow) {
|
|
128
143
|
border-top-left-radius: 0;
|
|
129
144
|
}
|
|
130
145
|
.tooltip.above .tooltipArrow {
|
|
@@ -144,6 +159,8 @@
|
|
|
144
159
|
}
|
|
145
160
|
.tooltip.above.leftArrow .tooltipLabel {
|
|
146
161
|
text-align: right;
|
|
162
|
+
}
|
|
163
|
+
.tooltip.above.leftArrow .tooltipLabel:not(.noArrow) {
|
|
147
164
|
border-bottom-right-radius: 0;
|
|
148
165
|
}
|
|
149
166
|
.tooltip.above.centerArrow .tooltipArrow::after {
|
|
@@ -160,7 +177,7 @@
|
|
|
160
177
|
transform-origin: bottom left;
|
|
161
178
|
transform: rotate(-45deg) skew(-45deg, 0);
|
|
162
179
|
}
|
|
163
|
-
.tooltip.above.rightArrow .tooltipLabel {
|
|
180
|
+
.tooltip.above.rightArrow .tooltipLabel:not(.noArrow) {
|
|
164
181
|
border-bottom-left-radius: 0;
|
|
165
182
|
}
|
|
166
183
|
.tooltip.left .tooltipArrow {
|
|
@@ -178,7 +195,7 @@
|
|
|
178
195
|
transform-origin: bottom right;
|
|
179
196
|
transform: rotate(-45deg) skew(0, 45deg);
|
|
180
197
|
}
|
|
181
|
-
.tooltip.left.topArrow .tooltipLabel {
|
|
198
|
+
.tooltip.left.topArrow .tooltipLabel:not(.noArrow) {
|
|
182
199
|
border-bottom-right-radius: 0;
|
|
183
200
|
}
|
|
184
201
|
.tooltip.left.middleArrow .tooltipArrow::after {
|
|
@@ -194,7 +211,7 @@
|
|
|
194
211
|
transform-origin: top right;
|
|
195
212
|
transform: rotate(45deg) skew(0, -45deg);
|
|
196
213
|
}
|
|
197
|
-
.tooltip.left.bottomArrow .tooltipLabel {
|
|
214
|
+
.tooltip.left.bottomArrow .tooltipLabel:not(.noArrow) {
|
|
198
215
|
border-top-right-radius: 0;
|
|
199
216
|
}
|
|
200
217
|
.tooltip.right .tooltipArrow {
|
|
@@ -212,7 +229,7 @@
|
|
|
212
229
|
transform-origin: bottom left;
|
|
213
230
|
transform: rotate(45deg) skew(0, -45deg);
|
|
214
231
|
}
|
|
215
|
-
.tooltip.right.topArrow .tooltipLabel {
|
|
232
|
+
.tooltip.right.topArrow .tooltipLabel:not(.noArrow) {
|
|
216
233
|
border-bottom-left-radius: 0;
|
|
217
234
|
}
|
|
218
235
|
.tooltip.right.middleArrow .tooltipArrow::after {
|
|
@@ -228,7 +245,7 @@
|
|
|
228
245
|
transform-origin: top left;
|
|
229
246
|
transform: rotate(-45deg) skew(0, 45deg);
|
|
230
247
|
}
|
|
231
|
-
.tooltip.right.bottomArrow .tooltipLabel {
|
|
248
|
+
.tooltip.right.bottomArrow .tooltipLabel:not(.noArrow) {
|
|
232
249
|
border-top-left-radius: 0;
|
|
233
250
|
}
|
|
234
251
|
.tooltip.absolute {
|
|
@@ -241,10 +258,10 @@
|
|
|
241
258
|
position: absolute;
|
|
242
259
|
}
|
|
243
260
|
.tooltip.absolute.below {
|
|
244
|
-
top: calc(var(--tooltip-position-top) +
|
|
261
|
+
top: calc(var(--tooltip-position-top) + var(--primitive-spacing-24) );
|
|
245
262
|
}
|
|
246
263
|
.tooltip.absolute.below.transparent {
|
|
247
|
-
top: calc(var(--tooltip-position-top) +
|
|
264
|
+
top: calc(var(--tooltip-position-top) + 0rem );
|
|
248
265
|
}
|
|
249
266
|
.tooltip.absolute.below.leftArrow .tooltipAnchor {
|
|
250
267
|
transform: translateX(-100%);
|
|
@@ -256,10 +273,10 @@
|
|
|
256
273
|
/* transform: translate(0, 0); */
|
|
257
274
|
}
|
|
258
275
|
.tooltip.absolute.above {
|
|
259
|
-
top: calc(var(--tooltip-position-top) -
|
|
276
|
+
top: calc(var(--tooltip-position-top) - var(--primitive-spacing-24) );
|
|
260
277
|
}
|
|
261
278
|
.tooltip.absolute.above.transparent {
|
|
262
|
-
top: calc(var(--tooltip-position-top) -
|
|
279
|
+
top: calc(var(--tooltip-position-top) - 0rem );
|
|
263
280
|
}
|
|
264
281
|
.tooltip.absolute.above.leftArrow .tooltipAnchor {
|
|
265
282
|
transform: translate(-100%, -100%);
|
|
@@ -271,10 +288,10 @@
|
|
|
271
288
|
transform: translate(0, -100%);
|
|
272
289
|
}
|
|
273
290
|
.tooltip.absolute.left {
|
|
274
|
-
left: calc(var(--tooltip-position-left) -
|
|
291
|
+
left: calc(var(--tooltip-position-left) - var(--primitive-spacing-24) );
|
|
275
292
|
}
|
|
276
293
|
.tooltip.absolute.left.transparent {
|
|
277
|
-
left: calc(var(--tooltip-position-left) -
|
|
294
|
+
left: calc(var(--tooltip-position-left) - 0rem );
|
|
278
295
|
}
|
|
279
296
|
.tooltip.absolute.left.topArrow .tooltipAnchor {
|
|
280
297
|
transform: translate(-100%, -100%);
|
|
@@ -286,10 +303,10 @@
|
|
|
286
303
|
transform: translate(-100%, 0);
|
|
287
304
|
}
|
|
288
305
|
.tooltip.absolute.right {
|
|
289
|
-
left: calc(var(--tooltip-position-left) +
|
|
306
|
+
left: calc(var(--tooltip-position-left) + var(--primitive-spacing-24) );
|
|
290
307
|
}
|
|
291
308
|
.tooltip.absolute.right.transparent {
|
|
292
|
-
left: calc(var(--tooltip-position-left) +
|
|
309
|
+
left: calc(var(--tooltip-position-left) + 0rem );
|
|
293
310
|
}
|
|
294
311
|
.tooltip.absolute.right.topArrow .tooltipAnchor {
|
|
295
312
|
transform: translate(0, -100%);
|
|
@@ -301,10 +318,10 @@
|
|
|
301
318
|
/* transform: translate(0, 0); */
|
|
302
319
|
}
|
|
303
320
|
.tooltip.relative.below {
|
|
304
|
-
top: calc(100% +
|
|
321
|
+
top: calc(100% + var(--primitive-spacing-24) );
|
|
305
322
|
}
|
|
306
323
|
.tooltip.relative.below.transparent {
|
|
307
|
-
top: calc(100% +
|
|
324
|
+
top: calc(100% + 0rem );
|
|
308
325
|
}
|
|
309
326
|
.tooltip.relative.below.leftArrow {
|
|
310
327
|
right: 50%;
|
|
@@ -317,10 +334,10 @@
|
|
|
317
334
|
transform: translateX(-50%);
|
|
318
335
|
}
|
|
319
336
|
.tooltip.relative.above {
|
|
320
|
-
bottom: calc(100% +
|
|
337
|
+
bottom: calc(100% + var(--primitive-spacing-24) );
|
|
321
338
|
}
|
|
322
339
|
.tooltip.relative.above.transparent {
|
|
323
|
-
bottom: calc(100% +
|
|
340
|
+
bottom: calc(100% + 0rem );
|
|
324
341
|
}
|
|
325
342
|
.tooltip.relative.above.leftArrow {
|
|
326
343
|
right: 50%;
|
|
@@ -333,10 +350,10 @@
|
|
|
333
350
|
transform: translateX(-50%);
|
|
334
351
|
}
|
|
335
352
|
.tooltip.relative.left {
|
|
336
|
-
right: calc(100% +
|
|
353
|
+
right: calc(100% + var(--primitive-spacing-24) );
|
|
337
354
|
}
|
|
338
355
|
.tooltip.relative.left.transparent {
|
|
339
|
-
right: calc(100% +
|
|
356
|
+
right: calc(100% + 0rem );
|
|
340
357
|
}
|
|
341
358
|
.tooltip.relative.left.topArrow {
|
|
342
359
|
bottom: 50%;
|
|
@@ -349,10 +366,10 @@
|
|
|
349
366
|
transform: translateY(-50%);
|
|
350
367
|
}
|
|
351
368
|
.tooltip.relative.right {
|
|
352
|
-
left: calc(100% +
|
|
369
|
+
left: calc(100% + var(--primitive-spacing-24) );
|
|
353
370
|
}
|
|
354
371
|
.tooltip.relative.right.transparent {
|
|
355
|
-
left: calc(100% +
|
|
372
|
+
left: calc(100% + 0rem );
|
|
356
373
|
}
|
|
357
374
|
.tooltip.relative.right.topArrow {
|
|
358
375
|
bottom: 50%;
|