@metamask/snaps-sdk 6.13.0 → 6.14.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 (70) hide show
  1. package/CHANGELOG.md +16 -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/Text.cjs +5 -0
  15. package/dist/jsx/components/Text.cjs.map +1 -1
  16. package/dist/jsx/components/Text.d.cts +7 -0
  17. package/dist/jsx/components/Text.d.cts.map +1 -1
  18. package/dist/jsx/components/Text.d.mts +7 -0
  19. package/dist/jsx/components/Text.d.mts.map +1 -1
  20. package/dist/jsx/components/Text.mjs +5 -0
  21. package/dist/jsx/components/Text.mjs.map +1 -1
  22. package/dist/jsx/components/form/Button.cjs.map +1 -1
  23. package/dist/jsx/components/form/Button.d.cts +4 -0
  24. package/dist/jsx/components/form/Button.d.cts.map +1 -1
  25. package/dist/jsx/components/form/Button.d.mts +4 -0
  26. package/dist/jsx/components/form/Button.d.mts.map +1 -1
  27. package/dist/jsx/components/form/Button.mjs.map +1 -1
  28. package/dist/jsx/components/index.cjs +1 -0
  29. package/dist/jsx/components/index.cjs.map +1 -1
  30. package/dist/jsx/components/index.d.cts +3 -1
  31. package/dist/jsx/components/index.d.cts.map +1 -1
  32. package/dist/jsx/components/index.d.mts +3 -1
  33. package/dist/jsx/components/index.d.mts.map +1 -1
  34. package/dist/jsx/components/index.mjs +1 -0
  35. package/dist/jsx/components/index.mjs.map +1 -1
  36. package/dist/jsx/validation.cjs +39 -8
  37. package/dist/jsx/validation.cjs.map +1 -1
  38. package/dist/jsx/validation.d.cts +8 -4
  39. package/dist/jsx/validation.d.cts.map +1 -1
  40. package/dist/jsx/validation.d.mts +8 -4
  41. package/dist/jsx/validation.d.mts.map +1 -1
  42. package/dist/jsx/validation.mjs +38 -7
  43. package/dist/jsx/validation.mjs.map +1 -1
  44. package/dist/types/handlers/index.cjs +1 -0
  45. package/dist/types/handlers/index.cjs.map +1 -1
  46. package/dist/types/handlers/index.d.cts +1 -0
  47. package/dist/types/handlers/index.d.cts.map +1 -1
  48. package/dist/types/handlers/index.d.mts +1 -0
  49. package/dist/types/handlers/index.d.mts.map +1 -1
  50. package/dist/types/handlers/index.mjs +1 -0
  51. package/dist/types/handlers/index.mjs.map +1 -1
  52. package/dist/types/handlers/settings-page.cjs +3 -0
  53. package/dist/types/handlers/settings-page.cjs.map +1 -0
  54. package/dist/types/handlers/settings-page.d.cts +23 -0
  55. package/dist/types/handlers/settings-page.d.cts.map +1 -0
  56. package/dist/types/handlers/settings-page.d.mts +23 -0
  57. package/dist/types/handlers/settings-page.d.mts.map +1 -0
  58. package/dist/types/handlers/settings-page.mjs +2 -0
  59. package/dist/types/handlers/settings-page.mjs.map +1 -0
  60. package/dist/types/interface.d.cts +1 -1
  61. package/dist/types/interface.d.cts.map +1 -1
  62. package/dist/types/interface.d.mts +1 -1
  63. package/dist/types/interface.d.mts.map +1 -1
  64. package/dist/types/permissions.cjs.map +1 -1
  65. package/dist/types/permissions.d.cts +3 -0
  66. package/dist/types/permissions.d.cts.map +1 -1
  67. package/dist/types/permissions.d.mts +3 -0
  68. package/dist/types/permissions.d.mts.map +1 -1
  69. package/dist/types/permissions.mjs.map +1 -1
  70. package/package.json +1 -1
@@ -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 "__#182463@#code": number;
19
+ readonly "__#182463@#message": string;
20
+ readonly "__#182463@#data"?: Record<string, Json> | undefined;
21
+ readonly "__#182463@#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 "__#182463@#code": number;
33
+ readonly "__#182463@#message": string;
34
+ readonly "__#182463@#data"?: Record<string, Json> | undefined;
35
+ readonly "__#182463@#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 "__#182463@#code": number;
47
+ readonly "__#182463@#message": string;
48
+ readonly "__#182463@#data"?: Record<string, Json> | undefined;
49
+ readonly "__#182463@#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 "__#91233@#code": number;
19
+ readonly "__#91233@#message": string;
20
+ readonly "__#91233@#data"?: Record<string, Json> | undefined;
21
+ readonly "__#91233@#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 "__#91233@#code": number;
33
+ readonly "__#91233@#message": string;
34
+ readonly "__#91233@#data"?: Record<string, Json> | undefined;
35
+ readonly "__#91233@#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 "__#91233@#code": number;
47
+ readonly "__#91233@#message": string;
48
+ readonly "__#91233@#data"?: Record<string, Json> | undefined;
49
+ readonly "__#91233@#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"]}
@@ -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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Button.ts"],"names":[],"mappings":";;;AACA,mDAAsD;AA4BtD,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;GASG;AACU,QAAA,MAAM,GAAG,IAAA,+BAAmB,EAA2B,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren, StringElement } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { IconElement } from '../Icon';\nimport type { ImageElement } from '../Image';\n\n// TODO: Add the `onClick` prop to the `ButtonProps` type.\n\n/**\n * The props of the {@link Button} component.\n *\n * @property children - The text to display on the button.\n * @property name - The name of the button. This is used to identify the button\n * in the event handler.\n * @property type - The type of the button, i.e., `'button'` or `'submit'`.\n * Defaults to `'button'`.\n * @property variant - The variant of the button, i.e., `'primary'` or\n * `'destructive'`. Defaults to `'primary'`.\n * @property disabled - Whether the button is disabled. Defaults to `false`.\n * @property form - The name of the form component to associate the button with.\n */\nexport type ButtonProps = {\n children: SnapsChildren<StringElement | IconElement | ImageElement>;\n name?: string | undefined;\n type?: 'button' | 'submit' | undefined;\n variant?: 'primary' | 'destructive' | undefined;\n disabled?: boolean | undefined;\n form?: string | undefined;\n};\n\nconst TYPE = 'Button';\n\n/**\n * A button component, which is used to create a clickable button.\n *\n * @param props - The props of the component.\n * @param props.children - The text to display on the button. This should be a\n * string or an array of strings.\n * @returns A button element.\n * @example\n * <Button name=\"my-button\">Click me</Button>\n */\nexport const Button = createSnapComponent<ButtonProps, typeof TYPE>(TYPE);\n\n/**\n * A button element.\n *\n * @see Button\n */\nexport type ButtonElement = ReturnType<typeof Button>;\n"]}
1
+ {"version":3,"file":"Button.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Button.ts"],"names":[],"mappings":";;;AACA,mDAAsD;AAgCtD,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;GASG;AACU,QAAA,MAAM,GAAG,IAAA,+BAAmB,EAA2B,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren, StringElement } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { IconElement } from '../Icon';\nimport type { ImageElement } from '../Image';\n\n// TODO: Add the `onClick` prop to the `ButtonProps` type.\n\n/**\n * The props of the {@link Button} component.\n *\n * @property children - The text to display on the button.\n * @property name - The name of the button. This is used to identify the button\n * in the event handler.\n * @property type - The type of the button, i.e., `'button'` or `'submit'`.\n * Defaults to `'button'`.\n * @property variant - The variant of the button, i.e., `'primary'` or\n * `'destructive'`. Defaults to `'primary'`.\n * @property size - The size of the button. Defaults to `md`.\n * @property disabled - Whether the button is disabled. Defaults to `false`.\n * @property loading - Whether the button is loading. Defaults to `false`.\n * @property form - The name of the form component to associate the button with.\n */\nexport type ButtonProps = {\n children: SnapsChildren<StringElement | IconElement | ImageElement>;\n name?: string | undefined;\n type?: 'button' | 'submit' | undefined;\n variant?: 'primary' | 'destructive' | undefined;\n size?: 'sm' | 'md' | undefined;\n disabled?: boolean | undefined;\n loading?: boolean | undefined;\n form?: string | undefined;\n};\n\nconst TYPE = 'Button';\n\n/**\n * A button component, which is used to create a clickable button.\n *\n * @param props - The props of the component.\n * @param props.children - The text to display on the button. This should be a\n * string or an array of strings.\n * @returns A button element.\n * @example\n * <Button name=\"my-button\">Click me</Button>\n */\nexport const Button = createSnapComponent<ButtonProps, typeof TYPE>(TYPE);\n\n/**\n * A button element.\n *\n * @see Button\n */\nexport type ButtonElement = ReturnType<typeof Button>;\n"]}
@@ -11,7 +11,9 @@ import type { ImageElement } from "../Image.cjs";
11
11
  * Defaults to `'button'`.
12
12
  * @property variant - The variant of the button, i.e., `'primary'` or
13
13
  * `'destructive'`. Defaults to `'primary'`.
14
+ * @property size - The size of the button. Defaults to `md`.
14
15
  * @property disabled - Whether the button is disabled. Defaults to `false`.
16
+ * @property loading - Whether the button is loading. Defaults to `false`.
15
17
  * @property form - The name of the form component to associate the button with.
16
18
  */
17
19
  export type ButtonProps = {
@@ -19,7 +21,9 @@ export type ButtonProps = {
19
21
  name?: string | undefined;
20
22
  type?: 'button' | 'submit' | undefined;
21
23
  variant?: 'primary' | 'destructive' | undefined;
24
+ size?: 'sm' | 'md' | undefined;
22
25
  disabled?: boolean | undefined;
26
+ loading?: boolean | undefined;
23
27
  form?: string | undefined;
24
28
  };
25
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,4BAAwB;AAEpE,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAgB;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAiB;AAI7C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,aAAa,CAAC,aAAa,GAAG,WAAW,GAAG,YAAY,CAAC,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACvC,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAIF;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,gEAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"Button.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,4BAAwB;AAEpE,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAgB;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAiB;AAI7C;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,aAAa,CAAC,aAAa,GAAG,WAAW,GAAG,YAAY,CAAC,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACvC,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC;IAChD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAIF;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,gEAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -11,7 +11,9 @@ import type { ImageElement } from "../Image.mjs";
11
11
  * Defaults to `'button'`.
12
12
  * @property variant - The variant of the button, i.e., `'primary'` or
13
13
  * `'destructive'`. Defaults to `'primary'`.
14
+ * @property size - The size of the button. Defaults to `md`.
14
15
  * @property disabled - Whether the button is disabled. Defaults to `false`.
16
+ * @property loading - Whether the button is loading. Defaults to `false`.
15
17
  * @property form - The name of the form component to associate the button with.
16
18
  */
17
19
  export type ButtonProps = {
@@ -19,7 +21,9 @@ export type ButtonProps = {
19
21
  name?: string | undefined;
20
22
  type?: 'button' | 'submit' | undefined;
21
23
  variant?: 'primary' | 'destructive' | undefined;
24
+ size?: 'sm' | 'md' | undefined;
22
25
  disabled?: boolean | undefined;
26
+ loading?: boolean | undefined;
23
27
  form?: string | undefined;
24
28
  };
25
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,4BAAwB;AAEpE,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAgB;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAiB;AAI7C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,aAAa,CAAC,aAAa,GAAG,WAAW,GAAG,YAAY,CAAC,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACvC,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAIF;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,gEAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"Button.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,4BAAwB;AAEpE,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAgB;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAiB;AAI7C;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,aAAa,CAAC,aAAa,GAAG,WAAW,GAAG,YAAY,CAAC,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACvC,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC;IAChD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAIF;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,gEAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Button.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AA4BtD,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,mBAAmB,CAA2B,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren, StringElement } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { IconElement } from '../Icon';\nimport type { ImageElement } from '../Image';\n\n// TODO: Add the `onClick` prop to the `ButtonProps` type.\n\n/**\n * The props of the {@link Button} component.\n *\n * @property children - The text to display on the button.\n * @property name - The name of the button. This is used to identify the button\n * in the event handler.\n * @property type - The type of the button, i.e., `'button'` or `'submit'`.\n * Defaults to `'button'`.\n * @property variant - The variant of the button, i.e., `'primary'` or\n * `'destructive'`. Defaults to `'primary'`.\n * @property disabled - Whether the button is disabled. Defaults to `false`.\n * @property form - The name of the form component to associate the button with.\n */\nexport type ButtonProps = {\n children: SnapsChildren<StringElement | IconElement | ImageElement>;\n name?: string | undefined;\n type?: 'button' | 'submit' | undefined;\n variant?: 'primary' | 'destructive' | undefined;\n disabled?: boolean | undefined;\n form?: string | undefined;\n};\n\nconst TYPE = 'Button';\n\n/**\n * A button component, which is used to create a clickable button.\n *\n * @param props - The props of the component.\n * @param props.children - The text to display on the button. This should be a\n * string or an array of strings.\n * @returns A button element.\n * @example\n * <Button name=\"my-button\">Click me</Button>\n */\nexport const Button = createSnapComponent<ButtonProps, typeof TYPE>(TYPE);\n\n/**\n * A button element.\n *\n * @see Button\n */\nexport type ButtonElement = ReturnType<typeof Button>;\n"]}
1
+ {"version":3,"file":"Button.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Button.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAgCtD,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,mBAAmB,CAA2B,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren, StringElement } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { IconElement } from '../Icon';\nimport type { ImageElement } from '../Image';\n\n// TODO: Add the `onClick` prop to the `ButtonProps` type.\n\n/**\n * The props of the {@link Button} component.\n *\n * @property children - The text to display on the button.\n * @property name - The name of the button. This is used to identify the button\n * in the event handler.\n * @property type - The type of the button, i.e., `'button'` or `'submit'`.\n * Defaults to `'button'`.\n * @property variant - The variant of the button, i.e., `'primary'` or\n * `'destructive'`. Defaults to `'primary'`.\n * @property size - The size of the button. Defaults to `md`.\n * @property disabled - Whether the button is disabled. Defaults to `false`.\n * @property loading - Whether the button is loading. Defaults to `false`.\n * @property form - The name of the form component to associate the button with.\n */\nexport type ButtonProps = {\n children: SnapsChildren<StringElement | IconElement | ImageElement>;\n name?: string | undefined;\n type?: 'button' | 'submit' | undefined;\n variant?: 'primary' | 'destructive' | undefined;\n size?: 'sm' | 'md' | undefined;\n disabled?: boolean | undefined;\n loading?: boolean | undefined;\n form?: string | undefined;\n};\n\nconst TYPE = 'Button';\n\n/**\n * A button component, which is used to create a clickable button.\n *\n * @param props - The props of the component.\n * @param props.children - The text to display on the button. This should be a\n * string or an array of strings.\n * @returns A button element.\n * @example\n * <Button name=\"my-button\">Click me</Button>\n */\nexport const Button = createSnapComponent<ButtonProps, typeof TYPE>(TYPE);\n\n/**\n * A button element.\n *\n * @see Button\n */\nexport type ButtonElement = ReturnType<typeof Button>;\n"]}
@@ -34,4 +34,5 @@ __exportStar(require("./Tooltip.cjs"), exports);
34
34
  __exportStar(require("./Footer.cjs"), exports);
35
35
  __exportStar(require("./Container.cjs"), exports);
36
36
  __exportStar(require("./Section.cjs"), exports);
37
+ __exportStar(require("./Banner.cjs"), exports);
37
38
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/jsx/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAqBA,mDAAuB;AACvB,yDAA6B;AAC7B,gDAA0B;AAC1B,+CAAyB;AACzB,4CAAsB;AACtB,6CAAuB;AACvB,iDAA2B;AAC3B,gDAA0B;AAC1B,8CAAwB;AACxB,gDAA0B;AAC1B,6CAAuB;AACvB,8CAAwB;AACxB,6CAAuB;AACvB,4CAAsB;AACtB,gDAA0B;AAC1B,6CAAuB;AACvB,gDAA0B;AAC1B,+CAAyB;AACzB,kDAA4B;AAC5B,gDAA0B","sourcesContent":["import type { AddressElement } from './Address';\nimport type { AvatarElement } from './Avatar';\nimport type { BoxElement } from './Box';\nimport type { CardElement } from './Card';\nimport type { ContainerElement } from './Container';\nimport type { CopyableElement } from './Copyable';\nimport type { DividerElement } from './Divider';\nimport type { FooterElement } from './Footer';\nimport type { StandardFormElement } from './form';\nimport type { StandardFormattingElement } from './formatting';\nimport type { HeadingElement } from './Heading';\nimport type { IconElement } from './Icon';\nimport type { ImageElement } from './Image';\nimport type { LinkElement } from './Link';\nimport type { RowElement } from './Row';\nimport type { SectionElement } from './Section';\nimport type { SpinnerElement } from './Spinner';\nimport type { TextElement } from './Text';\nimport type { TooltipElement } from './Tooltip';\nimport type { ValueElement } from './Value';\n\nexport * from './form';\nexport * from './formatting';\nexport * from './Address';\nexport * from './Avatar';\nexport * from './Box';\nexport * from './Card';\nexport * from './Copyable';\nexport * from './Divider';\nexport * from './Value';\nexport * from './Heading';\nexport * from './Icon';\nexport * from './Image';\nexport * from './Link';\nexport * from './Row';\nexport * from './Spinner';\nexport * from './Text';\nexport * from './Tooltip';\nexport * from './Footer';\nexport * from './Container';\nexport * from './Section';\n\n/**\n * A built-in JSX element, which can be used in a Snap user interface.\n */\nexport type JSXElement =\n | StandardFormElement\n | StandardFormattingElement\n | AvatarElement\n | AddressElement\n | BoxElement\n | CardElement\n | ContainerElement\n | CopyableElement\n | DividerElement\n | FooterElement\n | ValueElement\n | HeadingElement\n | IconElement\n | ImageElement\n | LinkElement\n | RowElement\n | SectionElement\n | SpinnerElement\n | TextElement\n | TooltipElement;\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/jsx/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAsBA,mDAAuB;AACvB,yDAA6B;AAC7B,gDAA0B;AAC1B,+CAAyB;AACzB,4CAAsB;AACtB,6CAAuB;AACvB,iDAA2B;AAC3B,gDAA0B;AAC1B,8CAAwB;AACxB,gDAA0B;AAC1B,6CAAuB;AACvB,8CAAwB;AACxB,6CAAuB;AACvB,4CAAsB;AACtB,gDAA0B;AAC1B,6CAAuB;AACvB,gDAA0B;AAC1B,+CAAyB;AACzB,kDAA4B;AAC5B,gDAA0B;AAC1B,+CAAyB","sourcesContent":["import type { AddressElement } from './Address';\nimport type { AvatarElement } from './Avatar';\nimport type { BannerElement } from './Banner';\nimport type { BoxElement } from './Box';\nimport type { CardElement } from './Card';\nimport type { ContainerElement } from './Container';\nimport type { CopyableElement } from './Copyable';\nimport type { DividerElement } from './Divider';\nimport type { FooterElement } from './Footer';\nimport type { StandardFormElement } from './form';\nimport type { StandardFormattingElement } from './formatting';\nimport type { HeadingElement } from './Heading';\nimport type { IconElement } from './Icon';\nimport type { ImageElement } from './Image';\nimport type { LinkElement } from './Link';\nimport type { RowElement } from './Row';\nimport type { SectionElement } from './Section';\nimport type { SpinnerElement } from './Spinner';\nimport type { TextElement } from './Text';\nimport type { TooltipElement } from './Tooltip';\nimport type { ValueElement } from './Value';\n\nexport * from './form';\nexport * from './formatting';\nexport * from './Address';\nexport * from './Avatar';\nexport * from './Box';\nexport * from './Card';\nexport * from './Copyable';\nexport * from './Divider';\nexport * from './Value';\nexport * from './Heading';\nexport * from './Icon';\nexport * from './Image';\nexport * from './Link';\nexport * from './Row';\nexport * from './Spinner';\nexport * from './Text';\nexport * from './Tooltip';\nexport * from './Footer';\nexport * from './Container';\nexport * from './Section';\nexport * from './Banner';\n\n/**\n * A built-in JSX element, which can be used in a Snap user interface.\n */\nexport type JSXElement =\n | StandardFormElement\n | StandardFormattingElement\n | AvatarElement\n | AddressElement\n | BoxElement\n | CardElement\n | ContainerElement\n | CopyableElement\n | DividerElement\n | FooterElement\n | ValueElement\n | HeadingElement\n | IconElement\n | ImageElement\n | LinkElement\n | RowElement\n | SectionElement\n | SpinnerElement\n | TextElement\n | TooltipElement\n | BannerElement;\n"]}
@@ -1,5 +1,6 @@
1
1
  import type { AddressElement } from "./Address.cjs";
2
2
  import type { AvatarElement } from "./Avatar.cjs";
3
+ import type { BannerElement } from "./Banner.cjs";
3
4
  import type { BoxElement } from "./Box.cjs";
4
5
  import type { CardElement } from "./Card.cjs";
5
6
  import type { ContainerElement } from "./Container.cjs";
@@ -38,8 +39,9 @@ export * from "./Tooltip.cjs";
38
39
  export * from "./Footer.cjs";
39
40
  export * from "./Container.cjs";
40
41
  export * from "./Section.cjs";
42
+ export * from "./Banner.cjs";
41
43
  /**
42
44
  * A built-in JSX element, which can be used in a Snap user interface.
43
45
  */
44
- export type JSXElement = StandardFormElement | StandardFormattingElement | AvatarElement | AddressElement | BoxElement | CardElement | ContainerElement | CopyableElement | DividerElement | FooterElement | ValueElement | HeadingElement | IconElement | ImageElement | LinkElement | RowElement | SectionElement | SpinnerElement | TextElement | TooltipElement;
46
+ export type JSXElement = StandardFormElement | StandardFormattingElement | AvatarElement | AddressElement | BoxElement | CardElement | ContainerElement | CopyableElement | DividerElement | FooterElement | ValueElement | HeadingElement | IconElement | ImageElement | LinkElement | RowElement | SectionElement | SpinnerElement | TextElement | TooltipElement | BannerElement;
45
47
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAc;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAoB;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAe;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAc;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAE5C,iCAAuB;AACvB,uCAA6B;AAC7B,8BAA0B;AAC1B,6BAAyB;AACzB,0BAAsB;AACtB,2BAAuB;AACvB,+BAA2B;AAC3B,8BAA0B;AAC1B,4BAAwB;AACxB,8BAA0B;AAC1B,2BAAuB;AACvB,4BAAwB;AACxB,2BAAuB;AACvB,0BAAsB;AACtB,8BAA0B;AAC1B,2BAAuB;AACvB,8BAA0B;AAC1B,6BAAyB;AACzB,gCAA4B;AAC5B,8BAA0B;AAE1B;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,mBAAmB,GACnB,yBAAyB,GACzB,aAAa,GACb,cAAc,GACd,UAAU,GACV,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,aAAa,GACb,YAAY,GACZ,cAAc,GACd,WAAW,GACX,YAAY,GACZ,WAAW,GACX,UAAU,GACV,cAAc,GACd,cAAc,GACd,WAAW,GACX,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/jsx/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAc;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAoB;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAe;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAc;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAE5C,iCAAuB;AACvB,uCAA6B;AAC7B,8BAA0B;AAC1B,6BAAyB;AACzB,0BAAsB;AACtB,2BAAuB;AACvB,+BAA2B;AAC3B,8BAA0B;AAC1B,4BAAwB;AACxB,8BAA0B;AAC1B,2BAAuB;AACvB,4BAAwB;AACxB,2BAAuB;AACvB,0BAAsB;AACtB,8BAA0B;AAC1B,2BAAuB;AACvB,8BAA0B;AAC1B,6BAAyB;AACzB,gCAA4B;AAC5B,8BAA0B;AAC1B,6BAAyB;AAEzB;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,mBAAmB,GACnB,yBAAyB,GACzB,aAAa,GACb,cAAc,GACd,UAAU,GACV,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,aAAa,GACb,YAAY,GACZ,cAAc,GACd,WAAW,GACX,YAAY,GACZ,WAAW,GACX,UAAU,GACV,cAAc,GACd,cAAc,GACd,WAAW,GACX,cAAc,GACd,aAAa,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { AddressElement } from "./Address.mjs";
2
2
  import type { AvatarElement } from "./Avatar.mjs";
3
+ import type { BannerElement } from "./Banner.mjs";
3
4
  import type { BoxElement } from "./Box.mjs";
4
5
  import type { CardElement } from "./Card.mjs";
5
6
  import type { ContainerElement } from "./Container.mjs";
@@ -38,8 +39,9 @@ export * from "./Tooltip.mjs";
38
39
  export * from "./Footer.mjs";
39
40
  export * from "./Container.mjs";
40
41
  export * from "./Section.mjs";
42
+ export * from "./Banner.mjs";
41
43
  /**
42
44
  * A built-in JSX element, which can be used in a Snap user interface.
43
45
  */
44
- export type JSXElement = StandardFormElement | StandardFormattingElement | AvatarElement | AddressElement | BoxElement | CardElement | ContainerElement | CopyableElement | DividerElement | FooterElement | ValueElement | HeadingElement | IconElement | ImageElement | LinkElement | RowElement | SectionElement | SpinnerElement | TextElement | TooltipElement;
46
+ export type JSXElement = StandardFormElement | StandardFormattingElement | AvatarElement | AddressElement | BoxElement | CardElement | ContainerElement | CopyableElement | DividerElement | FooterElement | ValueElement | HeadingElement | IconElement | ImageElement | LinkElement | RowElement | SectionElement | SpinnerElement | TextElement | TooltipElement | BannerElement;
45
47
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAc;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAoB;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAe;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAc;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAE5C,iCAAuB;AACvB,uCAA6B;AAC7B,8BAA0B;AAC1B,6BAAyB;AACzB,0BAAsB;AACtB,2BAAuB;AACvB,+BAA2B;AAC3B,8BAA0B;AAC1B,4BAAwB;AACxB,8BAA0B;AAC1B,2BAAuB;AACvB,4BAAwB;AACxB,2BAAuB;AACvB,0BAAsB;AACtB,8BAA0B;AAC1B,2BAAuB;AACvB,8BAA0B;AAC1B,6BAAyB;AACzB,gCAA4B;AAC5B,8BAA0B;AAE1B;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,mBAAmB,GACnB,yBAAyB,GACzB,aAAa,GACb,cAAc,GACd,UAAU,GACV,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,aAAa,GACb,YAAY,GACZ,cAAc,GACd,WAAW,GACX,YAAY,GACZ,WAAW,GACX,UAAU,GACV,cAAc,GACd,cAAc,GACd,WAAW,GACX,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/jsx/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAc;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAoB;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAmB;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAiB;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAe;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,+BAAqB;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAc;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAe;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAkB;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAE5C,iCAAuB;AACvB,uCAA6B;AAC7B,8BAA0B;AAC1B,6BAAyB;AACzB,0BAAsB;AACtB,2BAAuB;AACvB,+BAA2B;AAC3B,8BAA0B;AAC1B,4BAAwB;AACxB,8BAA0B;AAC1B,2BAAuB;AACvB,4BAAwB;AACxB,2BAAuB;AACvB,0BAAsB;AACtB,8BAA0B;AAC1B,2BAAuB;AACvB,8BAA0B;AAC1B,6BAAyB;AACzB,gCAA4B;AAC5B,8BAA0B;AAC1B,6BAAyB;AAEzB;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,mBAAmB,GACnB,yBAAyB,GACzB,aAAa,GACb,cAAc,GACd,UAAU,GACV,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,aAAa,GACb,YAAY,GACZ,cAAc,GACd,WAAW,GACX,YAAY,GACZ,WAAW,GACX,UAAU,GACV,cAAc,GACd,cAAc,GACd,WAAW,GACX,cAAc,GACd,aAAa,CAAC"}
@@ -18,4 +18,5 @@ export * from "./Tooltip.mjs";
18
18
  export * from "./Footer.mjs";
19
19
  export * from "./Container.mjs";
20
20
  export * from "./Section.mjs";
21
+ export * from "./Banner.mjs";
21
22
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/jsx/components/index.ts"],"names":[],"mappings":"AAqBA,iCAAuB;AACvB,uCAA6B;AAC7B,8BAA0B;AAC1B,6BAAyB;AACzB,0BAAsB;AACtB,2BAAuB;AACvB,+BAA2B;AAC3B,8BAA0B;AAC1B,4BAAwB;AACxB,8BAA0B;AAC1B,2BAAuB;AACvB,4BAAwB;AACxB,2BAAuB;AACvB,0BAAsB;AACtB,8BAA0B;AAC1B,2BAAuB;AACvB,8BAA0B;AAC1B,6BAAyB;AACzB,gCAA4B;AAC5B,8BAA0B","sourcesContent":["import type { AddressElement } from './Address';\nimport type { AvatarElement } from './Avatar';\nimport type { BoxElement } from './Box';\nimport type { CardElement } from './Card';\nimport type { ContainerElement } from './Container';\nimport type { CopyableElement } from './Copyable';\nimport type { DividerElement } from './Divider';\nimport type { FooterElement } from './Footer';\nimport type { StandardFormElement } from './form';\nimport type { StandardFormattingElement } from './formatting';\nimport type { HeadingElement } from './Heading';\nimport type { IconElement } from './Icon';\nimport type { ImageElement } from './Image';\nimport type { LinkElement } from './Link';\nimport type { RowElement } from './Row';\nimport type { SectionElement } from './Section';\nimport type { SpinnerElement } from './Spinner';\nimport type { TextElement } from './Text';\nimport type { TooltipElement } from './Tooltip';\nimport type { ValueElement } from './Value';\n\nexport * from './form';\nexport * from './formatting';\nexport * from './Address';\nexport * from './Avatar';\nexport * from './Box';\nexport * from './Card';\nexport * from './Copyable';\nexport * from './Divider';\nexport * from './Value';\nexport * from './Heading';\nexport * from './Icon';\nexport * from './Image';\nexport * from './Link';\nexport * from './Row';\nexport * from './Spinner';\nexport * from './Text';\nexport * from './Tooltip';\nexport * from './Footer';\nexport * from './Container';\nexport * from './Section';\n\n/**\n * A built-in JSX element, which can be used in a Snap user interface.\n */\nexport type JSXElement =\n | StandardFormElement\n | StandardFormattingElement\n | AvatarElement\n | AddressElement\n | BoxElement\n | CardElement\n | ContainerElement\n | CopyableElement\n | DividerElement\n | FooterElement\n | ValueElement\n | HeadingElement\n | IconElement\n | ImageElement\n | LinkElement\n | RowElement\n | SectionElement\n | SpinnerElement\n | TextElement\n | TooltipElement;\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/jsx/components/index.ts"],"names":[],"mappings":"AAsBA,iCAAuB;AACvB,uCAA6B;AAC7B,8BAA0B;AAC1B,6BAAyB;AACzB,0BAAsB;AACtB,2BAAuB;AACvB,+BAA2B;AAC3B,8BAA0B;AAC1B,4BAAwB;AACxB,8BAA0B;AAC1B,2BAAuB;AACvB,4BAAwB;AACxB,2BAAuB;AACvB,0BAAsB;AACtB,8BAA0B;AAC1B,2BAAuB;AACvB,8BAA0B;AAC1B,6BAAyB;AACzB,gCAA4B;AAC5B,8BAA0B;AAC1B,6BAAyB","sourcesContent":["import type { AddressElement } from './Address';\nimport type { AvatarElement } from './Avatar';\nimport type { BannerElement } from './Banner';\nimport type { BoxElement } from './Box';\nimport type { CardElement } from './Card';\nimport type { ContainerElement } from './Container';\nimport type { CopyableElement } from './Copyable';\nimport type { DividerElement } from './Divider';\nimport type { FooterElement } from './Footer';\nimport type { StandardFormElement } from './form';\nimport type { StandardFormattingElement } from './formatting';\nimport type { HeadingElement } from './Heading';\nimport type { IconElement } from './Icon';\nimport type { ImageElement } from './Image';\nimport type { LinkElement } from './Link';\nimport type { RowElement } from './Row';\nimport type { SectionElement } from './Section';\nimport type { SpinnerElement } from './Spinner';\nimport type { TextElement } from './Text';\nimport type { TooltipElement } from './Tooltip';\nimport type { ValueElement } from './Value';\n\nexport * from './form';\nexport * from './formatting';\nexport * from './Address';\nexport * from './Avatar';\nexport * from './Box';\nexport * from './Card';\nexport * from './Copyable';\nexport * from './Divider';\nexport * from './Value';\nexport * from './Heading';\nexport * from './Icon';\nexport * from './Image';\nexport * from './Link';\nexport * from './Row';\nexport * from './Spinner';\nexport * from './Text';\nexport * from './Tooltip';\nexport * from './Footer';\nexport * from './Container';\nexport * from './Section';\nexport * from './Banner';\n\n/**\n * A built-in JSX element, which can be used in a Snap user interface.\n */\nexport type JSXElement =\n | StandardFormElement\n | StandardFormattingElement\n | AvatarElement\n | AddressElement\n | BoxElement\n | CardElement\n | ContainerElement\n | CopyableElement\n | DividerElement\n | FooterElement\n | ValueElement\n | HeadingElement\n | IconElement\n | ImageElement\n | LinkElement\n | RowElement\n | SectionElement\n | SpinnerElement\n | TextElement\n | TooltipElement\n | BannerElement;\n"]}