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

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';
@@ -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'
@@ -792,7 +795,7 @@ declare interface SelectOptionProps extends Omit<ComponentProps<typeof WiredSele
792
795
  trailing?: ReactNode;
793
796
  }
794
797
 
795
- export declare type SelectProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string> = SelectionProps<typeof WiredSelect, TSelectionType, OptionValue, SelectOption<OptionValue>>;
798
+ export declare type SelectProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string> = SelectionProps<WCSelect, ComponentProps<typeof WiredSelect>, TSelectionType, OptionValue, SelectOption<OptionValue>>;
796
799
 
797
800
  export declare const Sidebar: ReactWebComponent<WCSidebar, {}> & {
798
801
  Side: default_2.ForwardRefExoticComponent<Omit<SidebarSideProps, "ref"> & default_2.RefAttributes<WCBox>>;
@@ -806,7 +809,7 @@ export declare type SidebarProps = ComponentProps<typeof Sidebar>;
806
809
  export declare type SidebarSideProps = Omit<BoxProps, 'slot'>;
807
810
 
808
811
  declare interface SingleProps<
809
- TComponent extends JSXElementConstructor<any>,
812
+ TComponent,
810
813
  OptionValue extends string,
811
814
  TValue = OptionValue | null,
812
815
  > extends BaseProps<TComponent, TValue> {
@@ -814,7 +817,7 @@ declare interface SingleProps<
814
817
  }
815
818
 
816
819
  declare interface SingleStrictProps<
817
- TComponent extends JSXElementConstructor<any>,
820
+ TComponent,
818
821
  OptionValue extends string,
819
822
  TValue = OptionValue,
820
823
  > extends BaseProps<TComponent, TValue> {
@@ -1041,7 +1044,7 @@ export declare type TimelineProps = ComponentProps<typeof Timeline>;
1041
1044
 
1042
1045
  export declare const Toggle: default_2.ForwardRefExoticComponent<Omit<ToggleProps, "ref"> & default_2.RefAttributes<WCToggle>>;
1043
1046
 
1044
- export declare function ToggleGroup<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string>({ options, children, onChange, ...rest }: ToggleGroupProps<TSelectionType, OptionValue>): default_2.JSX.Element;
1047
+ export declare function ToggleGroup<TSelectionType extends SelectionType = 'single', OptionValue extends string = string>({ options, children, onChange, ...rest }: ToggleGroupProps<TSelectionType, OptionValue>): default_2.JSX.Element;
1045
1048
 
1046
1049
  export declare namespace ToggleGroup {
1047
1050
  var Toggle: default_2.ForwardRefExoticComponent<Omit<ToggleProps, "ref"> & default_2.RefAttributes<WCToggle>>;
@@ -1054,7 +1057,7 @@ declare type ToggleGroupOption<TValue extends string> = {
1054
1057
  disabled?: boolean;
1055
1058
  };
1056
1059
 
1057
- export declare type ToggleGroupProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string> = SelectionProps<typeof WiredToggleGroup, TSelectionType, OptionValue, ToggleGroupOption<OptionValue>>;
1060
+ export declare type ToggleGroupProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string> = SelectionProps<WCToggleGroup, ComponentProps<typeof WiredToggleGroup>, TSelectionType, OptionValue, ToggleGroupOption<OptionValue>>;
1058
1061
 
1059
1062
  export declare type ToggleProps = ComponentProps<typeof WiredToggle> & {
1060
1063
  leading?: ReactNode;
@@ -1508,15 +1511,6 @@ declare const WiredTooltip: ReactWebComponent<WCTooltip, {}>;
1508
1511
  export { }
1509
1512
 
1510
1513
 
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
1514
  declare module 'react' {
1521
1515
  interface CSSProperties {
1522
1516
  '--m-card-body-padding'?: string;
@@ -1531,19 +1525,17 @@ declare module 'react' {
1531
1525
 
1532
1526
  declare module 'react' {
1533
1527
  interface CSSProperties {
1534
- '--m-icon-size'?: string;
1535
- '--m-icon-color'?: string;
1528
+ '--m-divider-margin-top'?: string;
1529
+ '--m-divider-margin-bottom'?: string;
1530
+ '--m-divider-margin-y'?: string;
1536
1531
  }
1537
1532
  }
1538
1533
 
1539
1534
 
1540
1535
  declare module 'react' {
1541
1536
  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;
1537
+ '--m-icon-size'?: string;
1538
+ '--m-icon-color'?: string;
1547
1539
  }
1548
1540
  }
1549
1541
 
@@ -1565,3 +1557,14 @@ declare module 'react' {
1565
1557
  '--m-text-max-width'?: string;
1566
1558
  }
1567
1559
  }
1560
+
1561
+
1562
+ declare module 'react' {
1563
+ interface CSSProperties {
1564
+ '--m-table-border-radius'?: string;
1565
+ '--m-table-border-top-left-radius'?: string;
1566
+ '--m-table-border-top-right-radius'?: string;
1567
+ '--m-table-border-bottom-left-radius'?: string;
1568
+ '--m-table-border-bottom-right-radius'?: string;
1569
+ }
1570
+ }
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;
@@ -28,19 +19,17 @@ declare module 'react' {
28
19
 
29
20
  declare module 'react' {
30
21
  interface CSSProperties {
31
- '--m-icon-size'?: string;
32
- '--m-icon-color'?: string;
22
+ '--m-divider-margin-top'?: string;
23
+ '--m-divider-margin-bottom'?: string;
24
+ '--m-divider-margin-y'?: string;
33
25
  }
34
26
  }
35
27
 
36
28
 
37
29
  declare module 'react' {
38
30
  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;
31
+ '--m-icon-size'?: string;
32
+ '--m-icon-color'?: string;
44
33
  }
45
34
  }
46
35
 
@@ -62,3 +51,14 @@ declare module 'react' {
62
51
  '--m-text-max-width'?: string;
63
52
  }
64
53
  }
54
+
55
+
56
+ declare module 'react' {
57
+ interface CSSProperties {
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
+ }
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.65",
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.65",
45
+ "@loadsmart/miranda-wc": "3.0.0-beta.65",
46
46
  "react-is": "^18.3.1"
47
47
  },
48
48
  "directories": {