@loadsmart/miranda-react 3.0.0-beta.64 → 3.0.0-beta.66

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/index.d.ts CHANGED
@@ -30,7 +30,6 @@ import { ForwardRefExoticComponent } from 'react';
30
30
  import { HeaderTabs as HeaderTabs_2 } from '@loadsmart/miranda-wc';
31
31
  import { IconName } from '@loadsmart/miranda-wc';
32
32
  import { InputHTMLAttributes } from 'react';
33
- import type { JSXElementConstructor } from 'react';
34
33
  import { JustifyContentValue } from '@loadsmart/miranda-wc';
35
34
  import { LinkReferrerPolicy } from '@loadsmart/miranda-wc';
36
35
  import { LinkSize } from '@loadsmart/miranda-wc';
@@ -46,7 +45,7 @@ import { ReactNode } from 'react';
46
45
  import { ReactWebComponent } from '@lit/react';
47
46
  import { RefAttributes } from 'react';
48
47
  import { SelectionType } from '@loadsmart/miranda-wc';
49
- import type { SelectionValue } from '@loadsmart/miranda-wc';
48
+ import { SelectionValue } from '@loadsmart/miranda-wc';
50
49
  import { StepChangeEventDetail } from '@loadsmart/miranda-wc';
51
50
  import { StepNavigateEventDetail } from '@loadsmart/miranda-wc';
52
51
  import { SwitchSize } from '@loadsmart/miranda-wc';
@@ -290,10 +289,10 @@ export declare type BannerProps = ComponentProps<typeof Banner>;
290
289
 
291
290
  export { BannerVariant }
292
291
 
293
- declare interface BaseProps<TComponent extends JSXElementConstructor<any>, TValue> {
294
- type?: string;
292
+ declare interface BaseProps<TComponent, TValue> {
293
+ type?: SelectionType;
295
294
  value?: TValue;
296
- onChange?: OnChangeEvent<TComponent, TValue>;
295
+ onChange?: SelectionChangeEventHandler<TComponent, TValue>;
297
296
  }
298
297
 
299
298
  export declare const Box: ReactWebComponent<WCBox, {}>;
@@ -681,17 +680,13 @@ export declare type MirandaChangeEvent<T = Element> = ChangeEvent<T> & Event;
681
680
  declare type MirandaChangeEvent_2<T = Element> = ChangeEvent<T> & Event;
682
681
 
683
682
  declare interface MultipleProps<
684
- TComponent extends JSXElementConstructor<any>,
683
+ TComponent,
685
684
  OptionValue extends string,
686
685
  TValue = Array<OptionValue> | ReadonlyArray<OptionValue> | null,
687
686
  > extends BaseProps<TComponent, Extract<TValue, ReadonlyArray<OptionValue>>> {
688
687
  type?: 'multiple';
689
688
  }
690
689
 
691
- declare type OnChangeEvent<TComponent extends JSXElementConstructor<any>, T> = (
692
- event: MirandaChangeEvent_2<Omit<TComponent, 'value'> & { value: T }>,
693
- ) => void;
694
-
695
690
  export declare const PageContent: ReactWebComponent<WCPageContent, {}> & {
696
691
  Body: ReactWebComponent<Body_2, {}>;
697
692
  };
@@ -752,23 +747,31 @@ declare type SectionTitleProps = Omit<ComponentProps<typeof WiredSectionTitle>,
752
747
  leading?: ReactNode;
753
748
  };
754
749
 
755
- export declare function Select<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string>(props: SelectProps<TSelectionType, OptionValue>): default_2.JSX.Element;
750
+ export declare function Select<TSelectionType extends SelectionType = 'single', OptionValue extends string = string>(props: SelectProps<TSelectionType, OptionValue>): default_2.JSX.Element;
756
751
 
757
752
  export declare namespace Select {
758
753
  var Option: default_2.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & default_2.RefAttributes<WCSelectOption>>;
759
754
  }
760
755
 
756
+ declare type SelectionChangeEventHandler<TComponent, T> = (
757
+ event: MirandaChangeEvent_2<Omit<TComponent, 'value'> & { value: T }>,
758
+ ) => void;
759
+
761
760
  declare type SelectionOption<TValue extends string = string> = {
762
761
  value: TValue;
763
762
  };
764
763
 
765
764
  declare type SelectionProps<
766
- TComponent extends JSXElementConstructor<any>,
765
+ TComponent,
766
+ TProps extends Omit<
767
+ BaseProps<TComponent, SelectionValue<string>>,
768
+ 'onChange'
769
+ >,
767
770
  TSelectionType extends SelectionType = SelectionType,
768
771
  OptionValue extends string = string,
769
772
  TSelectionOption extends SelectionOption<OptionValue> = SelectionOption<OptionValue>,
770
773
  TOptions extends ReadonlyArray<TSelectionOption> = ReadonlyArray<TSelectionOption>,
771
- > = Omit<ComponentProps<TComponent>, 'type' | 'value' | 'onChange'> & {
774
+ > = Omit<TProps, 'type' | 'value' | 'onChange'> & {
772
775
  type?: TSelectionType;
773
776
  options?: TOptions;
774
777
  } & (TSelectionType extends 'single'
@@ -779,6 +782,10 @@ declare type SelectionProps<
779
782
  ? MultipleProps<TComponent, OptionValue>
780
783
  : BaseProps<TComponent, SelectionValue<OptionValue>>);
781
784
 
785
+ export { SelectionType }
786
+
787
+ export { SelectionValue }
788
+
782
789
  export declare interface SelectOption<TValue extends string = string> {
783
790
  value: TValue;
784
791
  label?: string;
@@ -792,7 +799,7 @@ declare interface SelectOptionProps extends Omit<ComponentProps<typeof WiredSele
792
799
  trailing?: ReactNode;
793
800
  }
794
801
 
795
- export declare type SelectProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string> = SelectionProps<typeof WiredSelect, TSelectionType, OptionValue, SelectOption<OptionValue>>;
802
+ export declare type SelectProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string> = SelectionProps<WCSelect, ComponentProps<typeof WiredSelect>, TSelectionType, OptionValue, SelectOption<OptionValue>>;
796
803
 
797
804
  export declare const Sidebar: ReactWebComponent<WCSidebar, {}> & {
798
805
  Side: default_2.ForwardRefExoticComponent<Omit<SidebarSideProps, "ref"> & default_2.RefAttributes<WCBox>>;
@@ -806,7 +813,7 @@ export declare type SidebarProps = ComponentProps<typeof Sidebar>;
806
813
  export declare type SidebarSideProps = Omit<BoxProps, 'slot'>;
807
814
 
808
815
  declare interface SingleProps<
809
- TComponent extends JSXElementConstructor<any>,
816
+ TComponent,
810
817
  OptionValue extends string,
811
818
  TValue = OptionValue | null,
812
819
  > extends BaseProps<TComponent, TValue> {
@@ -814,7 +821,7 @@ declare interface SingleProps<
814
821
  }
815
822
 
816
823
  declare interface SingleStrictProps<
817
- TComponent extends JSXElementConstructor<any>,
824
+ TComponent,
818
825
  OptionValue extends string,
819
826
  TValue = OptionValue,
820
827
  > extends BaseProps<TComponent, TValue> {
@@ -1041,20 +1048,20 @@ export declare type TimelineProps = ComponentProps<typeof Timeline>;
1041
1048
 
1042
1049
  export declare const Toggle: default_2.ForwardRefExoticComponent<Omit<ToggleProps, "ref"> & default_2.RefAttributes<WCToggle>>;
1043
1050
 
1044
- export declare function ToggleGroup<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string>({ options, children, onChange, ...rest }: ToggleGroupProps<TSelectionType, OptionValue>): default_2.JSX.Element;
1051
+ export declare function ToggleGroup<TSelectionType extends SelectionType = 'single', OptionValue extends string = string>({ options, children, onChange, ...rest }: ToggleGroupProps<TSelectionType, OptionValue>): default_2.JSX.Element;
1045
1052
 
1046
1053
  export declare namespace ToggleGroup {
1047
1054
  var Toggle: default_2.ForwardRefExoticComponent<Omit<ToggleProps, "ref"> & default_2.RefAttributes<WCToggle>>;
1048
1055
  }
1049
1056
 
1050
- declare type ToggleGroupOption<TValue extends string> = {
1057
+ export declare type ToggleGroupOption<TValue extends string> = {
1051
1058
  value: TValue;
1052
1059
  label?: string;
1053
1060
  leading?: ReactNode;
1054
1061
  disabled?: boolean;
1055
1062
  };
1056
1063
 
1057
- export declare type ToggleGroupProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string> = SelectionProps<typeof WiredToggleGroup, TSelectionType, OptionValue, ToggleGroupOption<OptionValue>>;
1064
+ export declare type ToggleGroupProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string> = SelectionProps<WCToggleGroup, ComponentProps<typeof WiredToggleGroup>, TSelectionType, OptionValue, ToggleGroupOption<OptionValue>>;
1058
1065
 
1059
1066
  export declare type ToggleProps = ComponentProps<typeof WiredToggle> & {
1060
1067
  leading?: ReactNode;
@@ -1508,15 +1515,6 @@ declare const WiredTooltip: ReactWebComponent<WCTooltip, {}>;
1508
1515
  export { }
1509
1516
 
1510
1517
 
1511
- declare module 'react' {
1512
- interface CSSProperties {
1513
- '--m-divider-margin-top'?: string;
1514
- '--m-divider-margin-bottom'?: string;
1515
- '--m-divider-margin-y'?: string;
1516
- }
1517
- }
1518
-
1519
-
1520
1518
  declare module 'react' {
1521
1519
  interface CSSProperties {
1522
1520
  '--m-card-body-padding'?: string;
@@ -1529,6 +1527,15 @@ declare module 'react' {
1529
1527
  }
1530
1528
 
1531
1529
 
1530
+ declare module 'react' {
1531
+ interface CSSProperties {
1532
+ '--m-divider-margin-top'?: string;
1533
+ '--m-divider-margin-bottom'?: string;
1534
+ '--m-divider-margin-y'?: string;
1535
+ }
1536
+ }
1537
+
1538
+
1532
1539
  declare module 'react' {
1533
1540
  interface CSSProperties {
1534
1541
  '--m-icon-size'?: string;
@@ -1539,11 +1546,8 @@ declare module 'react' {
1539
1546
 
1540
1547
  declare module 'react' {
1541
1548
  interface CSSProperties {
1542
- '--m-table-border-radius'?: string;
1543
- '--m-table-border-top-left-radius'?: string;
1544
- '--m-table-border-top-right-radius'?: string;
1545
- '--m-table-border-bottom-left-radius'?: string;
1546
- '--m-table-border-bottom-right-radius'?: string;
1549
+ '--m-text-display'?: string;
1550
+ '--m-text-max-width'?: string;
1547
1551
  }
1548
1552
  }
1549
1553
 
@@ -1561,7 +1565,10 @@ declare module 'react' {
1561
1565
 
1562
1566
  declare module 'react' {
1563
1567
  interface CSSProperties {
1564
- '--m-text-display'?: string;
1565
- '--m-text-max-width'?: string;
1568
+ '--m-table-border-radius'?: string;
1569
+ '--m-table-border-top-left-radius'?: string;
1570
+ '--m-table-border-top-right-radius'?: string;
1571
+ '--m-table-border-bottom-left-radius'?: string;
1572
+ '--m-table-border-bottom-right-radius'?: string;
1566
1573
  }
1567
1574
  }
package/dist/tokens.d.ts CHANGED
@@ -5,15 +5,6 @@ export * from "@loadsmart/miranda-tokens/dist/themes.js";
5
5
  export { }
6
6
 
7
7
 
8
- declare module 'react' {
9
- interface CSSProperties {
10
- '--m-divider-margin-top'?: string;
11
- '--m-divider-margin-bottom'?: string;
12
- '--m-divider-margin-y'?: string;
13
- }
14
- }
15
-
16
-
17
8
  declare module 'react' {
18
9
  interface CSSProperties {
19
10
  '--m-card-body-padding'?: string;
@@ -26,6 +17,15 @@ declare module 'react' {
26
17
  }
27
18
 
28
19
 
20
+ declare module 'react' {
21
+ interface CSSProperties {
22
+ '--m-divider-margin-top'?: string;
23
+ '--m-divider-margin-bottom'?: string;
24
+ '--m-divider-margin-y'?: string;
25
+ }
26
+ }
27
+
28
+
29
29
  declare module 'react' {
30
30
  interface CSSProperties {
31
31
  '--m-icon-size'?: string;
@@ -36,11 +36,8 @@ declare module 'react' {
36
36
 
37
37
  declare module 'react' {
38
38
  interface CSSProperties {
39
- '--m-table-border-radius'?: string;
40
- '--m-table-border-top-left-radius'?: string;
41
- '--m-table-border-top-right-radius'?: string;
42
- '--m-table-border-bottom-left-radius'?: string;
43
- '--m-table-border-bottom-right-radius'?: string;
39
+ '--m-text-display'?: string;
40
+ '--m-text-max-width'?: string;
44
41
  }
45
42
  }
46
43
 
@@ -58,7 +55,10 @@ declare module 'react' {
58
55
 
59
56
  declare module 'react' {
60
57
  interface CSSProperties {
61
- '--m-text-display'?: string;
62
- '--m-text-max-width'?: string;
58
+ '--m-table-border-radius'?: string;
59
+ '--m-table-border-top-left-radius'?: string;
60
+ '--m-table-border-top-right-radius'?: string;
61
+ '--m-table-border-bottom-left-radius'?: string;
62
+ '--m-table-border-bottom-right-radius'?: string;
63
63
  }
64
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loadsmart/miranda-react",
3
- "version": "3.0.0-beta.64",
3
+ "version": "3.0.0-beta.66",
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
  },
42
42
  "dependencies": {
43
43
  "@lit/react": "^1.0.5",
44
- "@loadsmart/miranda-tokens": "4.0.0-beta.64",
45
- "@loadsmart/miranda-wc": "3.0.0-beta.64",
44
+ "@loadsmart/miranda-tokens": "4.0.0-beta.66",
45
+ "@loadsmart/miranda-wc": "3.0.0-beta.66",
46
46
  "react-is": "^18.3.1"
47
47
  },
48
48
  "directories": {