@loadsmart/miranda-react 3.0.0-beta.60 → 3.0.0-beta.62
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/dist/components/Accordion/AccordionTitle.d.ts +2 -2
- package/dist/components/Banner/BannerActionPrimary.d.ts +2 -2
- package/dist/components/Banner/BannerActionSecondary.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Card/CardActionPrimary.d.ts +2 -2
- package/dist/components/Card/CardActionSecondary.d.ts +2 -2
- package/dist/components/Card/CardActionTertiary.d.ts +2 -2
- package/dist/components/Card/CardTitle.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/Dialog/DialogActionPrimary.d.ts +2 -2
- package/dist/components/Dialog/DialogActionSecondary.d.ts +2 -2
- package/dist/components/Dialog/DialogActionTertiary.d.ts +2 -2
- package/dist/components/Drawer/DrawerActionPrimary.d.ts +2 -2
- package/dist/components/Drawer/DrawerActionSecondary.d.ts +2 -2
- package/dist/components/Drawer/DrawerActionTertiary.d.ts +2 -2
- package/dist/components/Dropdown/DropdownItem.d.ts +2 -2
- package/dist/components/Dropdown/DropdownTrigger.d.ts +2 -2
- package/dist/components/EmptyState/EmptyStateAction.d.ts +2 -2
- package/dist/components/Field/FieldHint.d.ts +2 -2
- package/dist/components/LabeledValue/LabeledValue.d.ts +2 -2
- package/dist/components/Layout/Sidebar.d.ts +3 -3
- package/dist/components/RadioGroup/Radio.d.ts +2 -2
- package/dist/components/Section/SectionTitle.d.ts +2 -2
- package/dist/components/Select/Select.d.ts +9 -10
- package/dist/components/Select/SelectOption.d.ts +2 -2
- package/dist/components/Tabs/Tab.d.ts +2 -2
- package/dist/components/Tag/ActionableTag.d.ts +2 -2
- package/dist/components/Tag/Tag.d.ts +2 -2
- package/dist/components/TextArea/TextArea.d.ts +2 -2
- package/dist/components/TextField/TextField.d.ts +2 -2
- package/dist/components/ToggleGroup/Toggle.d.ts +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +6 -30
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +64 -55
- package/dist/utils/SelectionProps.d.ts +28 -0
- package/package.json +7 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { default as React, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { AccordionTitle as WCAccordionTitle } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -12,5 +12,5 @@ declare const WiredAccordionTitle: import('@lit/react').ReactWebComponent<WCAcco
|
|
|
12
12
|
export type AccordionTitleProps = Omit<ComponentProps<typeof WiredAccordionTitle>, 'slot'> & {
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
};
|
|
15
|
-
export declare const AccordionTitle:
|
|
15
|
+
export declare const AccordionTitle: React.ForwardRefExoticComponent<Omit<AccordionTitleProps, "ref"> & React.RefAttributes<WCAccordionTitle>>;
|
|
16
16
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { default as React, ComponentProps, ReactNode } from 'react';
|
|
1
2
|
import { WebComponentProps } from '@lit/react';
|
|
2
3
|
import { BannerActionPrimary as WCBannerActionPrimary } from '@loadsmart/miranda-wc';
|
|
3
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
4
4
|
declare global {
|
|
5
5
|
namespace JSX {
|
|
6
6
|
interface IntrinsicElements {
|
|
@@ -13,5 +13,5 @@ export type BannerActionPrimaryProps = ComponentProps<typeof WiredBannerActionPr
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
};
|
|
16
|
-
export declare const BannerActionPrimary:
|
|
16
|
+
export declare const BannerActionPrimary: React.ForwardRefExoticComponent<Omit<BannerActionPrimaryProps, "ref"> & React.RefAttributes<WCBannerActionPrimary>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { default as React, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { BannerActionSecondary as WCBannerActionSecondary } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export type BannerActionSecondaryProps = ComponentProps<typeof WiredBannerAction
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
};
|
|
16
|
-
export declare const BannerActionSecondary:
|
|
16
|
+
export declare const BannerActionSecondary: React.ForwardRefExoticComponent<Omit<BannerActionSecondaryProps, "ref"> & React.RefAttributes<WCBannerActionSecondary>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { Button as WCButton } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export interface ButtonProps extends ComponentProps<typeof WiredButton> {
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
declare const Button:
|
|
16
|
+
declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<WCButton>>;
|
|
17
17
|
export default Button;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { CardActionPrimary as WCCardActionPrimary } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export interface CardActionPrimaryProps extends ComponentProps<typeof WiredCardA
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const CardActionPrimary:
|
|
16
|
+
export declare const CardActionPrimary: React.ForwardRefExoticComponent<Omit<CardActionPrimaryProps, "ref"> & React.RefAttributes<WCCardActionPrimary>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { CardActionSecondary as WCCardActionSecondary } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export interface CardActionSecondaryProps extends ComponentProps<typeof WiredCar
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const CardActionSecondary:
|
|
16
|
+
export declare const CardActionSecondary: React.ForwardRefExoticComponent<Omit<CardActionSecondaryProps, "ref"> & React.RefAttributes<WCCardActionSecondary>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { CardActionTertiary as WCCardActionTertiary } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export interface CardActionTertiaryProps extends ComponentProps<typeof WiredCard
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const CardActionTertiary:
|
|
16
|
+
export declare const CardActionTertiary: React.ForwardRefExoticComponent<Omit<CardActionTertiaryProps, "ref"> & React.RefAttributes<WCCardActionTertiary>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { default as React, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { CardTitle as WCCardTitle } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -12,5 +12,5 @@ declare const WiredCardTitle: import('@lit/react').ReactWebComponent<WCCardTitle
|
|
|
12
12
|
export type CardTitleProps = Omit<ComponentProps<typeof WiredCardTitle>, 'slot'> & {
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
};
|
|
15
|
-
export declare const CardTitle:
|
|
15
|
+
export declare const CardTitle: React.ForwardRefExoticComponent<Omit<CardTitleProps, "ref"> & React.RefAttributes<WCCardTitle>>;
|
|
16
16
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
1
2
|
import { Checkbox as WCCheckbox } from '@loadsmart/miranda-wc';
|
|
2
3
|
import { EventName, WebComponentProps } from '@lit/react';
|
|
3
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
4
4
|
import { MirandaChangeEvent } from '../../utils/types';
|
|
5
5
|
declare global {
|
|
6
6
|
namespace JSX {
|
|
@@ -15,5 +15,5 @@ declare const WiredCheckbox: import('@lit/react').ReactWebComponent<WCCheckbox,
|
|
|
15
15
|
export type CheckboxProps = ComponentProps<typeof WiredCheckbox> & {
|
|
16
16
|
leading?: ReactNode;
|
|
17
17
|
};
|
|
18
|
-
declare const Checkbox:
|
|
18
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<WCCheckbox>>;
|
|
19
19
|
export default Checkbox;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { DialogActionPrimary as WCDialogActionPrimary } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export interface DialogActionPrimaryProps extends ComponentProps<typeof WiredDia
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const DialogActionPrimary:
|
|
16
|
+
export declare const DialogActionPrimary: React.ForwardRefExoticComponent<Omit<DialogActionPrimaryProps, "ref"> & React.RefAttributes<WCDialogActionPrimary>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { DialogActionSecondary as WCDialogActionSecondary } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export interface DialogActionSecondaryProps extends ComponentProps<typeof WiredD
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const DialogActionSecondary:
|
|
16
|
+
export declare const DialogActionSecondary: React.ForwardRefExoticComponent<Omit<DialogActionSecondaryProps, "ref"> & React.RefAttributes<WCDialogActionSecondary>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { DialogActionTertiary as WCDialogActionTertiary } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export interface DialogActionTertiaryProps extends ComponentProps<typeof WiredDi
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const DialogActionTertiary:
|
|
16
|
+
export declare const DialogActionTertiary: React.ForwardRefExoticComponent<Omit<DialogActionTertiaryProps, "ref"> & React.RefAttributes<WCDialogActionTertiary>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { DrawerActionPrimary as WCDrawerActionPrimary } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export interface DrawerActionPrimaryProps extends ComponentProps<typeof WiredDra
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const DrawerActionPrimary:
|
|
16
|
+
export declare const DrawerActionPrimary: React.ForwardRefExoticComponent<Omit<DrawerActionPrimaryProps, "ref"> & React.RefAttributes<WCDrawerActionPrimary>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { DrawerActionSecondary as WCDrawerActionSecondary } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export interface DrawerActionSecondaryProps extends ComponentProps<typeof WiredD
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const DrawerActionSecondary:
|
|
16
|
+
export declare const DrawerActionSecondary: React.ForwardRefExoticComponent<Omit<DrawerActionSecondaryProps, "ref"> & React.RefAttributes<WCDrawerActionSecondary>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { DrawerActionTertiary as WCDrawerActionTertiary } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export interface DrawerActionTertiaryProps extends ComponentProps<typeof WiredDr
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const DrawerActionTertiary:
|
|
16
|
+
export declare const DrawerActionTertiary: React.ForwardRefExoticComponent<Omit<DrawerActionTertiaryProps, "ref"> & React.RefAttributes<WCDrawerActionTertiary>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { default as React, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { DropdownItem as WCDropdownItem } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,4 +13,4 @@ export interface DropdownItemProps extends ComponentProps<typeof WiredDropdownIt
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const DropdownItem:
|
|
16
|
+
export declare const DropdownItem: React.ForwardRefExoticComponent<Omit<DropdownItemProps, "ref"> & React.RefAttributes<WCDropdownItem>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { default as React, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { DropdownTrigger as WCDropdownTrigger } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -12,4 +12,4 @@ export declare const WiredDropdownTrigger: import('@lit/react').ReactWebComponen
|
|
|
12
12
|
export interface DropdownTriggerProps extends ComponentProps<typeof WiredDropdownTrigger> {
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
}
|
|
15
|
-
export declare const DropdownTrigger:
|
|
15
|
+
export declare const DropdownTrigger: React.ForwardRefExoticComponent<Omit<DropdownTriggerProps, "ref"> & React.RefAttributes<WCDropdownTrigger>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { EmptyStateAction as WCEmptyStateAction } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,5 +13,5 @@ export interface EmptyStateActionProps extends ComponentProps<typeof WiredEmptyS
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const EmptyStateAction:
|
|
16
|
+
export declare const EmptyStateAction: React.ForwardRefExoticComponent<Omit<EmptyStateActionProps, "ref"> & React.RefAttributes<WCEmptyStateAction>>;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { default as React, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { FieldHint as WCFieldHint } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -12,5 +12,5 @@ declare const WiredFieldHint: import('@lit/react').ReactWebComponent<WCFieldHint
|
|
|
12
12
|
export interface FieldHintProps extends Omit<ComponentProps<typeof WiredFieldHint>, 'slot'> {
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
}
|
|
15
|
-
export declare const FieldHint:
|
|
15
|
+
export declare const FieldHint: React.ForwardRefExoticComponent<Omit<FieldHintProps, "ref"> & React.RefAttributes<WCFieldHint>>;
|
|
16
16
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { default as React, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { LabeledValue as WCLabeledValue, LabeledValueLabel as WCLabeledValueLabel, LabeledValueValue as WCLabeledValueValue } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -18,7 +18,7 @@ export type LabeledValueProps = Omit<ComponentProps<typeof WiredLabeledValue>, '
|
|
|
18
18
|
label?: ReactNode;
|
|
19
19
|
value?: ReactNode;
|
|
20
20
|
};
|
|
21
|
-
export declare const LabeledValue:
|
|
21
|
+
export declare const LabeledValue: React.ForwardRefExoticComponent<Omit<LabeledValueProps, "ref"> & React.RefAttributes<WCLabeledValue>> & {
|
|
22
22
|
Label: import('@lit/react').ReactWebComponent<WCLabeledValueLabel, {}>;
|
|
23
23
|
Value: import('@lit/react').ReactWebComponent<WCLabeledValueValue, {}>;
|
|
24
24
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { default as React, ComponentProps } from 'react';
|
|
1
2
|
import { WebComponentProps } from '@lit/react';
|
|
2
3
|
import { Box as WCBox, Sidebar as WCSidebar } from '@loadsmart/miranda-wc';
|
|
3
|
-
import { ComponentProps } from 'react';
|
|
4
4
|
import { BoxProps } from './Box';
|
|
5
5
|
declare global {
|
|
6
6
|
namespace JSX {
|
|
@@ -12,8 +12,8 @@ declare global {
|
|
|
12
12
|
export type SidebarSideProps = Omit<BoxProps, 'slot'>;
|
|
13
13
|
export type SidebarContentProps = Omit<BoxProps, 'slot'>;
|
|
14
14
|
declare const Sidebar: import('@lit/react').ReactWebComponent<WCSidebar, {}> & {
|
|
15
|
-
Side:
|
|
16
|
-
Content:
|
|
15
|
+
Side: React.ForwardRefExoticComponent<Omit<SidebarSideProps, "ref"> & React.RefAttributes<WCBox>>;
|
|
16
|
+
Content: React.ForwardRefExoticComponent<Omit<SidebarContentProps, "ref"> & React.RefAttributes<WCBox>>;
|
|
17
17
|
};
|
|
18
18
|
export type SidebarProps = ComponentProps<typeof Sidebar>;
|
|
19
19
|
export default Sidebar;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { Radio as WCRadio } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -12,5 +12,5 @@ declare const WiredRadio: import('@lit/react').ReactWebComponent<WCRadio, {}>;
|
|
|
12
12
|
export type RadioProps = ComponentProps<typeof WiredRadio> & {
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
};
|
|
15
|
-
declare const Radio:
|
|
15
|
+
declare const Radio: React.ForwardRefExoticComponent<Omit<RadioProps, "ref"> & React.RefAttributes<WCRadio>>;
|
|
16
16
|
export default Radio;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { default as React, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { SectionTitle as WCSectionTitle } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -12,5 +12,5 @@ declare const WiredSectionTitle: import('@lit/react').ReactWebComponent<WCSectio
|
|
|
12
12
|
export type SectionTitleProps = Omit<ComponentProps<typeof WiredSectionTitle>, 'slot'> & {
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
};
|
|
15
|
-
export declare const SectionTitle:
|
|
15
|
+
export declare const SectionTitle: React.ForwardRefExoticComponent<Omit<SectionTitleProps, "ref"> & React.RefAttributes<WCSectionTitle>>;
|
|
16
16
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { Select as WCSelect, SelectionType } from '@loadsmart/miranda-wc';
|
|
2
3
|
import { EventName, WebComponentProps } from '@lit/react';
|
|
3
|
-
import {
|
|
4
|
+
import { SelectionProps } from 'utils/SelectionProps';
|
|
4
5
|
import { MirandaChangeEvent } from '../../utils/types';
|
|
5
6
|
declare global {
|
|
6
7
|
namespace JSX {
|
|
@@ -14,18 +15,16 @@ declare const WiredSelect: import('@lit/react').ReactWebComponent<WCSelect, {
|
|
|
14
15
|
onCollapse: EventName<CustomEvent>;
|
|
15
16
|
onChange: EventName<MirandaChangeEvent<WCSelect>>;
|
|
16
17
|
}>;
|
|
17
|
-
export
|
|
18
|
-
value:
|
|
18
|
+
export interface SelectOption<TValue extends string = string> {
|
|
19
|
+
value: TValue;
|
|
19
20
|
label?: string;
|
|
20
21
|
leading?: ReactNode;
|
|
21
22
|
trailing?: ReactNode;
|
|
22
23
|
disabled?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export type SelectProps =
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
export declare function Select(props: SelectProps): import("react/jsx-dev-runtime").JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
export type SelectProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string> = SelectionProps<typeof WiredSelect, TSelectionType, OptionValue, SelectOption<OptionValue>>;
|
|
26
|
+
export declare function Select<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string>(props: SelectProps<TSelectionType, OptionValue>): React.JSX.Element;
|
|
28
27
|
export declare namespace Select {
|
|
29
|
-
var Option:
|
|
28
|
+
var Option: React.ForwardRefExoticComponent<Omit<import("./SelectOption").SelectOptionProps, "ref"> & React.RefAttributes<import("@loadsmart/miranda-wc").SelectOption>>;
|
|
30
29
|
}
|
|
31
30
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { default as React, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { SelectOption as WCSelectOption } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -13,4 +13,4 @@ export interface SelectOptionProps extends Omit<ComponentProps<typeof WiredSelec
|
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
trailing?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare const SelectOption:
|
|
16
|
+
export declare const SelectOption: React.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & React.RefAttributes<WCSelectOption>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { default as React, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { Tab as WCTab } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -12,5 +12,5 @@ declare const WiredTab: import('@lit/react').ReactWebComponent<WCTab, {}>;
|
|
|
12
12
|
export interface TabProps extends ComponentProps<typeof WiredTab> {
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
}
|
|
15
|
-
declare const Tab:
|
|
15
|
+
declare const Tab: React.ForwardRefExoticComponent<Omit<TabProps, "ref"> & React.RefAttributes<WCTab>>;
|
|
16
16
|
export default Tab;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
1
2
|
import { ActionableTag as WCActionableTag } from '@loadsmart/miranda-wc';
|
|
2
3
|
import { EventName, WebComponentProps } from '@lit/react';
|
|
3
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
4
4
|
import { MirandaChangeEvent } from '../../utils/types';
|
|
5
5
|
declare global {
|
|
6
6
|
namespace JSX {
|
|
@@ -16,5 +16,5 @@ declare const WiredActionableTag: import('@lit/react').ReactWebComponent<WCActio
|
|
|
16
16
|
export type ActionableTagProps = ComponentProps<typeof WiredActionableTag> & {
|
|
17
17
|
leading?: ReactNode;
|
|
18
18
|
};
|
|
19
|
-
declare const ActionableTag:
|
|
19
|
+
declare const ActionableTag: React.ForwardRefExoticComponent<Omit<ActionableTagProps, "ref"> & React.RefAttributes<WCActionableTag>>;
|
|
20
20
|
export default ActionableTag;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { Tag as WCTag } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -12,5 +12,5 @@ declare const WiredTag: import('@lit/react').ReactWebComponent<WCTag, {}>;
|
|
|
12
12
|
export type TagProps = ComponentProps<typeof WiredTag> & {
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
};
|
|
15
|
-
declare const Tag:
|
|
15
|
+
declare const Tag: React.ForwardRefExoticComponent<Omit<TagProps, "ref"> & React.RefAttributes<WCTag>>;
|
|
16
16
|
export default Tag;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { default as React, ComponentProps } from 'react';
|
|
1
2
|
import { TextArea as WCTextArea, TextAreaProps as WCTextAreaProps } from '@loadsmart/miranda-wc';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
3
|
import { EventName, WebComponentProps } from '@lit/react';
|
|
4
4
|
import { MirandaChangeEvent } from '../../utils/types';
|
|
5
5
|
declare global {
|
|
@@ -14,5 +14,5 @@ declare const WiredTextArea: import('@lit/react').ReactWebComponent<WCTextArea,
|
|
|
14
14
|
onChange: EventName<MirandaChangeEvent<WCTextArea>>;
|
|
15
15
|
}>;
|
|
16
16
|
export type TextAreaProps = ComponentProps<typeof WiredTextArea>;
|
|
17
|
-
declare function TextArea(props: TextAreaProps):
|
|
17
|
+
declare function TextArea(props: TextAreaProps): React.JSX.Element;
|
|
18
18
|
export default TextArea;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { default as React, ReactNode, ComponentProps, InputHTMLAttributes } from 'react';
|
|
1
2
|
import { TextField as WCTextField } from '@loadsmart/miranda-wc';
|
|
2
3
|
import { EventName, WebComponentProps } from '@lit/react';
|
|
3
|
-
import { ReactNode, ComponentProps, InputHTMLAttributes } from 'react';
|
|
4
4
|
import { MirandaChangeEvent } from '../../utils/types';
|
|
5
5
|
declare global {
|
|
6
6
|
namespace JSX {
|
|
@@ -19,5 +19,5 @@ export type TextFieldProps = Omit<ComponentProps<typeof WiredTextField>, 'value'
|
|
|
19
19
|
leading?: ReactNode;
|
|
20
20
|
trailing?: ReactNode;
|
|
21
21
|
};
|
|
22
|
-
declare const TextField:
|
|
22
|
+
declare const TextField: React.ForwardRefExoticComponent<Omit<TextFieldProps, "ref"> & React.RefAttributes<WCTextField>>;
|
|
23
23
|
export default TextField;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ReactNode, ComponentProps } from 'react';
|
|
2
2
|
import { WebComponentProps } from '@lit/react';
|
|
3
3
|
import { Toggle as WCToggle } from '@loadsmart/miranda-wc';
|
|
4
4
|
declare global {
|
|
@@ -12,5 +12,5 @@ declare const WiredToggle: import('@lit/react').ReactWebComponent<WCToggle, {}>;
|
|
|
12
12
|
export type ToggleProps = ComponentProps<typeof WiredToggle> & {
|
|
13
13
|
leading?: ReactNode;
|
|
14
14
|
};
|
|
15
|
-
declare const Toggle:
|
|
15
|
+
declare const Toggle: React.ForwardRefExoticComponent<Omit<ToggleProps, "ref"> & React.RefAttributes<WCToggle>>;
|
|
16
16
|
export default Toggle;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { ToggleGroup as WCToggleGroup, SelectionType } from '@loadsmart/miranda-wc';
|
|
2
3
|
import { EventName, WebComponentProps } from '@lit/react';
|
|
3
|
-
import {
|
|
4
|
+
import { SelectionProps } from 'utils/SelectionProps';
|
|
4
5
|
import { MirandaChangeEvent } from '../../utils/types';
|
|
5
6
|
declare global {
|
|
6
7
|
namespace JSX {
|
|
@@ -18,34 +19,9 @@ export type ToggleGroupOption<TValue extends string> = {
|
|
|
18
19
|
leading?: ReactNode;
|
|
19
20
|
disabled?: boolean;
|
|
20
21
|
};
|
|
21
|
-
type
|
|
22
|
-
|
|
23
|
-
value?: TValue;
|
|
24
|
-
onChange?: OnChangeEvent<TValue>;
|
|
25
|
-
};
|
|
26
|
-
type SingleStrictProps<OptionValue extends string, TValue = OptionValue> = {
|
|
27
|
-
type?: 'single-strict';
|
|
28
|
-
value?: TValue;
|
|
29
|
-
onChange?: OnChangeEvent<TValue>;
|
|
30
|
-
};
|
|
31
|
-
type MultipleProps<OptionValue extends string, TValue = Array<OptionValue> | ReadonlyArray<OptionValue> | null> = {
|
|
32
|
-
type?: 'multiple';
|
|
33
|
-
value?: TValue;
|
|
34
|
-
onChange?: OnChangeEvent<Extract<TValue, ReadonlyArray<OptionValue>>>;
|
|
35
|
-
};
|
|
36
|
-
export type OnChangeEvent<T> = (event: MirandaChangeEvent<Omit<WCToggleGroup, 'value'> & {
|
|
37
|
-
value: T;
|
|
38
|
-
}>) => void;
|
|
39
|
-
export type ToggleGroupProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string, TOptions extends ReadonlyArray<ToggleGroupOption<string>> = ReadonlyArray<ToggleGroupOption<OptionValue>>> = Omit<ComponentProps<typeof WiredToggleGroup>, 'type' | 'value' | 'onChange'> & {
|
|
40
|
-
type?: TSelectionType;
|
|
41
|
-
options?: TOptions;
|
|
42
|
-
} & (TSelectionType extends 'single' ? SingleProps<OptionValue> : TSelectionType extends 'single-strict' ? SingleStrictProps<OptionValue> : TSelectionType extends 'multiple' ? MultipleProps<OptionValue> : {
|
|
43
|
-
type?: TSelectionType;
|
|
44
|
-
value?: SelectionValue<OptionValue>;
|
|
45
|
-
onChange?: OnChangeEvent<OptionValue>;
|
|
46
|
-
});
|
|
47
|
-
declare function ToggleGroup<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string>({ options, children, onChange, ...rest }: ToggleGroupProps<TSelectionType, OptionValue>): import("react/jsx-dev-runtime").JSX.Element;
|
|
22
|
+
export type ToggleGroupProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string> = SelectionProps<typeof WiredToggleGroup, TSelectionType, OptionValue, ToggleGroupOption<OptionValue>>;
|
|
23
|
+
declare function ToggleGroup<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string>({ options, children, onChange, ...rest }: ToggleGroupProps<TSelectionType, OptionValue>): React.JSX.Element;
|
|
48
24
|
declare namespace ToggleGroup {
|
|
49
|
-
var Toggle:
|
|
25
|
+
var Toggle: React.ForwardRefExoticComponent<Omit<import("./Toggle").ToggleProps, "ref"> & React.RefAttributes<import("@loadsmart/miranda-wc").Toggle>>;
|
|
50
26
|
}
|
|
51
27
|
export default ToggleGroup;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { default as React, ReactElement, ReactNode, ComponentProps } from 'react';
|
|
1
2
|
import { Tooltip as WCTooltip, TooltipPlacement, TooltipTrigger } from '@loadsmart/miranda-wc';
|
|
2
|
-
import { ReactElement, ReactNode, ComponentProps } from 'react';
|
|
3
3
|
import { WebComponentProps } from '@lit/react';
|
|
4
4
|
declare global {
|
|
5
5
|
namespace JSX {
|
|
@@ -19,5 +19,5 @@ export type TooltipProps = ComponentProps<typeof WiredTooltip> & {
|
|
|
19
19
|
* **Warning**: This component will throw if the provided `children` is not a single child,
|
|
20
20
|
* and will not render if the children is not valid or is a fragment.
|
|
21
21
|
*/
|
|
22
|
-
export declare function Tooltip(props: TooltipProps):
|
|
22
|
+
export declare function Tooltip(props: TooltipProps): React.JSX.Element | null;
|
|
23
23
|
export type { TooltipPlacement, TooltipTrigger };
|
package/dist/index.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ export { Radio as WCRadio, RadioGroup as WCRadioGroup, } from '@loadsmart/mirand
|
|
|
80
80
|
export type { RadioProps as WCRadioProps, RadioGroupProps as WCRadioGroupProps, RadioGroupOrientation, } from '@loadsmart/miranda-wc';
|
|
81
81
|
export { Section as WCSection, SectionTitle as WCSectionTitle, } from '@loadsmart/miranda-wc';
|
|
82
82
|
export type { SectionProps as WCSectionProps } from '@loadsmart/miranda-wc';
|
|
83
|
+
export { Select as WCSelect, SelectOption as WCSelectOption, } from '@loadsmart/miranda-wc';
|
|
83
84
|
export { SpinnerWheel as WCSpinnerWheel } from '@loadsmart/miranda-wc';
|
|
84
85
|
export type { SpinnerWheelProps as WCSpinnerWheelProps } from '@loadsmart/miranda-wc';
|
|
85
86
|
export { Step as WCStep, Steps as WCSteps } from '@loadsmart/miranda-wc';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { forwardRef, useState, useCallback, Children, isValidElement, cloneElement } from "react";
|
|
3
1
|
import { AccordionTitle as AccordionTitle$1, AccordionContent as AccordionContent$1, Accordion as Accordion$1, Badge as Badge$1, BannerActionPrimary as BannerActionPrimary$1, BannerActions as BannerActions$1, BannerActionSecondary as BannerActionSecondary$1, BannerDescription as BannerDescription$1, BannerIcon as BannerIcon$1, BannerTitle as BannerTitle$1, Banner as Banner$1, Button as Button$1, CardTitle as CardTitle$1, CardSubtitle as CardSubtitle$1, CardBody as CardBody$1, CardDivider as CardDivider$1, CardActionPrimary as CardActionPrimary$1, CardActionSecondary as CardActionSecondary$1, CardActionTertiary as CardActionTertiary$1, CardFooter as CardFooter$1, Card as Card$1, Checkbox as Checkbox$1, DialogActionPrimary as DialogActionPrimary$1, DialogActionSecondary as DialogActionSecondary$1, DialogActionTertiary as DialogActionTertiary$1, DialogActions as DialogActions$1, DialogBody as DialogBody$1, DialogClose as DialogClose$1, DialogFooter as DialogFooter$1, DialogHeader as DialogHeader$1, Dialog as Dialog$1, Divider as Divider$1, DrawerActionPrimary as DrawerActionPrimary$1, DrawerActionSecondary as DrawerActionSecondary$1, DrawerActionTertiary as DrawerActionTertiary$1, DrawerActions as DrawerActions$1, DrawerBody as DrawerBody$1, DrawerClose as DrawerClose$1, DrawerHeader as DrawerHeader$1, Drawer as Drawer$1, DropdownItem as DropdownItem$1, DropdownMenu as DropdownMenu$1, DropdownTrigger as DropdownTrigger$1, Dropdown as Dropdown$1, EmptyStateIllustration as EmptyStateIllustration$1, EmptyStateHeader as EmptyStateHeader$1, EmptyStateMessage as EmptyStateMessage$1, EmptyStateAction as EmptyStateAction$1, EmptyState as EmptyState$1, FieldLabel as FieldLabel$1, FieldHint as FieldHint$1, Field as Field$1, HeaderActions as HeaderActions$1, HeaderContent as HeaderContent$1, HeaderTitle as HeaderTitle$1, SubHeader as SubHeader$1, BackButton, HeaderTabs as HeaderTabs$1, Header as Header$1, Icon as Icon$1, LabeledValueLabel as LabeledValueLabel$1, LabeledValueValue as LabeledValueValue$1, LabeledValue as LabeledValue$1, Box as Box$1, Group as Group$1, Stack as Stack$1, Grid as Grid$1, Sidebar as Sidebar$1, Switcher as Switcher$1, Container as Container$1, Row as Row$1, Column as Column$1, Link as Link$1, Body as Body$1, PageContent as PageContent$1, Pagination as Pagination$1, ProgressBar as ProgressBar$1, ProgressBarCountdown as ProgressBarCountdown$1, Radio as Radio$1, RadioGroup as RadioGroup$1, SectionTitle as SectionTitle$1, Section as Section$1, SelectOption as SelectOption$1, Select as Select$1, SpinnerWheel as SpinnerWheel$1, Step as Step$1, Steps as Steps$1, Switch as Switch$1, TableHead as TableHead$1, TableBody as TableBody$1, TableFoot as TableFoot$1, TableRow as TableRow$1, TableCell as TableCell$1, TableToolbar as TableToolbar$1, TableHeadCell as TableHeadCell$1, TableFeedback as TableFeedback$1, TableActions as TableActions$1, TableSelectionCell as TableSelectionCell$1, Table as Table$1, Tab as Tab$1, TabPanel as TabPanel$1, Tabs as Tabs$1, Tag as Tag$1, ActionableTag as ActionableTag$1, Text as Text$1, TextArea as TextArea$1, TextField as TextField$1, TimelineItem as TimelineItem$1, TimelineExpandableItem as TimelineExpandableItem$1, TimelineItemBody as TimelineItemBody$1, TimelineItemFooter as TimelineItemFooter$1, TimelineItemHeader as TimelineItemHeader$1, TimelineItemHeaderSubtitle as TimelineItemHeaderSubtitle$1, TimelineItemHeaderTitle as TimelineItemHeaderTitle$1, TimelineItemIcon as TimelineItemIcon$1, Timeline as Timeline$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1, Tooltip as Tooltip$1, LogoLoader as LogoLoader$1, DotsLoader as DotsLoader$1 } from "@loadsmart/miranda-wc";
|
|
4
|
-
import { DIALOG_SIZES, DIALOG_VARIANTS, DRAWER_SIZES, EMPTY_STATE_VARIANTS, Accordion, AccordionContent, AccordionTitle, ActionableTag, Badge, Banner, BannerActionPrimary, BannerActionSecondary, BannerActions, BannerDescription, BannerIcon, BannerTitle, Box, Button, Card, CardActionPrimary, CardActionSecondary, CardActionTertiary, CardBody, CardDivider, CardFooter, CardSubtitle, CardTitle, Checkbox, Column, Container, Dialog, DialogActionPrimary, DialogActionSecondary, DialogActionTertiary, DialogActions, DialogBody, DialogClose, DialogFooter, DialogHeader, Divider, Drawer, DrawerActionPrimary, DrawerActionSecondary, DrawerActionTertiary, DrawerActions, DrawerBody, DrawerClose, DrawerHeader, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, EmptyState, EmptyStateAction, EmptyStateHeader, EmptyStateIllustration, EmptyStateMessage, Field, FieldHint, FieldLabel, Grid, Group, Header, HeaderActions, HeaderContent, HeaderTitle, Icon, LabeledValue, LabeledValueLabel, LabeledValueValue, Link, LogoLoader, PageContent, Pagination, ProgressBar, ProgressBarCountdown, Radio, RadioGroup, Row, Section, SectionTitle, Sidebar, SpinnerWheel, Stack, Step, Steps, SubHeader, Switch, Switcher, Tab, TabPanel, Table, TableActions, TableBody, TableCell, TableFeedback, TableFoot, TableHead, TableHeadCell, TableRow, TableToolbar, Tabs, Tag, Text, TextArea, TextField, Timeline, TimelineExpandableItem, TimelineItem, TimelineItemBody, TimelineItemFooter, TimelineItemHeader, TimelineItemHeaderSubtitle, TimelineItemHeaderTitle, TimelineItemIcon, Toggle, ToggleGroup, Tooltip } from "@loadsmart/miranda-wc";
|
|
2
|
+
import { DIALOG_SIZES, DIALOG_VARIANTS, DRAWER_SIZES, EMPTY_STATE_VARIANTS, Accordion, AccordionContent, AccordionTitle, ActionableTag, Badge, Banner, BannerActionPrimary, BannerActionSecondary, BannerActions, BannerDescription, BannerIcon, BannerTitle, Box, Button, Card, CardActionPrimary, CardActionSecondary, CardActionTertiary, CardBody, CardDivider, CardFooter, CardSubtitle, CardTitle, Checkbox, Column, Container, Dialog, DialogActionPrimary, DialogActionSecondary, DialogActionTertiary, DialogActions, DialogBody, DialogClose, DialogFooter, DialogHeader, Divider, Drawer, DrawerActionPrimary, DrawerActionSecondary, DrawerActionTertiary, DrawerActions, DrawerBody, DrawerClose, DrawerHeader, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, EmptyState, EmptyStateAction, EmptyStateHeader, EmptyStateIllustration, EmptyStateMessage, Field, FieldHint, FieldLabel, Grid, Group, Header, HeaderActions, HeaderContent, HeaderTitle, Icon, LabeledValue, LabeledValueLabel, LabeledValueValue, Link, LogoLoader, PageContent, Pagination, ProgressBar, ProgressBarCountdown, Radio, RadioGroup, Row, Section, SectionTitle, Select, SelectOption, Sidebar, SpinnerWheel, Stack, Step, Steps, SubHeader, Switch, Switcher, Tab, TabPanel, Table, TableActions, TableBody, TableCell, TableFeedback, TableFoot, TableHead, TableHeadCell, TableRow, TableToolbar, Tabs, Tag, Text, TextArea, TextField, Timeline, TimelineExpandableItem, TimelineItem, TimelineItemBody, TimelineItemFooter, TimelineItemHeader, TimelineItemHeaderSubtitle, TimelineItemHeaderTitle, TimelineItemIcon, Toggle, ToggleGroup, Tooltip } from "@loadsmart/miranda-wc";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import React__default, { forwardRef, useState, useCallback, Children, isValidElement, cloneElement } from "react";
|
|
5
5
|
import { createComponent as createComponent$1 } from "@lit/react";
|
|
6
6
|
import { isFragment } from "react-is";
|
|
7
7
|
const createComponent = ({
|
|
@@ -26,7 +26,7 @@ const WiredAccordionTitle = createComponent({
|
|
|
26
26
|
const AccordionTitle2 = forwardRef(
|
|
27
27
|
(props, ref) => {
|
|
28
28
|
const { leading, children, ...rest } = props;
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ React__default.createElement(WiredAccordionTitle, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children);
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
const AccordionContent2 = createComponent({
|
|
@@ -58,7 +58,7 @@ const WiredBannerActionPrimary = createComponent({
|
|
|
58
58
|
});
|
|
59
59
|
const BannerActionPrimary2 = forwardRef((props, ref) => {
|
|
60
60
|
const { leading, trailing, children, ...rest } = props;
|
|
61
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ React__default.createElement(WiredBannerActionPrimary, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
62
62
|
});
|
|
63
63
|
const BannerActions2 = createComponent({
|
|
64
64
|
tagName: "m-banner-actions",
|
|
@@ -72,7 +72,7 @@ const WiredBannerActionSecondary = createComponent({
|
|
|
72
72
|
});
|
|
73
73
|
const BannerActionSecondary2 = forwardRef((props, ref) => {
|
|
74
74
|
const { leading, trailing, children, ...rest } = props;
|
|
75
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ React__default.createElement(WiredBannerActionSecondary, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
76
76
|
});
|
|
77
77
|
const BannerDescription2 = createComponent({
|
|
78
78
|
tagName: "m-banner-description",
|
|
@@ -112,7 +112,7 @@ const WiredButton = createComponent({
|
|
|
112
112
|
});
|
|
113
113
|
const Button2 = forwardRef((props, ref) => {
|
|
114
114
|
const { leading, trailing, children, ...rest } = props;
|
|
115
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ React__default.createElement(WiredButton, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
116
116
|
});
|
|
117
117
|
const WiredCardTitle = createComponent({
|
|
118
118
|
tagName: "m-card-title",
|
|
@@ -121,7 +121,7 @@ const WiredCardTitle = createComponent({
|
|
|
121
121
|
});
|
|
122
122
|
const CardTitle2 = forwardRef(
|
|
123
123
|
({ children, leading, ...props }, ref) => {
|
|
124
|
-
return /* @__PURE__ */
|
|
124
|
+
return /* @__PURE__ */ React__default.createElement(WiredCardTitle, { ...props, slot: "title", ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children);
|
|
125
125
|
}
|
|
126
126
|
);
|
|
127
127
|
const CardSubtitle2 = createComponent({
|
|
@@ -146,7 +146,7 @@ const WiredCardActionPrimary = createComponent({
|
|
|
146
146
|
});
|
|
147
147
|
const CardActionPrimary2 = forwardRef((props, ref) => {
|
|
148
148
|
const { leading, trailing, children, ...rest } = props;
|
|
149
|
-
return /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ React__default.createElement(WiredCardActionPrimary, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
150
150
|
});
|
|
151
151
|
const WiredCardActionSecondary = createComponent({
|
|
152
152
|
tagName: "m-card-action-secondary",
|
|
@@ -155,7 +155,7 @@ const WiredCardActionSecondary = createComponent({
|
|
|
155
155
|
});
|
|
156
156
|
const CardActionSecondary2 = forwardRef((props, ref) => {
|
|
157
157
|
const { leading, trailing, children, ...rest } = props;
|
|
158
|
-
return /* @__PURE__ */
|
|
158
|
+
return /* @__PURE__ */ React__default.createElement(WiredCardActionSecondary, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
159
159
|
});
|
|
160
160
|
const WiredCardActionTertiary = createComponent({
|
|
161
161
|
tagName: "m-card-action-tertiary",
|
|
@@ -164,7 +164,7 @@ const WiredCardActionTertiary = createComponent({
|
|
|
164
164
|
});
|
|
165
165
|
const CardActionTertiary2 = forwardRef((props, ref) => {
|
|
166
166
|
const { leading, trailing, children, ...rest } = props;
|
|
167
|
-
return /* @__PURE__ */
|
|
167
|
+
return /* @__PURE__ */ React__default.createElement(WiredCardActionTertiary, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
168
168
|
});
|
|
169
169
|
const CardFooter2 = createComponent({
|
|
170
170
|
tagName: "m-card-footer",
|
|
@@ -199,7 +199,7 @@ const WiredCheckbox = createComponent({
|
|
|
199
199
|
});
|
|
200
200
|
const Checkbox2 = forwardRef((props, ref) => {
|
|
201
201
|
const { children, leading, ...rest } = props;
|
|
202
|
-
return /* @__PURE__ */
|
|
202
|
+
return /* @__PURE__ */ React__default.createElement(WiredCheckbox, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children);
|
|
203
203
|
});
|
|
204
204
|
const WiredDialogActionPrimary = createComponent({
|
|
205
205
|
tagName: "m-dialog-action-primary",
|
|
@@ -208,7 +208,7 @@ const WiredDialogActionPrimary = createComponent({
|
|
|
208
208
|
});
|
|
209
209
|
const DialogActionPrimary2 = forwardRef((props, ref) => {
|
|
210
210
|
const { leading, trailing, children, ...rest } = props;
|
|
211
|
-
return /* @__PURE__ */
|
|
211
|
+
return /* @__PURE__ */ React__default.createElement(WiredDialogActionPrimary, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
212
212
|
});
|
|
213
213
|
const WiredDialogActionSecondary = createComponent({
|
|
214
214
|
tagName: "m-dialog-action-secondary",
|
|
@@ -217,7 +217,7 @@ const WiredDialogActionSecondary = createComponent({
|
|
|
217
217
|
});
|
|
218
218
|
const DialogActionSecondary2 = forwardRef((props, ref) => {
|
|
219
219
|
const { leading, trailing, children, ...rest } = props;
|
|
220
|
-
return /* @__PURE__ */
|
|
220
|
+
return /* @__PURE__ */ React__default.createElement(WiredDialogActionSecondary, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
221
221
|
});
|
|
222
222
|
const WiredDialogActionTertiary = createComponent({
|
|
223
223
|
tagName: "m-dialog-action-tertiary",
|
|
@@ -226,7 +226,7 @@ const WiredDialogActionTertiary = createComponent({
|
|
|
226
226
|
});
|
|
227
227
|
const DialogActionTertiary2 = forwardRef((props, ref) => {
|
|
228
228
|
const { leading, trailing, children, ...rest } = props;
|
|
229
|
-
return /* @__PURE__ */
|
|
229
|
+
return /* @__PURE__ */ React__default.createElement(WiredDialogActionTertiary, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
230
230
|
});
|
|
231
231
|
const DialogActions2 = createComponent({
|
|
232
232
|
tagName: "m-dialog-actions",
|
|
@@ -290,7 +290,7 @@ const WiredDrawerActionPrimary = createComponent({
|
|
|
290
290
|
});
|
|
291
291
|
const DrawerActionPrimary2 = forwardRef(function DrawerActionPrimary22(props, ref) {
|
|
292
292
|
const { leading, trailing, children, ...rest } = props;
|
|
293
|
-
return /* @__PURE__ */
|
|
293
|
+
return /* @__PURE__ */ React__default.createElement(WiredDrawerActionPrimary, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
294
294
|
});
|
|
295
295
|
const WiredDrawerActionSecondary = createComponent({
|
|
296
296
|
tagName: "m-drawer-action-secondary",
|
|
@@ -299,7 +299,7 @@ const WiredDrawerActionSecondary = createComponent({
|
|
|
299
299
|
});
|
|
300
300
|
const DrawerActionSecondary2 = forwardRef(function DrawerActionSecondary22(props, ref) {
|
|
301
301
|
const { leading, trailing, children, ...rest } = props;
|
|
302
|
-
return /* @__PURE__ */
|
|
302
|
+
return /* @__PURE__ */ React__default.createElement(WiredDrawerActionSecondary, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
303
303
|
});
|
|
304
304
|
const WiredDrawerActionTertiary = createComponent({
|
|
305
305
|
tagName: "m-drawer-action-tertiary",
|
|
@@ -308,7 +308,7 @@ const WiredDrawerActionTertiary = createComponent({
|
|
|
308
308
|
});
|
|
309
309
|
const DrawerActionTertiary2 = forwardRef(function DrawerActionTertiary22(props, ref) {
|
|
310
310
|
const { leading, trailing, children, ...rest } = props;
|
|
311
|
-
return /* @__PURE__ */
|
|
311
|
+
return /* @__PURE__ */ React__default.createElement(WiredDrawerActionTertiary, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
312
312
|
});
|
|
313
313
|
const DrawerActions2 = createComponent({
|
|
314
314
|
tagName: "m-drawer-actions",
|
|
@@ -362,7 +362,7 @@ const WiredDropdownItem = createComponent({
|
|
|
362
362
|
const DropdownItem2 = forwardRef(
|
|
363
363
|
(props, ref) => {
|
|
364
364
|
const { leading, trailing, children, ...rest } = props;
|
|
365
|
-
return /* @__PURE__ */
|
|
365
|
+
return /* @__PURE__ */ React__default.createElement(WiredDropdownItem, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
366
366
|
}
|
|
367
367
|
);
|
|
368
368
|
const DropdownMenu2 = createComponent({
|
|
@@ -377,7 +377,7 @@ const WiredDropdownTrigger = createComponent({
|
|
|
377
377
|
});
|
|
378
378
|
const DropdownTrigger2 = forwardRef((props, ref) => {
|
|
379
379
|
const { leading, children, ...rest } = props;
|
|
380
|
-
return /* @__PURE__ */
|
|
380
|
+
return /* @__PURE__ */ React__default.createElement(WiredDropdownTrigger, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children);
|
|
381
381
|
});
|
|
382
382
|
const Dropdown2 = createComponent({
|
|
383
383
|
tagName: "m-dropdown",
|
|
@@ -415,7 +415,7 @@ const WiredEmptyStateAction = createComponent({
|
|
|
415
415
|
});
|
|
416
416
|
const EmptyStateAction2 = forwardRef((props, ref) => {
|
|
417
417
|
const { leading, trailing, children, ...rest } = props;
|
|
418
|
-
return /* @__PURE__ */
|
|
418
|
+
return /* @__PURE__ */ React__default.createElement(WiredEmptyStateAction, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { slot: "trailing" }, trailing));
|
|
419
419
|
});
|
|
420
420
|
const EmptyState2 = createComponent({
|
|
421
421
|
tagName: "m-empty-state",
|
|
@@ -443,7 +443,7 @@ const WiredFieldHint = createComponent({
|
|
|
443
443
|
});
|
|
444
444
|
const FieldHint2 = forwardRef(
|
|
445
445
|
({ children, leading, ...props }, ref) => {
|
|
446
|
-
return /* @__PURE__ */
|
|
446
|
+
return /* @__PURE__ */ React__default.createElement(WiredFieldHint, { ...props, slot: "hint", ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children);
|
|
447
447
|
}
|
|
448
448
|
);
|
|
449
449
|
const Field2 = createComponent({
|
|
@@ -537,7 +537,7 @@ const LabeledValue2 = Object.assign(
|
|
|
537
537
|
labelColor,
|
|
538
538
|
...rest
|
|
539
539
|
} = props;
|
|
540
|
-
return /* @__PURE__ */
|
|
540
|
+
return /* @__PURE__ */ React__default.createElement(WiredLabeledValue, { ...rest, ref }, label != null && /* @__PURE__ */ React__default.createElement(LabeledValueLabel2, { variant: labelVariant, color: labelColor }, label), value != null && /* @__PURE__ */ React__default.createElement(LabeledValueValue2, { variant: valueVariant, color: valueColor }, value), children);
|
|
541
541
|
}),
|
|
542
542
|
{
|
|
543
543
|
Label: LabeledValueLabel2,
|
|
@@ -566,12 +566,12 @@ const Grid2 = createComponent({
|
|
|
566
566
|
});
|
|
567
567
|
const SidebarSide = forwardRef(
|
|
568
568
|
({ children, ...boxProps }, ref) => {
|
|
569
|
-
return /* @__PURE__ */
|
|
569
|
+
return /* @__PURE__ */ React__default.createElement(Box2, { ...boxProps, slot: "sidebar", ref }, children);
|
|
570
570
|
}
|
|
571
571
|
);
|
|
572
572
|
const SidebarContent = forwardRef(
|
|
573
573
|
({ children, ...boxProps }, ref) => {
|
|
574
|
-
return /* @__PURE__ */
|
|
574
|
+
return /* @__PURE__ */ React__default.createElement(Box2, { ...boxProps, slot: "content", ref }, children);
|
|
575
575
|
}
|
|
576
576
|
);
|
|
577
577
|
const Sidebar2 = createComponent({
|
|
@@ -658,7 +658,7 @@ const WiredRadio = createComponent({
|
|
|
658
658
|
});
|
|
659
659
|
const Radio2 = forwardRef((props, ref) => {
|
|
660
660
|
const { children, leading, ...rest } = props;
|
|
661
|
-
return /* @__PURE__ */
|
|
661
|
+
return /* @__PURE__ */ React__default.createElement(WiredRadio, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children);
|
|
662
662
|
});
|
|
663
663
|
const RadioGroup2 = createComponent({
|
|
664
664
|
tagName: "m-radio-group",
|
|
@@ -678,7 +678,7 @@ const WiredSectionTitle = createComponent({
|
|
|
678
678
|
});
|
|
679
679
|
const SectionTitle2 = forwardRef(
|
|
680
680
|
({ children, leading, ...props }, ref) => {
|
|
681
|
-
return /* @__PURE__ */
|
|
681
|
+
return /* @__PURE__ */ React__default.createElement(WiredSectionTitle, { ...props, slot: "title", ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children);
|
|
682
682
|
}
|
|
683
683
|
);
|
|
684
684
|
const Section2 = createComponent({
|
|
@@ -695,13 +695,13 @@ const WiredSelectOption = createComponent({
|
|
|
695
695
|
displayName: "SelectOption"
|
|
696
696
|
});
|
|
697
697
|
const SLOTTED_STYLE$3 = { display: "contents" };
|
|
698
|
-
const
|
|
698
|
+
const SelectOption2 = forwardRef(
|
|
699
699
|
(props, ref) => {
|
|
700
700
|
const { leading, trailing, children, ...rest } = props;
|
|
701
|
-
return /* @__PURE__ */
|
|
701
|
+
return /* @__PURE__ */ React__default.createElement(WiredSelectOption, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { style: SLOTTED_STYLE$3, slot: "leading" }, leading), children, trailing != null && /* @__PURE__ */ React__default.createElement("span", { style: SLOTTED_STYLE$3, slot: "trailing" }, trailing));
|
|
702
702
|
}
|
|
703
703
|
);
|
|
704
|
-
|
|
704
|
+
SelectOption2.displayName = "SelectOption";
|
|
705
705
|
const WiredSelect = createComponent({
|
|
706
706
|
tagName: "m-select",
|
|
707
707
|
elementClass: Select$1,
|
|
@@ -713,20 +713,27 @@ const WiredSelect = createComponent({
|
|
|
713
713
|
displayName: "Select"
|
|
714
714
|
});
|
|
715
715
|
const SLOTTED_STYLE$2 = { display: "contents" };
|
|
716
|
-
function
|
|
717
|
-
const { options, children, ...rest } = props;
|
|
718
|
-
return /* @__PURE__ */
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
716
|
+
function Select2(props) {
|
|
717
|
+
const { options, children, onChange, ...rest } = props;
|
|
718
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
719
|
+
WiredSelect,
|
|
720
|
+
{
|
|
721
|
+
onChange,
|
|
722
|
+
...rest
|
|
723
|
+
},
|
|
724
|
+
children || options?.map(function renderOption(option) {
|
|
725
|
+
const {
|
|
726
|
+
label,
|
|
727
|
+
leading,
|
|
728
|
+
trailing,
|
|
729
|
+
value: optionValue,
|
|
730
|
+
...others
|
|
731
|
+
} = option;
|
|
732
|
+
return /* @__PURE__ */ React__default.createElement(SelectOption2, { key: optionValue, ...others, value: optionValue }, leading != null && /* @__PURE__ */ React__default.createElement("span", { style: SLOTTED_STYLE$2, slot: "leading" }, leading), label, trailing != null && /* @__PURE__ */ React__default.createElement("span", { style: SLOTTED_STYLE$2, slot: "trailing" }, trailing));
|
|
733
|
+
})
|
|
734
|
+
);
|
|
728
735
|
}
|
|
729
|
-
|
|
736
|
+
Select2.Option = SelectOption2;
|
|
730
737
|
const SpinnerWheel2 = createComponent({
|
|
731
738
|
tagName: "m-spinner-wheel",
|
|
732
739
|
elementClass: SpinnerWheel$1,
|
|
@@ -904,7 +911,7 @@ const WiredTab = createComponent({
|
|
|
904
911
|
});
|
|
905
912
|
const Tab2 = forwardRef(
|
|
906
913
|
({ children, leading, ...props }, ref) => {
|
|
907
|
-
return /* @__PURE__ */
|
|
914
|
+
return /* @__PURE__ */ React__default.createElement(WiredTab, { ...props, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children);
|
|
908
915
|
}
|
|
909
916
|
);
|
|
910
917
|
const TabPanel2 = createComponent({
|
|
@@ -932,7 +939,7 @@ const WiredTag = createComponent({
|
|
|
932
939
|
const SLOTTED_STYLE$1 = { display: "contents" };
|
|
933
940
|
const Tag2 = forwardRef((props, ref) => {
|
|
934
941
|
const { leading, children, ...rest } = props;
|
|
935
|
-
return /* @__PURE__ */
|
|
942
|
+
return /* @__PURE__ */ React__default.createElement(WiredTag, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { style: SLOTTED_STYLE$1, slot: "leading" }, leading), children);
|
|
936
943
|
});
|
|
937
944
|
const WiredActionableTag = createComponent({
|
|
938
945
|
tagName: "m-actionable-tag",
|
|
@@ -947,7 +954,7 @@ const SLOTTED_STYLE = { display: "contents" };
|
|
|
947
954
|
const ActionableTag2 = forwardRef(
|
|
948
955
|
(props, ref) => {
|
|
949
956
|
const { leading, children, selectable, removable, ...rest } = props;
|
|
950
|
-
return /* @__PURE__ */
|
|
957
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
951
958
|
WiredActionableTag,
|
|
952
959
|
{
|
|
953
960
|
...rest,
|
|
@@ -955,7 +962,7 @@ const ActionableTag2 = forwardRef(
|
|
|
955
962
|
removable: removable || Boolean(rest.onRemove),
|
|
956
963
|
ref
|
|
957
964
|
},
|
|
958
|
-
leading != null && /* @__PURE__ */
|
|
965
|
+
leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading", style: SLOTTED_STYLE }, leading),
|
|
959
966
|
children
|
|
960
967
|
);
|
|
961
968
|
}
|
|
@@ -975,7 +982,7 @@ const WiredTextArea = createComponent({
|
|
|
975
982
|
displayName: "TextArea"
|
|
976
983
|
});
|
|
977
984
|
function TextArea2(props) {
|
|
978
|
-
return /* @__PURE__ */
|
|
985
|
+
return /* @__PURE__ */ React__default.createElement(WiredTextArea, { ...props });
|
|
979
986
|
}
|
|
980
987
|
const WiredTextField = createComponent({
|
|
981
988
|
tagName: "m-text-field",
|
|
@@ -990,7 +997,7 @@ const WiredTextField = createComponent({
|
|
|
990
997
|
const TextField2 = forwardRef(
|
|
991
998
|
({ leading, trailing, value, ...rest }, ref) => {
|
|
992
999
|
const normalizedValue = value !== void 0 ? String(value) : "";
|
|
993
|
-
return /* @__PURE__ */
|
|
1000
|
+
return /* @__PURE__ */ React__default.createElement(WiredTextField, { ...rest, value: normalizedValue, ref }, leading != null && /* @__PURE__ */ React__default.createElement("div", { slot: "leading" }, leading), trailing != null && /* @__PURE__ */ React__default.createElement("div", { slot: "trailing" }, trailing));
|
|
994
1001
|
}
|
|
995
1002
|
);
|
|
996
1003
|
const TimelineItem2 = createComponent({
|
|
@@ -1055,7 +1062,7 @@ const WiredToggle = createComponent({
|
|
|
1055
1062
|
});
|
|
1056
1063
|
const Toggle2 = forwardRef((props, ref) => {
|
|
1057
1064
|
const { children, leading, ...rest } = props;
|
|
1058
|
-
return /* @__PURE__ */
|
|
1065
|
+
return /* @__PURE__ */ React__default.createElement(WiredToggle, { ...rest, ref }, leading != null && /* @__PURE__ */ React__default.createElement("span", { slot: "leading" }, leading), children);
|
|
1059
1066
|
});
|
|
1060
1067
|
const WiredToggleGroup = createComponent({
|
|
1061
1068
|
tagName: "m-toggle-group",
|
|
@@ -1071,15 +1078,15 @@ function ToggleGroup2({
|
|
|
1071
1078
|
onChange,
|
|
1072
1079
|
...rest
|
|
1073
1080
|
}) {
|
|
1074
|
-
return /* @__PURE__ */
|
|
1081
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
1075
1082
|
WiredToggleGroup,
|
|
1076
1083
|
{
|
|
1077
1084
|
onChange,
|
|
1078
1085
|
...rest
|
|
1079
1086
|
},
|
|
1080
|
-
children ??
|
|
1087
|
+
children ?? options?.map(function renderOption(option) {
|
|
1081
1088
|
const { label, value: optionValue, ...others } = option;
|
|
1082
|
-
return /* @__PURE__ */
|
|
1089
|
+
return /* @__PURE__ */ React__default.createElement(Toggle2, { key: optionValue, ...others, value: optionValue }, label);
|
|
1083
1090
|
})
|
|
1084
1091
|
);
|
|
1085
1092
|
}
|
|
@@ -1121,7 +1128,7 @@ function Tooltip2(props) {
|
|
|
1121
1128
|
})
|
|
1122
1129
|
];
|
|
1123
1130
|
})();
|
|
1124
|
-
return /* @__PURE__ */
|
|
1131
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(WiredTooltip, { anchor: anchorId, ...rest }, message), childWithId);
|
|
1125
1132
|
}
|
|
1126
1133
|
const LogoLoader2 = createComponent({
|
|
1127
1134
|
tagName: "m-logo-loader",
|
|
@@ -1179,7 +1186,7 @@ export {
|
|
|
1179
1186
|
RadioGroup2 as RadioGroup,
|
|
1180
1187
|
Row2 as Row,
|
|
1181
1188
|
Section2 as Section,
|
|
1182
|
-
Select,
|
|
1189
|
+
Select2 as Select,
|
|
1183
1190
|
Sidebar2 as Sidebar,
|
|
1184
1191
|
SpinnerWheel2 as SpinnerWheel,
|
|
1185
1192
|
Stack2 as Stack,
|
|
@@ -1295,6 +1302,8 @@ export {
|
|
|
1295
1302
|
Row as WCRow,
|
|
1296
1303
|
Section as WCSection,
|
|
1297
1304
|
SectionTitle as WCSectionTitle,
|
|
1305
|
+
Select as WCSelect,
|
|
1306
|
+
SelectOption as WCSelectOption,
|
|
1298
1307
|
Sidebar as WCSidebar,
|
|
1299
1308
|
SpinnerWheel as WCSpinnerWheel,
|
|
1300
1309
|
Stack as WCStack,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SelectionType, SelectionValue } from '@loadsmart/miranda-wc';
|
|
2
|
+
import { ComponentProps, JSXElementConstructor } from 'react';
|
|
3
|
+
import { MirandaChangeEvent } from './types';
|
|
4
|
+
export type OnChangeEvent<TComponent extends JSXElementConstructor<any>, T> = (event: MirandaChangeEvent<Omit<TComponent, 'value'> & {
|
|
5
|
+
value: T;
|
|
6
|
+
}>) => void;
|
|
7
|
+
interface BaseProps<TComponent extends JSXElementConstructor<any>, TValue> {
|
|
8
|
+
type?: string;
|
|
9
|
+
value?: TValue;
|
|
10
|
+
onChange?: OnChangeEvent<TComponent, TValue>;
|
|
11
|
+
}
|
|
12
|
+
interface SingleProps<TComponent extends JSXElementConstructor<any>, OptionValue extends string, TValue = OptionValue | null> extends BaseProps<TComponent, TValue> {
|
|
13
|
+
type?: 'single';
|
|
14
|
+
}
|
|
15
|
+
interface SingleStrictProps<TComponent extends JSXElementConstructor<any>, OptionValue extends string, TValue = OptionValue> extends BaseProps<TComponent, TValue> {
|
|
16
|
+
type?: 'single-strict';
|
|
17
|
+
}
|
|
18
|
+
interface MultipleProps<TComponent extends JSXElementConstructor<any>, OptionValue extends string, TValue = Array<OptionValue> | ReadonlyArray<OptionValue> | null> extends BaseProps<TComponent, Extract<TValue, ReadonlyArray<OptionValue>>> {
|
|
19
|
+
type?: 'multiple';
|
|
20
|
+
}
|
|
21
|
+
type SelectionOption<TValue extends string = string> = {
|
|
22
|
+
value: TValue;
|
|
23
|
+
};
|
|
24
|
+
export type SelectionProps<TComponent extends JSXElementConstructor<any>, TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string, TSelectionOption extends SelectionOption<OptionValue> = SelectionOption<OptionValue>, TOptions extends ReadonlyArray<TSelectionOption> = ReadonlyArray<TSelectionOption>> = Omit<ComponentProps<TComponent>, 'type' | 'value' | 'onChange'> & {
|
|
25
|
+
type?: TSelectionType;
|
|
26
|
+
options?: TOptions;
|
|
27
|
+
} & (TSelectionType extends 'single' ? SingleProps<TComponent, OptionValue> : TSelectionType extends 'single-strict' ? SingleStrictProps<TComponent, OptionValue> : TSelectionType extends 'multiple' ? MultipleProps<TComponent, OptionValue> : BaseProps<TComponent, SelectionValue<OptionValue>>);
|
|
28
|
+
export {};
|
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.62",
|
|
4
4
|
"description": "React component library based on Miranda Web Components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,16 +22,14 @@
|
|
|
22
22
|
"license": "UNLICENSED",
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@loadsmart/miranda-utils": "*",
|
|
25
|
-
"@
|
|
26
|
-
"@storybook/react-vite": "^8.5.3",
|
|
27
|
-
"@types/react-dom": "^17.0.25",
|
|
25
|
+
"@types/react-dom": "^17.0.26",
|
|
28
26
|
"@types/react-is": "^18.3.0",
|
|
29
|
-
"@types/react": "^17.0.
|
|
30
|
-
"@vitejs/plugin-react": "^4.
|
|
27
|
+
"@types/react": "^17.0.85",
|
|
28
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
31
29
|
"react-dom": "^17.0.2",
|
|
32
30
|
"react": "^17.0.2",
|
|
33
31
|
"ts-loader": "^9.4.2",
|
|
34
|
-
"vite": "^6.2
|
|
32
|
+
"vite": "^6.3.2",
|
|
35
33
|
"vite-plugin-dts": "^4.5.3"
|
|
36
34
|
},
|
|
37
35
|
"peerDependencies": {
|
|
@@ -43,8 +41,8 @@
|
|
|
43
41
|
},
|
|
44
42
|
"dependencies": {
|
|
45
43
|
"@lit/react": "^1.0.5",
|
|
46
|
-
"@loadsmart/miranda-tokens": "4.0.0-beta.
|
|
47
|
-
"@loadsmart/miranda-wc": "3.0.0-beta.
|
|
44
|
+
"@loadsmart/miranda-tokens": "4.0.0-beta.62",
|
|
45
|
+
"@loadsmart/miranda-wc": "3.0.0-beta.62",
|
|
48
46
|
"react-is": "^18.3.1"
|
|
49
47
|
},
|
|
50
48
|
"directories": {
|