@lumx/react 4.2.1-alpha.1 → 4.2.1-alpha.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/README.md +1 -2
- package/index.d.ts +194 -140
- package/index.js +13 -14
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1018,9 +1018,9 @@ const RawClickable$1 = props => {
|
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
1020
|
return /*#__PURE__*/jsx(Component, {
|
|
1021
|
-
"aria-disabled": isAnyDisabled || undefined,
|
|
1022
1021
|
...forwardedProps,
|
|
1023
1022
|
...clickableProps,
|
|
1023
|
+
"aria-disabled": isAnyDisabled || undefined,
|
|
1024
1024
|
onClick: event => {
|
|
1025
1025
|
if (isAnyDisabled) {
|
|
1026
1026
|
event.stopPropagation();
|
|
@@ -6449,10 +6449,7 @@ const {
|
|
|
6449
6449
|
* @param props Component props.
|
|
6450
6450
|
* @return JSX element.
|
|
6451
6451
|
*/
|
|
6452
|
-
const Flag$1 =
|
|
6453
|
-
const {
|
|
6454
|
-
Text
|
|
6455
|
-
} = nestedComponents || {};
|
|
6452
|
+
const Flag$1 = props => {
|
|
6456
6453
|
const {
|
|
6457
6454
|
children,
|
|
6458
6455
|
icon,
|
|
@@ -6460,6 +6457,7 @@ const Flag$1 = (props, nestedComponents) => {
|
|
|
6460
6457
|
className,
|
|
6461
6458
|
theme,
|
|
6462
6459
|
truncate,
|
|
6460
|
+
Text,
|
|
6463
6461
|
...forwardedProps
|
|
6464
6462
|
} = props;
|
|
6465
6463
|
const flagColor = color || (theme === Theme.light ? ColorPalette.dark : ColorPalette.light);
|
|
@@ -6476,7 +6474,7 @@ const Flag$1 = (props, nestedComponents) => {
|
|
|
6476
6474
|
className: element$B('icon')
|
|
6477
6475
|
}), /*#__PURE__*/jsx(Text, {
|
|
6478
6476
|
as: "span",
|
|
6479
|
-
truncate: !!
|
|
6477
|
+
truncate: !!truncate,
|
|
6480
6478
|
typography: "overline",
|
|
6481
6479
|
className: element$B('label'),
|
|
6482
6480
|
children: children
|
|
@@ -6497,8 +6495,7 @@ const Flag = forwardRef((props, ref) => {
|
|
|
6497
6495
|
...props,
|
|
6498
6496
|
theme: props.theme || defaultTheme,
|
|
6499
6497
|
ref,
|
|
6500
|
-
children: props.label
|
|
6501
|
-
}, {
|
|
6498
|
+
children: props.label,
|
|
6502
6499
|
Text
|
|
6503
6500
|
});
|
|
6504
6501
|
});
|
|
@@ -7823,7 +7820,7 @@ function setupViewTransitionName(elementRef, name) {
|
|
|
7823
7820
|
return {
|
|
7824
7821
|
set() {
|
|
7825
7822
|
const element = unref(elementRef);
|
|
7826
|
-
if (!element) return;
|
|
7823
|
+
if (!element || !name) return;
|
|
7827
7824
|
originalName = element.style.viewTransitionName;
|
|
7828
7825
|
element.style.viewTransitionName = name;
|
|
7829
7826
|
},
|
|
@@ -7851,15 +7848,15 @@ async function startViewTransition({
|
|
|
7851
7848
|
const {
|
|
7852
7849
|
flushSync
|
|
7853
7850
|
} = ReactDOM;
|
|
7854
|
-
if (prefersReducedMotion || !start || !flushSync || !viewTransitionName?.source || !viewTransitionName?.target) {
|
|
7851
|
+
if (prefersReducedMotion || !start || !flushSync || viewTransitionName && (!viewTransitionName?.source || !viewTransitionName?.target)) {
|
|
7855
7852
|
// Skip, apply changes without a transition
|
|
7856
7853
|
changes();
|
|
7857
7854
|
return;
|
|
7858
7855
|
}
|
|
7859
7856
|
|
|
7860
7857
|
// Setup set/unset transition name on source & target
|
|
7861
|
-
const sourceTransitionName = setupViewTransitionName(viewTransitionName
|
|
7862
|
-
const targetTransitionName = setupViewTransitionName(viewTransitionName
|
|
7858
|
+
const sourceTransitionName = setupViewTransitionName(viewTransitionName?.source, viewTransitionName?.name);
|
|
7859
|
+
const targetTransitionName = setupViewTransitionName(viewTransitionName?.target, viewTransitionName?.name);
|
|
7863
7860
|
sourceTransitionName.set();
|
|
7864
7861
|
|
|
7865
7862
|
// Start view transition, apply changes & flush to DOM
|
|
@@ -8851,6 +8848,7 @@ const Message$1 = props => {
|
|
|
8851
8848
|
kind,
|
|
8852
8849
|
icon: customIcon,
|
|
8853
8850
|
closeButtonProps,
|
|
8851
|
+
ref,
|
|
8854
8852
|
...forwardedProps
|
|
8855
8853
|
} = props;
|
|
8856
8854
|
const {
|
|
@@ -8864,6 +8862,7 @@ const Message$1 = props => {
|
|
|
8864
8862
|
const isCloseButtonDisplayed = hasBackground && kind === 'info' && onClick && closeButtonLabel;
|
|
8865
8863
|
return /*#__PURE__*/jsxs("div", {
|
|
8866
8864
|
...forwardedProps,
|
|
8865
|
+
ref: ref,
|
|
8867
8866
|
className: classnames(className, block$B({
|
|
8868
8867
|
[`color-${color}`]: Boolean(color),
|
|
8869
8868
|
'has-background': hasBackground
|
|
@@ -12076,7 +12075,7 @@ const InternalSlideshowControls = forwardRef((props, ref) => {
|
|
|
12076
12075
|
className: element$9('navigation'),
|
|
12077
12076
|
color: theme === Theme$1.dark ? 'light' : 'dark',
|
|
12078
12077
|
emphasis: Emphasis$1.low,
|
|
12079
|
-
onClick: onPreviousClick
|
|
12078
|
+
onClick: () => onPreviousClick?.()
|
|
12080
12079
|
}), /*#__PURE__*/jsx("div", {
|
|
12081
12080
|
ref: paginationRef,
|
|
12082
12081
|
className: element$9('pagination'),
|
|
@@ -12123,7 +12122,7 @@ const InternalSlideshowControls = forwardRef((props, ref) => {
|
|
|
12123
12122
|
className: element$9('navigation'),
|
|
12124
12123
|
color: theme === Theme$1.dark ? 'light' : 'dark',
|
|
12125
12124
|
emphasis: Emphasis$1.low,
|
|
12126
|
-
onClick: onNextClick
|
|
12125
|
+
onClick: () => onNextClick?.()
|
|
12127
12126
|
})]
|
|
12128
12127
|
});
|
|
12129
12128
|
});
|