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

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
@@ -289,10 +289,9 @@ export declare type BannerProps = ComponentProps<typeof Banner>;
289
289
 
290
290
  export { BannerVariant }
291
291
 
292
- declare interface BaseProps<TComponent, TValue> {
292
+ declare interface BaseProps<TValue> {
293
293
  type?: SelectionType;
294
294
  value?: TValue;
295
- onChange?: SelectionChangeEventHandler<TComponent, TValue>;
296
295
  }
297
296
 
298
297
  export declare const Box: ReactWebComponent<WCBox, {}>;
@@ -679,14 +678,6 @@ export declare type MirandaChangeEvent<T = Element> = ChangeEvent<T> & Event;
679
678
  */
680
679
  declare type MirandaChangeEvent_2<T = Element> = ChangeEvent<T> & Event;
681
680
 
682
- declare interface MultipleProps<
683
- TComponent,
684
- OptionValue extends string,
685
- TValue = Array<OptionValue> | ReadonlyArray<OptionValue> | null,
686
- > extends BaseProps<TComponent, Extract<TValue, ReadonlyArray<OptionValue>>> {
687
- type?: 'multiple';
688
- }
689
-
690
681
  export declare const PageContent: ReactWebComponent<WCPageContent, {}> & {
691
682
  Body: ReactWebComponent<Body_2, {}>;
692
683
  };
@@ -747,7 +738,7 @@ declare type SectionTitleProps = Omit<ComponentProps<typeof WiredSectionTitle>,
747
738
  leading?: ReactNode;
748
739
  };
749
740
 
750
- export declare function Select<TSelectionType extends SelectionType = 'single', OptionValue extends string = string>(props: SelectProps<TSelectionType, OptionValue>): default_2.JSX.Element;
741
+ export declare function Select<TSelectionType extends SelectionType = 'single', OptionValue extends string = string, TSelectionOption extends SelectOption<OptionValue> = SelectOption<OptionValue>, TOptions extends ReadonlyArray<TSelectionOption> = ReadonlyArray<TSelectionOption>>(props: SelectProps<TSelectionType, OptionValue, TSelectionOption, TOptions>): default_2.JSX.Element;
751
742
 
752
743
  export declare namespace Select {
753
744
  var Option: default_2.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & default_2.RefAttributes<WCSelectOption>>;
@@ -763,24 +754,26 @@ declare type SelectionOption<TValue extends string = string> = {
763
754
 
764
755
  declare type SelectionProps<
765
756
  TComponent,
766
- TProps extends Omit<
767
- BaseProps<TComponent, SelectionValue<string>>,
768
- 'onChange'
769
- >,
757
+ TProps extends BaseProps<SelectionValue<string>>,
770
758
  TSelectionType extends SelectionType = SelectionType,
771
759
  OptionValue extends string = string,
772
760
  TSelectionOption extends SelectionOption<OptionValue> = SelectionOption<OptionValue>,
773
761
  TOptions extends ReadonlyArray<TSelectionOption> = ReadonlyArray<TSelectionOption>,
774
- > = Omit<TProps, 'type' | 'value' | 'onChange'> & {
762
+ > = Omit<TProps, 'type' | 'value' | 'options' | 'onChange'> & {
775
763
  type?: TSelectionType;
764
+ value?: TOptions[number]['value'] | Array<TOptions[number]['value']> | null; // Infer value type from options
776
765
  options?: TOptions;
777
- } & (TSelectionType extends 'single'
778
- ? SingleProps<TComponent, OptionValue>
779
- : TSelectionType extends 'single-strict'
780
- ? SingleStrictProps<TComponent, OptionValue>
781
- : TSelectionType extends 'multiple'
782
- ? MultipleProps<TComponent, OptionValue>
783
- : BaseProps<TComponent, SelectionValue<OptionValue>>);
766
+ onChange?: SelectionChangeEventHandler<
767
+ TComponent,
768
+ TSelectionType extends 'single'
769
+ ? TOptions[number]['value'] | null
770
+ : TSelectionType extends 'single-strict'
771
+ ? TOptions[number]['value']
772
+ : TSelectionType extends 'multiple'
773
+ ? Array<TOptions[number]['value']>
774
+ : SelectionValue<TOptions[number]['value']>
775
+ >;
776
+ };
784
777
 
785
778
  export { SelectionType }
786
779
 
@@ -799,7 +792,7 @@ declare interface SelectOptionProps extends Omit<ComponentProps<typeof WiredSele
799
792
  trailing?: ReactNode;
800
793
  }
801
794
 
802
- export declare type SelectProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string> = SelectionProps<WCSelect, ComponentProps<typeof WiredSelect>, TSelectionType, OptionValue, SelectOption<OptionValue>>;
795
+ export declare type SelectProps<TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string, TSelectionOption extends SelectOption<OptionValue> = SelectOption<OptionValue>, TOptions extends ReadonlyArray<TSelectionOption> = ReadonlyArray<TSelectionOption>> = SelectionProps<WCSelect, ComponentProps<typeof WiredSelect>, TSelectionType, OptionValue, SelectOption<OptionValue>, TOptions>;
803
796
 
804
797
  export declare const Sidebar: ReactWebComponent<WCSidebar, {}> & {
805
798
  Side: default_2.ForwardRefExoticComponent<Omit<SidebarSideProps, "ref"> & default_2.RefAttributes<WCBox>>;
@@ -812,22 +805,6 @@ export declare type SidebarProps = ComponentProps<typeof Sidebar>;
812
805
 
813
806
  export declare type SidebarSideProps = Omit<BoxProps, 'slot'>;
814
807
 
815
- declare interface SingleProps<
816
- TComponent,
817
- OptionValue extends string,
818
- TValue = OptionValue | null,
819
- > extends BaseProps<TComponent, TValue> {
820
- type?: 'single';
821
- }
822
-
823
- declare interface SingleStrictProps<
824
- TComponent,
825
- OptionValue extends string,
826
- TValue = OptionValue,
827
- > extends BaseProps<TComponent, TValue> {
828
- type?: 'single-strict';
829
- }
830
-
831
808
  export declare const SpinnerWheel: ReactWebComponent<WCSpinnerWheel, {}>;
832
809
 
833
810
  export declare type SpinnerWheelProps = ComponentProps<typeof SpinnerWheel>;
@@ -1546,19 +1523,19 @@ declare module 'react' {
1546
1523
 
1547
1524
  declare module 'react' {
1548
1525
  interface CSSProperties {
1549
- '--m-text-display'?: string;
1550
- '--m-text-max-width'?: string;
1526
+ '--m-table-border-radius'?: string;
1527
+ '--m-table-border-top-left-radius'?: string;
1528
+ '--m-table-border-top-right-radius'?: string;
1529
+ '--m-table-border-bottom-left-radius'?: string;
1530
+ '--m-table-border-bottom-right-radius'?: string;
1551
1531
  }
1552
1532
  }
1553
1533
 
1554
1534
 
1555
1535
  declare module 'react' {
1556
1536
  interface CSSProperties {
1557
- '--m-table-border-radius'?: string;
1558
- '--m-table-border-top-left-radius'?: string;
1559
- '--m-table-border-top-right-radius'?: string;
1560
- '--m-table-border-bottom-left-radius'?: string;
1561
- '--m-table-border-bottom-right-radius'?: string;
1537
+ '--m-text-display'?: string;
1538
+ '--m-text-max-width'?: string;
1562
1539
  }
1563
1540
  }
1564
1541
 
package/dist/tokens.d.ts CHANGED
@@ -36,19 +36,19 @@ declare module 'react' {
36
36
 
37
37
  declare module 'react' {
38
38
  interface CSSProperties {
39
- '--m-text-display'?: string;
40
- '--m-text-max-width'?: string;
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;
41
44
  }
42
45
  }
43
46
 
44
47
 
45
48
  declare module 'react' {
46
49
  interface CSSProperties {
47
- '--m-table-border-radius'?: string;
48
- '--m-table-border-top-left-radius'?: string;
49
- '--m-table-border-top-right-radius'?: string;
50
- '--m-table-border-bottom-left-radius'?: string;
51
- '--m-table-border-bottom-right-radius'?: string;
50
+ '--m-text-display'?: string;
51
+ '--m-text-max-width'?: string;
52
52
  }
53
53
  }
54
54
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loadsmart/miranda-react",
3
- "version": "3.0.0-beta.66",
3
+ "version": "3.0.0-beta.68",
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.66",
45
- "@loadsmart/miranda-wc": "3.0.0-beta.66",
44
+ "@loadsmart/miranda-tokens": "4.0.0-beta.68",
45
+ "@loadsmart/miranda-wc": "3.0.0-beta.68",
46
46
  "react-is": "^18.3.1"
47
47
  },
48
48
  "directories": {