@loadsmart/miranda-react 3.0.0-beta.6 → 3.0.0-beta.60
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/Accordion.d.ts +6 -7
- package/dist/components/Accordion/AccordionContent.d.ts +2 -2
- package/dist/components/Accordion/AccordionTitle.d.ts +4 -4
- package/dist/components/Badge/Badge.d.ts +3 -3
- package/dist/components/Banner/Banner.d.ts +10 -10
- package/dist/components/Banner/BannerActionPrimary.d.ts +4 -4
- package/dist/components/Banner/BannerActionSecondary.d.ts +4 -4
- package/dist/components/Banner/BannerActions.d.ts +3 -3
- package/dist/components/Banner/BannerDescription.d.ts +3 -3
- package/dist/components/Banner/BannerIcon.d.ts +3 -3
- package/dist/components/Banner/BannerTitle.d.ts +3 -3
- package/dist/components/Button/Button.d.ts +4 -4
- package/dist/components/Card/Card.d.ts +12 -13
- package/dist/components/Card/CardActionPrimary.d.ts +4 -4
- package/dist/components/Card/CardActionSecondary.d.ts +4 -4
- package/dist/components/Card/CardActionTertiary.d.ts +4 -4
- package/dist/components/Card/CardBody.d.ts +3 -3
- package/dist/components/Card/CardDivider.d.ts +3 -3
- package/dist/components/Card/CardFooter.d.ts +3 -3
- package/dist/components/Card/CardSubtitle.d.ts +3 -3
- package/dist/components/Card/CardTitle.d.ts +4 -4
- package/dist/components/Checkbox/Checkbox.d.ts +5 -5
- package/dist/components/Dialog/Dialog.d.ts +17 -17
- package/dist/components/Dialog/DialogActionPrimary.d.ts +4 -4
- package/dist/components/Dialog/DialogActionSecondary.d.ts +4 -4
- package/dist/components/Dialog/DialogActionTertiary.d.ts +4 -4
- package/dist/components/Dialog/DialogActions.d.ts +3 -3
- package/dist/components/Dialog/DialogBody.d.ts +3 -3
- package/dist/components/Dialog/DialogClose.d.ts +4 -4
- package/dist/components/Dialog/DialogFooter.d.ts +3 -3
- package/dist/components/Dialog/DialogHeader.d.ts +3 -3
- package/dist/components/Divider/Divider.d.ts +3 -3
- package/dist/components/DotsLoader/DotsLoader.d.ts +13 -0
- package/dist/components/DotsLoader/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.d.ts +16 -19
- package/dist/components/Drawer/DrawerActionPrimary.d.ts +4 -4
- package/dist/components/Drawer/DrawerActionSecondary.d.ts +4 -4
- package/dist/components/Drawer/DrawerActionTertiary.d.ts +4 -4
- package/dist/components/Drawer/DrawerActions.d.ts +3 -3
- package/dist/components/Drawer/DrawerBody.d.ts +3 -3
- package/dist/components/Drawer/DrawerClose.d.ts +4 -4
- package/dist/components/Drawer/DrawerHeader.d.ts +3 -3
- package/dist/components/Dropdown/Dropdown.d.ts +8 -8
- package/dist/components/Dropdown/DropdownItem.d.ts +4 -4
- package/dist/components/Dropdown/DropdownMenu.d.ts +3 -3
- package/dist/components/Dropdown/DropdownTrigger.d.ts +4 -4
- package/dist/components/EmptyState/EmptyState.d.ts +8 -8
- package/dist/components/EmptyState/EmptyStateAction.d.ts +4 -4
- package/dist/components/EmptyState/EmptyStateHeader.d.ts +3 -3
- package/dist/components/EmptyState/EmptyStateIllustration.d.ts +3 -3
- package/dist/components/EmptyState/EmptyStateMessage.d.ts +3 -3
- package/dist/components/Field/Field.d.ts +5 -5
- package/dist/components/Field/FieldHint.d.ts +4 -4
- package/dist/components/Field/FieldLabel.d.ts +3 -3
- package/dist/components/Header/Header.d.ts +11 -8
- package/dist/components/Header/HeaderActions.d.ts +3 -3
- package/dist/components/Header/HeaderBackButton.d.ts +2 -2
- package/dist/components/Header/HeaderContent.d.ts +3 -3
- package/dist/components/Header/HeaderTabs.d.ts +14 -0
- package/dist/components/Header/HeaderTitle.d.ts +3 -3
- package/dist/components/Header/SubHeader.d.ts +3 -3
- package/dist/components/Header/index.d.ts +2 -0
- package/dist/components/Icon/Icon.d.ts +3 -3
- package/dist/components/Label/Label.d.ts +3 -3
- package/dist/components/LabeledValue/LabeledValue.d.ts +10 -10
- package/dist/components/Layout/Box.d.ts +3 -3
- package/dist/components/Layout/Grid.d.ts +3 -3
- package/dist/components/Layout/Group.d.ts +3 -3
- package/dist/components/Layout/Layout.d.ts +11 -11
- package/dist/components/Layout/Row.d.ts +5 -5
- package/dist/components/Layout/Sidebar.d.ts +7 -8
- package/dist/components/Layout/Stack.d.ts +3 -3
- package/dist/components/Layout/Switcher.d.ts +3 -3
- package/dist/components/Link/Link.d.ts +4 -5
- package/dist/components/Link/index.d.ts +1 -1
- package/dist/components/LogoLoader/LogoLoader.d.ts +3 -3
- package/dist/components/PageContent/Body.d.ts +3 -3
- package/dist/components/PageContent/PageContent.d.ts +4 -4
- package/dist/components/Pagination/Pagination.d.ts +4 -5
- package/dist/components/ProgressBar/ProgressBar.d.ts +4 -5
- package/dist/components/ProgressBarCountdown/ProgressBarCountdown.d.ts +3 -3
- package/dist/components/RadioGroup/Radio.d.ts +4 -4
- package/dist/components/RadioGroup/RadioGroup.d.ts +5 -5
- package/dist/components/Section/Section.d.ts +4 -4
- package/dist/components/Section/SectionTitle.d.ts +4 -4
- package/dist/components/Select/Select.d.ts +7 -7
- package/dist/components/Select/SelectOption.d.ts +5 -5
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/SpinnerWheel/SpinnerWheel.d.ts +3 -3
- package/dist/components/Steps/Step.d.ts +3 -3
- package/dist/components/Steps/Steps.d.ts +8 -9
- package/dist/components/Steps/useSteps.d.ts +2 -2
- package/dist/components/Switch/Switch.d.ts +4 -4
- package/dist/components/Table/Table.d.ts +17 -13
- package/dist/components/Table/TableActions.d.ts +3 -3
- package/dist/components/Table/TableBody.d.ts +3 -3
- package/dist/components/Table/TableCell.d.ts +3 -3
- package/dist/components/Table/TableFeedback.d.ts +3 -3
- package/dist/components/Table/TableFoot.d.ts +3 -3
- package/dist/components/Table/TableHead.d.ts +3 -3
- package/dist/components/Table/TableHeadCell.d.ts +4 -5
- package/dist/components/Table/TableRow.d.ts +3 -3
- package/dist/components/Table/TableSelectionCell.d.ts +12 -0
- package/dist/components/Table/TableToolbar.d.ts +3 -3
- package/dist/components/Table/index.d.ts +3 -1
- package/dist/components/Tabs/Tab.d.ts +4 -4
- package/dist/components/Tabs/TabPanel.d.ts +3 -3
- package/dist/components/Tabs/Tabs.d.ts +6 -7
- package/dist/components/Tag/ActionableTag.d.ts +6 -6
- package/dist/components/Tag/Tag.d.ts +4 -4
- package/dist/components/Text/Text.d.ts +3 -3
- package/dist/components/TextArea/TextArea.d.ts +6 -7
- package/dist/components/TextField/TextField.d.ts +8 -7
- package/dist/components/Timeline/Timeline.d.ts +11 -11
- package/dist/components/Timeline/TimelineExpandableItem.d.ts +3 -3
- package/dist/components/Timeline/TimelineItem.d.ts +3 -3
- package/dist/components/Timeline/TimelineItemBody.d.ts +3 -3
- package/dist/components/Timeline/TimelineItemFooter.d.ts +3 -3
- package/dist/components/Timeline/TimelineItemHeader.d.ts +3 -3
- package/dist/components/Timeline/TimelineItemHeaderSubtitle.d.ts +3 -3
- package/dist/components/Timeline/TimelineItemHeaderTitle.d.ts +3 -3
- package/dist/components/Timeline/TimelineItemIcon.d.ts +3 -3
- package/dist/components/ToggleGroup/Toggle.d.ts +4 -4
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +33 -10
- package/dist/components/Tooltip/Tooltip.d.ts +13 -7
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1220 -1121
- package/dist/tokens.d.ts +1 -1
- package/dist/tokens.js +2 -2
- package/dist/utils/createComponent.d.ts +3 -3
- package/dist/utils/types.d.ts +1 -1
- package/dist/utils/utils.d.ts +2 -2
- package/package.json +16 -13
- package/dist/tests/constants.d.ts +0 -12
- package/dist/tests/types.d.ts +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ToggleGroup as WCToggleGroup } from '@loadsmart/miranda-wc';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { ToggleGroup as WCToggleGroup, SelectionType, SelectionValue } from '@loadsmart/miranda-wc';
|
|
2
|
+
import { EventName, WebComponentProps } from '@lit/react';
|
|
3
|
+
import { ReactNode, ComponentProps } from 'react';
|
|
4
|
+
import { MirandaChangeEvent } from '../../utils/types';
|
|
5
5
|
declare global {
|
|
6
6
|
namespace JSX {
|
|
7
7
|
interface IntrinsicElements {
|
|
@@ -9,19 +9,42 @@ declare global {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
declare const WiredToggleGroup: import(
|
|
12
|
+
declare const WiredToggleGroup: import('@lit/react').ReactWebComponent<WCToggleGroup, {
|
|
13
13
|
onChange: EventName<MirandaChangeEvent<WCToggleGroup>>;
|
|
14
14
|
}>;
|
|
15
|
-
export type ToggleGroupOption = {
|
|
16
|
-
value:
|
|
15
|
+
export type ToggleGroupOption<TValue extends string> = {
|
|
16
|
+
value: TValue;
|
|
17
17
|
label?: string;
|
|
18
18
|
leading?: ReactNode;
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
type SingleProps<OptionValue extends string, TValue = OptionValue | null> = {
|
|
22
|
+
type?: 'single';
|
|
23
|
+
value?: TValue;
|
|
24
|
+
onChange?: OnChangeEvent<TValue>;
|
|
23
25
|
};
|
|
24
|
-
|
|
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;
|
|
25
48
|
declare namespace ToggleGroup {
|
|
26
49
|
var Toggle: import("react").ForwardRefExoticComponent<Omit<import("./Toggle").ToggleProps, "ref"> & import("react").RefAttributes<import("@loadsmart/miranda-wc").Toggle>>;
|
|
27
50
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import type { TooltipPlacement, TooltipTrigger } from '@loadsmart/miranda-wc';
|
|
1
|
+
import { Tooltip as WCTooltip, TooltipPlacement, TooltipTrigger } from '@loadsmart/miranda-wc';
|
|
2
|
+
import { ReactElement, ReactNode, ComponentProps } from 'react';
|
|
3
|
+
import { WebComponentProps } from '@lit/react';
|
|
5
4
|
declare global {
|
|
6
5
|
namespace JSX {
|
|
7
6
|
interface IntrinsicElements {
|
|
@@ -9,9 +8,16 @@ declare global {
|
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
|
-
declare const WiredTooltip: import(
|
|
11
|
+
declare const WiredTooltip: import('@lit/react').ReactWebComponent<WCTooltip, {}>;
|
|
13
12
|
export type TooltipProps = ComponentProps<typeof WiredTooltip> & {
|
|
14
|
-
message
|
|
13
|
+
message: ReactNode;
|
|
14
|
+
children: ReactElement;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Render the tooltip component.
|
|
18
|
+
*
|
|
19
|
+
* **Warning**: This component will throw if the provided `children` is not a single child,
|
|
20
|
+
* and will not render if the children is not valid or is a fragment.
|
|
21
|
+
*/
|
|
22
|
+
export declare function Tooltip(props: TooltipProps): import("react/jsx-dev-runtime").JSX.Element | null;
|
|
17
23
|
export type { TooltipPlacement, TooltipTrigger };
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export * from './components/Timeline';
|
|
|
35
35
|
export * from './components/ToggleGroup';
|
|
36
36
|
export * from './components/Tooltip';
|
|
37
37
|
export * from './components/LogoLoader';
|
|
38
|
+
export * from './components/DotsLoader';
|
|
38
39
|
export type { MirandaChangeEvent } from './utils/types';
|
|
39
40
|
export type { TypographyVariant } from '@loadsmart/miranda-wc';
|
|
40
41
|
export { Accordion as WCAccordion, AccordionTitle as WCAccordionTitle, AccordionContent as WCAccordionContent, } from '@loadsmart/miranda-wc';
|
|
@@ -90,7 +91,7 @@ export type { TableProps as WCTableProps, TableCellProps as WCTableCellProps, Ta
|
|
|
90
91
|
export { Tabs as WCTabs, Tab as WCTab, TabPanel as WCTabPanel, } from '@loadsmart/miranda-wc';
|
|
91
92
|
export type { TabsProps as WCTabsProps, TabProps as WCTabProps, TabPanelProps as WCTabPanelProps, TabChangeEventDetail, } from '@loadsmart/miranda-wc';
|
|
92
93
|
export { Tag as WCTag, ActionableTag as WCActionableTag, } from '@loadsmart/miranda-wc';
|
|
93
|
-
export type { TagProps as WCTagProps, ActionableTagProps as WCActionableTagProps, TagVariant, TagSize, } from '@loadsmart/miranda-wc';
|
|
94
|
+
export type { TagProps as WCTagProps, ActionableTagProps as WCActionableTagProps, TagVariant, TagSize, ActionableTagVariant, } from '@loadsmart/miranda-wc';
|
|
94
95
|
export { Text as WCText } from '@loadsmart/miranda-wc';
|
|
95
96
|
export type { TextProps as WCTextProps } from '@loadsmart/miranda-wc';
|
|
96
97
|
export { TextArea as WCTextArea } from '@loadsmart/miranda-wc';
|