@metamask/snaps-sdk 6.13.0 → 6.15.0

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.
Files changed (154) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/dist/error-wrappers.d.cts +192 -192
  3. package/dist/error-wrappers.d.mts +192 -192
  4. package/dist/internals/error-wrappers.d.cts +12 -12
  5. package/dist/internals/error-wrappers.d.mts +12 -12
  6. package/dist/jsx/components/Banner.cjs +19 -0
  7. package/dist/jsx/components/Banner.cjs.map +1 -0
  8. package/dist/jsx/components/Banner.d.cts +42 -0
  9. package/dist/jsx/components/Banner.d.cts.map +1 -0
  10. package/dist/jsx/components/Banner.d.mts +42 -0
  11. package/dist/jsx/components/Banner.d.mts.map +1 -0
  12. package/dist/jsx/components/Banner.mjs +16 -0
  13. package/dist/jsx/components/Banner.mjs.map +1 -0
  14. package/dist/jsx/components/Container.cjs +2 -1
  15. package/dist/jsx/components/Container.cjs.map +1 -1
  16. package/dist/jsx/components/Container.d.cts +7 -1
  17. package/dist/jsx/components/Container.d.cts.map +1 -1
  18. package/dist/jsx/components/Container.d.mts +7 -1
  19. package/dist/jsx/components/Container.d.mts.map +1 -1
  20. package/dist/jsx/components/Container.mjs +2 -1
  21. package/dist/jsx/components/Container.mjs.map +1 -1
  22. package/dist/jsx/components/Text.cjs +5 -0
  23. package/dist/jsx/components/Text.cjs.map +1 -1
  24. package/dist/jsx/components/Text.d.cts +7 -0
  25. package/dist/jsx/components/Text.d.cts.map +1 -1
  26. package/dist/jsx/components/Text.d.mts +7 -0
  27. package/dist/jsx/components/Text.d.mts.map +1 -1
  28. package/dist/jsx/components/Text.mjs +5 -0
  29. package/dist/jsx/components/Text.mjs.map +1 -1
  30. package/dist/jsx/components/Value.cjs +2 -0
  31. package/dist/jsx/components/Value.cjs.map +1 -1
  32. package/dist/jsx/components/Value.d.cts +5 -2
  33. package/dist/jsx/components/Value.d.cts.map +1 -1
  34. package/dist/jsx/components/Value.d.mts +5 -2
  35. package/dist/jsx/components/Value.d.mts.map +1 -1
  36. package/dist/jsx/components/Value.mjs +2 -0
  37. package/dist/jsx/components/Value.mjs.map +1 -1
  38. package/dist/jsx/components/form/Button.cjs.map +1 -1
  39. package/dist/jsx/components/form/Button.d.cts +4 -0
  40. package/dist/jsx/components/form/Button.d.cts.map +1 -1
  41. package/dist/jsx/components/form/Button.d.mts +4 -0
  42. package/dist/jsx/components/form/Button.d.mts.map +1 -1
  43. package/dist/jsx/components/form/Button.mjs.map +1 -1
  44. package/dist/jsx/components/index.cjs +1 -0
  45. package/dist/jsx/components/index.cjs.map +1 -1
  46. package/dist/jsx/components/index.d.cts +3 -1
  47. package/dist/jsx/components/index.d.cts.map +1 -1
  48. package/dist/jsx/components/index.d.mts +3 -1
  49. package/dist/jsx/components/index.d.mts.map +1 -1
  50. package/dist/jsx/components/index.mjs +1 -0
  51. package/dist/jsx/components/index.mjs.map +1 -1
  52. package/dist/jsx/validation.cjs +57 -15
  53. package/dist/jsx/validation.cjs.map +1 -1
  54. package/dist/jsx/validation.d.cts +15 -11
  55. package/dist/jsx/validation.d.cts.map +1 -1
  56. package/dist/jsx/validation.d.mts +15 -11
  57. package/dist/jsx/validation.d.mts.map +1 -1
  58. package/dist/jsx/validation.mjs +56 -14
  59. package/dist/jsx/validation.mjs.map +1 -1
  60. package/dist/types/handlers/index.cjs +1 -0
  61. package/dist/types/handlers/index.cjs.map +1 -1
  62. package/dist/types/handlers/index.d.cts +1 -0
  63. package/dist/types/handlers/index.d.cts.map +1 -1
  64. package/dist/types/handlers/index.d.mts +1 -0
  65. package/dist/types/handlers/index.d.mts.map +1 -1
  66. package/dist/types/handlers/index.mjs +1 -0
  67. package/dist/types/handlers/index.mjs.map +1 -1
  68. package/dist/types/handlers/settings-page.cjs +3 -0
  69. package/dist/types/handlers/settings-page.cjs.map +1 -0
  70. package/dist/types/handlers/settings-page.d.cts +23 -0
  71. package/dist/types/handlers/settings-page.d.cts.map +1 -0
  72. package/dist/types/handlers/settings-page.d.mts +23 -0
  73. package/dist/types/handlers/settings-page.d.mts.map +1 -0
  74. package/dist/types/handlers/settings-page.mjs +2 -0
  75. package/dist/types/handlers/settings-page.mjs.map +1 -0
  76. package/dist/types/interface.d.cts +2 -2
  77. package/dist/types/interface.d.cts.map +1 -1
  78. package/dist/types/interface.d.mts +2 -2
  79. package/dist/types/interface.d.mts.map +1 -1
  80. package/dist/types/methods/cancel-background-event.cjs +3 -0
  81. package/dist/types/methods/cancel-background-event.cjs.map +1 -0
  82. package/dist/types/methods/cancel-background-event.d.cts +15 -0
  83. package/dist/types/methods/cancel-background-event.d.cts.map +1 -0
  84. package/dist/types/methods/cancel-background-event.d.mts +15 -0
  85. package/dist/types/methods/cancel-background-event.d.mts.map +1 -0
  86. package/dist/types/methods/cancel-background-event.mjs +2 -0
  87. package/dist/types/methods/cancel-background-event.mjs.map +1 -0
  88. package/dist/types/methods/clear-state.cjs +3 -0
  89. package/dist/types/methods/clear-state.cjs.map +1 -0
  90. package/dist/types/methods/clear-state.d.cts +16 -0
  91. package/dist/types/methods/clear-state.d.cts.map +1 -0
  92. package/dist/types/methods/clear-state.d.mts +16 -0
  93. package/dist/types/methods/clear-state.d.mts.map +1 -0
  94. package/dist/types/methods/clear-state.mjs +2 -0
  95. package/dist/types/methods/clear-state.mjs.map +1 -0
  96. package/dist/types/methods/get-background-events.cjs +3 -0
  97. package/dist/types/methods/get-background-events.cjs.map +1 -0
  98. package/dist/types/methods/get-background-events.d.cts +38 -0
  99. package/dist/types/methods/get-background-events.d.cts.map +1 -0
  100. package/dist/types/methods/get-background-events.d.mts +38 -0
  101. package/dist/types/methods/get-background-events.d.mts.map +1 -0
  102. package/dist/types/methods/get-background-events.mjs +2 -0
  103. package/dist/types/methods/get-background-events.mjs.map +1 -0
  104. package/dist/types/methods/get-preferences.cjs.map +1 -1
  105. package/dist/types/methods/get-preferences.d.cts +6 -1
  106. package/dist/types/methods/get-preferences.d.cts.map +1 -1
  107. package/dist/types/methods/get-preferences.d.mts +6 -1
  108. package/dist/types/methods/get-preferences.d.mts.map +1 -1
  109. package/dist/types/methods/get-preferences.mjs.map +1 -1
  110. package/dist/types/methods/get-state.cjs +3 -0
  111. package/dist/types/methods/get-state.cjs.map +1 -0
  112. package/dist/types/methods/get-state.d.cts +21 -0
  113. package/dist/types/methods/get-state.d.cts.map +1 -0
  114. package/dist/types/methods/get-state.d.mts +21 -0
  115. package/dist/types/methods/get-state.d.mts.map +1 -0
  116. package/dist/types/methods/get-state.mjs +2 -0
  117. package/dist/types/methods/get-state.mjs.map +1 -0
  118. package/dist/types/methods/index.cjs +8 -2
  119. package/dist/types/methods/index.cjs.map +1 -1
  120. package/dist/types/methods/index.d.cts +8 -2
  121. package/dist/types/methods/index.d.cts.map +1 -1
  122. package/dist/types/methods/index.d.mts +8 -2
  123. package/dist/types/methods/index.d.mts.map +1 -1
  124. package/dist/types/methods/index.mjs +8 -2
  125. package/dist/types/methods/index.mjs.map +1 -1
  126. package/dist/types/methods/methods.cjs.map +1 -1
  127. package/dist/types/methods/methods.d.cts +21 -0
  128. package/dist/types/methods/methods.d.cts.map +1 -1
  129. package/dist/types/methods/methods.d.mts +21 -0
  130. package/dist/types/methods/methods.d.mts.map +1 -1
  131. package/dist/types/methods/methods.mjs.map +1 -1
  132. package/dist/types/methods/schedule-background-event.cjs +3 -0
  133. package/dist/types/methods/schedule-background-event.cjs.map +1 -0
  134. package/dist/types/methods/schedule-background-event.d.cts +22 -0
  135. package/dist/types/methods/schedule-background-event.d.cts.map +1 -0
  136. package/dist/types/methods/schedule-background-event.d.mts +22 -0
  137. package/dist/types/methods/schedule-background-event.d.mts.map +1 -0
  138. package/dist/types/methods/schedule-background-event.mjs +2 -0
  139. package/dist/types/methods/schedule-background-event.mjs.map +1 -0
  140. package/dist/types/methods/set-state.cjs +3 -0
  141. package/dist/types/methods/set-state.cjs.map +1 -0
  142. package/dist/types/methods/set-state.d.cts +23 -0
  143. package/dist/types/methods/set-state.d.cts.map +1 -0
  144. package/dist/types/methods/set-state.d.mts +23 -0
  145. package/dist/types/methods/set-state.d.mts.map +1 -0
  146. package/dist/types/methods/set-state.mjs +2 -0
  147. package/dist/types/methods/set-state.mjs.map +1 -0
  148. package/dist/types/permissions.cjs.map +1 -1
  149. package/dist/types/permissions.d.cts +4 -1
  150. package/dist/types/permissions.d.cts.map +1 -1
  151. package/dist/types/permissions.d.mts +4 -1
  152. package/dist/types/permissions.d.mts.map +1 -1
  153. package/dist/types/permissions.mjs.map +1 -1
  154. package/package.json +5 -5
@@ -15,10 +15,10 @@ export type JsonRpcErrorFunction = typeof rpcErrors.parse;
15
15
  */
16
16
  export declare function createSnapError(fn: JsonRpcErrorFunction): {
17
17
  new (message?: string): {
18
- readonly "__#182365@#code": number;
19
- readonly "__#182365@#message": string;
20
- readonly "__#182365@#data"?: Record<string, Json> | undefined;
21
- readonly "__#182365@#stack"?: string | undefined;
18
+ readonly "__#184335@#code": number;
19
+ readonly "__#184335@#message": string;
20
+ readonly "__#184335@#data"?: Record<string, Json> | undefined;
21
+ readonly "__#184335@#stack"?: string | undefined;
22
22
  readonly name: string;
23
23
  readonly code: number;
24
24
  readonly message: string;
@@ -29,10 +29,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
29
29
  cause?: unknown;
30
30
  };
31
31
  new (data?: Record<string, Json>): {
32
- readonly "__#182365@#code": number;
33
- readonly "__#182365@#message": string;
34
- readonly "__#182365@#data"?: Record<string, Json> | undefined;
35
- readonly "__#182365@#stack"?: string | undefined;
32
+ readonly "__#184335@#code": number;
33
+ readonly "__#184335@#message": string;
34
+ readonly "__#184335@#data"?: Record<string, Json> | undefined;
35
+ readonly "__#184335@#stack"?: string | undefined;
36
36
  readonly name: string;
37
37
  readonly code: number;
38
38
  readonly message: string;
@@ -43,10 +43,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
43
43
  cause?: unknown;
44
44
  };
45
45
  new (message?: string | Record<string, Json>, data?: Record<string, Json>): {
46
- readonly "__#182365@#code": number;
47
- readonly "__#182365@#message": string;
48
- readonly "__#182365@#data"?: Record<string, Json> | undefined;
49
- readonly "__#182365@#stack"?: string | undefined;
46
+ readonly "__#184335@#code": number;
47
+ readonly "__#184335@#message": string;
48
+ readonly "__#184335@#data"?: Record<string, Json> | undefined;
49
+ readonly "__#184335@#stack"?: string | undefined;
50
50
  readonly name: string;
51
51
  readonly code: number;
52
52
  readonly message: string;
@@ -15,10 +15,10 @@ export type JsonRpcErrorFunction = typeof rpcErrors.parse;
15
15
  */
16
16
  export declare function createSnapError(fn: JsonRpcErrorFunction): {
17
17
  new (message?: string): {
18
- readonly "__#91184@#code": number;
19
- readonly "__#91184@#message": string;
20
- readonly "__#91184@#data"?: Record<string, Json> | undefined;
21
- readonly "__#91184@#stack"?: string | undefined;
18
+ readonly "__#92169@#code": number;
19
+ readonly "__#92169@#message": string;
20
+ readonly "__#92169@#data"?: Record<string, Json> | undefined;
21
+ readonly "__#92169@#stack"?: string | undefined;
22
22
  readonly name: string;
23
23
  readonly code: number;
24
24
  readonly message: string;
@@ -29,10 +29,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
29
29
  cause?: unknown;
30
30
  };
31
31
  new (data?: Record<string, Json>): {
32
- readonly "__#91184@#code": number;
33
- readonly "__#91184@#message": string;
34
- readonly "__#91184@#data"?: Record<string, Json> | undefined;
35
- readonly "__#91184@#stack"?: string | undefined;
32
+ readonly "__#92169@#code": number;
33
+ readonly "__#92169@#message": string;
34
+ readonly "__#92169@#data"?: Record<string, Json> | undefined;
35
+ readonly "__#92169@#stack"?: string | undefined;
36
36
  readonly name: string;
37
37
  readonly code: number;
38
38
  readonly message: string;
@@ -43,10 +43,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
43
43
  cause?: unknown;
44
44
  };
45
45
  new (message?: string | Record<string, Json>, data?: Record<string, Json>): {
46
- readonly "__#91184@#code": number;
47
- readonly "__#91184@#message": string;
48
- readonly "__#91184@#data"?: Record<string, Json> | undefined;
49
- readonly "__#91184@#stack"?: string | undefined;
46
+ readonly "__#92169@#code": number;
47
+ readonly "__#92169@#message": string;
48
+ readonly "__#92169@#data"?: Record<string, Json> | undefined;
49
+ readonly "__#92169@#stack"?: string | undefined;
50
50
  readonly name: string;
51
51
  readonly code: number;
52
52
  readonly message: string;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Banner = void 0;
4
+ const component_1 = require("../component.cjs");
5
+ const TYPE = 'Banner';
6
+ /**
7
+ * A Banner component, which is used to display custom banner alerts.
8
+ *
9
+ * @param props - The props of the component.
10
+ * @param props.children - The content to display in the banner.
11
+ * @param props.title - Title of the banner.
12
+ * @param props.severity - Severity level of the banner.
13
+ * @example
14
+ * <Banner title="Success banner" severity="success">
15
+ * <Text>Here is the banner content!</Text>
16
+ * </Banner>
17
+ */
18
+ exports.Banner = (0, component_1.createSnapComponent)(TYPE);
19
+ //# sourceMappingURL=Banner.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Banner.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":";;;AAAA,gDAAuE;AA+BvE,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;GAWG;AACU,QAAA,MAAM,GAAG,IAAA,+BAAmB,EAA2B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent, type SnapsChildren } from '../component';\nimport type { ButtonElement } from './form/Button';\nimport type { StandardFormattingElement } from './formatting';\nimport type { IconElement } from './Icon';\nimport type { LinkElement } from './Link';\nimport type { TextElement } from './Text';\n\n/**\n * Types of children components that can be used with Banner.\n */\nexport type BannerChildren = SnapsChildren<\n | TextElement\n | StandardFormattingElement\n | LinkElement\n | IconElement\n | ButtonElement\n>;\n\n/**\n * The props of the {@link Banner} component.\n *\n * @param children - The content to display in the banner.\n * @param title - Title of the banner.\n * @param severity - Severity level of the banner.\n */\nexport type BannerProps = {\n children: BannerChildren;\n title: string;\n severity: 'danger' | 'info' | 'success' | 'warning';\n};\n\nconst TYPE = 'Banner';\n\n/**\n * A Banner component, which is used to display custom banner alerts.\n *\n * @param props - The props of the component.\n * @param props.children - The content to display in the banner.\n * @param props.title - Title of the banner.\n * @param props.severity - Severity level of the banner.\n * @example\n * <Banner title=\"Success banner\" severity=\"success\">\n * <Text>Here is the banner content!</Text>\n * </Banner>\n */\nexport const Banner = createSnapComponent<BannerProps, typeof TYPE>(TYPE);\n\n/**\n * A Banner element.\n *\n * @see Banner\n */\nexport type BannerElement = ReturnType<typeof Banner>;\n"]}
@@ -0,0 +1,42 @@
1
+ import { type SnapsChildren } from "../component.cjs";
2
+ import type { ButtonElement } from "./form/Button.cjs";
3
+ import type { StandardFormattingElement } from "./formatting/index.cjs";
4
+ import type { IconElement } from "./Icon.cjs";
5
+ import type { LinkElement } from "./Link.cjs";
6
+ import type { TextElement } from "./Text.cjs";
7
+ /**
8
+ * Types of children components that can be used with Banner.
9
+ */
10
+ export type BannerChildren = SnapsChildren<TextElement | StandardFormattingElement | LinkElement | IconElement | ButtonElement>;
11
+ /**
12
+ * The props of the {@link Banner} component.
13
+ *
14
+ * @param children - The content to display in the banner.
15
+ * @param title - Title of the banner.
16
+ * @param severity - Severity level of the banner.
17
+ */
18
+ export type BannerProps = {
19
+ children: BannerChildren;
20
+ title: string;
21
+ severity: 'danger' | 'info' | 'success' | 'warning';
22
+ };
23
+ /**
24
+ * A Banner component, which is used to display custom banner alerts.
25
+ *
26
+ * @param props - The props of the component.
27
+ * @param props.children - The content to display in the banner.
28
+ * @param props.title - Title of the banner.
29
+ * @param props.severity - Severity level of the banner.
30
+ * @example
31
+ * <Banner title="Success banner" severity="success">
32
+ * <Text>Here is the banner content!</Text>
33
+ * </Banner>
34
+ */
35
+ export declare const Banner: import("../component.cjs").SnapComponent<BannerProps, "Banner">;
36
+ /**
37
+ * A Banner element.
38
+ *
39
+ * @see Banner
40
+ */
41
+ export type BannerElement = ReturnType<typeof Banner>;
42
+ //# sourceMappingURL=Banner.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Banner.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,aAAa,EAAE,yBAAqB;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,0BAAsB;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAE1C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,CACtC,WAAW,GACX,yBAAyB,GACzB,WAAW,GACX,WAAW,GACX,aAAa,CAChB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACrD,CAAC;AAIF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,6DAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { type SnapsChildren } from "../component.mjs";
2
+ import type { ButtonElement } from "./form/Button.mjs";
3
+ import type { StandardFormattingElement } from "./formatting/index.mjs";
4
+ import type { IconElement } from "./Icon.mjs";
5
+ import type { LinkElement } from "./Link.mjs";
6
+ import type { TextElement } from "./Text.mjs";
7
+ /**
8
+ * Types of children components that can be used with Banner.
9
+ */
10
+ export type BannerChildren = SnapsChildren<TextElement | StandardFormattingElement | LinkElement | IconElement | ButtonElement>;
11
+ /**
12
+ * The props of the {@link Banner} component.
13
+ *
14
+ * @param children - The content to display in the banner.
15
+ * @param title - Title of the banner.
16
+ * @param severity - Severity level of the banner.
17
+ */
18
+ export type BannerProps = {
19
+ children: BannerChildren;
20
+ title: string;
21
+ severity: 'danger' | 'info' | 'success' | 'warning';
22
+ };
23
+ /**
24
+ * A Banner component, which is used to display custom banner alerts.
25
+ *
26
+ * @param props - The props of the component.
27
+ * @param props.children - The content to display in the banner.
28
+ * @param props.title - Title of the banner.
29
+ * @param props.severity - Severity level of the banner.
30
+ * @example
31
+ * <Banner title="Success banner" severity="success">
32
+ * <Text>Here is the banner content!</Text>
33
+ * </Banner>
34
+ */
35
+ export declare const Banner: import("../component.mjs").SnapComponent<BannerProps, "Banner">;
36
+ /**
37
+ * A Banner element.
38
+ *
39
+ * @see Banner
40
+ */
41
+ export type BannerElement = ReturnType<typeof Banner>;
42
+ //# sourceMappingURL=Banner.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Banner.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,aAAa,EAAE,yBAAqB;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,0BAAsB;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAE1C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,CACtC,WAAW,GACX,yBAAyB,GACzB,WAAW,GACX,WAAW,GACX,aAAa,CAChB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACrD,CAAC;AAIF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,6DAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { createSnapComponent } from "../component.mjs";
2
+ const TYPE = 'Banner';
3
+ /**
4
+ * A Banner component, which is used to display custom banner alerts.
5
+ *
6
+ * @param props - The props of the component.
7
+ * @param props.children - The content to display in the banner.
8
+ * @param props.title - Title of the banner.
9
+ * @param props.severity - Severity level of the banner.
10
+ * @example
11
+ * <Banner title="Success banner" severity="success">
12
+ * <Text>Here is the banner content!</Text>
13
+ * </Banner>
14
+ */
15
+ export const Banner = createSnapComponent(TYPE);
16
+ //# sourceMappingURL=Banner.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Banner.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Banner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAsB,yBAAqB;AA+BvE,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,mBAAmB,CAA2B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent, type SnapsChildren } from '../component';\nimport type { ButtonElement } from './form/Button';\nimport type { StandardFormattingElement } from './formatting';\nimport type { IconElement } from './Icon';\nimport type { LinkElement } from './Link';\nimport type { TextElement } from './Text';\n\n/**\n * Types of children components that can be used with Banner.\n */\nexport type BannerChildren = SnapsChildren<\n | TextElement\n | StandardFormattingElement\n | LinkElement\n | IconElement\n | ButtonElement\n>;\n\n/**\n * The props of the {@link Banner} component.\n *\n * @param children - The content to display in the banner.\n * @param title - Title of the banner.\n * @param severity - Severity level of the banner.\n */\nexport type BannerProps = {\n children: BannerChildren;\n title: string;\n severity: 'danger' | 'info' | 'success' | 'warning';\n};\n\nconst TYPE = 'Banner';\n\n/**\n * A Banner component, which is used to display custom banner alerts.\n *\n * @param props - The props of the component.\n * @param props.children - The content to display in the banner.\n * @param props.title - Title of the banner.\n * @param props.severity - Severity level of the banner.\n * @example\n * <Banner title=\"Success banner\" severity=\"success\">\n * <Text>Here is the banner content!</Text>\n * </Banner>\n */\nexport const Banner = createSnapComponent<BannerProps, typeof TYPE>(TYPE);\n\n/**\n * A Banner element.\n *\n * @see Banner\n */\nexport type BannerElement = ReturnType<typeof Banner>;\n"]}
@@ -7,10 +7,11 @@ const TYPE = 'Container';
7
7
  * A container component, which is used to create a container with a box and a footer.
8
8
  *
9
9
  * @param props - The props of the component.
10
+ * @param props.backgroundColor - The color of the background.
10
11
  * @param props.children - The Box and the Footer or the Box element.
11
12
  * @returns A container element.
12
13
  * @example
13
- * <Container>
14
+ * <Container backgroundColor="default">
14
15
  * <Box>
15
16
  * <Text>Hello world!</Text>
16
17
  * </Box>
@@ -1 +1 @@
1
- {"version":3,"file":"Container.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AAYnD,MAAM,IAAI,GAAG,WAAW,CAAC;AAEzB;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,SAAS,GAAG,IAAA,+BAAmB,EAA8B,IAAI,CAAC,CAAC","sourcesContent":["import type { GenericSnapElement } from '../component';\nimport { createSnapComponent } from '../component';\nimport type { FooterElement } from './Footer';\n\n/**\n * The props of the {@link Container} component.\n *\n * @property children - The Box and the Footer or the Box element.\n */\nexport type ContainerProps = {\n children: [GenericSnapElement, FooterElement] | GenericSnapElement;\n};\n\nconst TYPE = 'Container';\n\n/**\n * A container component, which is used to create a container with a box and a footer.\n *\n * @param props - The props of the component.\n * @param props.children - The Box and the Footer or the Box element.\n * @returns A container element.\n * @example\n * <Container>\n * <Box>\n * <Text>Hello world!</Text>\n * </Box>\n * <Footer>\n * <Button name=\"cancel\">Cancel</Button>\n * <Button name=\"confirm\">Confirm</Button>\n * </Footer>\n * </Container>\n */\nexport const Container = createSnapComponent<ContainerProps, typeof TYPE>(TYPE);\n\n/**\n * A container element.\n *\n * @see Container\n */\nexport type ContainerElement = ReturnType<typeof Container>;\n"]}
1
+ {"version":3,"file":"Container.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AAkBnD,MAAM,IAAI,GAAG,WAAW,CAAC;AAEzB;;;;;;;;;;;;;;;;;GAiBG;AACU,QAAA,SAAS,GAAG,IAAA,+BAAmB,EAA8B,IAAI,CAAC,CAAC","sourcesContent":["import type { GenericSnapElement } from '../component';\nimport { createSnapComponent } from '../component';\nimport type { FooterElement } from './Footer';\n\n/**\n * Definition of container background colors.\n */\nexport type ContainerBackgroundColor = 'default' | 'alternative';\n\n/**\n * The props of the {@link Container} component.\n *\n * @property children - The Box and the Footer or the Box element.\n */\nexport type ContainerProps = {\n children: [GenericSnapElement, FooterElement] | GenericSnapElement;\n backgroundColor?: ContainerBackgroundColor | undefined;\n};\n\nconst TYPE = 'Container';\n\n/**\n * A container component, which is used to create a container with a box and a footer.\n *\n * @param props - The props of the component.\n * @param props.backgroundColor - The color of the background.\n * @param props.children - The Box and the Footer or the Box element.\n * @returns A container element.\n * @example\n * <Container backgroundColor=\"default\">\n * <Box>\n * <Text>Hello world!</Text>\n * </Box>\n * <Footer>\n * <Button name=\"cancel\">Cancel</Button>\n * <Button name=\"confirm\">Confirm</Button>\n * </Footer>\n * </Container>\n */\nexport const Container = createSnapComponent<ContainerProps, typeof TYPE>(TYPE);\n\n/**\n * A container element.\n *\n * @see Container\n */\nexport type ContainerElement = ReturnType<typeof Container>;\n"]}
@@ -1,5 +1,9 @@
1
1
  import type { GenericSnapElement } from "../component.cjs";
2
2
  import type { FooterElement } from "./Footer.cjs";
3
+ /**
4
+ * Definition of container background colors.
5
+ */
6
+ export type ContainerBackgroundColor = 'default' | 'alternative';
3
7
  /**
4
8
  * The props of the {@link Container} component.
5
9
  *
@@ -7,15 +11,17 @@ import type { FooterElement } from "./Footer.cjs";
7
11
  */
8
12
  export type ContainerProps = {
9
13
  children: [GenericSnapElement, FooterElement] | GenericSnapElement;
14
+ backgroundColor?: ContainerBackgroundColor | undefined;
10
15
  };
11
16
  /**
12
17
  * A container component, which is used to create a container with a box and a footer.
13
18
  *
14
19
  * @param props - The props of the component.
20
+ * @param props.backgroundColor - The color of the background.
15
21
  * @param props.children - The Box and the Footer or the Box element.
16
22
  * @returns A container element.
17
23
  * @example
18
- * <Container>
24
+ * <Container backgroundColor="default">
19
25
  * <Box>
20
26
  * <Text>Hello world!</Text>
21
27
  * </Box>
@@ -1 +1 @@
1
- {"version":3,"file":"Container.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAqB;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAE9C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAAG,kBAAkB,CAAC;CACpE,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,SAAS,mEAAyD,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"Container.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAqB;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAE9C;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,aAAa,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAAG,kBAAkB,CAAC;IACnE,eAAe,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;CACxD,CAAC;AAIF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS,mEAAyD,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC"}
@@ -1,5 +1,9 @@
1
1
  import type { GenericSnapElement } from "../component.mjs";
2
2
  import type { FooterElement } from "./Footer.mjs";
3
+ /**
4
+ * Definition of container background colors.
5
+ */
6
+ export type ContainerBackgroundColor = 'default' | 'alternative';
3
7
  /**
4
8
  * The props of the {@link Container} component.
5
9
  *
@@ -7,15 +11,17 @@ import type { FooterElement } from "./Footer.mjs";
7
11
  */
8
12
  export type ContainerProps = {
9
13
  children: [GenericSnapElement, FooterElement] | GenericSnapElement;
14
+ backgroundColor?: ContainerBackgroundColor | undefined;
10
15
  };
11
16
  /**
12
17
  * A container component, which is used to create a container with a box and a footer.
13
18
  *
14
19
  * @param props - The props of the component.
20
+ * @param props.backgroundColor - The color of the background.
15
21
  * @param props.children - The Box and the Footer or the Box element.
16
22
  * @returns A container element.
17
23
  * @example
18
- * <Container>
24
+ * <Container backgroundColor="default">
19
25
  * <Box>
20
26
  * <Text>Hello world!</Text>
21
27
  * </Box>
@@ -1 +1 @@
1
- {"version":3,"file":"Container.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAqB;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAE9C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAAG,kBAAkB,CAAC;CACpE,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,SAAS,mEAAyD,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"Container.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAqB;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAE9C;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,aAAa,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAAG,kBAAkB,CAAC;IACnE,eAAe,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;CACxD,CAAC;AAIF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS,mEAAyD,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC"}
@@ -4,10 +4,11 @@ const TYPE = 'Container';
4
4
  * A container component, which is used to create a container with a box and a footer.
5
5
  *
6
6
  * @param props - The props of the component.
7
+ * @param props.backgroundColor - The color of the background.
7
8
  * @param props.children - The Box and the Footer or the Box element.
8
9
  * @returns A container element.
9
10
  * @example
10
- * <Container>
11
+ * <Container backgroundColor="default">
11
12
  * <Box>
12
13
  * <Text>Hello world!</Text>
13
14
  * </Box>
@@ -1 +1 @@
1
- {"version":3,"file":"Container.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAYnD,MAAM,IAAI,GAAG,WAAW,CAAC;AAEzB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,mBAAmB,CAA8B,IAAI,CAAC,CAAC","sourcesContent":["import type { GenericSnapElement } from '../component';\nimport { createSnapComponent } from '../component';\nimport type { FooterElement } from './Footer';\n\n/**\n * The props of the {@link Container} component.\n *\n * @property children - The Box and the Footer or the Box element.\n */\nexport type ContainerProps = {\n children: [GenericSnapElement, FooterElement] | GenericSnapElement;\n};\n\nconst TYPE = 'Container';\n\n/**\n * A container component, which is used to create a container with a box and a footer.\n *\n * @param props - The props of the component.\n * @param props.children - The Box and the Footer or the Box element.\n * @returns A container element.\n * @example\n * <Container>\n * <Box>\n * <Text>Hello world!</Text>\n * </Box>\n * <Footer>\n * <Button name=\"cancel\">Cancel</Button>\n * <Button name=\"confirm\">Confirm</Button>\n * </Footer>\n * </Container>\n */\nexport const Container = createSnapComponent<ContainerProps, typeof TYPE>(TYPE);\n\n/**\n * A container element.\n *\n * @see Container\n */\nexport type ContainerElement = ReturnType<typeof Container>;\n"]}
1
+ {"version":3,"file":"Container.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Container.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAkBnD,MAAM,IAAI,GAAG,WAAW,CAAC;AAEzB;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,mBAAmB,CAA8B,IAAI,CAAC,CAAC","sourcesContent":["import type { GenericSnapElement } from '../component';\nimport { createSnapComponent } from '../component';\nimport type { FooterElement } from './Footer';\n\n/**\n * Definition of container background colors.\n */\nexport type ContainerBackgroundColor = 'default' | 'alternative';\n\n/**\n * The props of the {@link Container} component.\n *\n * @property children - The Box and the Footer or the Box element.\n */\nexport type ContainerProps = {\n children: [GenericSnapElement, FooterElement] | GenericSnapElement;\n backgroundColor?: ContainerBackgroundColor | undefined;\n};\n\nconst TYPE = 'Container';\n\n/**\n * A container component, which is used to create a container with a box and a footer.\n *\n * @param props - The props of the component.\n * @param props.backgroundColor - The color of the background.\n * @param props.children - The Box and the Footer or the Box element.\n * @returns A container element.\n * @example\n * <Container backgroundColor=\"default\">\n * <Box>\n * <Text>Hello world!</Text>\n * </Box>\n * <Footer>\n * <Button name=\"cancel\">Cancel</Button>\n * <Button name=\"confirm\">Confirm</Button>\n * </Footer>\n * </Container>\n */\nexport const Container = createSnapComponent<ContainerProps, typeof TYPE>(TYPE);\n\n/**\n * A container element.\n *\n * @see Container\n */\nexport type ContainerElement = ReturnType<typeof Container>;\n"]}
@@ -11,6 +11,7 @@ const TYPE = 'Text';
11
11
  * @param props.color - The color of the text.
12
12
  * @param props.children - The text to display.
13
13
  * @param props.size - The size of the text. Defaults to `md`.
14
+ * @param props.fontWeight - The font weight of the text. Defaults to `regular`.
14
15
  * @returns A text element.
15
16
  * @example
16
17
  * <Text>
@@ -24,6 +25,10 @@ const TYPE = 'Text';
24
25
  * <Text size="sm">
25
26
  * Hello <Bold>world</Bold>!
26
27
  * </Text>
28
+ * @example
29
+ * <Text fontWeight="medium">
30
+ * Hello <Bold>world</Bold>!
31
+ * </Text>
27
32
  */
28
33
  exports.Text = (0, component_1.createSnapComponent)(TYPE);
29
34
  //# sourceMappingURL=Text.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Text.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AAsCnD,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACU,QAAA,IAAI,GAAG,IAAA,+BAAmB,EAAyB,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren } from '../component';\nimport { createSnapComponent } from '../component';\nimport type { StandardFormattingElement } from './formatting';\nimport type { IconElement } from './Icon';\nimport type { LinkElement } from './Link';\n\n/**\n * The children of the {@link Text} component.\n */\nexport type TextChildren = SnapsChildren<\n string | StandardFormattingElement | LinkElement | IconElement\n>;\n\n/**\n * The colors available to the Text {@link Text} component.\n */\nexport type TextColors =\n | 'default'\n | 'alternative'\n | 'muted'\n | 'error'\n | 'success'\n | 'warning';\n\n/**\n * The props of the {@link Text} component.\n *\n * @property children - The text to display.\n * @property alignment - The alignment of the text.\n * @property color - The color of the text.\n * @property size - The size of the text. Defaults to `md`.\n */\nexport type TextProps = {\n children: TextChildren;\n alignment?: 'start' | 'center' | 'end' | undefined;\n color?: TextColors | undefined;\n size?: 'sm' | 'md' | undefined;\n};\n\nconst TYPE = 'Text';\n\n/**\n * A text component, which is used to display text.\n *\n * @param props - The props of the component.\n * @param props.alignment - The alignment of the text.\n * @param props.color - The color of the text.\n * @param props.children - The text to display.\n * @param props.size - The size of the text. Defaults to `md`.\n * @returns A text element.\n * @example\n * <Text>\n * Hello <Bold>world</Bold>!\n * </Text>\n * @example\n * <Text alignment=\"end\">\n * Hello <Bold>world</Bold>!\n * </Text>\n * @example\n * <Text size=\"sm\">\n * Hello <Bold>world</Bold>!\n * </Text>\n */\nexport const Text = createSnapComponent<TextProps, typeof TYPE>(TYPE);\n\n/**\n * A text element.\n *\n * @see Text\n */\nexport type TextElement = ReturnType<typeof Text>;\n"]}
1
+ {"version":3,"file":"Text.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Text.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AAwCnD,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACU,QAAA,IAAI,GAAG,IAAA,+BAAmB,EAAyB,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren } from '../component';\nimport { createSnapComponent } from '../component';\nimport type { StandardFormattingElement } from './formatting';\nimport type { IconElement } from './Icon';\nimport type { LinkElement } from './Link';\n\n/**\n * The children of the {@link Text} component.\n */\nexport type TextChildren = SnapsChildren<\n string | StandardFormattingElement | LinkElement | IconElement\n>;\n\n/**\n * The colors available to the Text {@link Text} component.\n */\nexport type TextColors =\n | 'default'\n | 'alternative'\n | 'muted'\n | 'error'\n | 'success'\n | 'warning';\n\n/**\n * The props of the {@link Text} component.\n *\n * @property children - The text to display.\n * @property alignment - The alignment of the text.\n * @property color - The color of the text.\n * @property size - The size of the text. Defaults to `md`.\n * @property fontWeight - The font weight of the text. Defaults to `regular`.\n */\nexport type TextProps = {\n children: TextChildren;\n alignment?: 'start' | 'center' | 'end' | undefined;\n color?: TextColors | undefined;\n size?: 'sm' | 'md' | undefined;\n fontWeight?: 'regular' | 'medium' | 'bold' | undefined;\n};\n\nconst TYPE = 'Text';\n\n/**\n * A text component, which is used to display text.\n *\n * @param props - The props of the component.\n * @param props.alignment - The alignment of the text.\n * @param props.color - The color of the text.\n * @param props.children - The text to display.\n * @param props.size - The size of the text. Defaults to `md`.\n * @param props.fontWeight - The font weight of the text. Defaults to `regular`.\n * @returns A text element.\n * @example\n * <Text>\n * Hello <Bold>world</Bold>!\n * </Text>\n * @example\n * <Text alignment=\"end\">\n * Hello <Bold>world</Bold>!\n * </Text>\n * @example\n * <Text size=\"sm\">\n * Hello <Bold>world</Bold>!\n * </Text>\n * @example\n * <Text fontWeight=\"medium\">\n * Hello <Bold>world</Bold>!\n * </Text>\n */\nexport const Text = createSnapComponent<TextProps, typeof TYPE>(TYPE);\n\n/**\n * A text element.\n *\n * @see Text\n */\nexport type TextElement = ReturnType<typeof Text>;\n"]}
@@ -17,12 +17,14 @@ export type TextColors = 'default' | 'alternative' | 'muted' | 'error' | 'succes
17
17
  * @property alignment - The alignment of the text.
18
18
  * @property color - The color of the text.
19
19
  * @property size - The size of the text. Defaults to `md`.
20
+ * @property fontWeight - The font weight of the text. Defaults to `regular`.
20
21
  */
21
22
  export type TextProps = {
22
23
  children: TextChildren;
23
24
  alignment?: 'start' | 'center' | 'end' | undefined;
24
25
  color?: TextColors | undefined;
25
26
  size?: 'sm' | 'md' | undefined;
27
+ fontWeight?: 'regular' | 'medium' | 'bold' | undefined;
26
28
  };
27
29
  /**
28
30
  * A text component, which is used to display text.
@@ -32,6 +34,7 @@ export type TextProps = {
32
34
  * @param props.color - The color of the text.
33
35
  * @param props.children - The text to display.
34
36
  * @param props.size - The size of the text. Defaults to `md`.
37
+ * @param props.fontWeight - The font weight of the text. Defaults to `regular`.
35
38
  * @returns A text element.
36
39
  * @example
37
40
  * <Text>
@@ -45,6 +48,10 @@ export type TextProps = {
45
48
  * <Text size="sm">
46
49
  * Hello <Bold>world</Bold>!
47
50
  * </Text>
51
+ * @example
52
+ * <Text fontWeight="medium">
53
+ * Hello <Bold>world</Bold>!
54
+ * </Text>
48
55
  */
49
56
  export declare const Text: import("../component.cjs").SnapComponent<TextProps, "Text">;
50
57
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAqB;AAElD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAE1C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,CACtC,MAAM,GAAG,yBAAyB,GAAG,WAAW,GAAG,WAAW,CAC/D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,aAAa,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,CAAC;AAEd;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACnD,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CAChC,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,IAAI,yDAAoD,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"Text.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAqB;AAElD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAE1C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,CACtC,MAAM,GAAG,yBAAyB,GAAG,WAAW,GAAG,WAAW,CAC/D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,aAAa,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,CAAC;AAEd;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACnD,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/B,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;CACxD,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,IAAI,yDAAoD,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC"}
@@ -17,12 +17,14 @@ export type TextColors = 'default' | 'alternative' | 'muted' | 'error' | 'succes
17
17
  * @property alignment - The alignment of the text.
18
18
  * @property color - The color of the text.
19
19
  * @property size - The size of the text. Defaults to `md`.
20
+ * @property fontWeight - The font weight of the text. Defaults to `regular`.
20
21
  */
21
22
  export type TextProps = {
22
23
  children: TextChildren;
23
24
  alignment?: 'start' | 'center' | 'end' | undefined;
24
25
  color?: TextColors | undefined;
25
26
  size?: 'sm' | 'md' | undefined;
27
+ fontWeight?: 'regular' | 'medium' | 'bold' | undefined;
26
28
  };
27
29
  /**
28
30
  * A text component, which is used to display text.
@@ -32,6 +34,7 @@ export type TextProps = {
32
34
  * @param props.color - The color of the text.
33
35
  * @param props.children - The text to display.
34
36
  * @param props.size - The size of the text. Defaults to `md`.
37
+ * @param props.fontWeight - The font weight of the text. Defaults to `regular`.
35
38
  * @returns A text element.
36
39
  * @example
37
40
  * <Text>
@@ -45,6 +48,10 @@ export type TextProps = {
45
48
  * <Text size="sm">
46
49
  * Hello <Bold>world</Bold>!
47
50
  * </Text>
51
+ * @example
52
+ * <Text fontWeight="medium">
53
+ * Hello <Bold>world</Bold>!
54
+ * </Text>
48
55
  */
49
56
  export declare const Text: import("../component.mjs").SnapComponent<TextProps, "Text">;
50
57
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAqB;AAElD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAE1C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,CACtC,MAAM,GAAG,yBAAyB,GAAG,WAAW,GAAG,WAAW,CAC/D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,aAAa,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,CAAC;AAEd;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACnD,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CAChC,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,IAAI,yDAAoD,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"Text.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAqB;AAElD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAE1C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,CACtC,MAAM,GAAG,yBAAyB,GAAG,WAAW,GAAG,WAAW,CAC/D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,aAAa,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,CAAC;AAEd;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACnD,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/B,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;CACxD,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,IAAI,yDAAoD,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC"}
@@ -8,6 +8,7 @@ const TYPE = 'Text';
8
8
  * @param props.color - The color of the text.
9
9
  * @param props.children - The text to display.
10
10
  * @param props.size - The size of the text. Defaults to `md`.
11
+ * @param props.fontWeight - The font weight of the text. Defaults to `regular`.
11
12
  * @returns A text element.
12
13
  * @example
13
14
  * <Text>
@@ -21,6 +22,10 @@ const TYPE = 'Text';
21
22
  * <Text size="sm">
22
23
  * Hello <Bold>world</Bold>!
23
24
  * </Text>
25
+ * @example
26
+ * <Text fontWeight="medium">
27
+ * Hello <Bold>world</Bold>!
28
+ * </Text>
24
29
  */
25
30
  export const Text = createSnapComponent(TYPE);
26
31
  //# sourceMappingURL=Text.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Text.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAsCnD,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,mBAAmB,CAAyB,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren } from '../component';\nimport { createSnapComponent } from '../component';\nimport type { StandardFormattingElement } from './formatting';\nimport type { IconElement } from './Icon';\nimport type { LinkElement } from './Link';\n\n/**\n * The children of the {@link Text} component.\n */\nexport type TextChildren = SnapsChildren<\n string | StandardFormattingElement | LinkElement | IconElement\n>;\n\n/**\n * The colors available to the Text {@link Text} component.\n */\nexport type TextColors =\n | 'default'\n | 'alternative'\n | 'muted'\n | 'error'\n | 'success'\n | 'warning';\n\n/**\n * The props of the {@link Text} component.\n *\n * @property children - The text to display.\n * @property alignment - The alignment of the text.\n * @property color - The color of the text.\n * @property size - The size of the text. Defaults to `md`.\n */\nexport type TextProps = {\n children: TextChildren;\n alignment?: 'start' | 'center' | 'end' | undefined;\n color?: TextColors | undefined;\n size?: 'sm' | 'md' | undefined;\n};\n\nconst TYPE = 'Text';\n\n/**\n * A text component, which is used to display text.\n *\n * @param props - The props of the component.\n * @param props.alignment - The alignment of the text.\n * @param props.color - The color of the text.\n * @param props.children - The text to display.\n * @param props.size - The size of the text. Defaults to `md`.\n * @returns A text element.\n * @example\n * <Text>\n * Hello <Bold>world</Bold>!\n * </Text>\n * @example\n * <Text alignment=\"end\">\n * Hello <Bold>world</Bold>!\n * </Text>\n * @example\n * <Text size=\"sm\">\n * Hello <Bold>world</Bold>!\n * </Text>\n */\nexport const Text = createSnapComponent<TextProps, typeof TYPE>(TYPE);\n\n/**\n * A text element.\n *\n * @see Text\n */\nexport type TextElement = ReturnType<typeof Text>;\n"]}
1
+ {"version":3,"file":"Text.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Text.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAwCnD,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,mBAAmB,CAAyB,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren } from '../component';\nimport { createSnapComponent } from '../component';\nimport type { StandardFormattingElement } from './formatting';\nimport type { IconElement } from './Icon';\nimport type { LinkElement } from './Link';\n\n/**\n * The children of the {@link Text} component.\n */\nexport type TextChildren = SnapsChildren<\n string | StandardFormattingElement | LinkElement | IconElement\n>;\n\n/**\n * The colors available to the Text {@link Text} component.\n */\nexport type TextColors =\n | 'default'\n | 'alternative'\n | 'muted'\n | 'error'\n | 'success'\n | 'warning';\n\n/**\n * The props of the {@link Text} component.\n *\n * @property children - The text to display.\n * @property alignment - The alignment of the text.\n * @property color - The color of the text.\n * @property size - The size of the text. Defaults to `md`.\n * @property fontWeight - The font weight of the text. Defaults to `regular`.\n */\nexport type TextProps = {\n children: TextChildren;\n alignment?: 'start' | 'center' | 'end' | undefined;\n color?: TextColors | undefined;\n size?: 'sm' | 'md' | undefined;\n fontWeight?: 'regular' | 'medium' | 'bold' | undefined;\n};\n\nconst TYPE = 'Text';\n\n/**\n * A text component, which is used to display text.\n *\n * @param props - The props of the component.\n * @param props.alignment - The alignment of the text.\n * @param props.color - The color of the text.\n * @param props.children - The text to display.\n * @param props.size - The size of the text. Defaults to `md`.\n * @param props.fontWeight - The font weight of the text. Defaults to `regular`.\n * @returns A text element.\n * @example\n * <Text>\n * Hello <Bold>world</Bold>!\n * </Text>\n * @example\n * <Text alignment=\"end\">\n * Hello <Bold>world</Bold>!\n * </Text>\n * @example\n * <Text size=\"sm\">\n * Hello <Bold>world</Bold>!\n * </Text>\n * @example\n * <Text fontWeight=\"medium\">\n * Hello <Bold>world</Bold>!\n * </Text>\n */\nexport const Text = createSnapComponent<TextProps, typeof TYPE>(TYPE);\n\n/**\n * A text element.\n *\n * @see Text\n */\nexport type TextElement = ReturnType<typeof Text>;\n"]}
@@ -16,6 +16,8 @@ const TYPE = 'Value';
16
16
  * @returns A value element.
17
17
  * @example
18
18
  * <Value value="0.05 ETH" extra="$200" />
19
+ * @example
20
+ * <Value value={<Text color='error'>0.05 ETH</Text>} extra={<Text color='error'>$200</Text>} />
19
21
  */
20
22
  exports.Value = (0, component_1.createSnapComponent)(TYPE);
21
23
  //# sourceMappingURL=Value.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Value.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Value.ts"],"names":[],"mappings":";;;AAAA,gDAAmD;AAanD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;GAaG;AACU,QAAA,KAAK,GAAG,IAAA,+BAAmB,EAA0B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Value} component.\n *\n * @property value - The value shown on the right side.\n * @property extra - The extra text shown on the left side.\n */\nexport type ValueProps = {\n value: string;\n extra: string;\n};\n\nconst TYPE = 'Value';\n\n/**\n * A value component, which can be used to display two different text values side by side.\n *\n * This component can only be used as a child of the {@link Row} component.\n *\n * This component does not accept any children.\n *\n * @param props - The props of the component.\n * @param props.value - The value shown on the right side.\n * @param props.extra - The extra text shown on the left side.\n * @returns A value element.\n * @example\n * <Value value=\"0.05 ETH\" extra=\"$200\" />\n */\nexport const Value = createSnapComponent<ValueProps, typeof TYPE>(TYPE);\n\n/**\n * A value element.\n *\n * @see Value\n */\nexport type ValueElement = ReturnType<typeof Value>;\n"]}
1
+ {"version":3,"file":"Value.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Value.ts"],"names":[],"mappings":";;;AAAA,gDAAmD;AAcnD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;;;GAeG;AACU,QAAA,KAAK,GAAG,IAAA,+BAAmB,EAA0B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../component';\nimport type { TextElement } from './Text';\n\n/**\n * The props of the {@link Value} component.\n *\n * @property value - The value shown on the right side.\n * @property extra - The extra text shown on the left side.\n */\nexport type ValueProps = {\n value: TextElement | string;\n extra: TextElement | string;\n};\n\nconst TYPE = 'Value';\n\n/**\n * A value component, which can be used to display two different text values side by side.\n *\n * This component can only be used as a child of the {@link Row} component.\n *\n * This component does not accept any children.\n *\n * @param props - The props of the component.\n * @param props.value - The value shown on the right side.\n * @param props.extra - The extra text shown on the left side.\n * @returns A value element.\n * @example\n * <Value value=\"0.05 ETH\" extra=\"$200\" />\n * @example\n * <Value value={<Text color='error'>0.05 ETH</Text>} extra={<Text color='error'>$200</Text>} />\n */\nexport const Value = createSnapComponent<ValueProps, typeof TYPE>(TYPE);\n\n/**\n * A value element.\n *\n * @see Value\n */\nexport type ValueElement = ReturnType<typeof Value>;\n"]}
@@ -1,3 +1,4 @@
1
+ import type { TextElement } from "./Text.cjs";
1
2
  /**
2
3
  * The props of the {@link Value} component.
3
4
  *
@@ -5,8 +6,8 @@
5
6
  * @property extra - The extra text shown on the left side.
6
7
  */
7
8
  export type ValueProps = {
8
- value: string;
9
- extra: string;
9
+ value: TextElement | string;
10
+ extra: TextElement | string;
10
11
  };
11
12
  /**
12
13
  * A value component, which can be used to display two different text values side by side.
@@ -21,6 +22,8 @@ export type ValueProps = {
21
22
  * @returns A value element.
22
23
  * @example
23
24
  * <Value value="0.05 ETH" extra="$200" />
25
+ * @example
26
+ * <Value value={<Text color='error'>0.05 ETH</Text>} extra={<Text color='error'>$200</Text>} />
24
27
  */
25
28
  export declare const Value: import("../component.cjs").SnapComponent<ValueProps, "Value">;
26
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Value.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Value.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAIF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,KAAK,2DAAqD,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"Value.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/Value.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IAC5B,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;CAC7B,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,KAAK,2DAAqD,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { TextElement } from "./Text.mjs";
1
2
  /**
2
3
  * The props of the {@link Value} component.
3
4
  *
@@ -5,8 +6,8 @@
5
6
  * @property extra - The extra text shown on the left side.
6
7
  */
7
8
  export type ValueProps = {
8
- value: string;
9
- extra: string;
9
+ value: TextElement | string;
10
+ extra: TextElement | string;
10
11
  };
11
12
  /**
12
13
  * A value component, which can be used to display two different text values side by side.
@@ -21,6 +22,8 @@ export type ValueProps = {
21
22
  * @returns A value element.
22
23
  * @example
23
24
  * <Value value="0.05 ETH" extra="$200" />
25
+ * @example
26
+ * <Value value={<Text color='error'>0.05 ETH</Text>} extra={<Text color='error'>$200</Text>} />
24
27
  */
25
28
  export declare const Value: import("../component.mjs").SnapComponent<ValueProps, "Value">;
26
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Value.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Value.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAIF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,KAAK,2DAAqD,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"Value.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/Value.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IAC5B,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;CAC7B,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,KAAK,2DAAqD,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC"}
@@ -13,6 +13,8 @@ const TYPE = 'Value';
13
13
  * @returns A value element.
14
14
  * @example
15
15
  * <Value value="0.05 ETH" extra="$200" />
16
+ * @example
17
+ * <Value value={<Text color='error'>0.05 ETH</Text>} extra={<Text color='error'>$200</Text>} />
16
18
  */
17
19
  export const Value = createSnapComponent(TYPE);
18
20
  //# sourceMappingURL=Value.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Value.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAanD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,mBAAmB,CAA0B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Value} component.\n *\n * @property value - The value shown on the right side.\n * @property extra - The extra text shown on the left side.\n */\nexport type ValueProps = {\n value: string;\n extra: string;\n};\n\nconst TYPE = 'Value';\n\n/**\n * A value component, which can be used to display two different text values side by side.\n *\n * This component can only be used as a child of the {@link Row} component.\n *\n * This component does not accept any children.\n *\n * @param props - The props of the component.\n * @param props.value - The value shown on the right side.\n * @param props.extra - The extra text shown on the left side.\n * @returns A value element.\n * @example\n * <Value value=\"0.05 ETH\" extra=\"$200\" />\n */\nexport const Value = createSnapComponent<ValueProps, typeof TYPE>(TYPE);\n\n/**\n * A value element.\n *\n * @see Value\n */\nexport type ValueElement = ReturnType<typeof Value>;\n"]}
1
+ {"version":3,"file":"Value.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAcnD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,mBAAmB,CAA0B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../component';\nimport type { TextElement } from './Text';\n\n/**\n * The props of the {@link Value} component.\n *\n * @property value - The value shown on the right side.\n * @property extra - The extra text shown on the left side.\n */\nexport type ValueProps = {\n value: TextElement | string;\n extra: TextElement | string;\n};\n\nconst TYPE = 'Value';\n\n/**\n * A value component, which can be used to display two different text values side by side.\n *\n * This component can only be used as a child of the {@link Row} component.\n *\n * This component does not accept any children.\n *\n * @param props - The props of the component.\n * @param props.value - The value shown on the right side.\n * @param props.extra - The extra text shown on the left side.\n * @returns A value element.\n * @example\n * <Value value=\"0.05 ETH\" extra=\"$200\" />\n * @example\n * <Value value={<Text color='error'>0.05 ETH</Text>} extra={<Text color='error'>$200</Text>} />\n */\nexport const Value = createSnapComponent<ValueProps, typeof TYPE>(TYPE);\n\n/**\n * A value element.\n *\n * @see Value\n */\nexport type ValueElement = ReturnType<typeof Value>;\n"]}