@loadsmart/miranda-react 4.0.0-alpha.7 → 4.0.0-alpha.9

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/CHANGELOG.md ADDED
@@ -0,0 +1 @@
1
+ Please check our [releases](https://github.com/loadsmart/miranda-wc/releases?q=miranda-react) page for the complete CHANGELOG.
package/dist/index.d.ts CHANGED
@@ -343,8 +343,8 @@ export declare type BannerProps = ComponentProps<typeof Banner>;
343
343
  export { BannerVariant }
344
344
 
345
345
  declare interface BaseProps<TValue> {
346
- type?: SelectionType;
347
- value?: TValue;
346
+ type?: SelectionType;
347
+ value?: TValue;
348
348
  }
349
349
 
350
350
  export declare const Box: ReactWebComponent<WCBox, {}>;
@@ -738,12 +738,6 @@ export declare type LogoLoaderProps = ComponentProps<typeof LogoLoader>;
738
738
  */
739
739
  export declare type MirandaChangeEvent<T = Element> = ChangeEvent<T> & Event;
740
740
 
741
- /**
742
- * This is a patch type to make our components compatible to React's
743
- * synthetic event types.
744
- */
745
- declare type MirandaChangeEvent_2<T = Element> = ChangeEvent<T> & Event;
746
-
747
741
  export declare const Page: ReactWebComponent<WCPage, {}> & {
748
742
  Content: ReactWebComponent<WCPageContent, {}> & {
749
743
  Body: ReactWebComponent<WCBody, {}>;
@@ -827,41 +821,19 @@ export declare namespace Select {
827
821
  var Option: default_2.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & default_2.RefAttributes<WCSelectOption>>;
828
822
  }
829
823
 
830
- declare type SelectionChangeEventHandler<TComponent, T> = (
831
- event: MirandaChangeEvent_2<Omit<TComponent, 'value'> & { value: T }>,
832
- ) => void;
824
+ declare type SelectionChangeEventHandler<TComponent, T> = (event: MirandaChangeEvent<Omit<TComponent, 'value'> & {
825
+ value: T;
826
+ }>) => void;
833
827
 
834
828
  declare type SelectionOption<TValue extends string = string> = {
835
- value: TValue;
829
+ value: TValue;
836
830
  };
837
831
 
838
- declare type SelectionProps<
839
- TComponent,
840
- TProps extends BaseProps<SelectionValue<string>>,
841
- TSelectionType extends SelectionType = SelectionType,
842
- OptionValue extends string = string,
843
- TSelectionOption extends SelectionOption<OptionValue> = SelectionOption<OptionValue>,
844
- TOptions extends ReadonlyArray<TSelectionOption> = ReadonlyArray<TSelectionOption>,
845
- > = Omit<TProps, 'type' | 'value' | 'options' | 'onChange'> & {
846
- type?: TSelectionType;
847
- value?: TSelectionType extends 'single'
848
- ? TOptions[number]['value'] | null
849
- : TSelectionType extends 'single-strict'
850
- ? TOptions[number]['value']
851
- : TSelectionType extends 'multiple'
852
- ? ReadonlyArray<TOptions[number]['value']> | null
853
- : SelectionValue<TOptions[number]['value']>; // Infer value type from options
854
- options?: TOptions;
855
- onChange?: SelectionChangeEventHandler<
856
- TComponent,
857
- TSelectionType extends 'single'
858
- ? TOptions[number]['value'] | null
859
- : TSelectionType extends 'single-strict'
860
- ? TOptions[number]['value']
861
- : TSelectionType extends 'multiple'
862
- ? Array<TOptions[number]['value']> | null
863
- : SelectionValue<TOptions[number]['value']>
864
- >;
832
+ declare type SelectionProps<TComponent, TProps extends BaseProps<SelectionValue<string>>, TSelectionType extends SelectionType = SelectionType, OptionValue extends string = string, TSelectionOption extends SelectionOption<OptionValue> = SelectionOption<OptionValue>, TOptions extends ReadonlyArray<TSelectionOption> = ReadonlyArray<TSelectionOption>> = Omit<TProps, 'type' | 'value' | 'options' | 'onChange'> & {
833
+ type?: TSelectionType;
834
+ value?: TSelectionType extends 'single' ? TOptions[number]['value'] | null : TSelectionType extends 'single-strict' ? TOptions[number]['value'] : TSelectionType extends 'multiple' ? ReadonlyArray<TOptions[number]['value']> | null : SelectionValue<TOptions[number]['value']>;
835
+ options?: TOptions;
836
+ onChange?: SelectionChangeEventHandler<TComponent, TSelectionType extends 'single' ? TOptions[number]['value'] | null : TSelectionType extends 'single-strict' ? TOptions[number]['value'] : TSelectionType extends 'multiple' ? Array<TOptions[number]['value']> | null : SelectionValue<TOptions[number]['value']>>;
865
837
  };
866
838
 
867
839
  export { SelectionType }
@@ -1803,6 +1775,15 @@ declare const WiredTooltip: ReactWebComponent<WCTooltip, {}>;
1803
1775
  export { }
1804
1776
 
1805
1777
 
1778
+ declare module 'react' {
1779
+ interface CSSProperties {
1780
+ '--m-divider-margin-top'?: string;
1781
+ '--m-divider-margin-bottom'?: string;
1782
+ '--m-divider-margin-y'?: string;
1783
+ }
1784
+ }
1785
+
1786
+
1806
1787
  declare module 'react' {
1807
1788
  interface CSSProperties {
1808
1789
  '--m-card-body-padding'?: string;
@@ -1817,17 +1798,16 @@ declare module 'react' {
1817
1798
 
1818
1799
  declare module 'react' {
1819
1800
  interface CSSProperties {
1820
- '--m-divider-margin-top'?: string;
1821
- '--m-divider-margin-bottom'?: string;
1822
- '--m-divider-margin-y'?: string;
1801
+ '--m-icon-size'?: string;
1802
+ '--m-icon-color'?: string;
1823
1803
  }
1824
1804
  }
1825
1805
 
1826
1806
 
1827
1807
  declare module 'react' {
1828
1808
  interface CSSProperties {
1829
- '--m-icon-size'?: string;
1830
- '--m-icon-color'?: string;
1809
+ '--m-text-display'?: string;
1810
+ '--m-text-max-width'?: string;
1831
1811
  }
1832
1812
  }
1833
1813
 
@@ -1850,7 +1830,6 @@ declare module 'react' {
1850
1830
  '--m-table-border-top-right-radius'?: string;
1851
1831
  '--m-table-border-bottom-left-radius'?: string;
1852
1832
  '--m-table-border-bottom-right-radius'?: string;
1853
- '--m-table-border-width'?: string;
1854
1833
  }
1855
1834
  }
1856
1835
 
@@ -1862,13 +1841,6 @@ declare module 'react' {
1862
1841
  '--m-table-border-top-right-radius'?: string;
1863
1842
  '--m-table-border-bottom-left-radius'?: string;
1864
1843
  '--m-table-border-bottom-right-radius'?: string;
1865
- }
1866
- }
1867
-
1868
-
1869
- declare module 'react' {
1870
- interface CSSProperties {
1871
- '--m-text-display'?: string;
1872
- '--m-text-max-width'?: string;
1844
+ '--m-table-border-width'?: string;
1873
1845
  }
1874
1846
  }
package/dist/tokens.d.ts CHANGED
@@ -5,6 +5,15 @@ 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
+
8
17
  declare module 'react' {
9
18
  interface CSSProperties {
10
19
  '--m-card-body-padding'?: string;
@@ -19,17 +28,16 @@ declare module 'react' {
19
28
 
20
29
  declare module 'react' {
21
30
  interface CSSProperties {
22
- '--m-divider-margin-top'?: string;
23
- '--m-divider-margin-bottom'?: string;
24
- '--m-divider-margin-y'?: string;
31
+ '--m-icon-size'?: string;
32
+ '--m-icon-color'?: string;
25
33
  }
26
34
  }
27
35
 
28
36
 
29
37
  declare module 'react' {
30
38
  interface CSSProperties {
31
- '--m-icon-size'?: string;
32
- '--m-icon-color'?: string;
39
+ '--m-text-display'?: string;
40
+ '--m-text-max-width'?: string;
33
41
  }
34
42
  }
35
43
 
@@ -52,7 +60,6 @@ declare module 'react' {
52
60
  '--m-table-border-top-right-radius'?: string;
53
61
  '--m-table-border-bottom-left-radius'?: string;
54
62
  '--m-table-border-bottom-right-radius'?: string;
55
- '--m-table-border-width'?: string;
56
63
  }
57
64
  }
58
65
 
@@ -64,13 +71,6 @@ declare module 'react' {
64
71
  '--m-table-border-top-right-radius'?: string;
65
72
  '--m-table-border-bottom-left-radius'?: string;
66
73
  '--m-table-border-bottom-right-radius'?: string;
67
- }
68
- }
69
-
70
-
71
- declare module 'react' {
72
- interface CSSProperties {
73
- '--m-text-display'?: string;
74
- '--m-text-max-width'?: string;
74
+ '--m-table-border-width'?: string;
75
75
  }
76
76
  }
package/package.json CHANGED
@@ -1,67 +1,68 @@
1
1
  {
2
- "name": "@loadsmart/miranda-react",
3
- "version": "4.0.0-alpha.7",
4
- "description": "React component library based on Miranda Web Components",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "type": "module",
8
- "files": [
9
- "dist"
10
- ],
11
- "scripts": {
12
- "build-docs": "storybook build -o ./docs",
13
- "dev": "storybook dev -p 7007",
14
- "test": "cypress run --component --browser chrome",
15
- "cypress": "cypress open --component --browser chrome",
16
- "build": "vite build",
17
- "prePublishOnly": "npm run build",
18
- "release": "semantic-release",
19
- "typecheck": "tsc --noEmit",
20
- "figma:create": "dotenvx run -- figma connect create --outDir src/components",
21
- "figma:parse": "dotenvx run -- figma connect parse",
22
- "figma:publish": "dotenvx run -- figma connect publish",
23
- "figma:unpublish": "dotenvx run -- figma connect unpublish",
24
- "figma:build-icons": "tsx ./src/scripts/build-icons-figma-connect.ts"
25
- },
26
- "author": "Loadsmart",
27
- "license": "UNLICENSED",
28
- "devDependencies": {
29
- "@figma/code-connect": "^1.3.6",
30
- "@loadsmart/miranda-utils": "*",
31
- "@types/node": "^22.15.23",
32
- "@types/react": "^17.0.85",
33
- "@types/react-dom": "^17.0.26",
34
- "@types/react-is": "^18.3.0",
35
- "@vitejs/plugin-react": "^4.4.1",
36
- "react": "^17.0.2",
37
- "react-dom": "^17.0.2",
38
- "ts-loader": "^9.4.2",
39
- "tsx": "^4.19.4",
40
- "vite": "^6.3.2",
41
- "vite-plugin-dts": "^4.5.3"
42
- },
43
- "peerDependencies": {
44
- "react": ">=16.8.0",
45
- "react-dom": ">=16.8.0"
46
- },
47
- "publishConfig": {
48
- "access": "public"
49
- },
50
- "dependencies": {
51
- "@lit/react": "^1.0.5",
52
- "@loadsmart/miranda-tokens": "5.0.0-alpha.7",
53
- "@loadsmart/miranda-wc": "4.0.0-alpha.7",
54
- "react-is": "^18.3.1"
55
- },
56
- "directories": {
57
- "test": "tests"
58
- },
59
- "repository": {
60
- "type": "git",
61
- "url": "git+https://github.com/loadsmart/miranda-wc.git"
62
- },
63
- "bugs": {
64
- "url": "https://github.com/loadsmart/miranda-wc/issues"
65
- },
66
- "homepage": "https://github.com/loadsmart/miranda-wc#readme"
67
- }
2
+ "name": "@loadsmart/miranda-react",
3
+ "version": "4.0.0-alpha.9",
4
+ "description": "React component library based on Miranda Web Components",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "type": "module",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build-docs": "storybook build -o ./docs",
13
+ "dev": "storybook dev -p 7007",
14
+ "test": "cypress run --component --browser chrome",
15
+ "cypress": "cypress open --component --browser chrome",
16
+ "build": "vite build",
17
+ "release": "semantic-release",
18
+ "typecheck": "tsc --noEmit",
19
+ "figma:create": "dotenvx run -- figma connect create --outDir src/components",
20
+ "figma:parse": "dotenvx run -- figma connect parse",
21
+ "figma:publish": "dotenvx run -- figma connect publish",
22
+ "figma:unpublish": "dotenvx run -- figma connect unpublish",
23
+ "figma:build-icons": "tsx ./src/scripts/build-icons-figma-connect.ts"
24
+ },
25
+ "author": "Loadsmart",
26
+ "license": "UNLICENSED",
27
+ "devDependencies": {
28
+ "@figma/code-connect": "^1.3.6",
29
+ "@loadsmart/miranda-utils": "0.0.0",
30
+ "@types/node": "^24.1.0",
31
+ "@types/react": "^18.3.24",
32
+ "@types/react-dom": "^18.3.7",
33
+ "@types/react-is": "^18.3.1",
34
+ "@vitejs/plugin-react": "^4.4.1",
35
+ "react": "^18.3.1",
36
+ "react-dom": "^18.3.1",
37
+ "ts-loader": "^9.4.2",
38
+ "tsx": "^4.19.4",
39
+ "typescript": "~5.9.3",
40
+ "vite": "^6.3.2",
41
+ "vite-plugin-dts": "^4.5.3"
42
+ },
43
+ "peerDependencies": {
44
+ "react": ">=16.8.0",
45
+ "react-dom": ">=16.8.0"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ },
50
+ "dependencies": {
51
+ "@lit/react": "^1.0.5",
52
+ "@loadsmart/miranda-tokens": "5.0.0-alpha.9",
53
+ "@loadsmart/miranda-wc": "4.0.0-alpha.9",
54
+ "react-is": "^18.3.1"
55
+ },
56
+ "directories": {
57
+ "test": "tests"
58
+ },
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "git+https://github.com/loadsmart/miranda-wc.git"
62
+ },
63
+ "bugs": {
64
+ "url": "https://github.com/loadsmart/miranda-wc/issues"
65
+ },
66
+ "homepage": "https://github.com/loadsmart/miranda-wc#readme",
67
+ "stableVersion": "0.0.0"
68
+ }