@loadsmart/miranda-react 3.0.0-beta.40 → 3.0.0-beta.42
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.
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
import type { EventName, WebComponentProps } from '@lit/react';
|
|
3
3
|
import { Drawer as WCDrawer } from '@loadsmart/miranda-wc';
|
|
4
|
-
import { DrawerActionPrimary } from './DrawerActionPrimary';
|
|
5
|
-
import { DrawerActionSecondary } from './DrawerActionSecondary';
|
|
6
|
-
import { DrawerActionTertiary } from './DrawerActionTertiary';
|
|
7
4
|
declare global {
|
|
8
5
|
namespace JSX {
|
|
9
6
|
interface IntrinsicElements {
|
|
@@ -18,9 +15,9 @@ export declare const Drawer: import("@lit/react").ReactWebComponent<WCDrawer, {
|
|
|
18
15
|
onClosing: EventName<CustomEvent>;
|
|
19
16
|
onClosed: EventName<CustomEvent>;
|
|
20
17
|
}> & {
|
|
21
|
-
ActionPrimary:
|
|
22
|
-
ActionSecondary:
|
|
23
|
-
ActionTertiary:
|
|
18
|
+
ActionPrimary: import("react").ForwardRefExoticComponent<Omit<import("./DrawerActionPrimary").DrawerActionPrimaryProps, "ref"> & import("react").RefAttributes<import("@loadsmart/miranda-wc").DrawerActionPrimary>>;
|
|
19
|
+
ActionSecondary: import("react").ForwardRefExoticComponent<Omit<import("./DrawerActionSecondary").DrawerActionSecondaryProps, "ref"> & import("react").RefAttributes<import("@loadsmart/miranda-wc").DrawerActionSecondary>>;
|
|
20
|
+
ActionTertiary: import("react").ForwardRefExoticComponent<Omit<import("./DrawerActionTertiary").DrawerActionTertiaryProps, "ref"> & import("react").RefAttributes<import("@loadsmart/miranda-wc").DrawerActionTertiary>>;
|
|
24
21
|
Actions: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DrawerActions, {}>;
|
|
25
22
|
Body: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DrawerBody, {}>;
|
|
26
23
|
Close: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DrawerClose, {
|
|
@@ -13,5 +13,5 @@ export interface DrawerActionPrimaryProps extends ComponentProps<typeof WiredDra
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare
|
|
16
|
+
export declare const DrawerActionPrimary: import("react").ForwardRefExoticComponent<Omit<DrawerActionPrimaryProps, "ref"> & import("react").RefAttributes<WCDrawerActionPrimary>>;
|
|
17
17
|
export {};
|
|
@@ -13,5 +13,5 @@ export interface DrawerActionSecondaryProps extends ComponentProps<typeof WiredD
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare
|
|
16
|
+
export declare const DrawerActionSecondary: import("react").ForwardRefExoticComponent<Omit<DrawerActionSecondaryProps, "ref"> & import("react").RefAttributes<WCDrawerActionSecondary>>;
|
|
17
17
|
export {};
|
|
@@ -13,5 +13,5 @@ export interface DrawerActionTertiaryProps extends ComponentProps<typeof WiredDr
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare
|
|
16
|
+
export declare const DrawerActionTertiary: import("react").ForwardRefExoticComponent<Omit<DrawerActionTertiaryProps, "ref"> & import("react").RefAttributes<WCDrawerActionTertiary>>;
|
|
17
17
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -413,30 +413,30 @@ const WiredDrawerActionPrimary = createComponent({
|
|
|
413
413
|
elementClass: DrawerActionPrimary$1,
|
|
414
414
|
displayName: 'DrawerActionPrimary',
|
|
415
415
|
});
|
|
416
|
-
function DrawerActionPrimary(props) {
|
|
416
|
+
const DrawerActionPrimary = forwardRef(function DrawerActionPrimary(props, ref) {
|
|
417
417
|
const { leading, trailing, children, ...rest } = props;
|
|
418
|
-
return (jsxs(WiredDrawerActionPrimary, { ...rest, children: [leading != null && jsx("span", { slot: "leading", children: leading }), children, trailing != null && jsx("span", { slot: "trailing", children: trailing })] }));
|
|
419
|
-
}
|
|
418
|
+
return (jsxs(WiredDrawerActionPrimary, { ...rest, ref: ref, children: [leading != null && jsx("span", { slot: "leading", children: leading }), children, trailing != null && jsx("span", { slot: "trailing", children: trailing })] }));
|
|
419
|
+
});
|
|
420
420
|
|
|
421
421
|
const WiredDrawerActionSecondary = createComponent({
|
|
422
422
|
tagName: 'm-drawer-action-secondary',
|
|
423
423
|
elementClass: DrawerActionSecondary$1,
|
|
424
424
|
displayName: 'DrawerActionSecondary',
|
|
425
425
|
});
|
|
426
|
-
function DrawerActionSecondary(props) {
|
|
426
|
+
const DrawerActionSecondary = forwardRef(function DrawerActionSecondary(props, ref) {
|
|
427
427
|
const { leading, trailing, children, ...rest } = props;
|
|
428
|
-
return (jsxs(WiredDrawerActionSecondary, { ...rest, children: [leading != null && jsx("span", { slot: "leading", children: leading }), children, trailing != null && jsx("span", { slot: "trailing", children: trailing })] }));
|
|
429
|
-
}
|
|
428
|
+
return (jsxs(WiredDrawerActionSecondary, { ...rest, ref: ref, children: [leading != null && jsx("span", { slot: "leading", children: leading }), children, trailing != null && jsx("span", { slot: "trailing", children: trailing })] }));
|
|
429
|
+
});
|
|
430
430
|
|
|
431
431
|
const WiredDrawerActionTertiary = createComponent({
|
|
432
432
|
tagName: 'm-drawer-action-tertiary',
|
|
433
433
|
elementClass: DrawerActionTertiary$1,
|
|
434
434
|
displayName: 'DrawerActionTertiary',
|
|
435
435
|
});
|
|
436
|
-
function DrawerActionTertiary(props) {
|
|
436
|
+
const DrawerActionTertiary = forwardRef(function DrawerActionTertiary(props, ref) {
|
|
437
437
|
const { leading, trailing, children, ...rest } = props;
|
|
438
|
-
return (jsxs(WiredDrawerActionTertiary, { ...rest, children: [leading != null && jsx("span", { slot: "leading", children: leading }), children, trailing != null && jsx("span", { slot: "trailing", children: trailing })] }));
|
|
439
|
-
}
|
|
438
|
+
return (jsxs(WiredDrawerActionTertiary, { ...rest, ref: ref, children: [leading != null && jsx("span", { slot: "leading", children: leading }), children, trailing != null && jsx("span", { slot: "trailing", children: trailing })] }));
|
|
439
|
+
});
|
|
440
440
|
|
|
441
441
|
const DrawerActions = createComponent({
|
|
442
442
|
tagName: 'm-drawer-actions',
|
|
@@ -1210,10 +1210,11 @@ function ToggleGroup({ options, children, onChange, ...rest }) {
|
|
|
1210
1210
|
// @ts-expect-error -- we can't type this properly because of the way the WC is implemented
|
|
1211
1211
|
, {
|
|
1212
1212
|
// @ts-expect-error -- we can't type this properly because of the way the WC is implemented
|
|
1213
|
-
onChange: onChange, ...rest, children: children
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1213
|
+
onChange: onChange, ...rest, children: children ??
|
|
1214
|
+
(options || []).map(function renderOption(option) {
|
|
1215
|
+
const { label, value: optionValue, ...others } = option;
|
|
1216
|
+
return (jsx(Toggle, { ...others, value: optionValue, children: label }, optionValue));
|
|
1217
|
+
}) }));
|
|
1217
1218
|
}
|
|
1218
1219
|
ToggleGroup.Toggle = Toggle;
|
|
1219
1220
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loadsmart/miranda-react",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.42",
|
|
4
4
|
"description": "React component library based on Miranda Web Components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@loadsmart/miranda-tokens": "4.0.0-beta.
|
|
45
|
-
"@loadsmart/miranda-wc": "3.0.0-beta.
|
|
44
|
+
"@loadsmart/miranda-tokens": "4.0.0-beta.42",
|
|
45
|
+
"@loadsmart/miranda-wc": "3.0.0-beta.42",
|
|
46
46
|
"@lit/react": "^1.0.5",
|
|
47
47
|
"react-is": "^18.3.1"
|
|
48
48
|
},
|